summaryrefslogtreecommitdiff
path: root/scripts/update_payload/format_utils.py
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2018-08-15 13:15:42 -0700
committerYifan Hong <elsk@google.com>2018-09-28 23:03:46 +0000
commit537802d92503dbd109ddbf568262aba468544921 (patch)
tree8c7865cd4a9ccbdbc1a08b362fc360e6a1cfa661 /scripts/update_payload/format_utils.py
parent3e5804d8ad22361c091c11ffe1183069612d56a9 (diff)
update_engine resize dynamic partitions during OTA.
update_engine uses device mapper to resize dynamic partitions before opening the devices to apply the update. * DeltaPerformer calls BootControlInterface::InitPartitionMetadata when parsing the update manifest. The implementation for BootControlAndroid::InitPartitionMetadata does the following if sizes for dynamic partitions are incorrect (assuming updating from slot A to B): * Load metadata from metadata slot A * Delete all extents of partitions at slot B (with _b suffix) * Add extents for partitions at slot B * Write metadata to metadata slot B * Re-map all partitions at slot B using metadata slot B with force_writable = true * BootControlAndroid::GetPartitionDevice() checks device-mapper before returning static partitions. * PostinstallRunnerAction::Cleanup calls BootControlInterface::Cleanup which unmaps all partitions at slot B. A partition "foo" is considered dynamic if foo_a exists as a dynamic partition OR foo_b does NOT exist as a static partition. Bug: 110717529 Test: manual ota Test: update_engine_unittests --gtest_filter=*BootControlAndroid* Change-Id: I50f410b486a874242663624801c3694151bdda18
Diffstat (limited to 'scripts/update_payload/format_utils.py')
0 files changed, 0 insertions, 0 deletions