Merge "Allow vendor_otatools arg to be file or folder" am: a2d6ed53f0 am: 8414a9e9c0

Original change: https://android-review.googlesource.com/c/platform/build/+/2007451

Change-Id: I6e0087bfda17fe45418928103f95154c5592710a
This commit is contained in:
Treehugger Robot
2022-03-05 00:04:49 +00:00
committed by Automerger Merge Worker

View File

@@ -1321,8 +1321,12 @@ def BuildVendorPartitions(output_zip_path):
os.remove(os.path.join(vendor_tempdir, "META/pack_radioimages.txt"))
# Build vendor images using vendor otatools.
# Accept either a zip file or extracted directory.
if os.path.isfile(OPTIONS.vendor_otatools):
vendor_otatools_dir = common.MakeTempDir(prefix="vendor_otatools_")
common.UnzipToDir(OPTIONS.vendor_otatools, vendor_otatools_dir)
else:
vendor_otatools_dir = OPTIONS.vendor_otatools
cmd = [
os.path.join(vendor_otatools_dir, "bin", "add_img_to_target_files"),
"--is_signing",