diff options
author | Yifan Hong <elsk@google.com> | 2018-11-09 16:50:51 -0800 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2018-11-15 19:01:41 +0000 |
commit | 6e706b165a15e77488ef0009d76680c2f280477f (patch) | |
tree | 005297298da418c19011421c2413aabfd8ec86b7 /dynamic_partition_control_interface.h | |
parent | 9edcd045830a9fc7ac22622759b8378929cb7c66 (diff) |
DynamicPartitionControl: support retrofit devices
On retrofit devices:
* The retrofit update includes block devices at source
slot (for example, system_a, vendor_a, product_a).
This is done automatically because the retrofit update
does not look different from regular updates in OTA
client's perspective.
* The first update after the retrofit update includes
the rest of the block devices (in the above example,
system_b, vendor_b and product_b).
In order to do the second,
* use NewForUpdate() API from liblp to automatically
include block devices at the target slot when the metadata
is loaded.
* Use FlashPartitionTable() API to flash metadata to system_b
directly without reading existing metadata from it.
Test: manual OTA on retrofit devices
Bug: 118506262
Change-Id: Ib2c15b8a1a04271320bfef408813723a5b2a7bd7
Diffstat (limited to 'dynamic_partition_control_interface.h')
-rw-r--r-- | dynamic_partition_control_interface.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dynamic_partition_control_interface.h b/dynamic_partition_control_interface.h index 95b01a1b..b92d88ab 100644 --- a/dynamic_partition_control_interface.h +++ b/dynamic_partition_control_interface.h @@ -74,8 +74,12 @@ class DynamicPartitionControlInterface { std::string* path) = 0; // Retrieve metadata from |super_device| at slot |source_slot|. + // On retrofit devices, if |target_slot| != kInvalidSlot, the returned + // metadata automatically includes block devices at |target_slot|. virtual std::unique_ptr<android::fs_mgr::MetadataBuilder> LoadMetadataBuilder( - const std::string& super_device, uint32_t source_slot) = 0; + const std::string& super_device, + uint32_t source_slot, + uint32_t target_slot) = 0; // Write metadata |builder| to |super_device| at slot |target_slot|. virtual bool StoreMetadata(const std::string& super_device, |