How do you use force adb to backup without user confirmation?
Asked Answered
C

2

6

Running adb backup -apk -shared -all on an Android device yields Now unlock your device and confirm the backup operation. on the Terminal and a prompt on the device screen that requires user intervention. I was hoping to automate backup and restore from adb. is there a way to force and proceed with backup without user confirmation?

Collection answered 11/11, 2013 at 14:22 Comment(0)
C
-4

This can be done using fastboot command by pulling data off the inactive Android device. Here's a sample tutorial on this at XDA University.

Collection answered 3/12, 2013 at 9:0 Comment(1)
In the link you posted, I cannot find instructions to do a backup using fastboot. It only instructs, how to create update.zip-files (including scripts) to modify something on the device as far as I can see. Could you please post the steps needed here? ThanksRemovable
M
2

My solution for this case is to use dd (it's available in vanilla Android, and custom recoveries, like TWRP, as well):

sudo adb shell dd if=/dev/block/bootdevice/by-name/boot > boot.bin
sudo adb shell dd if=/dev/block/bootdevice/by-name/modem > modem.bin
sudo adb shell dd if=/dev/block/bootdevice/by-name/system > system.bin

...Or with compression:

sudo adb shell dd if=/dev/block/bootdevice/by-name/system | xz -9 -T0 - > system.bin.xz

Later the binary image can be transformed to any desired backup format.

Mackintosh answered 17/2, 2020 at 5:7 Comment(0)
C
-4

This can be done using fastboot command by pulling data off the inactive Android device. Here's a sample tutorial on this at XDA University.

Collection answered 3/12, 2013 at 9:0 Comment(1)
In the link you posted, I cannot find instructions to do a backup using fastboot. It only instructs, how to create update.zip-files (including scripts) to modify something on the device as far as I can see. Could you please post the steps needed here? ThanksRemovable

© 2022 - 2024 — McMap. All rights reserved.