[Galaxy S I9000 Android Development] distortedloop:
Okay, so I answered my own question, and yours in under five minutes by just hooking the phone up to the computer and running adb logcat during a shut down from the hardware shut down button.

I must tell you that the logcat entries kept scrolling by LONG AFTER the phone stopped the shutdown video/music and the screen turned black. It was at least 15-20 seconds longer, but maybe even 30-45; I didn't stopwatch it. This is something people should consider before pulling the battery after turning off the phone; perhaps it's wise to wait at least 30 seconds before doing so.

I pasted all the entries that occurred from the time I pushed the button. I edited out a hundred or so "I/SISODRM ( 2259)" entries as they don't reveal anything and just made it that much longer to read.

I'm no expert, but it seems pretty obvious that the phone's doing all it can to clean up the file system and unmount things. Kind of funny that one of the caches starts trying to write to the sdcard after the phone's unmounted it.

Note that I am not running the mimocan fix that this thread discusses, so my log won't indicate anything being done with the ext4 partition I have on my sdcard which is unused. I am running the RyanZ fix (2-3), and I can't tell if the shutdown does anything to the particular mods that the "fix" makes. (Your thesis might include that even though the phones filesystem shuts itself down that the ext2 mounts don't...?)

Anyways, it would be interesting to see what someone actually running mimocan gets on shutdown logcat. Maybe you should post yours...

D/ShutdownThread( 2259): Notifying thread to start radio shutdown
I/ShutdownThread( 2259): ########POWEROFF START WITH CONFIRM######
D/StatusBar( 2259): manageDisableList what=0x0 pkg=android
D/NotificationService( 2259): onSetDisabled :: mDisabledNotifications = 0
V/AudioHardwareALSA( 2194):
V/AudioHardwareALSA( 2194): ------------------------>>>>>> ALSA OPEN mode 0,device 2
I/AudioHardwareALSA( 2194): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal
D/AudioHardwareALSA( 2194): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 2194): Using 2 channels for PLAYBACK.
D/AudioHardwareALSA( 2194): Set PLAYBACK sample rate to 44100 HZ
D/AudioHardwareALSA( 2194): Buffer size: 4096
D/AudioHardwareALSA( 2194): Latency: 92879
D/dalvikvm( 3038): GC freed 1657 objects / 126368 bytes in 178ms
W/PowerManagerService( 2259): Timer 0x3->0x3|0x1
I/AudioHardwareALSA( 2194): Output standby called!!. Turn off PCM device.
V/InputDevice( 2259): ID[0]=0 Dn (0=>1)
V/WindowManager( 2259): Dsptch 0 x126.0 y205.0 > Window{48055778 paused=false}
V/InputDevice( 2259): ID[0]=0 Up (1=>0)
V/WindowManager( 2259): Dsptch 1 x126.0 y205.0 > Window{48055778 paused=false}
V/AudioHardwareALSA( 2194):
V/AudioHardwareALSA( 2194): ------------------------>>>>>> ALSA OPEN mode 0,device 2
I/ShutdownThread( 2259): Finding sound file : //system/media/audio/ui/shutdown.ogg
I/ShutdownThread( 2259): Sound file found
I/AudioFlinger( 2194): power off stream = 1
I/AudioHardwareALSA( 2194): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal
D/AudioHardwareALSA( 2194): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 2194): Using 2 channels for PLAYBACK.
D/AudioHardwareALSA( 2194): Set PLAYBACK sample rate to 44100 HZ
D/AudioHardwareALSA( 2194): Buffer size: 4096
D/AudioHardwareALSA( 2194): Latency: 92879
D/dalvikvm( 2259): Trying to load lib /system/lib/libdrm2_jni.so 0x0
D/dalvikvm( 2259): Added shared lib /system/lib/libdrm2_jni.so 0x0
I/SISODRM ( 2259): OMADRMManager : IsDrmFileByExt : in
I/SISODRM ( 2259): OMADRMManager : IsDrmFileByExt : out

I/PowerManagerService( 2259): ULight 3->7 f0
I/SISODRM ( 2259): OMADRMManager : IsDrmFileByExt : in
I/SISODRM ( 2259): OMADRMManager : IsDrmFileByExt : out
D/dalvikvm( 2259): GC freed 13856 objects / 695480 bytes in 216ms

D/dalvikvm( 2259): GC freed 107 objects / 104232 bytes in 73ms
W/PowerManagerService( 2259): Timer 0x7->0x3|0x3
I/PowerManagerService( 2259): ULight 7->3 f0
I/SISODRM ( 2259): OMADRMManager : IsDrmFileByExt : in
I/SISODRM ( 2259): OMADRMManager : IsDrmFileByExt : out
I/SISODRM ( 2259): OMADRMManager : IsDrmFileByExt : in
I/SISODRM ( 2259): OMADRMManager : IsDrmFileByExt : out
I/SISODRM ( 2259): OMADRMManager : IsDrmFileByExt : in
I/SISODRM ( 2259): OMADRMManager : IsDrmFileByExt : out
D/dalvikvm( 2259): GC freed 124 objects / 104848 bytes in 71ms
I/ShutdownThread( 2259): onCompletion(MediaPlayer arg0) called !!
I/ShutdownThread( 2259): Releasing sAnimationSound end lock
I/ShutdownThread( 2259): Releasing animation end lock
I/ShutdownThread( 2259): animation end detected
I/ShutdownThread( 2259): Sending shutdown broadcast...
W/SyncManager( 2259): Writing sync state before shutdown...
I/ShutdownThread( 2259): Shutting down activity manager...
W/UsageStats( 2259): Writing usage stats before shutdown...
W/BatteryStats( 2259): Writing battery stats before shutdown...
D/MountService( 2259): Shutting down
D/vold ( 2185): dispatch_cmd(eject_media:/sdcard):
D/vold ( 2185): do_eject_media(eject_media:/sdcard):
D/vold ( 2185): volmgr_walking_by_storage++
D/vold ( 2185): volmgr_walking_by_storage: operate /sdcard/sd 0x154c0 bl_do_checkfs 0
D/vold ( 2185): property_set: EXTERNAL_STORAGE_STATE_SD ejecting
I/vold ( 2185): volmgr_stop_volume(/sdcard/sd): Volume unmounted sucessfully
D/vold ( 2185): Volume /sdcard/sd state change from 4 -> 2
D/vold ( 2185): property_set: EXTERNAL_STORAGE_STATE_SD unmounted
D/vold ( 2185): volmgr_walking_by_storage: operate /sdcard 0x153f8 bl_do_checkfs 0
D/vold ( 2185): property_set by eject: EXTERNAL_STORAGE_STATE_MMC ejecting
D/MountListener( 2259): listenToSocket :: event = volume_ejecting:/sdcard/sd, count = 55
I/vold ( 2185): volmngr quick stop umount(/sdcard) attempt 1 (Device or resource busy)
D/MountListener( 2259): handleEvent :: volume_ejecting:/sdcard/sd
D/MountService( 2259): notifyMediaEject :: path = /sdcard/sd
E/MediaProvider( 2350): mUnmountReceiver - intent.getAction : android.intent.action.MEDIA_EJECT, path[/sdcard/sd]
D/MountListener( 2259): listenToSocket :: event = volume_unmounted:/sdcard/sd, count = 55
D/MountListener( 2259): handleEvent :: volume_unmounted:/sdcard/sd
D/MountListener( 2259): SetExternalSDCardStatus called status = false, and path = /sdcard/sd
D/MountListener( 2259): This is External SD card
D/MountService( 2259): notifyMediaUnmounted :: path = /sdcard/sd, mMounted = true, mCheckedUnmount = false, mShowSafeUnmountNotificationWhenUnmountedSd = false
D/MountService( 2259): setMediaStorageNotification :: visible = false, sound = false, mPlaySounds = false
D/MountService( 2259): updateUsbMassStorageNotification :: getMassStorageConnected() = true, suppressIfConnected = false, sound = false
D/MountService( 2259): setUsbStorageNotification :: visible = true, sound = false
D/NotificationService( 2259): enqueueNotification :: notification.defaults = 0, Notification.DEFAULT_SOUND = 1, notification.sound = null
E/MediaProvider( 2350): mUnmountReceiver - intent.getAction : android.intent.action.MEDIA_UNMOUNTED, path[/sdcard/sd]
E/MediaProvider( 2350): mUnmountReceiver - ExternalStorage_SD, /sdcard/sd -> don't detach -> start MediaScanner
D/MountListener( 2259): listenToSocket :: event = volume_ejecting:/sdcard, count = 24
D/MountListener( 2259): handleEvent :: volume_ejecting:/sdcard
D/MountService( 2259): notifyMediaEject :: path = /sdcard
I/BootReceiver( 2929): Got intent with action Intent { act=android.intent.action.MEDIA_EJECT dat=file:///sdcard/sd cmp=com.cooliris.media/com.cooliris.cache.BootReceiver }
D/MediaScannerService( 2350): onStartCommand : intent - Intent { cmp=com.android.providers.media/.MediaScannerService (has extras) }
D/MediaScannerService( 2350): onStartCommand : flags [0], startId [1]
D/MediaScannerService( 2350): onStartCommand : intent.getExtra's volume : external/sd
D/MediaScannerService( 2350): ServiceHandler:handleMessage volume[external/sd], filePath[null]
I/MediaScannerService( 2350): !@beginofMediascannerservice
D/MediaScannerService( 2350): start scanning volume external/sd
E/MediaScannerService( 2350): scan : ExternalStorageState[ejecting]... do not need to scan
D/MediaScannerService( 2350): done scanning volume external/sd
I/MediaScannerService( 2350): !@endofMediascannerservice
E/MediaProvider( 2350): mUnmountReceiver - intent.getAction : android.intent.action.MEDIA_EJECT, path[/sdcard]
E/MediaProvider( 2350): mUnmountReceiver - Internal_SD, /sdcard -> only do detachVolume
V/MediaProvider( 2350): Detached volume: external
W/DiskCache( 2929): Create TempFile = /sdcard/DiskCacheIndex74569.tmp
D/DiskCache( 2929): Wrote index with 597 records.
I/vold ( 2185): volmngr quick stop umount(/sdcard) attempt 2 (Device or resource busy)
I/vold ( 2185): volmngr quick stop umount(/sdcard) attempt 3 (Device or resource busy)
I/vold ( 2185): volmngr quick stop umount(/sdcard) attempt 4 (Device or resource busy)
I/vold ( 2185): volmngr quick stop umount(/sdcard) attempt 5 (Device or resource busy)
W/vold ( 2185): Volume /sdcard is busy (-1) - uncaging the reaper
W/vold ( 2185): Reaper here - working on /sdcard
E/vold ( 2185): volmngr reaper umount(/sdcard) attempt 1 (Device or resource busy)
W/DiskCache( 2929): rename to = /sdcard/Android/data/com.cooliris.media/cache/local-image-thumbs/index
W/DiskCache( 2929): Create TempFile = /sdcard/DiskCacheIndex74570.tmp
D/DiskCache( 2929): Wrote index with 0 records.
W/DiskCache( 2929): rename to = /sdcard/Android/data/com.cooliris.media/cache/local-video-thumbs/index
W/DiskCache( 2929): Create DiskCache Directory = /sdcard/Android/data/com.cooliris.media/cache/picasa-thumbs/
W/DiskCache( 2929): loadIndex /sdcard/Android/data/com.cooliris.media/cache/picasa-thumbs/index
W/DiskCache( 2929): Create TempFile = /sdcard/DiskCacheIndex74571.tmp
D/DiskCache( 2929): Wrote index with 0 records.
W/DiskCache( 2929): rename to = /sdcard/Android/data/com.cooliris.media/cache/picasa-thumbs/index
W/DiskCache( 2929): Create TempFile = /sdcard/DiskCacheIndex74572.tmp
D/DiskCache( 2929): Wrote index with 16 records.
W/DiskCache( 2929): rename to = /sdcard/Android/data/com.cooliris.media/cache/local-album-cache/index
W/DiskCache( 2929): Create TempFile = /sdcard/DiskCacheIndex74573.tmp
D/DiskCache( 2929): Wrote index with 0 records.
W/DiskCache( 2929): rename to = /sdcard/Android/data/com.cooliris.media/cache/local-meta-cache/index
I/BootReceiver( 2929): =========EJECTION All Cache Fulshed & Closed=============
E/MTPRx ( 3032): In MtpReceiverandroid.intent.action.MEDIA_UNMOUNTED
I/BootReceiver( 2929): Got intent with action Intent { act=android.intent.action.MEDIA_EJECT dat=file:///sdcard cmp=com.cooliris.media/com.cooliris.cache.BootReceiver }
W/DiskCache( 2929): Create TempFile = /sdcard/DiskCacheIndex74574.tmp
D/DiskCache( 2929): Wrote index with 0 records.
W/DiskCache( 2929): rename to = /sdcard/Android/data/com.cooliris.media/cache/local-image-thumbs/index
W/DiskCache( 2929): Create TempFile = /sdcard/DiskCacheIndex74575.tmp
D/DiskCache( 2929): Wrote index with 0 records.
W/DiskCache( 2929): rename to = /sdcard/Android/data/com.cooliris.media/cache/local-video-thumbs/index
W/DiskCache( 2929): Create TempFile = /sdcard/DiskCacheIndex74576.tmp
D/DiskCache( 2929): Wrote index with 0 records.
W/DiskCache( 2929): rename to = /sdcard/Android/data/com.cooliris.media/cache/picasa-thumbs/index
W/DiskCache( 2929): Create TempFile = /sdcard/DiskCacheIndex74577.tmp
D/DiskCache( 2929): Wrote index with 0 records.
W/DiskCache( 2929): rename to = /sdcard/Android/data/com.cooliris.media/cache/local-album-cache/index
W/DiskCache( 2929): Create TempFile = /sdcard/DiskCacheIndex74578.tmp
D/DiskCache( 2929): Wrote index with 0 records.
W/DiskCache( 2929): rename to = /sdcard/Android/data/com.cooliris.media/cache/local-meta-cache/index
I/BootReceiver( 2929): =========EJECTION All Cache Fulshed & Closed=============
E/CacheService( 2929): skip Computing dirty set as low storage
D/dalvikvm( 2801): GC freed 5773 objects / 481544 bytes in 29ms
D/BaseDiskCache( 2801): Found disk cache length to be: 188
E/vold ( 2185): volmngr reaper umount(/sdcard) attempt 2 (Unknown error: 0)
I/vold ( 2185): Reaper sucessfully unmounted /sdcard
D/vold ( 2185): Volume /sdcard state change from 4 -> 2
D/vold ( 2185): property_set: EXTERNAL_STORAGE_STATE_MMC unmounted
D/MountListener( 2259): listenToSocket :: event = volume_unmounted:/sdcard, count = 25
D/MountListener( 2259): handleEvent :: volume_unmounted:/sdcard
D/MountListener( 2259): SetExternalSDCardStatus called status = false, and path = /sdcard
D/MountListener( 2259): This is Internal SD card
D/MountService( 2259): notifyMediaUnmounted :: path = /sdcard, mMounted = true, mCheckedUnmount = false, mShowSafeUnmountNotificationWhenUnmountedSd = false
D/MountService( 2259): setMediaStorageNotification :: visible = true, sound = false, mPlaySounds = false
D/vold ( 2185): volmgr_start_fs(/sdcard): stop thread
D/vold ( 2185): volmgr_walking_by_storage: operate with /sdcard, cmd /sdcard
D/NotificationService( 2259): enqueueNotification :: notification.defaults = 0, Notification.DEFAULT_SOUND = 1, notification.sound = null
D/MountService( 2259): updateUsbMassStorageNotification :: getMassStorageConnected() = true, suppressIfConnected = true, sound = false
D/MountService( 2259): setUsbStorageNotification :: visible = false, sound = false
E/MediaProvider( 2350): mUnmountReceiver - intent.getAction : android.intent.action.MEDIA_UNMOUNTED, path[/sdcard]
E/MTPRx ( 3032): In MtpReceiverandroid.intent.action.MEDIA_UNMOUNTED
D/BaseDiskCache( 2801): Trying to create storageDirectory: false
D/BaseDiskCache( 2801): Exists: /sdcard/foursquare/cache false
D/BaseDiskCache( 2801): State: unmounted
D/BaseDiskCache( 2801): Isdir: /sdcard/foursquare/cache false
D/BaseDiskCache( 2801): Readable: /sdcard/foursquare/cache false
D/BaseDiskCache( 2801): Writable: /sdcard/foursquare/cache false
D/BaseDiskCache( 2801): Exists: /sdcard/foursquare false
D/BaseDiskCache( 2801): Isdir: /sdcard/foursquare false
D/BaseDiskCache( 2801): Readable: /sdcard/foursquare false
D/BaseDiskCache( 2801): Writable: /sdcard/foursquare false
D/BaseDiskCache( 2801): Exists: /sdcard true
D/BaseDiskCache( 2801): Isdir: /sdcard true
D/BaseDiskCache( 2801): Readable: /sdcard false
D/BaseDiskCache( 2801): Writable: /sdcard false
D/BaseDiskCache( 2801): Unable to create .nomedia file for some reason.
D/BaseDiskCache( 2801): java.io.IOException: Parent directory of file does not exist: /sdcard/foursquare/cache/.nomedia
D/BaseDiskCache( 2801):	at java.io.File.createNewFile(File.java:1263)
D/BaseDiskCache( 2801):	at com.joelapenna.foursquared.util.BaseDiskCache.createDirectory(BaseDiskCache.java:181)
D/BaseDiskCache( 2801):	at com.joelapenna.foursquared.util.BaseDiskCache.<init>(BaseDiskCache.java:35)
D/BaseDiskCache( 2801):	at com.joelapenna.foursquared.util.RemoteResourceManager.<init>(RemoteResourceManager.java:30)
D/BaseDiskCache( 2801):	at com.joelapenna.foursquared.Foursquared.loadResourceManagers(Foursquared.java:282)
D/BaseDiskCache( 2801):	at com.joelapenna.foursquared.Foursquared.access$0(Foursquared.java:274)
D/BaseDiskCache( 2801):	at com.joelapenna.foursquared.Foursquared$MediaCardStateBroadcastReceiver.onReceive(Foursquared.java:314)
D/BaseDiskCache( 2801):	at android.app.ActivityThread$PackageInfo$ReceiverDispatcher$Args.run(ActivityThread.java:754)
D/BaseDiskCache( 2801):	at android.os.Handler.handleCallback(Handler.java:587)
D/BaseDiskCache( 2801):	at android.os.Handler.dispatchMessage(Handler.java:92)
D/BaseDiskCache( 2801):	at android.os.Looper.loop(Looper.java:123)
D/BaseDiskCache( 2801):	at android.app.ActivityThread.main(ActivityThread.java:4363)
D/BaseDiskCache( 2801):	at java.lang.reflect.Method.invokeNative(Native Method)
D/BaseDiskCache( 2801):	at java.lang.reflect.Method.invoke(Method.java:521)
D/BaseDiskCache( 2801):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
D/BaseDiskCache( 2801):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
D/BaseDiskCache( 2801):	at dalvik.system.NativeStart.main(Native Method)
I/AudioHardwareALSA( 2194): Output standby called!!. Turn off PCM device.
W/ShutdownThread( 2259): Turning off radio...
I/ShutdownThread( 2259): Waiting for Bluetooth and Radio...
I/AlarmManager( 2259): mWakeLock.acquire(500);
D/dalvikvm( 3092): GC freed 9947 objects / 524816 bytes in 28ms
I/ShutdownThread( 2259): PhoneOff req resp
I/ShutdownThread( 2259): Radio and Bluetooth shutdown complete.
I/ShutdownThread( 2259): Performing low-level shutdown...

edit: also extremely amusing that the mediascanner starts running a media scan in the middle of a shutdown. LOL