[TIP/TRICK] Stop Stock Gallery From Creating .thumbnails Folder! Save SD Card Space!

Search This thread
the best and the easeist solution:(n0 root needed)
I pinpointed the problem to thumbnails. These are tiny copies of photos used by some apps to more quickly display pictures. Specifically, the 1GB was being taken up by a thumbnail index file, and I didn't need to lose that 1GB to a function I don't use on the tablet. I erased the file as follows:
1. Open a file manager on Android. I use any File Manager ES is the best.
2. Ensure that it can display system or hidden files. This is an option somewhere under Settings. In File Manager, tap Menu > Settings > Show Hidden Files.
3. Navigate to \mnt\sdcard\DCIM\ .thumbnails. By the way, DCIM is the standard name for the folder that holds photographs, and is the standard for pretty much any device, whether smartphone or camera; it is short for "digital camera IMages." Another BTW: when a folder name is prefixed with a period, then it is a hidden folder in Android (such as .thumbnails).
4. Select and erase the file that's about 1GB and contains the word 'thumbdata." The exact file name will vary.
After I did this, image viewing apps like Gallery operated just fine, with no apparent slowdown from the loss of this file.
In this way I freed up 1GB on my Android v4 tablet, 1GB on my Android v4 phone, and 750MB on an older Android v2 phone.
Keeping the 1GB Free

That's great if it works, but on my tablet, after deleting the file and creating a dummy file, the space STILL was never regained. The only way to get it back was a factory reset followed immediately by replacing the thumbdata files with empty folders of the exact same name. Since I did this, I've had no issues whatsoever and it's impossible for the OS to rob my tablet of space like it did previously.
 

ManOrMonster

New member
Aug 9, 2013
2
0
That's great if it works, but on my tablet, after deleting the file and creating a dummy file, the space STILL was never regained. The only way to get it back was a factory reset followed immediately by replacing the thumbdata files with empty folders of the exact same name. Since I did this, I've had no issues whatsoever and it's impossible for the OS to rob my tablet of space like it did previously.

Same here. After waiting a couple of weeks to see if anyone knew how to get the phantom space back (including contacting the ES File Explorer dev), the only way to get it back was a wipe. Unfortunately, I didn't replace the thumbnail folder right away. I waited to see if it would happen again, and now several weeks later the same issue has happened. I deleted just the thumbnails file this time (instead of the folder) and once again I lost that space. I'll probably have to wipe yet again.

Google needs to be shamed over this debacle because it seems like either they don't know about the issue or don't care. Losing several GB on our phones is a major deal and is absolutely unacceptable.
 

watchman.see

Senior Member
Aug 31, 2013
86
8
the best and the easeist solution:(n0 root needed)
I pinpointed the problem to thumbnails. These are tiny copies of photos used by some apps to more quickly display pictures. Specifically, the 1GB was being taken up by a thumbnail index file, and I didn't need to lose that 1GB to a function I don't use on the tablet. I erased the file as follows:
1. Open a file manager on Android. I use any File Manager ES is the best.
2. Ensure that it can display system or hidden files. This is an option somewhere under Settings. In File Manager, tap Menu > Settings > Show Hidden Files.
3. Navigate to \mnt\sdcard\DCIM\ .thumbnails. By the way, DCIM is the standard name for the folder that holds photographs, and is the standard for pretty much any device, whether smartphone or camera; it is short for "digital camera IMages." Another BTW: when a folder name is prefixed with a period, then it is a hidden folder in Android (such as .thumbnails).
4. Select and erase the file that's about 1GB and contains the word 'thumbdata." The exact file name will vary.
After I did this, image viewing apps like Gallery operated just fine, with no apparent slowdown from the loss of this file.
In this way I freed up 1GB on my Android v4 tablet, 1GB on my Android v4 phone, and 750MB on an older Android v2 phone.
Keeping the 1GB Free
Because .thumb data is a system file, Android recreates it. Indeed, you may find more than one copy in the .thumbnails folder, if you have reinstalled Android or similarly redid the system in some way.
To keep Android from creating the 1GB file anew, we need to create a dummy file that fools Android. In short, we create a text file with a text editor, and then move it to the thumbnails folder. Here are the steps to doing this:
1. Use File Manager to determine the exact name of the thumbnail index file. On one of my Android devices, the name is .thumbdata3--1967290299. Write it down.
2. Start a text editor or word processor on the Android, and then create a new text file.
3. Use the Save As command to save the file in the DCIM folder. (We move it to the .thumbnails folder in a later step.) Save it with the same name at that index file, such as ".thumbdata3--1967290299". Now, depending on the text editor's capabilities, it might not allow the "." prefix or a blank extension. Thus, you might end up with thumbdata3--1967290299.txt as the file name. We fix this in a later step.
4. Exit the text editor, and then switch to File Manager. Now, it is important you use a file manager like ES File Manager app, because it does what some others cannot: it can (a) rename file extensions and (b) access hidden folders.
5. In File Manager, navigate to the \DCIM\ .thumbnails folder. If the thumbdata3 file is there again, erase it again.
6. Move up a level to the \DCIM folder, and then right-click the thumbdata3--1967290299.txt file name. ("Right click" means hold your finger down on the name until a menu appears.)
7. From the menu, choose Rename, and then rename thumbdata3--1967290299.txt to .thumbdata3--1967290299 -- (a) add the dot (.) to the start of the file name, and (b) erase the ".txt" from the end of the file name.
8. Click OK (or Rename) to finish renaming.
9. Right click the file name, and then choose Move (or Cut).
10. Navigate down to the .thumbnails folder, and then tap Paste.
The dummy file will now prevent Android from creating the huge index file.


are you sure this works for you. it surely didn't for me. the file disappeared for a while but then it came back. at the same exact same file before I deleted it. the blank file purposely created and named to replace it and prevent it from being created were gone and overwritten by the system automatically by the same huge-size thumbnail index file.
 

rorogio

Senior Member
Oct 11, 2006
141
15
I found that not only stock gallery app is creating this "crap", QuickPic does it too.
Only that it has the option not to use thumbnails to "speed up next loading" [and eat all your free space left on SDcard](lol!).

The option with creating a FILE ".thumbnails" instead of the deleted folder seems to work for now. Even after camera use and previews in stok gallery app.
 

martyfried

Senior Member
Aug 30, 2013
146
30
Pleasant Hill
Perhaps I'm missing something about where they come from, but my brief experiments seem to indicate that opening the camera app creates the directory and files, although it seemed like Quickpic created it the first time I viewed a photo with it, but not on subsequent viewings. I disabled the Gallery app itself a while back, so I couldn't test that.

It seems like you don't even need to take a photo, just open it.
 

kurkosdr

Member
Jan 15, 2007
29
1
GalaxySIII, 4.3 here. I post to confirm that deleting the .thumbnails folder or the .thumbdata3-whatever file does NOT give you any free space back, even though the folder or file appears deleted to ES, Astro etc. I checked both the "legacy" and "emulated" folders in Astro, appears deleted in both.

Said folder and file reappears after 15 minutes or so with the same size (fortunatelly without penalizing you with more lost space), you may need to open gallery and reboot in the meantime for it to reappear.

I read around the web about people doing force quit on gallery and media before doing the "delete and create file with the same name" trick and they claim it worked. Didn't try it myself, not brave enough (what if said the space .thumbnails occupies is really lost with this trick?)

-----

IMO most people aren't aware about what's eating their space. They assume it's all "system files". That's why the Android team doesn't know it's a problem.

It would be a nice move to inform the Android team about this. Tell them that Android is in desperate need of a button called "clear and recreate thumb cache now" and a "i don't want my thumbs to be cached" checkbox. Failing that, a petition.

I would do it myself, but English is a second language to me.
 
Last edited:
It would be a nice move to inform the Android team about this. Tell them that Android is in desperate need of a button called "clear and recreate thumb cache now" and a "i don't want my thumbs to be cached" checkbox. Failing that, a petition.

I would do it myself, but English is a second language to me.

Your English is so perfect, I can't believe it's not your native language. If you know how to contact the Android team about this, you should go ahead and do it.
 
Dec 14, 2008
228
41
Bucharest
Well, doing the folder trick worked great for me. It was ridiculous to see a thumbnail folder that had 500mb and to have anly 300mb of photos in my phone. It's retarded isn't it?
Anyway, i was expecting to see very poor loading times on the photo gallery, but i was a bit shocked ,and i still can't believe it, i'm just waiting for something to go wrong any moment... the loading speed of photos almost doubled. It's snappier then ever.

My phone, HTC One SV , 4.2.2 , Sense 5 , Stock
 

Marce2014

Member
Mar 2, 2014
9
1
Still don't get the free space back!!

I guess that I’ll have to live with the fact that I got a Samsung SIII (Android 4.3 officially updated, not rooted) device with around of 4gb less of SD space. :crying:

@ kurkosdr: The issue has already been reported to the Android team at https://code.google.com/p/android/ Issue # 39546 during November, 2012!! :confused: So, I wouldn’t expect a quick solution from their side. It’s ticked as a “Defect” and has “Medium” priority.

I’ve tried almost everything, and always the same result. I’m not available to get the free space back, although I’ve managed to avoid the coming back to life of the huge thumdata3 file. Sadly, most of the posts I could find focus on the deletion of the file, but do not check if the free space was recovered indeed.

I’ve tried:
1) erasing the thumbdata3 files (I had 2, it looks like from other posts that one is for images and the other for videos). It appeared again and again (*)
2) putting a dummy file with the same name (trick mentioned at page 4 of this thread) (**)
3) Also putting the directory with the same name trick;

Last intent was wiping the cache through a soft boot. By doing so, something new happened. Now the same problematic thumbdata3 file is being created by the phone. But with a size of 7Mb, which is a lot for a couple of pictures taken with the device camera so as to test it. In any case, still much better than 4 Gb, though :eek:. Before soft booting, I erased the Camera and Gallery apps cache and data from the Applications menu. I don’t know if that is also required, but it’s easy and quick to do.

Sadly, the original 4Gb are still lost somewhere (***) :confused::mad::mad:

John8472 at http://xdaforums.com/showthread.php?t=1717572&page=3 posted another solution that I haven't tried (it looks to far advance for my limit knowledge). But if you take a look further into that thread, it looks like the free space is also not available.

So, bottom line:
1) I managed to avoid the generation of the old huge thumbdata3 file over and over, and now the device generates a “reasonable” new one
2) I still was not able to get back the free space.

Please, if someone knows how to make Android to recognize that the old thumbdata file is gone and should take a look at the new one, please let us all know. Of course, I’m focusing on getting the real free space available, not only in erasing or replacing the thumbdata file.
;););

I promise to post a solution, if I can get it!

Further information,
-----
(*) First time I saw these files, there were 2 of 1.98Gb size each (.thumbdata3-176508120 and .thumdata3—1967290299). After erasing both, when the “. thumbdata3” appeared again was only one file (.thumdata3—1967290299) with the aggregated size of the 2 original ones.
-----
(**) at a Spanish speaking forum, a similar trick was detailed. It added that it was important to change the attribute of the dummy file to “read only” directly from the windows explorer (right click, archive, properties, click read only, or something similar, can’t remember exactly) instead from the Android explorer. I tried doing so with the device connect via USB, but I was not able to see the “.thumbnails” directory at Windows Explorer. I also tried connecting wirelessly via FTP. I could see the directory and the file itself, but it didn’t allow me to change the properties.

It looks like if you create the dummy file at Android, move it to Windows, change the attributes to read only and move it back to android and then move it with ES File Explorer to the .thumbnail directory , the dummy file is respected and it is not replaced. I still have some doubts if it worked because the attributes shown by the ES File Explorer were “-rw” instead of “-r”.

In any case, free space still was not recovered. :(
------
(***) Where are my Gbs gone?
Taking a look at the storage report (configuration / more / storage), it says:

Total: 16Gb; Memory System:4.65Gb; Space Used 5.44Gb; Miscellaneous files 1.99Gb; Memory Cache: 0.03. So, total less the rest = 3.89, that’s my free space.

Total less Memory System almost equals the ES File Explorer Total of 11,333 Gb.

When I click miscellaneous files, the detail is around 100Mb only, instead of 1.99Gb. Therefore, there is a gap of around 1.98Gb

When I click Space Used (total was 5.44Gb), the applications total is 7.07Gb (a submenu is higher than the total one by 1.63Gb).

Then I click Applications and move the screen to Memory Card there are almost 4Gb of heavy games (Real Racing3; Asphalt8 and Minion Rush). If I add the amount detailed at the downloaded screen, rounded figures I get another 1Gb. So, I’m close to the Space Used of 5.44Gb.

Bottom line, 1.98Gb is lost as Miscellaneous files and 1.63 as Space Used – Applications. Total gone 3.61Gb.
------
Soft boot procedure (not an expert, I just googled it and it worked - you'd better do it paying attention to the menu. A wrong choise may imply very different consequences).
Power phone off > Press volume up and home key then press power button all at the same till S3 logo displays > then Android logo will display for a few seconds then list of choices will come up > to select " wipe cache " use volume buttons to highlight choice > then press power button to enter selection > once cache has been wiped will automatically go to reboot press power button and then you’re done,
----
What is the origin of this mess, it is explained at http://xdaforums.com/showthread.php?t=2012061&page=309
-------
A piece of advice of my own,

If by any chance you are force to use your device to move files from one place to another, in case it includes media files (like for instance a GPS related files), my advice is first compress everything to a single .zip file. In theory, it won’t increase not only the amount of files but also the thumbnails.
 
  • Like
Reactions: the gladiator

Marce2014

Member
Mar 2, 2014
9
1
The ONLY way I was able to regain the space was a factory reset. I followed that immediately by creating the dummy thumbdata files to prevent them getting huge. So far, this has taken care of the issue on my Galaxy Tab 2 7.0 since the factory reset about 5 months ago.


Thanks for the message.

Unfortunately, it’s my labor Samsung S3. It’s highly likely that a factory reset not only goes against the "small letters" of the paper I signed when they gave it to me but also I may lose some labor proprietary specific apps installed.
Bottom line, the factory reset is not an option for me.

Still haven't find any solution, yet.
 
Thanks for the message.

Unfortunately, it’s my labor Samsung S3. It’s highly likely that a factory reset not only goes against the "small letters" of the paper I signed when they gave it to me but also I may lose some labor proprietary specific apps installed.
Bottom line, the factory reset is not an option for me.

Still haven't find any solution, yet.

If it's your work phone, check to see if it's okay to factory reset after backing up everything. A factory reset is NOT rooting your phone. There is absolutely no reason why you or ANYONE with a smartphone from ANY company can't do a factory reset. Many times when there are issues with a device, the carrier will suggest a factory reset to fix the issue.
 
Last edited:

phaneendra07

New member
May 10, 2014
1
0
{tip/trick} .thumbnails of gallery can be avoided

hello everyone
well we all know that .thumbnails consumes space in phone memory . . but i had observed that after few configurations it shows as follows : phone memory 1.69gb
apps 900mb
pictures,videos 1.1gb (due to thumbnails of gallery)
etc 23mb
available space 754mb

from the above we came to know that it is either using another memory or ext sd card because my galaxy s duos s7562 has 4gb (according to web search ) but it has 1.69gb usable....
i don't know exactly but i post the configurations i have made : 1. open filemanger (usually named as my files) in your android
2. then select settings by tapping left side of the home button or in some phones it has inside the touchscreen ie select the icon that looks like [ i dont have the picture so i am saying words :: ( lines inside the semi opened box )]
3.then select the dirctory for home image video music etc
finished ;)


another method is that install another image viewer and disable the gallery app in the android by
1. open the task manger
2. open or click on gallery
3. after entering you can see options like force stop , disable etc
4.click on the disable
finished enjoy yourselfs
 

equitube

Senior Member
Feb 27, 2014
205
39
OnaHill
Neither one of the lasts posts worked on mt SM-T110. I have no gallery, I use quickpic (which is great). I've also tried the empty file w same name. It just creates a different number.

Sent from a shadow world by tapadancing on my rooted sm-t110
 

polocanada

Member
Nov 4, 2010
29
5
Works for some and doesn't work for others seems. So far OK on Samsung 4s mini with Android 4.2 installed.

Can somebody confirm the latest KK 4.4 or whatever reiteration or beta version you are using has still the same problem?

Also, try changing the main storage for camera from internal memory to the external card, then resetting the Galery app, removing the external card and do the steps as outlined in this post.

If you don't have rooted phone, you won't be able to change the read/write settings of the files, so the workaround is by either creating file in place of the folder called ".thumbnails" or to create a folder in place of the file called "thumbdata3-XXXXX" or whatever is called on your phone.

I was used "Storage Analyzer" to delete ".thumnails" but I don't know if that could help. In my case the deleted space was recovered after I deleted it. I used the ES File Explorer to create the new file however, other methods could also work.

Disabling Galery app won't work as the index file is used by other apps. Also disabling this would disable any synch operation you have with Dropbox (gives you almost 50GB dropbox space on Samsung phones) since the sync with Google+ locks you down to Google+ with no ability to manage pictures other than the Google+ web interface, old Picasa web interface (if you get the link) or (better) using ChromeOS on Chromebook (has decent picture management app for Google+)
 
Last edited:

jamshed21

New member
Jul 11, 2013
4
2
thumbnail creation problem

friends I think this will workout as its working great for me.
just go to your sd card where your thumbnail file is located.
delete the .thumbnails folder consisting your .thumbnailx--yz file.
create a new file named .thumbnails and move to DCIM FOLDER.
forget your bulky thumbnail file now.....:cowboy::)
 

Marce2014

Member
Mar 2, 2014
9
1
Dear all,

In my case with an unrooted Samsung S3 (android 4.3) the only solution that it worked out was doing a factory reset.

After that, installed Quick Pick as my camera app and disable at the Galey app at the standard app administrator.

When I take a photo, the con is that I cannot see it directly touching the small screen at the camera. I have to go back one step and look it at the Quick Pick screen.

Done this one month ago, no signals of the thumbdata huge file, at least yet.
 

debanjan.ray

New member
Oct 24, 2014
1
0
2 .thumnails directories

That's great if it works, but on my tablet, after deleting the file and creating a dummy file, the space STILL was never regained. The only way to get it back was a factory reset followed immediately by replacing the thumbdata files with empty folders of the exact same name. Since I did this, I've had no issues whatsoever and it's impossible for the OS to rob my tablet of space like it did previously.

By using "Storage Analyser" App, I came to know which application is consuming maximum amount of memory. I realized that apart from storage>emulated>0 >DCIM\.thumbnails directory, there exists another .thumbnails directory in the storage>emulated>0 >.thumbnails, which contains media files of high size ( total > 1GB). These are actually video files. Using ES file explorer app, delete all these media files. Bingo!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    OK I believe I may have found the possible solution to this problem.

    I was searching around on how to fix this problem as well, and tried a few things myself and believe I have found a solution, so I had to sign up for xda to share with everyone else. So please be gentle as this is my first post, although im a long time lurker.

    I also got rid of the stock gallery (uninstalled with Titanium Backup) and now use Quick Pic. although I have removed the stock gallery it still builds that 60mb+ thumbnails directory on my SDcard. I was using SD Maid to delete it but it gets annoying that it kept reappearing even after the uninstall of stock gallery.

    Now to start fixing,

    I realized it was actually a large single file itself named ".thumbdata3-1967290299" in "sdcard/DCIM/.thumbnails/" that was taking up the 60mb+ , the smaller individual thumbnails Quick Pic created only added up to a 1mb or so.

    So what I did was I just grabbed a random useless file from my SD card I didn't need anymore (an alarm clock plus backup .bak file, but I would assume the *new file" option in root explorer would do the same) and I renamed the unneeded file the same name as the file in /.thumbdata/ (the the .thumbdata3-19672902099).

    Now I had a .thumbdata file that was only 1.75kb and just simply moved it to the sdcard/DCIM/.thumbnails/ folder and replaced the 60mb .thumbdata file with the smaller one.

    After a few restarts of my phone, opening and browsing Quick Pic, checking my thumbnail size a few times with both SD Maid and Root Explore - I now have a much smaller 1.75kb file instead of the old 60mb file.

    Hopefully this well help some of you out and solve your problem as well, as far as I can tell it is no longer making that thumbnail file expand so large on my phone.


    Phone: HTC Hero CDMA
    ROM: Cyanogenmod 7.1
    Carrier: i-wireless/sprint
    2
    Just a file, a folder is not good idea because the system will use the folder to write inside, creating a file the system can not create a folder .thumbnails because the name exist..
    I tryed to create file, but when I opened gallery new thumbdata-file (2Gb) just rewrited my file (that I created) and problem still remained. But when I created folder it's works. I don't know how but this is the only way that has helped me.
    2
    You can try creating a folder instead of a file(no need to set permissions). So far, it's working

    Another quick way that seems to work:

    Code:
    rm -rf /mnt/sdcard/DCIM/.thumbnails && touch /mnt/sdcard/DCIM/.thumbnails
    rm -rf /mnt/sdcard/external_sd/DCIM/.thumbnails && touch /mnt/sdcard/external_sd/DCIM/.thumbnails
    1
    Well, it looks like this is not a big issue for anyone out there - but it still annoys me.

    I have since "frozen" the stock Camera and Gallery apps with Titanium Backup Pro, and still; no luck.

    Now, granted when I reboot my phone and look in my DCIM folder it doesn't seem to be creating the .thumbnails folder 100% of the time. But the folder is still being created somehow, and my only guess is from a third-party app (and I can't seem to pinpoint which one) but I'm gonna test to find out which and post my results...

    I wish someone out there could give me some input, I've been talking to myself here for too long. :p - zmag
    1
    i bet it is hiding somewhere. maybe it's slightly different on other phones.

    the issue was that i had an ever-expanding sdcard/dcim/.thumbnails/.thumbdata3--1967290299 file being recreated every time i accessed the gallery viewer, even after that thumbnails folder was erased.

    my device was keeping track of ALL the media files that were ever on it, not just the ones presently on it. so the more files that passed through my device, the bigger the thumbdata file kept getting. the external.db file contains a table that lists all media files along with a bunch of attributes for each. apparently this db file is used to generate the thumbdata file. all the info for deleted files just leads to more padding inside the thumbdata file, so it keeps getting bigger.

    by trimming the table i meant to delete the records in the external.db that correspond to thumbnails for media no longer on the device. that file is an SQLite file, so to open it you need a special viewer/editor. i first used the SQLite Viewer that comes with Root Explorer. with that, i could see the all the redundant thumbnail entries. to edit it, i got the SQLite Editor, though i'm sure there are other ways. then it's a matter of recognizing which files it lists that are no longer on your device, and getting rid of those rows from the table. in my case the external.db file went down from 8mb to 500kb after i did that.

    screenshot 1 showing tables inside external.db, using SQLite Editor

    screenshot 2 showing 'thumbnails' table

    I had the sam issue, but unfortunately your solution didn't help me. I have only a couple of pictures on my phone, but a lot of GBs of music on SDCard and I think this is he reason why .thumbdata3 file is so large on my phone.

    I also tried using SDRescan as proposed here: http://xdaforums.com/showpost.php?p=28516079&postcount=6, but that didn't help either.

    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.