packages/os/android/installer/docs/recovery-rollback.md
This installer does not automate rollback. Rollback is a release-owner procedure because it depends on bootloader state, anti-rollback policy, slot layout, and which partitions were flashed.
Prepare these items before any --execute --confirm-flash run:
adb shell getprop ro.boot.slot_suffix
fastboot getvar current-slot
If a device fails to boot, start with read-only checks:
fastboot devices
fastboot getvar product
fastboot getvar current-slot
fastboot getvar unlocked
fastboot getvar all
Capture the output before changing slots or flashing replacement images.
For A/B devices, the least invasive rollback is often switching to the previous slot when that slot still contains a known-good system:
fastboot --set-active=a
fastboot reboot
or:
fastboot --set-active=b
fastboot reboot
Only switch to a slot when you know it contains a bootable build for the same device. Slot switching can still fail if shared partitions were changed.
If slot rollback is not enough, reflash the previous known-good artifact set with the same dry-run-first installer flow:
packages/os/android/installer/install-elizaos-android.sh \
--device SERIAL \
--artifact-dir path/to/previous-known-good \
--assume-bootloader
Inspect the plan. Execute only when the mapping is correct:
packages/os/android/installer/install-elizaos-android.sh \
--device SERIAL \
--artifact-dir path/to/previous-known-good \
--assume-bootloader \
--execute \
--confirm-flash \
--reboot-after-flash
Add --wipe-data only when the release owner confirms it is required.
When custom rollback images are not available, use the OEM factory image or rescue process for the exact model and codename. Do not cross-flash images from a different codename, carrier variant, or bootloader generation.
After recovery boots, run:
packages/os/android/installer/scripts/validate-post-flash.sh \
--device SERIAL \
--execute
Record:
ro.product.devicero.build.fingerprintro.boot.slot_suffixsys.boot_completed