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

@@ -788,9 +788,16 @@ def AddSuperEmpty(output_zip):
img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "super_empty.img")
if os.path.exists(img.name):
logger.info("super_empty.img already exists; no need to rebuild...")
return
build_super_image.BuildSuperImage(OPTIONS.info_dict, img.name)
img.Write()
else:
build_super_image.BuildSuperImage(OPTIONS.info_dict, img.name)
img.Write()
unsparse_img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "unsparse_super_empty.img")
if os.path.exists(unsparse_img.name):
logger.info("unsparse_super_empty.img already exists; no need to rebuild...")
else:
build_super_image.BuildSuperImage(OPTIONS.info_dict, unsparse_img.name, force_non_sparse=True)
unsparse_img.Write()
def AddSuperSplit(output_zip):