[T-Mobile Samsung Galaxy S II SGH-T989] alienmonkey:
The below is long winded, but I believe in giving as much detail as possible, as well as it's still an ongoing process for me where I believe I've resolved the problem, yet I keep forcing it accidentally and not yet exactly pinned down my issue entirely.

I just got this phone, set it up, and was running into a similar issue where media scanning would initiate and continually initiate over and over while reloading dash and not loading all widgets. My actions the other night prior to this happening were making a backup in clockwork mod, installing setcpu, setting up setcpu, copying media files from old SD card from previous phone into new external and internal SD cardm then restarting the following morning after waking up. This baffeled me, and through google searching I came upon your threads, I saw ICE Music 4.0x or IM+ apps where your issues, however I have neither app.

Traced my steps back thinking what I did before sleeping and after backing up. I started deleting media files (pictures, movies, music) off the SD cards. After rebooting, this did not resolve my issue. I then rememebered I did SetCPU. I was able to successfully uninstall the app from my phone by dragging it to the trashcan before media scanning restarted. I rebooted, however, this still did not resolve my issue. I restored my backup prior to all this since my issue was unresolved through these means, and media scanning was fine. I've not been using SetCPU the past day and everything is fine.

My analysis is that using SetCPU is fine, I was using it the other night after backup, but prior to rebooting phone, however if SetCPU is set to run on boot, then Media scanning goes all fubar. Even if you uninstall SetCPU app through the android menus or dumping to the trashcan, something still seems resident in the booting process or initially something is modified that does not become unmodified. I've yet to try manually loading and running SetCPU each instance after bootup without having setcpu set to start on boot.

Hmm maybe I spoke too soon. Since that time, I've restored approximately 10k sms messages with SMS+ Backup app, sent a sms in handcent, backed up sms with SMS+ Backup, believe I received a sms, updated AdAway app, and started/updated AdFree app, and however I don't see it now.

Now, the adfree app gave me a menu I had no recolection of on my Nexus One, where I had two options. One option I don't rememeber, but the other "Boot Normally", I remember and chose. SetCPU is not installed at this moment, and after doing just those couple things from the 1st sentence, I rebooted. I noticed that the display at the bottom would show Adfree granted superuser permissions, and then I would get a freeze and reboot of the dash. I may have setup Adfree the night before along with SetCPU (It was late and I had been up 24hrs the previous night). I've frozen AdFree with Titanium Backup and removed it from superuser permissions, but I'm still media scanning crashing again. Unsure if the boot normally option in Adfree modified something in the booting code. I'm going to try restoring with Clockwork Mod again, then do my sms restore, and see if that narrows the issue down. If it appears finem then I'm assuming it has something to do with apps that modify boot coding like SetCPU or AdFree, if they actually modify it that is. I'm not good at coding. I'm at work, unable to do much playing around, however, I hope some of this is of assistance with resolving this issue.

Got a chance to test it. My issue with media scanning appears to be too many sms messages saved. after restoring about 10k in sms's, it just media scan loops.