Add snapshot_enabled field to DeltaArchiveManifest.
When this field is set, OTA client should try to use snapshots
during updates. If it is not set, OTA client MUST NOT use snapshots.
This field is set iff the target build has Virtual A/B feature enabled
/ retrofitted (except for secondary OTAs, where system_other should
be written directly).
In follow-up CLs, DynamicPartitionControlAndroid only maps partitions
as snapshots if this flag is set. DeltaPerformer may skip in-place
SOURCE_COPY operations if snapshots are created.
Note that:
- On retrofit Virtual A/B devices, this field is always set. If
updating from a non Virtual A/B build to a Virtual A/B build, the OTA
client on the device would simply ignore this field and perform a
regular A/B OTA.
- When downgrading a retrofit Virtual A/B device back to a regular A/B
build, this field is NOT set, and the OTA client will create the
target slot partitions as usual.
- When sideloading a full OTA in recovery, OTA client cannot create
any snapshots. This field is effectively ignored (as if it were set to
false).
Fixes: 141720569
Test: build OTA
Test: update_engine_unittests
Test: apply Virtual A/B OTA
Change-Id: I1939b24f6687f66a682cd6b7ae826f27acf98e2f
2 files changed