Pull every JPEG thumbnail out of an Android gallery cache file — Step-by-step guide
Android keeps gallery thumbnails in cache files such as .thumbdata3, with many small JPEG images one after another and no index. ThumbSplit finds each complete JPEG by reading its marker structure in your browser, and gives you a ZIP of numbered images plus an index.csv with the offset, size and pixel size of every one. Nothing is uploaded.
What the sample produces
The sample is generated by a script from JPEG-structured data, not taken from a phone. A separate check compares each file in the ZIP byte for byte with the offsets the script recorded, including a thumbnail whose data holds an end marker and a nested start marker that a plain byte search would cut at. A file with no complete JPEG is rejected.
- Files in the ZIP
- thumb-0001.jpg to thumb-0003.jpg, byte for byte
- Rows in index.csv
- 3, with offset, size, width and height
- Where they sat
- in a 971-byte file, starting at bytes 16, 355 and 662
How to use it
- Copy the gallery cache file from the phone to your computer, for example a .thumbdata3 file from the phone's thumbnail cache folder. Keep the original name and do not edit it.
- Choose one or more cache files here. Each JPEG is checked by its marker structure, and any JPEG start that never ends is skipped and counted. Nothing is uploaded.
- Download the ZIP. Open index.csv to see where each thumbnail sat in the original file, and open the numbered JPEG files to view them.
Supported files
Finds complete JPEG images by walking their marker segments and scan data, so a thumbnail that holds an end marker or a nested start marker inside its data is not cut short. Each image is copied byte for byte: nothing is re-encoded and a damaged image is not repaired. Damaged JPEG starts are skipped and counted. Only JPEG images are extracted; headers that are not JPEG are left out. The layouts are checked with generated files built from the JPEG structure, not with a phone's own cache, and other cache versions such as thumbdata5 are not checked. Files over 128 MB are refused. Nothing is uploaded and the phone is not contacted.