What happens when you scan for duplicate photos in DeDup 1.5.3 on Android
Tapping Scan in DeDup's Image Scanner reads your photo list from Android's media library, builds a small fingerprint for each photo, and groups photos that match exactly or look nearly the same. The scan itself deletes nothing. This post follows the 1.5.3 code step by step.
What the scan reads
For every photo the media library lists, the scan reads its ID, file size, file path, date modified and date taken. On Android 10 and newer it also reads the storage volume. On Android 11 and newer it reads the favorite flag. Photos in folders you've excluded in Settings are skipped.
For each photo it hasn't fingerprinted before, DeDup opens the file, decodes a small copy upright using the photo's rotation data, and turns that copy into a 64-bit fingerprint. It also reads the first 64 KB of the file for a CRC32 checksum. The small copy is released afterwards. The code doesn't save it.
How photos are compared
Two checks run on each photo, in this order.
- Exact-file check. The file size and the first-64-KB checksum form a key. If an earlier photo has the same key, the new photo joins its group. Only 64 KB is read, so this is a light exact-match check, not proof that two files are identical byte for byte.
- Look-alike check. The small copy is shrunk to a 9 by 8 grid, and each square's brightness is compared with its right-hand neighbour, giving 64 yes/no values. The distance between two photos is how many of the 64 differ. A photo joins the group whose first photo is closest, if that distance is no larger than your Similarity Sensitivity setting (default 10, range 0 to 20). Otherwise it starts its own group.
Only groups of two or more photos are shown. Each photo is compared with a group's first photo, not every member, so results can depend on processing order.
What you see
While scanning, the header reads "Scanning gallery..." and a progress bar counts photos scanned against the total outside excluded folders. Groups appear as they form. Stop ends the scan and keeps the groups found so far.
When it finishes, the header reads "N duplicate groups found" with "Potential savings", the combined size of every photo except the first in each group. Each group card shows "N photos · save <size>" and a row of tiles. The first tile carries a label (KEEP, or a best-shot label). A long press opens a full-screen preview. Groups are listed 10 per page.
Auto Clear keeps the first photo in each group and deletes the rest. Delete appears once you tick tiles. On Android 11 and newer both use Android's system delete prompt, and deletion is permanent. DeDup's Trash screen exists, but nothing in the scanners sends files to it in 1.5.3. Guests see "Sign in required" instead.
What's saved for the next visit
After a scan runs to the end, DeDup saves one row per scanned photo in its on-device database: media address, fingerprint, checksum, size, dates, favorite flag, scores and, for grouped photos, a group key. It also saves the scan time, but not the small copies.
On your next visit, saved groups show straight away, and the next scan reuses stored fingerprints for photos whose size and modified date haven't changed. If any photo has a newer modified date than the last scan, a banner reads "Results may be outdated" with a Re-scan button. Auto Scan on Startup (on by default) only starts a scan when no saved groups exist.
If you stop a scan, the earlier saved results aren't replaced. Every scan, stopped or not, adds a record to Scan History.
Scope of this post
Checked against: DeDup 1.5.3 source code (Android).
Not tested on a device: scan speed, how many photos get grouped on a real library, how accurate the matching is, how the permission prompts look on each Android version, and what the system delete prompt shows.