Add PartitionUpdateGenerator
For a/b partial update, the payload doesn't contain all partitions
for the device to boot up. Therefore, we add a new class to generate
additional operations on top of the partial update. The class is used
in payload consumer when the install plan is created.
In specific, the new class parses for the a/b partitions not included in
the payload. Then, for static partitions, it generates SOURCE_COPY
operations to copy the bytes from the source slot to target slot. For
dynamic partitions, it only calculates the partition hash for the filesystem
verification later.
Bug: 157778739
Test: do a partial OTA
Change-Id: Ia5c64cff4655aad05311b0e7c8c8327bc2f4fd91
diff --git a/update_metadata.proto b/update_metadata.proto
index 9bc0d8a..4b4c327 100644
--- a/update_metadata.proto
+++ b/update_metadata.proto
@@ -367,4 +367,7 @@
// Metadata related to all dynamic partitions.
optional DynamicPartitionMetadata dynamic_partition_metadata = 15;
+
+ // If the payload only updates a subset of partitions on the device.
+ optional bool partial_update = 16;
}