Saturday 23 November 2013

How to completely back up an Android device?

Yes there are a lot of software's available on Play store to backup your Android device. A normal user can simply purchase that app and backup your data. it may have it's own cloud server or may provide you with the backup file to save. Take the example of DropBox  you can sync your images with it. Your apps data is generally synced with Google servers if you have checked that option. You can find this option in

System Settings -> Personal -> Backup & Reset -> Back up my data



But What is the fun in that? As a developer we need something more than an app that is developed by someone else and moreover who is charging us for that.




Android includes a built-in way to back up and restore the contents of your phone or tablet. All you need is a computer and a device running Android 4.0 (Ice Cream Sandwich) or newer.

Prerequisites are that you must have Android SDK installed on your system. It is nothing like installing a complicated program. You need to download Android SDK bundle from here.  All you have to do then is extract it and navigate to adt-bundle-windows-x86\sdk\platform-tools folder.(Also you need to have Java installed!)

Open command prompt here. You can execute a lot of android related commands here. You can Start/Stop android server, you can see connected devices etc.


Make sure you have USB debugging enabled. You can enable it from

System settings -> Developer options

Reference Posts -
  1. Troubleshooting steps when Android device is detected but not recognized by Eclipse ADT.
  2. Troubleshooting steps when Eclipse ADT does not recognizing your Android device.

After these you are all set to backup your device. To make sure your device is connected you can go to the type the following command in the command prompt we had opened in platform-tools directory.

adb devices

You should see your device information listed.



Backing Up Your Device


Now you are all set to backup your device data. All you have to do is run the following command on the console

adb backup -apk -shared -all -f C:\Users\UserName\backup.ab




Now you will get a prompt to unlock your device and confirm backup operation. When you unlock your device it will look something like below



Now put your encryption password and select Backup data. Your back up will start soon. Have patience it will take time to backup as it does entire backup including your apps. Even at time it may seem nothing is happening but data is being continuously backed up. You can verify that by looking at the file size of the backup on your machine. It will keep in increasing.

Once it is done you can safely move that file to your cloud storage or your external storage drive.

Restoring a Backup

Restoring your data from the backup is again a very simple task. Simply run the following command in your console

adb restore C:\Users\UserName\backup.ab 



Again you will be provided a prompt to enter the decryption password. Here you must enter the same password you had entered while creating the backup. After entering the password click on Restore my data and your data will be restored.

t> UA-39527780-1 back to top