Before you start to back up your complete Android phone, there are certain pre-requisite steps you need to perform. The first step is to turn on USB debugging mode on Android phone. I have already explained the related steps in my earlier article. Just for a recap, you need to move to settings>developer options and turn on USB debugging mode.
The next step is to install Java development kit that creates a runtime environment for developers to write tools and applications.
After you have successfully completed the above steps, it’s time to install Android studio. Alternatively, you can also install the stand alone Android SDK tools but you have to perform some manual steps. So I won’t recommend this for normal users.
Now the next step is to install USB drivers. For this, open Android studio, navigate to configure>SDK manager. Now under the SDK tools tab, select USB driver to install it. (as shown in image below).
Alternatively, you can also install it by visit this link and download the USB driver in Zip file. Bit I would recommend the 1st method.
Backup using adb command
Open SDK manager and copy the Android SDK location path. The default path is C:\Users\USER-NAME\AppData\Local\Android\Sdk. Open this sdk folder and now you can see another sub-folder named platform-tools. Pressing the shift on the keyboard, right click on platform-tools. Now click on “open command window here”.
Alternatively, you can right click on the windows start button, open Command Prompt(admin) and paste the following path
Now, depending on the backup type, there are various adb commands.
The basic command is adb backup. The type of backup changes by using following suffixes.
- -apk. used to backup all the applications
- –all. Backs up all data except app
- –Noapk. Does not backup apps
- –Shared. Backup all the dta from SD card
- -f. followed by a path. This switch is used along with other switches. It allows you to specify the backup path of your choice.
The default path of backup is C:\Users\USER-NAME\AppData\Local\Android\Sdk\paltform-tools.
“Note: Replace USER-NAME with the actual name of Windows user.”
Once you have typed the adb command to backup Android data, press Enter and instantly you will receive a notification on your phone screen to fill in a password. You will be requiring this encryption password while restoring the data from this backup file.
Restore Android data by using adb command
In case you need to restore your Android phone from an earlier backup file located on your computer system, you need to type a simple command adb restore in the command prompt. Press Enter and that’s it. Just input your password and the restore will begin and completes in a certain time period depending on the amount of data.
Use command: adb restore C:\Users\USER-NAME\AppData\Local\Android\Sdk\paltform-tools