Merge "Rebuild and copy recovery and boot img when using vendor_otatools"
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 6af7486..f363afd 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -1355,12 +1355,13 @@
vendor_misc_info["no_boot"] = "true" # boot
vendor_misc_info["vendor_boot"] = "false" # vendor_boot
vendor_misc_info["no_recovery"] = "true" # recovery
+ vendor_misc_info["avb_enable"] = "false" # vbmeta
vendor_misc_info["board_bpt_enable"] = "false" # partition-table
vendor_misc_info["has_dtbo"] = "false" # dtbo
vendor_misc_info["has_pvmfw"] = "false" # pvmfw
vendor_misc_info["avb_custom_images_partition_list"] = "" # custom images
- vendor_misc_info["avb_enable"] = "false" # vbmeta
+ vendor_misc_info["avb_building_vbmeta_image"] = "false" # skip building vbmeta
vendor_misc_info["use_dynamic_partitions"] = "false" # super_empty
vendor_misc_info["build_super_partition"] = "false" # super split
with open(vendor_misc_info_path, "w") as output:
@@ -1415,8 +1416,12 @@
map_file_path = "IMAGES/{}.map".format(p)
common.ZipWrite(output_zip, os.path.join(vendor_tempdir, img_file_path), img_file_path)
common.ZipWrite(output_zip, os.path.join(vendor_tempdir, map_file_path), map_file_path)
- # copy recovery patch & install.sh
+ # copy recovery.img, boot.img, recovery patch & install.sh
if OPTIONS.rebuild_recovery:
+ recovery_img = "IMAGES/recovery.img"
+ boot_img = "IMAGES/boot.img"
+ common.ZipWrite(output_zip, os.path.join(vendor_tempdir, recovery_img), recovery_img)
+ common.ZipWrite(output_zip, os.path.join(vendor_tempdir, boot_img), boot_img)
recovery_patch_path = "VENDOR/recovery-from-boot.p"
recovery_sh_path = "VENDOR/bin/install-recovery.sh"
common.ZipWrite(output_zip, os.path.join(vendor_tempdir, recovery_patch_path), recovery_patch_path)