Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63cde0fd authored by Iavor-Valentin Iftime's avatar Iavor-Valentin Iftime
Browse files

Allow vendor_otatools arg to be file or folder

  Required by signer script when using "--vendor_otatools" argument.

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: Iaa596f95f9db1e1e423b8306e9590fe27acb76e7
parent 4e09d57f
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -1321,8 +1321,12 @@ def BuildVendorPartitions(output_zip_path):
    os.remove(os.path.join(vendor_tempdir, "META/pack_radioimages.txt"))
    os.remove(os.path.join(vendor_tempdir, "META/pack_radioimages.txt"))


  # Build vendor images using vendor otatools.
  # 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_")
    vendor_otatools_dir = common.MakeTempDir(prefix="vendor_otatools_")
    common.UnzipToDir(OPTIONS.vendor_otatools, vendor_otatools_dir)
    common.UnzipToDir(OPTIONS.vendor_otatools, vendor_otatools_dir)
  else:
    vendor_otatools_dir = OPTIONS.vendor_otatools
  cmd = [
  cmd = [
      os.path.join(vendor_otatools_dir, "bin", "add_img_to_target_files"),
      os.path.join(vendor_otatools_dir, "bin", "add_img_to_target_files"),
      "--is_signing",
      "--is_signing",