5,605,373 Members 41,137 Now Online
XDA Developers Android and Mobile Development Forum

using adb to backup user apps on googleglass

Tip us?
 
dq11
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 26
Join Date: Jun 2009
Default using adb to backup user apps on googleglass

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 http://sourceforge.net/projects/adbextractor/ 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
http://www.oracle.com/technetwork/ja...ad-432124.html
Usage:
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.
 
dq11
Old
#2  
Junior Member - OP
Thanks Meter 0
Posts: 26
Join Date: Jun 2009
It is interesting that on an un-rooted XE12 glass, one can access directly all the system apks that are located under /data/system but not directly access the manually loaded app apks located under /data/apps
All of these succeed

adb pull /system/app/ApplicationsProvider.apk
adb pull /system/app/BackupRestoreConfirmation.apk
adb pull /system/app/CalendarProvider.apk
adb pull /system/app/CertInstaller.apk
adb pull /system/app/ContactsProvider.apk
adb pull /system/app/DefaultContainerService.apk
adb pull /system/app/DownloadProvider.apk
adb pull /system/app/FrameworkStubs.apk
adb pull /system/app/GlassBluetooth.apk
adb pull /system/app/GlassBoutique.apk
adb pull /system/app/GlassBrowser.apk
adb pull /system/app/GlassCamera.apk
adb pull /system/app/GlassDeviceAdministration.apk
adb pull /system/app/GlassGesture.apk
adb pull /system/app/GlassHangouts.apk
adb pull /system/app/GlassHome.apk
adb pull /system/app/GlassLockRecovery.apk
adb pull /system/app/GlassLogging.apk
adb pull /system/app/GlassMaps.apk
adb pull /system/app/GlassMusicPlayer.apk
adb pull /system/app/GlassPhone.apk
adb pull /system/app/GlassPhotosphere.apk
adb pull /system/app/GlassSearch.apk
adb pull /system/app/GlassSettings.apk
adb pull /system/app/GlassSetup.apk
adb pull /system/app/GlassSound.apk
adb pull /system/app/GlassSystemUI.apk
adb pull /system/app/GlassTutorial.apk
adb pull /system/app/GlassUpdate.apk
adb pull /system/app/GlassVideoPlayer.apk
adb pull /system/app/GlassVoice.apk
adb pull /system/app/GoogleBackupTransport.apk
adb pull /system/app/GoogleLoginService.apk
adb pull /system/app/GoogleServicesFramework.apk
adb pull /system/app/GoogleTTS.apk
adb pull /system/app/KeyChain.apk
adb pull /system/app/LatinIME.apk
adb pull /system/app/MediaProvider.apk
adb pull /system/app/NetworkLocation.apk
adb pull /system/app/PackageInstaller.apk
adb pull /system/app/SettingsProvider.apk
adb pull /system/app/SystemUI.apk
adb pull /system/app/UserDictionaryProvider.apk
adb pull /system/app/VpnDialogs.apk
adb pull /system/framework/framework-res.apk
adb pull /system/framework/glass-framework-res.apk
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes