It contains 96x96 pixel versions of your photos. The file is simply a concatenation of JPEG files. You can split it into individual JPG files by searching for the signatures indicating the start and end of a JPG file, i.e. the two bytes FF D8
for the start and FF D9
as the end. If you can transfer the file to your computer and you can access Python, the following Python code will extract the files (name the file thumbdata3.dat
):
#!/usr/bin/python
"""extract files from Android thumbdata3 file"""
f=open('thumbdata3.dat','rb')
tdata = f.read()
f.close()
ss = '\xff\xd8'
se = '\xff\xd9'
count = 0
start = 0
while True:
x1 = tdata.find(ss,start)
if x1 < 0:
break
x2 = tdata.find(se,x1)
jpg = tdata[x1:x2+1]
count += 1
fname = 'extracted%d03.jpg' % (count)
fw = open(fname,'wb')
fw.write(jpg)
fw.close()
start = x2+2
The program will save the files with the names extractednnn.jpg
, where nnn
is a number.