Android Debug Bridge or ADB is one of the tools that is designed for Android developers, but it can be used by almost anyone to perform a full backup and restore of all the data of your Android smartphone. We have already described how you can install ADB and Fastboot tools on your Windows PC in a previous post – Installing Android ADB and Fastboot Tools in Windows. Once you have setup these tools in your Windows PC, you can proceed to create a backup of all the data of your Android phone on your Windows PC in the following manner.
Backing up Data Using ADB from Phone to PC:
- Open a command prompt. To do this, press the hotkey Win+R, type cmd in the Run dialog and press Enter.
- Enable Developer Options in your Android phone. And then enable USB Debugging in the Developer options.
- In the command prompt window, type the command : adb backup -apk -shared -all and press Enter.
- In your phone you would see the screen where you can touch on the Backup My Data to proceed with the backup. You can also enter a password if you want to encrypt the data.
- The backup process might take a while to complete and will generate a file backup.ab in the working command prompt folder in the end.
Restoring the Data Using ADB from PC to Phone:
- Open a command prompt. To do this, press the hotkey Win+R, type cmd in the Run dialog and press Enter.
- Enable Developer Options in your Android phone. And then enable USB Debugging in the Developer options.
- In the command prompt window, type the command : adb restore backup.ab and press Enter.
- In your phone you would see the screen where you can touch on the Restore My Data to proceed with the restoring of the data. You may have to enter a password if you encrypted the backup data.
- The whole process will take some time to complete and in the end you will have to restart your phone.
Explanation of the Command:
The adb backup command can be used without specifying any parameters. But through the parameters, you can customize the backup to suit your needs. If you want to backup the user-installed apps APK files, then you can specify the -apk parameter. If you want to backup the shared storage (basically the SD card), then you can use the parameter -shared. The -all parameter means that all the installed apps are to be backed up. If you want to backup the data generated by apps, then you can use the -obb parameter. If you also want the system apps (usually they come installed with the phone), then give the -system parameter.
It should be noted that this method of backing up the device data does not include the system ROM. If you want to backup the system ROM, then perhaps you may want to use Online Nandroid Backup.