Recovering deleted files works best when you stop using the phone immediately. Every new write operation can overwrite the sectors that still contain the deleted image data, making recovery impossible.
If your bootloader is locked and you cannot install a custom recovery, the tutorial still works using the adb pull method, but the recovered data will be limited to files that are still listed in Android’s media database.
Why this matters: ADB is the bridge that lets the PC read the raw partitions without needing root access.
adb devicesdevice. If it says unauthorized, check your phone for a confirmation dialog and tap Allow.If the device does not appear, try a different cable, enable “USB debugging (Security settings)” on some manufacturers, or reinstall platform‑tools.
Android stores user data in the /data partition, which is not directly accessible without root. However, many devices expose the /sdcard (emulated external storage) as a regular directory, and the media database still references deleted files there. To maximize recovery chances, we’ll create a block‑level image of the /sdcard partition using the adb exec-out command.
adb shell "df -h /sdcard"
The output will show something like /dev/block/vold/179:9. Note the device name.
BLOCK_DEVICE with the name you noted:
adb exec-out "su -c 'dd if=BLOCK_DEVICE bs=4M'" > sdcard.img
Important: Most stock ROMs do not grant su to ADB, so the command will fail. In that case, skip to the alternative method in the Alternative without a custom recovery box below.
sdcard.img file on your PC. This file is a bit‑for‑bit copy of the storage partition.
Warning: The dd operation reads the entire partition. Interrupting it may leave the image incomplete, which reduces recovery success.
su)If your device does not allow privileged dd, you can still pull the visible file tree. This will only recover files that the media scanner still indexes, but it’s safer and works on locked devices.
adb pull /sdcard ~/android-recovery/sdcard_copy
This copies the entire user‑visible storage to a folder on your PC.
sdcard_copy folder. PhotoRec will scan the raw files for remnants of deleted images.
PhotoRec is a free, open‑source recovery utility that works on Windows, macOS, and Linux. It ignores the file system and looks for known file signatures, which makes it ideal for finding deleted JPEG/PNG files.
photorec (or photorec_win.exe on Windows).sdcard.img file (or the sdcard_copy folder if you used the alternative method).jpg, png, gif) are checked. Unchecking other file types speeds up the scan.What to expect: PhotoRec creates sub‑folders named recup_dir.1, recup_dir.2, etc. Inside, you’ll find files with generic names like f123456.jpg. Open a few to verify that they are indeed your missing photos.
bs=8M) or try a different recovery tool such as R-Studio (free trial).dd. Use the Alternative without a custom recovery method or flash a temporary custom recovery (TWRP) via fastboot – see the sidebar below.Raw disk image) and that the .img file isn’t empty (check its size).If you are comfortable unlocking the bootloader (which wipes user data) and flashing TWRP, you can obtain a complete userdata image, which yields higher recovery rates.
fastboot oem unlock).fastboot flash recovery twrp-xxxx.img
adb reboot recovery.Data partition, and swipe to start the backup. The result is a userdata.ext4.win file on the internal storage.userdata.img. Then scan it with PhotoRec as described in Step 4.Warning: Unlocking the bootloader deletes all user data. Only proceed if you have a recent backup of everything else.
Recovering deleted photos on Android without root is possible, but success hinges on how quickly you act and whether you can obtain a raw image of the storage. The workflow above gives you two pathways – a privileged dd image for devices that allow it, and a safer file‑tree pull for locked phones. By pairing the image with PhotoRec, you can retrieve many lost pictures that would otherwise be gone forever.









