I accidentally formatted my Android phone's storage partition while updating to Android Oreo today. When I tried to restore the backup I realized that the backup of the data partition had failed and basically is an empty file with 0 Bytes.

I would like to run PhotoRec over it but I'm somehow unable to get my phone into mass storage mode. It seams like Google has ditched it for MTP. I tried some apps from XDA but none of them really worked with my device. I was able to get the external SD mounted but not the internal storage. The custom recoveries that are available for my device only support MTP as well.

Does anyone have an idea how it could be possible to recover my files? I'm rooted and bootloader is unlocked.


2 Answers 2


You can't do that. Google has made MTP the default since version 3.0 and remove mass storage mode completely years ago in Android 4.0

If you want to do things directly on the data partition you have 2 ways

  • Run command in adb shell
  • Start in recovery mode (if you're using a custom ROM)

Since you're running a restore from backup, I assume you're on a custom ROM and still have the backup file with you, why don't just do the restoration again?

  • The backup failed. file size of the data partition backup is 0 bytes and i only realized when it was too late so i cant just restore
    – J. Doe
    Commented Jul 23, 2018 at 11:57

You can see my answer to Why can't I see Android storage as a partition on PC? for methods to enable UMS and make /data (userdata) appear as a partition on PC, which can be mounted on Linux.

Other options to access internal storage at block level are answered in How to take full image backup of partitions or eMMC? and How to recover a deleted file from /data partition?.

  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Firelord
    Commented Apr 26, 2020 at 8:04

You must log in to answer this question.