From 880e4432b9e72b918796bea2195430fa47a21b2d Mon Sep 17 00:00:00 2001 From: Iavor-Valentin Iftime Date: Thu, 17 Mar 2022 14:02:27 +0000 Subject: [PATCH] Copy vendor & odm .map files when using vendor_otatools Copy IMAGES/vendor.map and IMAGES/odm.map files when building vendor images using vendor otatools. Fixes validate_target_files failure. Bug: 220126689 Bug: 186097910 Test: sign_target_files_apks \ --vendor_otatools=otatools_vendor_dir \ --vendor_partitions=vendor,odm \ merged-target_files.zip \ signed-target_files.zip Change-Id: Iaf904c90761b3830cf81af2561695c81bfc6c70d --- tools/releasetools/sign_target_files_apks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index a24fbdd7c5..aaf4a34337 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -1341,8 +1341,10 @@ def BuildVendorPartitions(output_zip_path): output_zip_path, "a", compression=zipfile.ZIP_DEFLATED, allowZip64=True) as output_zip: for p in OPTIONS.vendor_partitions: - path = "IMAGES/{}.img".format(p) - common.ZipWrite(output_zip, os.path.join(vendor_tempdir, path), path) + img_file_path = "IMAGES/{}.img".format(p) + 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) def main(argv):