On this page
The basic idea
On a classic (A-only) device, an OTA update stops the phone, writes the new system image, and reboots. If anything fails mid-way, the device is unbootable.
On an A/B device, the running slot (say A) keeps working. The updater writes the new image to the other slot (B) in the background while you use the phone. On next boot, the bootloader switches to slot B. If B fails to boot after a few tries, the bootloader automatically falls back to A — your phone always has a working OS.
Which partitions are duplicated?
Not all partitions are A/B. The duplicated ones are the ones the OTA replaces:
boot_a/boot_b— kernel + ramdiskvendor_boot_a/vendor_boot_b— vendor ramdisk (Android 12+)init_boot_a/init_boot_b— init ramdisk (Android 13+)dtbo_a/dtbo_b— device tree overlayvbmeta_a/vbmeta_b— verified boot metadatasystem_a/system_b— Android systemvendor_a/vendor_b— OEM vendor filesproduct_a/product_b— product-specific appslk_a/lk_b— bootloader (Motorola specifically)
Not duplicated (single copy, shared by both slots): userdata, metadata, persist, modem (sometimes), cache.
How boot picks a slot
The bootloader stores slot metadata in a small region usually called misc or a dedicated BCB (bootloader control block). On each boot:
- Read the BCB.
- Pick the slot marked active.
- Try to load
boot_<slot>and chain into Android. - If boot fails N times (usually 7), decrement that slot's retry counter.
- When retry counter hits 0, mark the slot unbootable and switch to the other.
Working with slots in fastboot
Useful fastboot commands:
fastboot getvar current-slot— show active slotfastboot getvar slot-count— 1 (A-only) or 2 (A/B)fastboot getvar slot-suffixes—_a,_bfastboot set_active aorfastboot --set-active=a— mark slot A activefastboot flash boot_a boot.img— flash to specific slotfastboot flash --slot=all boot boot.img— flash both slots
Flashing to the right slot
Flashing boot (no suffix) in fastboot writes to the currently active slot. If you want both A and B updated (recommended for custom boot images), use --slot=all or run fastboot flash boot_a boot.img then fastboot flash boot_b boot.img.
Virtual A/B (Android 11+)
Full A/B doubles the flash used by system/vendor/product. On entry-level phones that was unaffordable. Android 11 introduced Virtual A/B: only the small partitions (boot, dtbo, vbmeta) have real A/B copies. System/vendor/product use snapshots via dm-snapshot:
- OTA writes updates to a copy-on-write area in
userdata. - Reboot. Snapshot overlay merges COW into system/vendor on first boot.
- If anything fails, snapshot is discarded. Classic rollback.
From a flashing-tool perspective, Virtual A/B still exposes _a/_b suffixes for the real A/B partitions, but system/vendor/product are no longer per-slot.
Download Android Root Tool v8.0.1.5
A/B-aware fastboot flashing, slot management, backup/restore per slot.
FAQ
How do I tell if my phone is A/B?
fastboot getvar slot-count. Returns 2 for A/B, 1 for A-only. Or check Settings → Storage — A/B devices lose about 2–4 GB to the duplicate partitions on classic A/B (less on Virtual A/B).Can I convert my phone from A-only to A/B?
What happens if I flash only slot A and switch to B?
fastboot set_active a.Why does my new phone have no recovery partition?
boot ramdisk. There's one recovery per slot.