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

Search This thread

Kyonex

Senior Member
Dec 6, 2011
67
50
28
4pda.to
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.
 
Last edited:

endigo85

Senior Member
Dec 27, 2011
64
18
It's kind of unfortunate that Android suffers from this problem. My thumbdata file is 1.5 GB! Anyways, for those who have replaced the file with a folder of the same name, have you had any problems with taking photos with the Camera app, accessing the Gallery app, or any major/minor changes of any kind?
 

wadster21

Member
Apr 27, 2008
29
3
Oregon
I can also confirm that the new folder method works on my Samsung Galaxy S Blaze 4G. I deleted the thumbdata file then created a new folder with the same name. No new thumbdata file recreated yet.
 
Last edited:
  • Like
Reactions: Kyonex

Nakulkhanna

Senior Member
Jun 28, 2011
257
26
gurgaon
okay i just tried this method on my Xperia go too... i have 2 thumbnail files of 300mb each. just replaced them with another file created with root explorer of the same name n removed the write permissions, lets see if it works. else will try the folder method.
 

indomi

New member
Feb 26, 2008
2
0
I am using galaxy note 2 and my thumbnaiils folder was at one point took up to 7gb of my sd space. By creating a thumbnails file and removed the write permission works on me. The camera and the gallery app so far works fine for me. thank you for sharing such awesome tricks.
 

socmaster

New member
Jun 1, 2012
2
0
huawei g300

no rooted, deleted .thumbnails from sd card , copied .thumbnails folder from internal sd to sdcard .... Everything OK so far
sorry.. inaccurate monster is back I suppose I have to root
 
Last edited:
Jan 28, 2011
31
1
London
I had 2 thumbnails files, each over 2GB, which was more than all the pictures I actually had on the phone. I've seen this tip posted a few times so thought I'd give it ago on my HTC One X (which is not even rooted :eek:). So far, the folders haven't returned for half a day. I created an empty file called .thumbnails using File Expert.

Doing this has caused a minor problem though. I use Nova Launcher Prime and after a reboot, all the custom app icons I set are lost. It also seems slower for all the apps to display after a reboot.
 
Last edited:
  • Like
Reactions: feriber

KanuHelmut

New member
May 14, 2013
3
0
This works on a Samsung Galaxy W

I had the problem, that all the available space was eaten up by then .thumbnails folder.
I have deleted the .thumbnails folder and placed an empty file at that location with that name.
The access rights of the folder cannot be changed - it seems to be the wrong formating for that (fat32).
So the file prevents the folder from being written.

The location is: /storage/sdcard0/DCIM
I am using the CM10 for that phone.

Problem is, that the Galery reacts some times slow and does not show the preview of pictures.
Only grey squares.

I solved that by using QuickPic app from the market instead.
 

petrsiri

Senior Member
Jun 30, 2011
132
19
I deleted the thumbnails file (around 2gb) and even though it initially looked I reclaimed the space, next time I checked I still had 2 gb less free space even though there is no thumbnail file... I confirmed with SD Card analyst that used space was 2 gb less than what it was supposed to be.

Any ideas?

Sent from my Galaxy Nexus
 
  • Like
Reactions: ManOrMonster

Kyonex

Senior Member
Dec 6, 2011
67
50
28
4pda.to
I deleted the thumbnails file (around 2gb) and even though it initially looked I reclaimed the space, next time I checked I still had 2 gb less free space even though there is no thumbnail file... I confirmed with SD Card analyst that used space was 2 gb less than what it was supposed to be.

Any ideas?
reboot your device, look in folders named LOST.DIR (on your internal memory and on your sdcard) - temporary files may be left in these folders
 
Last edited:

petrsiri

Senior Member
Jun 30, 2011
132
19
Thanks but I didn't find anything. It's weird because when I run a directory analysis numbers just don't add up. Free space < SD size - used space

Sent from my Galaxy Nexus
 
  • Like
Reactions: ManOrMonster

ManOrMonster

New member
Aug 9, 2013
2
0
I deleted the thumbnails file (around 2gb) and even though it initially looked I reclaimed the space, next time I checked I still had 2 gb less free space even though there is no thumbnail file... I confirmed with SD Card analyst that used space was 2 gb less than what it was supposed to be.

I did the same thing and currently have the same issue. I deleted the .thumbnails folder through ES File Explorer's SD Card Analyzer. I then copied a .thumbnails file into that same folder (DCIM) via Windows as soon as I deleted it. It didn't see the freed space, and after restarting it still doesn't. My thumbnails folder was 4.12 GB. That's almost half my internal storage gone for no good reason!
 
i have this exact same problem with my 19505 s4. i deleted the 3.7gb(!) thumbnail file ok and stoppped it from recreating a new one. but the freed-up space is not showing.

Exact same problem here on Galaxy Tab 2 7.0. I'm starting to think the only way to get back this "phantom" space is to do a factory reset. I would just do that but don't have 6-8 hours free to set everything back up on my Tab nor do I want to.
 
Did a factory reset to gain back the phantom space. As it turns out, because of this thumbdata file size issue, my device couldn't get the update to 4.2.2 (was on 4.1.1). Hopefully this issue won't return since I've put empty folders with the exact same names as the thumbdata files in the thumbnails folder.
 
Last edited:

haythams

Senior Member
May 13, 2006
165
5
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.
 
Last edited:

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.