snapshotctl: Add a test-blank-ota command for development.
The test-blank-ota command is for iterating on changes to snapuserd or
the Virtual A/B boot flow, which is normally very time consuming to
test.
It works by creating a partial OTA outside of update_engine, purely
through SnapshotManager calls. Every partition except system is
preserved. system is "updated" entirely with copy operations. The entire
"OTA" takes about ten seconds.
Tested on cuttlefish, but a physical device should work as long as
physical partitions are flashed to both slots beforehand.
The big limitation is that since update_engine does not run, there is no
merge action on reboot. This can be done manually with "snapshotctl
merge" however.
This type of tool could be easily used in the future for quickly testing
specific bugs or performance ideas in snapuserd.
Bug: N/A
Test: launch_cvd
adb wait-for-device root
adb shell snapshotctl test-blank-ota
adb reboot
adb wait-for-device root
adb shell snapshotctl dump
Change-Id: I5911440cbe14ee909905a0b0fc17da95ba4c5d68
2 files changed