Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

ADB Backup Device

20200122

$ adb backup -apk -shared -all -f s7backup.ab
Now unlock your device and confirm the backup operation...
A popup appears on the device requesting permission to perform the backup. An option is provided to encrypt the backup. If the device is encrypted the backup must also be encrypted. Provide an encryption phrase and then click on the button to continue with the backup.

Backup has been measured at about 200MB per minute with USB2. A typical backup will create a file of 6GB in about 30 minutes.

Numerous options are available for the backup from the command line. -apk will backup all apps whereas -noapk (the default) will not backup apps. -shared will backup data from the SD card whereas -noshared (the default) will not backup the SD card. -all will backup system data and app data but not the apps themselves.

To restore:

$ adb restore s7backup.ab

To explore its contents, download the android-backup-extractor from https://sourceforge.net/projects/adbextractor/. Then:

$ unzip android-backup-extractor-20180521-src.zip
Latest test (20200413) of this fails (both Java and Perl versions) to convert the ab file into a tar file that can be extracted.


Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.