.thumbdata3 file eating up internal storage

I have been running into issues where I was running out of space on the Internal SD card.  I had an app that was using about 400MB, so I removed that.  I also moved all of my pictures and videos to the external card last week, but it still looked like something was using up a lot of space.  I discovered that there is a file in \DCIM\.thumbnails on the internal card named .thumbdata3--1967290299  .  This file is 285 meg on my device.  If you google that filename, you will find all kinds of posts about the file growing to 1gig or more and causing performance/crashing issues on various Android devices.  There are posted workarounds where it is suggested to put an empty file there with the same name.  According to these posts if you just delete the file, it will be recreated the next time you boot.  Just to test this, I deleted the file and did not put an empty one in it's place.  I rebooted the device, and so far it has not recreated the file.  I do see in the gallery the thumbnails seem to be a little out of whack.  It shows a bunch of empty pictures between the real ones, but I'm not sure it wasn't like that before (might have happened when I moved my pictures to the external card).  I have a feeling that the file will eventually come back, so I'll be watching for that.

I'm thinking that our customers who might be using the camera  a lot may have this issue (as well as the issue where the camera app only uses the internal SD card for storage).

Hector Meza
Dan, good find - the

Dan, good find - the following explanation was posted that might be useful:

In simple terms,

1.Stock camera app indexes the thumbnails and saves the respective image's properties in a thumbdata file.

2.The problem is that each and every pic present in your memory card will be indexed in the thumbdata file and even if you remove the image, the indexed properties of the image still remains dormant in the thumb data file.

3.If the removed image is again restored in the memory card, it creates another new id for the image and indexes it once again so two entries are present for a single image (it may be the same image for us but the operating system takes the date of creation of the image in the sd card into consideration so it's another new image for it)

4.This thumbdata file increases in size in time if you keep on adding and deleting images in your sdcard because new entries gets created and old entries are not at all removed and still remains in the thumbdata file as dead weight.

5. Eventually it's size increases to hundreds of megabytes that's why you have a heavy thumbdata file even though at the particular point of time your gallery is only few megabytes because you have added and deleted files before and those entries remain there in the thumbdata files.

6. This thumbdata file can be deleted with no hesitation what so ever because it's not so important and it eventually gets generated again.

7. You may ask "what is the purpose of this thumbdata files?" the main purpose is to load images faster into memory using the indexes generated so that when you open apps like gallery it doesn't lag to display the thumbnails.

8. That's all I know . I might be wrong somewhere but that's the whole point of thumbdata files generated, getting so heavy.

9. This is again, sourced from google


what was not clear is if the bug has been fixed and if so, in what version.  I did see that the issue exist. 


HM


Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
This seems good old

This seems good old issue39546 that Google marked as obsolete. It's funny because this behaviour is still in the current codebase.

So, this thumbnail file is build as a "sparse file", so it should not really take up much space. The problem is that FAT does not support sparse files... so, the file really take a lot of space. Thanks Google!

Workarounds are to create a folder in place of the file, with the same name, so that the system cannot add to that.

In CyanogenMod there's a fix for this: http://review.cyanogenmod.org/#/c/36850. They reimplemented the handling of this Thumbfile.


I think that this issue is probably on every Android 4.0+ device...


~Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


David Singer
Folks,Pietro informed me that

Folks,


Pietro informed me that the e-mail I sent out to the TC75 Dogfooders as well as the Launchpad post I created yesterday https://developer.motorolasolutions.com/thread/31184 were in fact a duplicate of the issue you (Dan) reported in late July 2015... Sorry for the duplication.

I did notice that at the very least it restated an obviously bad Android flaw that could trouble our Customers and that some SEs did try it and it worked... so I guess that was a good thing.

Thank you once again for all you do.


David Singer

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments