Ubuntu – How to recover deleted file from mtp device

androiddata-recoverymtp

Acidentally I deleted two directories of images from the internal stockage memory of my Asus zenfone MAX 3 and I don't have an SD card on it. I found foremost is a tool to recover deleted data. But it's not able to give it the /run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C0 as a partition to scan it.
I active the USB debug option following these instructions:

  1. Go to Settings -> About Phone/Tablet.
  2. Go to “Build Number” at the end of the Scroll list.
  3. Tap on “Build Number” repeatedly 3 times
  4. Now Developer Option will be included in setting list of yours now.
    Go to “Develop Options” to check USB debugging > OK. Done.

But in USB configuration I have:

  1. Load
  2. MTP(Media Transfer Protocol)
  3. PTP (Picture Transfer Protocol)
  4. RNDIS (USB Ethernet)
  5. Audio Source
  6. MIDI

I plug the usb cable to the pc and I got this alert message:

 Use USB to transfer files

I pressed OK.

Best Answer

I don't know which mtp device you have but I have been able to recover files using photorec (part of the package testdisk) where scapel (outdated) and foremost (also outdated) were not able to. I also recommend setting the mtp device to mass storage so photorec can read it as mentioned here How to mount Smartphone to recover files

Related Question