releasetools: Pass non-sparse super_empty.img to update_dynamic_partitions()

* So that updater program can load dynamic partitions metadata from OTA
  when it fails to load from the device

Change-Id: I73687009a2cb243aba1bfec6f357c8ff25f27784
Signed-off-by: RITEFANG <1721985272@qq.com>
This commit is contained in:
Yumi Yukimura
2024-03-24 02:19:46 +08:00
committed by SkyMinus
parent 979dcf2b8d
commit c116d69cb1
4 changed files with 33 additions and 9 deletions

View File

@@ -238,6 +238,15 @@ else if get_stage("%(bcb_dev)s") == "3/3" then
progress_dict["system"] = system_progress
if target_info.get('use_dynamic_partitions') == "true":
# Add non-sparse super empty image to OTA package if it exists
if target_info.get('build_super_empty_partition') == "true":
unsparse_super_empty_image_name = "unsparse_super_empty.img"
unsparse_super_empty_image_path = os.path.join(OPTIONS.input_tmp, "IMAGES",
unsparse_super_empty_image_name)
unsparse_super_empty_image = common.File.FromLocalFile(
unsparse_super_empty_image_name, unsparse_super_empty_image_path)
common.ZipWriteStr(output_zip, unsparse_super_empty_image_name,
unsparse_super_empty_image.data)
# Use empty source_info_dict to indicate that all partitions / groups must
# be re-added.
dynamic_partitions_diff = common.DynamicPartitionsDifference(