Reputation: 142
I am trying to do an ADB backup of a device. The device is seen and able to communicate with the ADB.
The code I want to run is:
adb backup -shared -apk -all
After running the above command the response is:
Now unlock your device and confirm the backup operation.
Then the command terminates. Without any prompts on the mobile.
When I ran adb logcat
, I got a weird response in the logcat, here it is:
10-23 13:10:09.135 11119 11119 D bu: Beginning: backup
10-23 13:10:09.137 11119 11119 W bu: Unknown backup flag -apk:-shared:-all
10-23 13:10:09.137 11119 11119 E bu: no backup packages supplied and neither -shared nor -all given
10-23 13:10:09.137 11119 11119 D bu: Finished.
It seems that the ADB isn't recognising -apk or -shared as flags.
I am able to run:
adb backup -all
So the phone is working and the ADB is able to run backups.
Anyone seen this before and have a solution?
EDIT 1
Running the following:
adb backup '-apk -shared -all'
Seems to then run the following command:
10-23 13:31:40.598 2954 6688 V BackupManagerService: Requesting full backup: apks=true obb=false shared=true all=true system=true pkgs=[Ljava.lang.String;@73faafb
Upvotes: 1
Views: 2009
Reputation: 1
I was able to remedy this in Windows OS with properly placed quotes...
adb backup "-apk -shared -all -system" -f backup20170508.ab
Take note, the process failed when I tried to have my file path (-f) start from C:\ and traverse through Users\ to my personal folder due to permission issues. Deposit the backup in the same folder as the adb executable and just move it when you're done.
Upvotes: 0
Reputation: 1
try adb backup "-apk -shared -all " -f c:\Users**user**\backup.ab
you need to put the " " like i did . Not ' ' like our frineds did above
Upvotes: 0
Reputation: 31
I had the same problem. The solution was to put all the options in the '' quotation marks, f.e.:
adb backup '-apk -obb -shared -all -system' -f /path/to/backup.ab
Upvotes: 3