Backup & Restore Android with ADB

Android Robot

Backup & Restore Android with ADB.
In this example a Samsung Galaxy A7 will be used

Check Connectivity

adb devices -l
PHONE:
Allow access to phone data?

The connected device will be able to access data on this phone.

[DENY] [ALLOW]
[ALLOW]
[COMPUTER]
List of devices attached
9999999999999999 device usb:2-1 product:a7y17ltexx model:SM_A720F device:a7y17lte transport_id:1

Backup Everything

System app data, user app data with apk and sdcard content.
(Note: you can’t backup system app apks and paid user app apks)

mkdir /home/user/android-backup
adb backup -all -apk -shared -f /home/user/android-backup/20811025-SGA7-2017-all-apk-shared.ab
[COMPUTER]
Now unlock your device and confirm the backup operation…

[PHONE]
Full backup

A full backup if all data to a connected desktop computer has been requested. Do you want to allow this to heppen?

If you did not request the backup yourself, do not allow the operation to proceed.

If you wish to encrypt the full backup data, enter a password below:

[DO NOT BACKUP] [BACK UP MY DATA]
[BACK UP MY DATA]

Restore

adb restore /home/user/android-backup/backup.ab

After doing a Factory Reset and doing the above restore.

What gets restored?

  • Some Free Apps (NOT ALL)

What did not get restored?

  • Desktop Background
  • Icon Positions
  • WiFi Settings
  • Application Logins/State

Related

Remote Desktop Control Phone from Computer

Where are Android APK Files Located?

,