No images in gallery apps, media storage to blame - Android Q&A, Help & Troubleshooting

Hey there guys,
For some time I haven't been able to see the images in my gallery properly. The list was only partial, it only showed the latest 50 photos of the 1000 available in DCIM/Camera.
Since there was no problem with permissions I dug some deeper. In /data/data/com.android.providers.media/databases I opened up the external.db with the sqlite3 command and did some poking around. It appears all my images are in the files table. When I take a picture from within any gallery app, a line gets added in the images table and then it is visible in the gallery apps.
Since I have narrowed it down to Media Storage not putting the files in the right table, how do I fix it? There is virtually no information available on the subject.
I'm running a very recent nightly build from this thread. (A CM12.1 build)
Please respond?

badoop22 said:
Hey there guys,
For some time I haven't been able to see the images in my gallery properly. The list was only partial, it only showed the latest 50 photos of the 1000 available in DCIM/Camera.
Since there was no problem with permissions I dug some deeper. In /data/data/com.android.providers.media/databases I opened up the external.db with the sqlite3 command and did some poking around. It appears all my images are in the files table. When I take a picture from within any gallery app, a line gets added in the images table and then it is visible in the gallery apps.
Since I have narrowed it down to Media Storage not putting the files in the right table, how do I fix it? There is virtually no information available on the subject.
I'm running a very recent nightly build from this thread. (A CM12.1 build)
Please respond?
Click to expand...
Click to collapse
Have you tried another gallery app, like QuickPic? If it's happening in just 1 app or multiple ones will help narrow down the problem.

Related

Entertainment Center stuck

hello my atrix's entertainment center gets stuck upon selecting to browse each media category. Once I select videos or music I just get that "orange waiting box" for like eternity. I am using this rom http://forum.xda-developers.com/showthread.php?t=1169409&highlight=keyboard+language which is the standard international rom for atrix. Any ideas? I have some videos I want to play from internal storage
Freezing on Motorola Entertainment Center Splash Screen
Similar issues on a Bell Atrix 2.3.6.
Mine used to hang when going through the pictures or videos menu..
Now it hangs on the splash screen and doesn't even load. Sometimes the glimmering bit shows and freezes, sometimes it just says "Motorola Entertainment Center." After 30s or less it asks to Force Close or just closes on its own.
System 45.21.78.MB860.BellMobility.en.CA
Android 2.3.6
Webtop WT-1.2.0-167_BELL
Build 4.5.2A-51_OLL-17.8
Any help's appreciated!
Thermanshs said:
hello my atrix's entertainment center gets stuck upon selecting to browse each media category. Once I select videos or music I just get that "orange waiting box" for like eternity. I am using this rom http://forum.xda-developers.com/showthread.php?t=1169409&highlight=keyboard+language which is the standard international rom for atrix. Any ideas? I have some videos I want to play from internal storage
Click to expand...
Click to collapse
have you tried reducing the number of media files on your device?
I'm still trying to get mine to work too, but trimming the files got me past the splash screen at least. now i'm just stuck with the "Loading" circle and "waiting" inside each category - same as you i guess.
I would say my dcim/thumbnails definitely has an influence on the entertainment center. so maybe the gallery also plays a part. still messing around with deleting the thumbnails folder, refreshing it, etc.
problem solved!
i found the place where the thumbnail data is stored, which was making the huge thumbnail file and crashing Entertainment Center.
it isn't storing the entire ".thumbdata3--1967290299" file (which can be hundreds of mb for some people), rather a large (tens of mb) .db database file that is being used to recreate it on demand.
/data/data/com.android.providers.media/databases
external.db
with Root Explorer i could view the file, and Speed Software also sells an sql editor which you can use to trim the thumbnails table.
*be careful: deleting entries from this file also seems to delete it from the device! i deleted all records from the thumbnails and images tables..
learn from my mistake. i thought it would regenerate, but it deleted all images from /sd card. good thing i backed up all my photos first, but better to use the filter option and trim out only the records for files that are no longer on the device.
".thumbdata3--1967290299" now reappears, but a whole lot smaller.
Gallery opens so much faster now, and Entertainment Center works again!
hope it helps!
whitebreadstyle said:
i found the place where the thumbnail data is stored, which was making the huge thumbnail file and crashing Entertainment Center.
it isn't storing the entire ".thumbdata3--1967290299" file (which can be hundreds of mb for some people), rather a large (tens of mb) .db database file that is being used to recreate it on demand.
/data/data/com.android.providers.media/databases
external.db
with Root Explorer i could view the file, and Speed Software also sells an sql editor which you can use to trim the thumbnails table.
*be careful: deleting entries from this file also seems to delete it from the device! i deleted all records from the thumbnails and images tables..
learn from my mistake. i thought it would regenerate, but it deleted all images from /sd card. good thing i backed up all my photos first, but better to use the filter option and trim out only the records for files that are no longer on the device.
".thumbdata3--1967290299" now reappears, but a whole lot smaller.
Gallery opens so much faster now, and Entertainment Center works again!
hope it helps!
Click to expand...
Click to collapse
Thanks for that, but what if the images are not the problem, but music or videos? I have tons of music on my SDCard and I don't know exactly what to delete in that database.
I tried using SDRescan as proposed here: http://forum.xda-developers.com/showpost.php?p=28516079&postcount=6, but that didn't help.
I've done some more research and found a solution here: http://www.mobilephonetalk.com/show...in-memory-card&p=311954&viewfull=1#post311954. After I deleted the .thumbdata3 file, created a blank one with Root Explorer and removed write permission to it, the file stays at 0 bytes and Camera and Gallery apps still work fine.
strom87 said:
Thanks for that, but what if the images are not the problem, but music or videos? I have tons of music on my SDCard and I don't know exactly what to delete in that database.
I tried using SDRescan as proposed here: http://forum.xda-developers.com/showpost.php?p=28516079&postcount=6, but that didn't help.
I've done some more research and found a solution here: http://www.mobilephonetalk.com/show...in-memory-card&p=311954&viewfull=1#post311954. After I deleted the .thumbdata3 file, created a blank one with Root Explorer and removed write permission to it, the file stays at 0 bytes and Camera and Gallery apps still work fine.
Click to expand...
Click to collapse
if you still have all the music, deleting entries from the database won't solve anything because they will just be recreated the next time you open gallery.
your fix is probably the best for your situation.
solution... maybe...
Maybe you will find solution here: http://forum.xda-developers.com/showpost.php?p=35259164&postcount=7
Kyonex said:
Maybe you will find solution here: http://forum.xda-developers.com/showpost.php?p=35259164&postcount=7
Click to expand...
Click to collapse
I just want to add, that it's the camera app causing the thumbdata3 to grow, each picture you take. (I verified file size change after taking pictures.) I'm trying the solution by creating the dummy file and making it read only now.

Android(JB) Gallery broken?

Hi there,
Whats the deal with Google not fixing/improving the current Gallery? Right now i have installed a new SD card for dedicated camera storage for ease of transferring to/from my computer.
But upon copy my DCIM/Camera folder over, the gallery now decides to sort my media by grouping the entire Video selection at the front of my gallery in the correct date order, followed by all my photos in the correct date order? Why aren't they mixed together in date order and instead grouped in the "media type", and does anybody know a fix?
I have tried to check the filenames and they are fine. When I open the camera directory on my computer, the files appear fine and all in the correct date/filename sorting.
My device in a GS3 running stock rom, have asked in there but figured its more of a general Android/JB problem and here would have more chance of a helping hand.
Thanks!

[Q] Gallery not finding pictures in the correct location

Okay, so hear me out.
I've been switching ROMS a lot lately (and I think this have played a part) and I've just landed back on ViperROM (4.1.1) from Carbon (4.2.2) and all of my old app/camera/etc data from Carbon was placed on /sdcard0/0/ (or /mnt/sdcard/0/). Now, I didn't care for it because it was mostly junk I wanted gone anyway. The only thing I wanted was my pictures (both taken on the phone and downloaded via facebook, browser, etc.). So, after a couple days using the ROM, I wanted to tidy up files and folders and remove the damn 0 folder because I'm not on 4.2.2 anymore. So I took my DCIM, downloads, etc and merged them with the respective folders under /sdcard0/ (or /mnt/sdcard/). Everything looked fine until I checked the Gallery and none of them are showing up when viewed (I get the exclaimation point in a triangle warning sign when I do) and the "View Details" option shows that they're "stored" under /sdcard0/0/.
In attempts to remedy the above stated situation, I tried to clear the cache/data of the camera and gallery apks. Doing so (and rebooting) lead the gallery to rebuild the photo cache!... and populate the old, broken photo links.
So what gives XDA? I can't wrap my head around this.
TL;DR:
Switched from ViperROM to Carbon back to ViperROM, moved /sdcard/0/ 4.2.2 folder back to /sdcard/ 4.1.1 folder, pictures are "stuck" on /0/ in Gallery but have been moved to /sdcard/
EDIT:
The camera even continues the naming pattern (say, I took 400 pictures on my "old" phone setup and they were IMAG000.jpg through IMAG400.jpg, if I take a picture, it labels the new one IMAG401.jpg)
It's not even that it's bothering me that it won't catch the old ones, but it's refusing to recognize that they aren't there anymore.

[Q] Where does stock HTC Gallery store database?

Somehow, my gallery is showing the same pictures twice. Not all, but many. If you long press, and click details, the picture name and location for the two are identical. I've verify that only one copy is on the SD card. I've tried clearing data for the gallery (via the app menu in settings); I also tried deleting /data/data/com.htc.album (which had some database files, oh, I should note I have root) as well as deleting all .thumbnail directories. I figure there must be somewhere that I'm not looking.
Here's a screenshot:
2014-06-07_00-39-43 by oryan_dunn, on Flickr
2 photos
oryan_dunn said:
Somehow, my gallery is showing the same pictures twice
Click to expand...
Click to collapse
How about first backup all your pictures to your PC so you're sure to have them, disconnect from PC, then try delete ALL of them through Gallery.
Maybe there's a backup on your ext_sd and that's why?
Here's something web-wise that might apply (google):
http://android.stackexchange.com/questions/43311/im-seeing-duplicated-images-and-videos-on-gallery
pbergonzi said:
How about first backup all your pictures to your PC so you're sure to have them, disconnect from PC, then try delete ALL of them through Gallery.
Maybe there's a backup on your ext_sd and that's why?
Here's something web-wise that might apply (google):
http://android.stackexchange.com/questions/43311/im-seeing-duplicated-images-and-videos-on-gallery
Click to expand...
Click to collapse
I saw that, but I'm not on JB, and the path given in details for each image is identical. I do have a backup, I'll see what happens when I delete one of the two. As you can see, I've got several thousand pictures, so I'd rather not fix this one at a time, esp since I'm going to be flashing a new ROM soon. I just want to try to figure this out. There has to be a way to reset the gallery and get it to rescan my SD card fresh.
delete all
oryan_dunn said:
I saw that, but I'm not on JB, and the path given in details for each image is identical. I do have a backup, I'll see what happens when I delete one of the two. As you can see, I've got several thousand pictures, so I'd rather not fix this one at a time, esp since I'm going to be flashing a new ROM soon. I just want to try to figure this out. There has to be a way to reset the gallery and get it to rescan my SD card fresh.
Click to expand...
Click to collapse
In Gallery Album view then settings, I find option "Select Album" allowing me to tag each and every album to delete all at once.
However my gallery in ICS CM10 may be different than yours.
If your images are synced to the web is there a chance that they show up as the second images?
pbergonzi said:
In Gallery Album view then settings, I find option "Select Album" allowing me to tag each and every album to delete all at once.
However my gallery in ICS CM10 may be different than yours.
If your images are synced to the web is there a chance that they show up as the second images?
Click to expand...
Click to collapse
Yeah, it's the stock HTC Gallery. The only option in settings are "Perfect Pics" options. There is no way to delete full albums through the gallery. They are not synced to the web. The details dialog for the images show the exact same details down to the path, filename, everything, for duplicate images.
I deleted one of the pictures, and just deleting one, made both disappear from the gallery. Copying back that single file, there is only one shown. So, looks like it is definitely a goof up in the gallery database. Now to just figure out where it is on the filesystem.
view
oryan_dunn said:
Yeah, it's the stock HTC Gallery. The only option in settings are "Perfect Pics" options. There is no way to delete full albums through the gallery. They are not synced to the web. The details dialog for the images show the exact same details down to the path, filename, everything, for duplicate images.
Click to expand...
Click to collapse
Up top on the left, see if you can switch that view to Album. Then check the settings about Selecting Albums.
Yours looks different from mine--mine has a text drop-down menu where you have an icon of an album.
And I was using the on-screen buttons--Home, Menu, Return, Search, when I said to use the Settings, it was the Menu button on the bottom of my phone.
pbergonzi said:
Up top on the left, see if you can switch that view to Album. Then check the settings about Selecting Albums.
Yours looks different from mine--mine has a text drop-down menu where you have an icon of an album.
And I was using the on-screen buttons--Home, Menu, Return, Search, when I said to use the Settings, it was the Menu button on the bottom of my phone.
Click to expand...
Click to collapse
In the screen of my screenshot, menu key doesn't do anything. Up a level, at the album view, I get a settings menu, but the only options are for Perfect Pics.
delete all
oryan_dunn said:
In the screen of my screenshot, menu key doesn't do anything. Up a level, at the album view, I get a settings menu, but the only options are for Perfect Pics.
Click to expand...
Click to collapse
Can you do it through HTC Sync, or perhaps an after-market file utility--alas the File Manager that comes with CM10 allows me to wildcard search "*.jpg" and shows them all in a list, however at that point didn't allow me to select them all at once to delete all at once, just individually.
However, my images are stored in DCIM/Camera/ and I have those folders on both my int and ext sd.
Your camera settings may give you the option of where to store photos--possibly there's a "both" option, idunno.
The free app Quick Pic that I use gives me the option to select all my photos or albums at once and to delete them at once.
Maybe that is the easiest solution.
I really appreciate you trying to help, but I'm almost sure the issue is the database the gallery creates. I've been using ES File Explorer to try to find this database and delete it, to force the gallery to re-parse the entire filesystem. I'm positive that the database has duplicate entries for the same file. Deleting and restoring pictures external to the gallery app has no effect. Deleting the pic from the gallery causes the gallery to remove both entries in it's database, and when I add the picture back, I get only one, as I should (which effectively cleans the db for that one particular file). This database has to exist somewhere, it's just a matter of finding and deleting it.
I submitted a question to HTC support. We'll see what they say.
Maybe it's not your device.
Maybe it's just syncing to a cloud storage.
I know that my brother's girlfriend's Motorola Xoom was sending pictures directly to her Google+ account and she didn't like that. It took me a while to figure out that's what it was because we'd delete all the pictures and still they'd show up.
Maybe that's what's happening to you.
pbergonzi said:
Up top on the left, see if you can switch that view to Album. Then check the settings about Selecting Albums.
Yours looks different from mine--mine has a text drop-down menu where you have an icon of an album.
And I was using the on-screen buttons--Home, Menu, Return, Search, when I said to use the Settings, it was the Menu button on the bottom of my phone.
Click to expand...
Click to collapse
rdar_93 said:
Maybe it's not your device.
Maybe it's just syncing to a cloud storage.
I know that my brother's girlfriend's Motorola Xoom was sending pictures directly to her Google+ account and she didn't like that. It took me a while to figure out that's what it was because we'd delete all the pictures and still they'd show up.
Maybe that's what's happening to you.
Click to expand...
Click to collapse
The stock gallery isn't that smart. On the main screen, you can select to show pictures from local storage, Picassa, Flickr, etc. But these show the same path for each duplicate "/mnt/sdcard/ext_sd/DCIM/100MEDIA".
Why not just try "Quickpic"? Better than stock IMO.
Quickpic
SuperAfnan said:
Why not just try "Quickpic"? Better than stock IMO.
Quickpic
Click to expand...
Click to collapse
I could use a different gallery, but just as an exercise, want to figure this out, since it has to be solvable. I'm going to flash a new ROM soon, so it really doesn't matter, I just want to solve this, since it seems like an easy problem (figure out where the gallery db is and delete it).
database
oryan_dunn said:
I could use a different gallery, but just as an exercise, want to figure this out, since it has to be solvable. I'm going to flash a new ROM soon, so it really doesn't matter, I just want to solve this, since it seems like an easy problem (figure out where the gallery db is and delete it).
Click to expand...
Click to collapse
Possible it doesn't keep a database, just scans each time, and is listing the same photo under two headings even though same path?
pbergonzi said:
Possible it doesn't keep a database, just scans each time, and is listing the same photo under two headings even though same path?
Click to expand...
Click to collapse
It may not be a database proper, like a SQLite database, but there is definitely some sort of cache that it builds. If I add a huge directory of pictures, open the gallery, it takes a while to parse through it all. Subsequent times opening the gallery, the pictures/thumbnails are available instantly.
db
oryan_dunn said:
It may not be a database proper, like a SQLite database, but there is definitely some sort of cache that it builds. If I add a huge directory of pictures, open the gallery, it takes a while to parse through it all. Subsequent times opening the gallery, the pictures/thumbnails are available instantly.
Click to expand...
Click to collapse
Good test.
Thumbnails
oryan_dunn said:
It may not be a database proper, like a SQLite database, but there is definitely some sort of cache that it builds. If I add a huge directory of pictures, open the gallery, it takes a while to parse through it all. Subsequent times opening the gallery, the pictures/thumbnails are available instantly.
Click to expand...
Click to collapse
Thumbs are built and kept in a folder under DICM. there is most likely a process that scans the folders for pics and then makes a thumb if it doesn't already have one.
Thus there are actually two copies of pictures on your phone. One is full sized and the other is a thumb size.
You can copy all the pics off your phone to one folder on your computer, then delete all the photos from your phone and then copy them back from your computer.
If you have thousands of pics, I'd back them up anyway. dont want to lose some great pics...
chevycowboyusa said:
Thumbs are built and kept in a folder under DICM. there is most likely a process that scans the folders for pics and then makes a thumb if it doesn't already have one.
Thus there are actually two copies of pictures on your phone. One is full sized and the other is a thumb size.
You can copy all the pics off your phone to one folder on your computer, then delete all the photos from your phone and then copy them back from your computer.
If you have thousands of pics, I'd back them up anyway. dont want to lose some great pics...
Click to expand...
Click to collapse
Yeah, I've tried deleting the .thumbnail folder to try to get the gallery to rescan. Say I have 1000 pics, and I add a folder of pictures with a 1000 more, the first time I open the gallery, it shows 1000, with a spinning wheel. Eventually, it'll populate with 2000 pictures. And you can tell it's creating thumbnails. If I just delete the thumbnail folder, when I open the gallery, it immediately shows 2000 pictures, but it'll slowly recreate thumbnails. That's why I think there has to be some other cache somewhere, and in my case it has duplicates in it.
As for backup, I have a Synology NAS (with 1TB RAID1 mirror) that all of my pictures are backed up to, and I use the Synology DS Photo+ app to instantly backup pictures as I take them to my NAS. Once a month, my NAS is mirrored to a 1TB USB drive.
pics
oryan_dunn said:
Yeah, I've tried
Click to expand...
Click to collapse
Yeah, some of those thumbs did look pretty good.

Some recently taken photos/videos are only accessible by Google Photos, appear to be in its app data and not movable

Very peculiar issue occurring: there are a fair amount of photos and videos that show up under google photos under library -> photos on device -> camera with SDCard Icon.
But the location for these files is "/external/video/media" or "/external/image/media" under ""On Device (size)." The other files taken in a similar way are correctly on "/storage/9C32-13OC/DCIM/Camera"
When clicking these files, they play normally, clicking share and More or Create Link says "Error, could not download media" and using Google Photos to Move / Copy says "Trouble Moving 1 item"
When ejecting the SDCard and physically removing it while keeping Google Photos open, all the files actually on /storage/<ID> disappear, and all these weird files remain and can be played. This is how I discovered it wasn't just today's videos, which were mysteriously not being uploaded to my nextcloud. No other app can see these videos/images, including the system's gallery app, and they are not in the internal emulated "SDcard"
These are on my SO's phone and I use the exact same model phone. I did discover that I do have some files like these but hey are all older than the oldest file on my SDCard, e.g. Google Photos has somehow decided to cache them. But on my SO's phone, these files are intermingled with the ones she's actually taken
Interestingly when I switch the google photos account to another google user logged on the phone, those files disappear. I did try moving files to the locked folder but it says "Trouble moving to Locked Folder. Try again later"— I did verify I could move files actually on the SDCard there, and they are then removed from all views except Locked Folder.
In this folder, on the top right when clicking the SDCard Icon, it does show the "SD Card folder" as "file:///storage/9C32-13OC/DCIM/Camera" as expected.
I searched for the filename in a file browser as well as in adb shell (using find / -name "filename" 2> /dev/null) and nothing comes up. As there are some lengthy videos in here, I used DiskUsage to see what might be using a lot of space, and the Google Photos app is using 7.55 GB of data, so it seems like they are being stored there. And it makes sense why they can't be found, as /data/data/com.google.android.apps.photos is only accessible by that app or the system, and I'm unrooted.
My SO said she took them the same way she normally takes photos and video, and of course when I take some they show up on the actual SDCard. I suppose in theory I could use adb backup and follow instructions on how to decrypt the data files, but really what the heck is going on?
We aren't on the latest phone or even the latest Google Photos app (could be a bug with this specific version, but then again google photos isn't taking the photos/videos, the system Camera app is). I could try upgrading her google photos but I also don't want to lose these videos of our kid. It does seem like it would back them up, but we don't have enough Google Storage to back them up online (hence why we use nextcloud), and they don't even show up under different google accounts as mentioned.
Phone: LG G7
Android 10
Google Photos: 6.21.0.504361003
robobub said:
EDIT: whoops, can this be moved to https://forum.xda-developers.com/f/android-q-a-help-troubleshooting.1236/ ?
Click to expand...
Click to collapse
Done!
Regards
Oswald Boelcke
robobub said:
I suppose in theory I could use adb backup and follow instructions on how to decrypt the data files, but really what the heck is going on?
Click to expand...
Click to collapse
Well this didn't work, as google photos does not back up with adb, as some apps can specify this.
Some of these videos did get uploaded to google photos, but they are (now) compressed to under 1/8th their size (the original size is noted correctly in google photos), and from 4k to HD.
From what I had recalled, when they are first uploaded, they are available at their original size to be downloaded. So I tried deleting one to get it to re-upload, and now that video no longer shows up on my SDCard under "/external/video/media" so I basically lost the original HQ video of my kid, great.
Any ideas?

Categories

Resources