Thanks to everyone who has downloaded and tried MediaFix, and thanks for adding your reviews here.
I've now changed my phone (my Galaxy S2 died suddenly), and I no longer have any problems with the music on my new one, so I won't be maintaining MediaFix any more ("He's been maintaining it?", I hear you ask!)
Rather than let the code go to waste though, I'm making it available on Bitbucket so that hopefully it can be taken and made to work on devices that are still having problems. Assuming that anyone can understand it, of course!
Head to https://bitbucket.org/Peter_H/mediafix to grab a copy.
1) MediaFix was created to work around a problem on the Samsung Galaxy S II, and it has only been tested on that device. If you have a different device, it may work (and it's free, so you have nothing to lose by trying it), but don't be surprised (and leave 1-star feedback) if it doesn't work.
2) The app will only process .m4a or .aac tracks. It will ignore any tracks that are not .m4a or .aac.
3) The app only works with tracks that show up in the Music app. It doesn't scan the filesystem for tracks. If you can't see the track when you open Music, MediaFix won't see it either.
Various versions of Android seem to have trouble handling the metadata tags in audio files, resulting in MediaStore database entries that have incomplete data.
MediaFix scans your MediaStore database for mpeg4 (.m4a or .aac) tracks that have the artist set to "unknown". For each track, it parses the mpeg4 metadata structure in the original file to extract the track title, album name, track artist, track number and disk number, and updates the MediaStore database.
No changes are made to the original tracks on your SD card.
To see a list of files that MediaFix will attempt to fix, tap the "files to fix" number.
I've only really tested on a Samsung Galaxy S II running 2.3.3, as that's my phone. I know that it does work on other devices, but I know that it fails on some too.
I haven't been able to find a way to update the album artists for compilations (I get an "unsupported operation" exception when I try), so compilation albums show the artist for the last track fixed.
There's a bug in Android relating to the way Genres are stored. Samsung has implemented a workaround, so genre updates should work on their devices. On other devices, each track will still appear under the "Unknown" genre, but should also appear under the correct genre.
There should be no chance of MediaFix causing any major problems with your device (it only updates the MediaStore database after all), but you USE IT AT YOUR OWN RISK!! I accept no responsibility for its operation on your device.
Discontinued and open-sourced.