Implement PartitionUpdateGenerator for partial updates
Implement the logic in PartitionUpdateGenerator. Here's the summary,
1. finds the a/b partitions (both static & dynamic) on the device
For partitions not included in the payload:
2. calculates the partition hash for filesystem verification
3. generates one SOURCE_COPY operation for each static partition
The order of the partitions are sorted. So the update will resume from
the correct operation in case it's interruptted.
Bug: 157778739
Test: run a partial OTA with boot & system_ext
Change-Id: I5683b85e3c6dab813a33d5144aceb996fd8163d4
diff --git a/payload_consumer/delta_performer.cc b/payload_consumer/delta_performer.cc
index d1de9f4..d9b739d 100644
--- a/payload_consumer/delta_performer.cc
+++ b/payload_consumer/delta_performer.cc
@@ -879,7 +879,8 @@
touched_partitions.insert(partition_update.partition_name());
}
- auto generator = partition_update_generator::Create(boot_control_);
+ auto generator = partition_update_generator::Create(boot_control_,
+ manifest_.block_size());
std::vector<PartitionUpdate> other_partitions;
TEST_AND_RETURN_FALSE(
generator->GenerateOperationsForPartitionsNotInPayload(