Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,785,935 Members 52,648 Now Online
XDA Developers Android and Mobile Development Forum

[Q] .thumbdata3 file permanent removal?

Tip us?
 
paper13579
Old
#1  
paper13579's Avatar
Senior Member - OP
Thanks Meter 248
Posts: 684
Join Date: Oct 2013
Location: dublin
Default [Q] .thumbdata3 file permanent removal?

Hey guys.

There has been something really annoying me lately. It's the .thumbdata3 file in /storage/emulated/0/DCIM/.thumbnail. Its always like a 200 mb + file and it just takes up wayy too much space on my internal storage. So is there anyway to permanently remove this file for good? Like somehow prevent it from forming again? By the way, i already have the latest albums app so that didn't fix the problem.

Sent from my C2004 using XDA Free mobile app
Press Thanks If I Helped

 
mbc07
Old
#2  
mbc07's Avatar
Senior Member
Thanks Meter 417
Posts: 381
Join Date: Dec 2013
The only way I know about is deleting the folder .thumbnail and then creating an empty file named .thumbnail (this will prevent the folder being created again). However, be adivised that Album app may get laggy since it'll regenerate the thumbnails every time you open the app or use the photo widget. If you have a lot of them, your phone also may get hot and the battery will go quickly if you keep opening album app various times...

Furthermore, it's hard to know the real size of that file. Yes, it holds some space in internal memory, but it's definitely not the size shown. In my phone, for example, this file show as 870 MB, but once I delete it I get only 50-60MB of space back...
Sony Xperia M dual [C2004]
ROM: 15.5.A.1.5 (stock)
Android version: 4.3 (rooted)
Bootloader: locked (unlockable)
The Following User Says Thank You to mbc07 For This Useful Post: [ Click to Expand ]
 
paper13579
Old
#3  
paper13579's Avatar
Senior Member - OP
Thanks Meter 248
Posts: 684
Join Date: Oct 2013
Location: dublin
Quote:
Originally Posted by mbc07 View Post
The only way I know about is deleting the folder .thumbnail and then creating an empty file named .thumbnail (this will prevent the folder being created again). However, be adivised that Album app may get laggy since it'll regenerate the thumbnails every time you open the app or use the photo widget. If you have a lot of them, your phone also may get hot and the battery will go quickly if you keep opening album app various times...

Furthermore, it's hard to know the real size of that file. Yes, it holds some space in internal memory, but it's definitely not the size shown. In my phone, for example, this file show as 870 MB, but once I delete it I get only 50-60MB of space back...
That worked for like an hour. Afterwards when i checked again, i actually found two .thumbnail3 files instead of one. They were both the same size. Any idea why?

Sent from my C2004 using XDA Free mobile app
Press Thanks If I Helped

 
mbc07
Old
(Last edited by mbc07; 11th May 2014 at 10:14 PM.)
#4  
mbc07's Avatar
Senior Member
Thanks Meter 417
Posts: 381
Join Date: Dec 2013
This trick works only for folders (e.g. if you created empty .thumbdata3 file inside /DCIM/.thumbnails/ it won't work, that file will be replaced next time you open Album app). You need to remove the entire .thumbnails folder from DCIM and then create an empty .thumbnails file in DCIM. Next time it'll try to create the folder again to store the thumbdata3 files but it'll fail because a file with the same name already exist, doing nothing then...

Another way is opening a terminal (or adb shell) and running these two lines of code as root:
Code:
chown 0:0 /data/media/0/DCIM/.thumbnails
chmod 0440 /data/media/0/DCIM/.thumbnails
That way this folder will be accessible only if Album app run with root access (which never occur)
Sony Xperia M dual [C2004]
ROM: 15.5.A.1.5 (stock)
Android version: 4.3 (rooted)
Bootloader: locked (unlockable)
The Following User Says Thank You to mbc07 For This Useful Post: [ Click to Expand ]
 
paper13579
Old
#5  
paper13579's Avatar
Senior Member - OP
Thanks Meter 248
Posts: 684
Join Date: Oct 2013
Location: dublin
Quote:
Originally Posted by mbc07 View Post
This trick works only for folders (e.g. if you created empty .thumbdata3 file inside /DCIM/.thumbnails/ it won't work, that file will be replaced next time you open Album app). You need to remove the entire .thumbnails folder from DCIM and then create an empty .thumbnails file in DCIM. Next time it'll try to create the folder again to store the thumbdata3 files but it'll fail because a file with the same name already exist, doing nothing then...

Another way is opening a terminal (or adb shell) and running these two lines of code as root:
Code:
chown 0:0 /data/media/0/DCIM/.thumbnails
chmod 0440 /data/media/0/DCIM/.thumbnails
That way this folder will be accessible only if Album app run with root access (which never occur)
I actually did both of the things you said above. And so far so good. Well done bro, you're amazing

Sent from my C2004 using XDA Free mobile app
Press Thanks If I Helped

 
bubimir13
Old
#6  
bubimir13's Avatar
Member
Thanks Meter 2
Posts: 47
Join Date: Jun 2008
Location: Kutina
Quote:
Originally Posted by mbc07 View Post
This trick works only for folders (e.g. if you created empty .thumbdata3 file inside /DCIM/.thumbnails/ it won't work, that file will be replaced next time you open Album app). You need to remove the entire .thumbnails folder from DCIM and then create an empty .thumbnails file in DCIM. Next time it'll try to create the folder again to store the thumbdata3 files but it'll fail because a file with the same name already exist, doing nothing then...

Another way is opening a terminal (or adb shell) and running these two lines of code as root:
Code:
chown 0:0 /data/media/0/DCIM/.thumbnails
chmod 0440 /data/media/0/DCIM/.thumbnails
That way this folder will be accessible only if Album app run with root access (which never occur)
Can you please write full adb procedure for noobs please
I think this might be a very helpfull, since that problem exists in virtually all android 4.0+ devices and it is annoying as hell
My Devices over the years:

Sony Xperia M - Android 4.3 Jellybean
<- Prestigio Multiphone PAP 4040 - Android 4.0.4 ICS
<- LG Optimus Me P350 - Android 2.2 Froyo
<- HTC Tytn II - Windows Mobile 6.1
<- HP 514 Voice Messenger - Windows Mobile 6
<- Sony Ericsson S500i
<- Sony Ericsson D750i
<- Nokia 6320i
<- Siemens c65
<- Siemens MT50
<- Nokia 3310
 
mbc07
Old
#7  
mbc07's Avatar
Senior Member
Thanks Meter 417
Posts: 381
Join Date: Dec 2013
It's simple. The first option is chown/chmod the .thumbnails folder but it may not work in all phones (however, it works fine in Xperia M). You have two ways to do that:

Using a computer:
1) Enable USB Debugging
2) Plug your USB cable (make sure you're in MTP mode)
3) Open adb shell from Terminal/Command Prompt and run the following commands:
Code:
Select Code
su
rm -r /data/media/0/DCIM/.thumbnails
mkdir /data/media/0/DCIM/.thumbnails
chown 0:0 /data/media/0/DCIM/.thumbnails
chmod 0440 /data/media/0/DCIM/.thumbnails
Using only your phone:
1) Install Terminal Emulator app if you don't have it
2) Run the same commands:
Code:
Select Code
su
rm -r /data/media/0/DCIM/.thumbnails
mkdir /data/media/0/DCIM/.thumbnails
chown 0:0 /data/media/0/DCIM/.thumbnails
chmod 0440 /data/media/0/DCIM/.thumbnails
If you get errors when running any of these commands, you should install busybox in your device and then try again. Also, as I said before, it may not work in all phones, and if that method failed, you can try the empty file method. In your phone, using a file manager of your preference, go inside DCIM folder and delete the entire .thumbnails folder. Then, create an empty file named .thumbnails and you're done. If this method also fails, your phone have a different filesystem layout (eg. doesn't have an emulated SD Card) and I don't know any method of archiving that in these devices.

Furthermore, be adivised that your gallery may get laggy since it'll regenerate the thumbnails every time you open the app or use a photo widget because you disabled thumbnail cache. If you have a lot of pictures, your phone also may get hot and the battery will drain faster, especially if you open your gallery frequently...
Sony Xperia M dual [C2004]
ROM: 15.5.A.1.5 (stock)
Android version: 4.3 (rooted)
Bootloader: locked (unlockable)

The Following User Says Thank You to mbc07 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes