Tell me more ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I've tried a few builds of Android Jelly Bean coming from Android Ice Cream Sandwich, and one common thing that happens is that Gallery will only show pictures taken after the ROM installation. The images themselves are still in the /sdcard/DCIM folder, but they are just not showing up in Gallery.

My phone is a Verizon Samsung Galaxy Nexus.

share|improve this question
Found the problem via rootzwiki.com/topic/29214-still-havent-found-a-fix/#entry788587 . I put a .nomedia file in my /sdcard/DCIM/Camera folder and my gallery became populated with images from other folders in the file system. Removing the .nomedia file eventually causes Media to spin up again but it crashes and tries to restart itself. I wonder if Jelly Bean's Media scanner has a problem with too many files or something – SAGExSDX Jul 11 '12 at 21:40
the .nomedia is an indicator to the scanner to omit that directory from the index completely (e.g. for a game's media data so that icons, etc. don't appear in the gallery) – ce4 Jul 11 '12 at 21:57
correct. by putting the .nomedia file in the /sdcard/DCIM/Camera folder, I was able to isolate that something in that folder was causing the media scanner to crash – SAGExSDX Jul 11 '12 at 22:00
The worst thing is that this was not a problem in Ice Cream Sandwich. I always saw my old pictures after doing full wipes and installation of different ROMs. QuickPic does not choke on the things that cause MediaScannerService to restart. I wonder what they changed in Jelly Bean's MediaScannerService – SAGExSDX Jul 12 '12 at 21:21

2 Answers

This behaviour is not uncommon, sadly.

I use SDrescan to fix it usually.

Here are some other questions targeting the same underlying problem:

The music player keeps displaying deleted songs. How do I remove them or refresh the library?
Picture Gallery Slow & Won't Refresh on HTC G2 w Android 2.3 Gingerbread

share|improve this answer
Unfortunately, this isn't the problem. Turns out it has to do with Media Scanner constantly crashing – SAGExSDX Jul 11 '12 at 21:35
Can you spot where it crashes? (Maybe use CatLog to view logs) instantly after issuing a rescan. Maybe it's just a single bad file that causes this – ce4 Jul 11 '12 at 21:55
Unless I'm doing it wrong, it doesn't look like catlog is catching anything when I enable folders that cause MediaScannerService to restart – SAGExSDX Jul 12 '12 at 21:06
Maybe use the bisection method to find the faulty pic? E.g, 128 pics requires 7 steps to isolate a single pic. – ce4 Jul 13 '12 at 6:15

This trick didn't work for me. So, I did what the system should have done with the .nomedia file present. I moved all of my photos to a hidden folder (with a . before the name) and removed the DCIM folder. Then, I looked for all instances of the .nomedia file (Root Explorer helped) and deleted them. Rebooted the phone. Started Gallery. Waited for 10 minutes. Voila! Gallery showed every little image file that was on /sdcard. To remove the files that I didn't want to see, I copied the .nomedia file from a random system folder and pasted it into all the folders that I didn't want indexed. Strangely though, moving even one of the original /sdcard/DCIM/Camera files from the hidden folder into the current Camera folder took Gallery down. Stranger that this also made the Internal Storage show a blank window when I connected the phone to my laptop. Almost positive that this has to do with JellyBean creating a /storage/sdcard0 folder that's linked to the older /sdcard folder. Looking it up and will post updates if I find any.

Update: The same trick works for Paranoid Android's JellyBean ROMs (even the latest 2.13) for the Galaxy Nexus. Something to do with the DCIM folder and how it is handled by Media Storage. A Linux-geek friend of mine confirms this has to do with the /sdcard0 symlinking. Although, why we need something like that is beyond my limited knowledge of the OS.

share|improve this answer
Thanks for looking into this more. I've since ignored the problem but was still hoping someone could find what the problem with Jelly Bean was. I'll await your updated response – SAGExSDX Aug 3 '12 at 14:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.