User Tools

Site Tools


Backup Android Apps data and system apps

Create the backup (whole)

adb backup -apk -noshared -all -system -f ./my-backup.ab

Create a Single-Package backup

# list the package names
adb shell pm list packages
# Create a WhatsApp backup (for example), where PACKAGE-NAME is "com.whatsapp"
adb backup -f yourbackupfile.ab -noapk com.whatsapp

Extract the files/directories of the backup for query or modification

# strip the first 24 bytes (header) and decompress the raw zlib data with "openssl"
dd if=yourbackupfile.ab ibs=24 skip=1 | openssl zlib -d > yourbackupfile.tar
# extract the archive
tar xvf yourbackupfile.tar

More informatión of how to modify/repack and restore an Android ADB Backup on:

Restore the backup (any)

adb restore ./my-backup.ab
docu/csheet/dtproc/backups/android_apps_backup.txt · Last modified: 2020/12/17 22:50 by admin