Find Your Device:
Or Continue to Thread: using adb to backup user apps …
23rd February 2014, 04:18 AM |#1  
OP Junior Member
Thanks Meter: 0
I found the following steps useful and thought I should document it for the benefit of others. I did not know that adb has a backup which is useful for non-rooted devices like the google glass where you do not have direct access to /data/app folder via adb shell.

adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion
(aka .obb) files associated with each application; the default
is noobb.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)

I used "adb backup -nosystem -apk -all -f backup.ab" to backup all my apps

You can then use to validate the integrity of the backup

anand@awrtc:~/android-backup-extractor-20130526-bin$ java -jar abe.jar info
Android backup extractor
Cipher.getMaxAllowedKeyLength("AES") = 128
Strong AES encryption disabled, MaxKeyLenght is < 256
Please install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7
info: abe info <backup.ab> [password]
unpack: abe unpack <backup.ab> <backup.tar> [password]
pack: abe pack <backup.tar> <backup.ab> [password]

Works like a champ!

Hope this helps someone like me who did not know about adb backup prior to now.