私は試してみました：<事前> <コード> adb backup -all adb: unable to connect for backup
この bmgr ？
I would like to ask if it possible to backup and restore all Android Settings and applications through ADB.
adb backup -all adb: unable to connect for backup
It is not working, while all other commands are working.
Is it possible to use this bmgr ?
Make sure debugging is enabled and the device is connected. Also, remember to actually select the "backup my data" button on the device itself (the device requires confirmation). If you don't see such a screen on your device, you're quite possibly running a pre-ICS (< 4.0) phone, which will unfortunately will not have the feature.
bmgr is not a solution for this- It's a tool for testing apps that handle their own backups using the backup API by manually firing the "backup" and "restore" methods on the backup agent in the application, not shelling into the device and copying data to/from the development machine.
Here is my command for backing things up
./adb shell ls -l -a | grep '^[^l]' | sed -e 's/^d.* \([^ ]*\)\r$/mkdir sav\/\1; .\/adb pull \/\1 sav\/\1/' -e 's/-.* \([^ ]*\)\r$/.\/adb pull \/\1 sav\/\1/' | /bin/bash
There are some files where I get a permission denied - but as this backup is made in order to root the device, I can not get more permissions :(
If I understand you correctly, this link might be what you are looking for. To summarize:
adb devices to make sure your device is attached.
adb pull /data/app ./ to grab all the app APKs and put them in the current folder.
a) Or Run
adb pull /system/sd/app ./ to get apps on the SD card.
3) Settings are located in various places, so find out where and then use the same
adb pull command to grab them.
And then the link details how to restore based on Mac or Windows.
Alternatively, it looks like the
bmgr command you mentioned would also work with a few simple commands (
adb shell bmgr backup <package> to backup and
adb shell bmgr restore <package> to restore). What more are you looking for?
problem is probably due to more than one device/emulator connected.
adb devices if it shows more than one device then it might not be able to connect
specialy to emulators.
adb usb it will restart other devices, then disconnect/reconncet usb cable, now run
it should show only one device.
adb backup -all
and you should be good to go :)
Make sure to run the SDK update and specifically check the box for Google USB Drivers and update the SDK.
After enabling USB debugging on your device and plugging into your PC, you should get a prompt about installing drivers. Even if its successful open device manager and find your phone, right click and update drivers and point it to the Google USB driver folder in the
SDK > Extras > Google USB and let it update the drivers.
Then you should be able to pull full backups off your device.
I have a GS4 that I needed to backup and unfortunately ran into this error. after a bit of head scratching (and swearing) I found a fix that I hope will work for you. I was able to find this by just running
abd and scrolling through the help documentation. I found that
-d is a parameter that "directs command to the only connected USB device". So after plugging and chugging I got it to work for me. The command I used was:
adb -d backup -apk -shared -all -f C:\Users\NAME\backup.ab
Hope this works for someone having the same issue I had.
I had the same issue and am also pre-ICS. What I did to work around it was used an ls of
/ and awk (with grep to skip links) to create a batch file that pulls each actual directory onto a directory on my PC.