Published on
Updated on 

Guide on Data Recovery from Internal Storage of Android Phone

Authors

Photos and videos are lost from internal memory of a phone more often than from SD Card. By far not every program can find a way around such an issue.

This, however, is not a merely a question of lost data. Android users have a limited set of tools they can use to recover data from internal storage of a phone.

Recovery method we are describing here can’t be called a simple one but it works. 

Is it hard to recover data from Android phone internal memory?

It’s not an easy thing to access internal memory of an Android device. When you connect your phone to the computer, it is opened via Media Transfer Protocol. The content of the phone storage is connected as a separate disk and is not recognized by data recovery software.

That is the main difficulty one faces when restoring files from the internal memory. Further down the text you’ll find out how to go round this obstacle.

Steps you take to recover deleted files from phone memory

These instructions are applicable to any Android phone since you can get access to the internal memory on absolutely any of them. Another component that you need is Windows 7 or 10 (or, in principle, any OS).

Here’s the algorithm for Android internal storage recovery:

Table of Contents

Setting up FileZilla Server

FileZilla Server is a program for creation and management of an FTP server. Without setting up the server you are unlikely to get an image of the internal storage of Android.

1. Install FileZilla Server, leave default settings as they are.

2. Run the app as Administrator.

3. Leave the name of the server unchanged.

4. Alter FileZilla General Settings:

  • listen on those ports - 40
  • timeout settings – specify value "0" in each case
settings 01

5. In the Users section (edit – users) add a new user: click Add and type in qwer for name and pass for password.

6. In the same Users menu on the left find the tab 'Shared folders'. In it add a folder where you are going to copy the image of internal storage. Click Add and specify the address C:\cygwin64\000.

7. Choose the line C:\cygwin64\000, click Set as home dir (to get letter H on the left). Enable Read and Write options.

settings 02

Setting up ADB

To set up ADB connection between your phone and PC you need the following files:

  • adb.exe
  • AdbWinApi.dll
  • adb-windows.exe
  • AdbWinUsbApi.dll
  • fastboot.exe

They can be copied from the distribution kit Android SDK (size about 700MB) or downloaded in a portable format from our page:

Download ADB

Copy these files to the folder C:\cygwin64\bin.

Connecting your phone to your PC using ADB protocol

  1. Install USB drivers for your device (if you haven’t got them yet).
  2. Restart your PC.
  3. Enable USB debugging on your phone (for correct work of ADB).
  4. Now check if ADB works. The easiest way is via Windows (cmd). In the console type in:

adb devices

On the list of devices you should see the code and name of your tablet or phone.

Enable USB tethering

Your mobile device needs to be connected to the computer via USB protocol using tethering. For this:

  1. Go to Settings & Internet, and then Hotspot & tethering (or Settings > Mobile hotspot and Tethering - USB Tethering on Samsung Galaxy).
  2. Enable USB tethering option.
  3. On computer open the command line (cmd) and type in ipconfig. Address will appear in IPv4 line.
  4. Remember the figure: it is going to change every time you connect your phone.
how to enable USB Tethering

Looking for the partition with lost data 

Why copying the whole internal memory to the computer (its size can reach dozens of gigabytes). Copying the partition from which files were deleted is enough.

1. To get the list of partitions in the text form, perform the following sequence of commands:

adb shell

su

find /dev/block/platform/ -name 'mmc*' -exec fdisk -l \; > /sdcard/list_of_partitions.txt

2. Next, copy the text file list_of_partitions.txt to your computer. To do this in the new console window type in:

adb pull /sdcard/list_of_partitions.txt C:/cygwin64/000

For the moment your file with the partition list is in folder 000.

3. Figuring out the exact location of the photos, videos and other files before their deletion is not an easy task. Consider the largest partition, it is likely to be the one you’re looking for. If there is no sign of deleted files on it, examine the other internal storage partitions one by one.

Making an image of Android internal storage

1. Open a new window of the console, type in (replace this with your own data):

adb shell

su

mkfifo /cache/myfifo

ftpput -v -u qwer -p pass -P 40 192.168.42.79 mmcblk0p27.raw /cache/myfifo

Keys:

  • qwer – user name
  • pass – password
  • 40 – port number
  • 192.168.42.79 – server address
  • mmcblk0p27.raw – area of the internal storage where the files were located

2. Open another window in the console and type in:

adb shell

su

dd if=/dev/block/mmcblk0p27 of=/cache/myfifo

where mmcblk0p27 is the name of Android internal storage partition.

3. FileZilla will start copying Android internal storage to folder 000, it’s rather time-consuming (from ten minutes up to an hour).

Converting image of the memory to VHD format

VHDTool is a program that creates VHD and VHDX virtual hard drives. You need your VHD file for mounting it into the system. It enables data recovery software to see the memory image as a separate disk, which can’t be achieved by connecting your phone using basic method.

  1. Download VHDTool.
  2. Copy VHDTool.exe file to folder 000.
  3. Open console utility Cygwin.bat and type in:

cd C:/cygwin64/000/ VhdTool.exe /convert mmcblk0p27.raw

Here mmcblk0p27.raw is the name of your partition (rename it!).

In the end you get a VHD file, despite it having .raw extension.

Mounting the image of internal memory

For futher internal storage recovery you need to mount VHD as a virtual disk in Windows. How to do it:

  1. Start – Run – perform the command diskmgmt.msc. Next go to Disk Management.
  2. Menu Action > Attach VHD.
  3. As a location define [c:\cygwin\nexus\mmcblk0p12.raw] .
  4. Right-click on the name to the left from the blank space and select Initialize Disk and further – GPT.
  5. Right-click on the blank file space – New Simple Volume. 
  6. In the wizard click Next and leave default settings for size unchanged. Next, assign a letter to the drive (say, K). Next. Double-check that you didn’t activate the ‘Partition not allowed to be formatted’ option.

Critical! There will pop up a disk format window. DO NOT FORMAT disk at this stage. It is impossible to restore files after internal memory gets formatted!

1. Right-click on RAW space and select Format…

  • File system type - FAT32
  • Cluster size – by default

2. Check if the option ‘Quick format’ is enabled and click OK.

You’ll get a notification warning you that formatting this partition will remove all the data from it. Just a reminder: you selected the quick format option (double-check if so), so everything is going alright.

How to recover data from phone memory image using Recuva

  1. Open Piriform Recuva (you can download it here). In recovery Wizard click Next. Select All files and click Next. In the text box ‘In a specific location’ give the letter assigned to the mounted drive. Click Next.
  2. Tick the option 'Enable Deep Scan' – it will increase your chances to find and recover deleted data from phone memory.
  3. Press on 'Start' to scan the disk. Recuva works slowly in Deep Scan mode, and the whole thing can take about an hour.
  4. After Recuva displays scan results, select files to recover. Press on 'Recover' and specify the location you want to save selected data from the internal storage of your phone.

Questions - Answers

[Is it possible to recover overwritten photos]

I just want to ask if it’s possible to recover a deleted photos in a Samsung J7 Pro internal memory.

I purposely deleted my photos and reset my phone. Store new photos and videos until the phone storage is full and done it 7x then after that the new owner of the phone is using it. It’s almost a year now since I overwritten it, is it possible to recover my old photos doing root or the process you said?


My phone internal memory was full. So I transferred some photos to a memory card and now the majority of the photos opens as a green spot! When I went to repair it I was told that I had transferred the photos to the memory card in the wrong way and, as a result, the files were deleted. Is there a chance I can somehow fix the problem and recover deleted files from Android internal storage?!


[Lost my all photos in internal storage]

My all photos has been deleted from internal storage then I will try many of apps but failure what can I do to get my all photos and videos back please give me solution.


[making image on Android]

in your guide it says:

"find /dev/block/platform/ -name 'mmc*' -exec fdisk -l \; > /sdcard/list_of_partitions.txt"

if i want to get something from the internal memory, why would the text include SD CARD? also it has no SD CARD. i'm trying to find some hidden files that concealed with an app: i used the app HD SMTH which makes a folder inside the internal storage, with an extension behind it. the photos and videos are very valuable to me.


Does this article assume that the phone being accessed is a rooted device? Attempted this guide on a factory Samsung s8(not rooted) that was factory reset accidentally. Running into problems with the following commands adb shell

resulted in this response "dreamqltesq:/ $ su"

su

resulted in this response "su/system/bin/sh: su: not found 127ldreamqltesq:/ $"

find /dev/block/platform/ -name 'mmc*' -exec fdisk -l \; > /sdcard/list_of_partitions.txt


Photos disappeared I'm using Honor 6X..Since my internal storage was full, I transferred few folders from my phone's gallery to laptop..later I found the rest of my folders went missing and images are lost, including the screenshots folders..I'm sure that , I didn't delete or transfer those folders….it just went missing…what should I do , to recover my photos..


[recovering data from dead android phone's internal memory]

My samsung galaxy note 2, all of a sudden went dead after kept for charging with absolutely no sign of life. tried to put new battery and still it remains lifeless. is there a way i) i can wake up the phone ii) or at least recover deleted files from phone memory?


Recovery from internal phone memory

I have a Moto X play phone which had some important data that got deleted. I had moved the files from internal storage to SD card however it got formatted. I have never done a factory reset on my phone. Is it possible to recover the formatted data from phone internal memory? All other options to recover the data from the SD card have failed. Please suggest.


[Recovery of data from android phone internal memory]

Loved the article unfortunately recuva didn't find the files i’m looking for. The data i want resides in /data/data/org.sufficientlysecure.keychain, but the list of partitions comes back as userdata. Where should i look, do i need to download all the memory of the phone or can i just image the data portion?


Recovery of data from android phone internal memory

Hi love the guide, think there is a typo in it (nexus). Followed the guide I'm looking to restore my secret keys from openkeychain pgp, which was accidentally uninstalled. The files have the extensions .db and .sec they reside in the folders /data/data/org.sufficientlysecure.keychain/ which has also been deleted. Is there any way to make recuva (sp) find those extensions or undelete whole directories / folders?


I am using Android mobile phone. I unknowingly deleted My phone internal "storage\emulated" directory. all data paths was deleted. so i can't open or view my data all..i lost all data.do you know how to recover my all data from my phone?


Hi, this article is brilliant. It would be helpfull if you could add the info that the windows firewall might be blocking the ftp connection to the article (took me around 30min to figure out)

also how to figure out the usb tethering ipadress for the server isn't that intuitive (ipconfig -all -> Remote NDIS based Internet Sharing Device)

Regards


[Gallery photos]

Nearly all my gallery photos have disappeared. The pics saved to my SD card are still in my file folders but the internal memory pics are gone. I still have over 1/2 of memory still available can you help me. I tried one of the apps for recovery…it was no help. Thanks


The weird thing is, that when i bought my phone a year or 2 ago, the sd card worked fine. I also used to have an sd card option in the settings menu, but thats suddenly nowhere to be found. So i can't even check what's going on. I can only see the internal storage. I've tried restarting my phone with and without sd card. I've also tried reformatting the sd card, but it already had the right format.. Any idea what's going on?


hello i tried to use your method on my NOT ROOTED galaxy s7 edge

everything worked until this step

Looking for the partition with lost data

Why copying the whole internal memory to the computer (its size can reach dozens of gigabytes). Copying the partition from which files were deleted is enough.

To get the list of partitions in the text form, perform the following sequence of commands:

adb shell

su

when I write SU it tells me

System/Bin/sh: su : su not found"


Lost files from internal storage

I have deleted files from internal storage of my files in my android tab A and I lost my all photos from gallery and audio files.please help me to recover because they are important photos


Was this helpful?

Result: 0, total votes: 0

I'm Vladimir, your guide in the expansive world of technology journalism, with a special focus on GPS technologies and mapping. My journey in this field extends over twenty fruitful years, fueled by a profound passion for technology and an insatiable curiosity to explore its frontiers.