Is it possible to switch slots with virtual A/B in AOSP device using fastbootd? #412
-
My Android device is an AOSP 14 launch device, based on x86_64 architecture, bootloader is also unlocked. Seamless A/B support and Dynamic partitions support is present in my device. Also I can switch slots using fastbootd (fastboot set_active ). By flashing images to both slots, I can set _a/_b slot as active and the device will boot with that slot. Recently, I enabled virtual A/B support in the device. Is slot switching still possible with fastbootd? As far as I know, with virtual A/B, slot_a and slot_b dynamic partitions will not present inside the super image at a time, slot switch will happen only through OTA. During OTA, the update will get snapshotted and applied on the base device, and if it succeeded, that snapshot got merged with the base device and the active slot will be switched to another slot. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It looks like you already found #249, but yes, your understanding is correct. However, note that even in the non-virtual-A/B case, fastbootd does not allow This is likely due to Android's use of rollback indices. If switching a slot downgrades the OS, it would become unbootable (or permanently bricked if the OEM unlocking toggle was disabled). |
Beta Was this translation helpful? Give feedback.
It looks like you already found #249, but yes, your understanding is correct.
However, note that even in the non-virtual-A/B case, fastbootd does not allow
fastboot set_active
while the bootloader is locked: https://cs.android.com/android/platform/superproject/main/+/main:system/core/fastboot/device/commands.cpp;l=325;drc=2cb36706f40a7afac9159126a97421b37e2ef8dcThis is likely due to Android's use of rollback indices. If switching a slot downgrades the OS, it would become unbootable (or permanently bricked if the OEM unlocking toggle was disabled).