How to recover deleted file from mtp device?

14,468

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

Share:
14,468

Related videos on Youtube

Slim
Author by

Slim

I'm a passionate fullstack javascript engineer, and I'm always looking for new things to learn.

Updated on September 18, 2022

Comments

  • Slim
    Slim almost 2 years

    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.

  • Slim
    Slim almost 6 years
    I tried to use USB DEBUG option and then I used photorec but the device is not displayed in the list.
  • Slim
    Slim almost 6 years
    I run photorec but I didn't find the device in the list of devices.
  • vidarlo
    vidarlo almost 6 years
    USB Debugging on Android is not for giving raw block-level access to the flash of the phone. It's a debugging API.
  • Slim
    Slim almost 6 years
    So it's not able to recover data from linux?
  • Luis Alvarado
    Luis Alvarado almost 6 years
    Follow the link provided about setting it up as a mass storage. Also mention in your post what storsge device you are using and what you have done so far to configure it.
  • vidarlo
    vidarlo almost 6 years
    Not over MTP or USB debugging, no. You have to get a image or raw block-level access. Read and understand the naswer by Oli on that Q&A.
  • Slim
    Slim almost 6 years
    I have already read it and I followed the first part of the answer and It does not resolve my problem.