1

If I have ADB access to device, how can I specify the boot partition and reboot. I tried with setprop but this failed,

#> setprop ro.boot.slot_suffix _b
libc: Unable to set property "ro.boot.slot_suffix" to "_b": error code: 0xb
setprop: failed to set property 'ro.boot.slot_suffix' to '_b'

1 Answer 1

1

Using bootctl

Though it requires adb root, one method to do this would be to use bootctl if available.

#> bootctl set-active-boot-slot SLOT
#> reboot

Note: SLOT is a number, you can find out the labels by looping through them and calling get-suffix for example this little shell script,

for slot in $(seq 0 $(expr $(bootctl get-number-slots) - 1)); do
  echo $slot: $(bootctl get-suffix $slot);
done;

Which will return the mapping,

0: _a
1: _b

See also: How can I tell whether I am booted into the A or B partition?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .