How to Recover data Using ADB recovery on Android

After my smartphone was broken and dead i Couldnt found a good way to recover my useful data, Repairing it was costing me more than its worth in the market, I tried my level best to recover data from number of ways but all were in vain, I had heard About How to Recover data Using ADB recovery on Android smartphones, but it never seemed easy as it had alot of coding and stuff which I didnt had a clue about, But in the end I tried using the ADB recovery, and succeeded, My Smartphone was Samsung galaxy S2, ADB recovery is same for all Android smartphones, So below Method will work for you guys aswell, I have tried my level best to keep it simple and understandable for layman.

Please note that,this method worked for me. If you brick your phone, loose files, break your PC, I am taking no responsibility, However, if this is your last ditch attempt to get your collection of your precious memories in the form of pictures from your phone before you throw it away, making it more broken cant hurt.

{Samsung Specific} First of All, First of all you need to download a custom recovery like ClockworkMod or TWRP on your device. There are lot of them available on our site. If you do not find one for your phone, you can download it from ClockworkMod official site or TWRP official site. The only part you will have problem with if you dont have a working screen is putting the phone into download mode. You have to power it on by holding down the volume down, home and power buttons for about 10 seconds, then wait about 5 seconds and press volume up once. This is you accepting the disclaimer that you are installing stuff on the phone at your own risk. Which you do, if you want to proceed any further with this! Other than that, their tutorial is really easy to follow and has all the links to the stuff you need. You only need to install the custom recovery, don’t continue on to install cyanogenmod.

Sponsored links

{For Non-Samsung devices} You need a custom recovery fr your device. You can boot into recovery using following method. This method not only applies to Non-Samsung devices, but on Samsung devices as well. Actually all devices have different methods, but this method is same for any device running Android OS.

  • Enable USB Debugging
  • To do so, navigate to Settings > Developer Options > USB Debugging and enable it
  • For Android 4.2 and higher, Developer options are hidden. Activate them by taping build number 7 times
  • Once you have enabled USB Debugging, type adb reboot recovery in cm window of Minimal ADB and Fastboot Installer or you can also use SDK tools here
  • To reboot into Fastboot mode in Sony devices to flash img or elf files, Hboot mode in HTC devices or bootloader in Nexus devices, type adb reboot bootloader and press Enter

Once you have clockworkmod installed, you need to get ADB. The easiest way to do this is to go here . This gives you all you would need to develop for android, but essentially we are just using one of the tools it gives us (ADB). Unzip that file somewhere easy to get to and go into the unzipped folder.

Go into sdk -> platform-tools and make a new folder in there called “phone” .

Then open up a command prompt by going to your start menu, typing in “cmd” and pressing enter. You then need to navigate to the tools we need which are in the directory you unzipped:

cd C:\adt-bundle-windows-x86-20130219\sdk\platform-tools

The platform-tools folder is where adb.exe lives and this is the killer tool that we need. From here you can run the following command to make sure its going to work correctly:
adb ?
This will produce the long list of commands and help information for adb. Don’t close the command prompt – you will need it in a minute.

Now you have the right tools in place, pull the battery from the phone to make sure its off, then put it back in and power on in recovery mode (volume up, home and power). Plug into your PC and let it install the drivers. Once that is done Samsung Android ADB device (or something similar) should show up under Samsung Android Phone in your device manager. Go back to your command prompt window and type in the following command:
adb shell

If all has gone well up to this point you should be dropped into a very basic shell prompt on the phone itself. It usually just shows up as a # symbol,. If you have this shell, you are now in position to get stuff on and off the device, however there is a bit of setup to get anything useful.

adb-shell

In order to gain access to the area where your phone would store your data, you need to mount the internal memory card so that you can read from it. Start with:

cd etc && ls
This changes directory to /etc and then lists its contents. It should contain a file called something like recovery.fstab which we need to read. Luckily we can do this with
cat recovery.fstab

adb-shell

This file shows you where the physical devices are mounted  when the phone is being used normally. The important one we are looking for here is /emmc, which on my phone used physical device /dev/block/mmcblk0p11. So now we need to make that directory and mount that drive to read its data.

cd ../
mkdir emmc
mount /dev/block/mmcblk0p11 /emmc
cd emmc && ls

Barring any errors along the way, you should now have a listing that will look familiar if you have ever looked around your phones storage.

adb-shell-mounted

Now that’s accessible via the shell, all we need to do is copy it to our host PC. To do this you need to come out of the adb shell prompt and use the pull command. Enter the following:
exit
adb pull /emmc ./phone/

This will then pull the entire contents of the /emmc directory to the phone directory we made earlier. Go back to that folder to see the files once adb has finished.

adb-shell-pull

Once you have done that, you can enter:
adb reboot

to safely reboot the phone. If the screen is broken, I’m guessing that its probably going in the recycling so this is not strictly necessary. You can just unplug and remove the battery.

There are lots of Android Smartphones  that support clockworkmod so this method may work on other handsets. Cyanogenmod provide a guide for installing it on a lot of other mobiles so if you have a different android handset, it may be worth a go before shelling out for someone to try and recover the data for you or just getting rid of the phone.

If you have any Questions, Feel Free to ask them in Comments.

Apps for PC +Hayder Ameen is a Computer Science student and Android is his passion. Other than that, he is a gym addict and a great sportsman. Connect with Hayder on Facebook and Twitter Email: Hayder@TechGlen.com Site: WhatsApp For PC

One thought on “How to Recover data Using ADB recovery on Android

Add Comment