A relative of mine accidentally deleted the "DCIM/Camera" folder with all her photos, and asked me if it's possible to recover them.

I copied the 'userdata' partition (ext4) to a VHD image at once and tried to recover the files (Recuva, R-Studio, Photorec, DiskDrill, DiskDigger, DiskGenius, etc., were used but to no avail). Nearly all the photos were of 0 bytes in size, like they were securely deleted.

Several years ago I encountered a similar issue (the photos just vanished, I believe it was some SD card issue) and recovered files were 0 bytes in size too.

Is there any way to recover the files?

Unfortunately, sync with Google Photos cloud was not set up as well.

Edit: this is how I pulled the image:

  1. Installed BusyBox in the phone;

  2. Installed Filezilla Server on desktop. Settings: listen on those ports: 40, all timeout settings: 0, create new user ("user", "pass") and give him rights for the chosen shared folder ("read write delete" for files and "list + subdirs" for folders);

  3. Disabled Windows firewall;

  4. Checked adb (adb devices);

  5. Enabled USB tethering, got the new desktop IP via ipconfig (;

  6. Found the userdata partition (mmcblk0p17):

    adb shell
    cat /proc/emmc | grep userdata
  7. Pulled the dump:

    adb shell
    mkfifo /cache/myfifo ftpput -v -u user -p pass -P 40 mmcblk0p17.raw /cache/myfifo

    And then:

    adb shell
    dd if=/dev/block/mmcblk0p17 of=/cache/myfifo
  8. Voila! We've got a 27 GB mmcblk0p17.raw image.
  • 1
    Not sure how you copied the "userdata" partition unless you have TWRP or an unlocked bootloader, nor did you state your device. If you are trying to access a partition or directly to the "disk" via USB, that hasn't been possible since prior to Android 5.0 and only MTP access is available, which is accessing a database of files and using the OS to transfer then with a different protocol, you can't access the DB directly. Assuming you did pull a good image with dd or similar tool, and those tools or testdisk under Linux found nothing or just zero byte files, unfortunately they are just lost. – acejavelin Dec 5 '18 at 2:00
  • Yes the ext4 image seems to be pretty good, I even managed to restore 4 photos out of several hundred, and all other files were intact. I tried testdisk as well (so called PhotoRec). – FelisManulus Dec 5 '18 at 4:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.