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

Commit a7f2857f authored by Kelvin Zhang's avatar Kelvin Zhang Committed by Gerrit Code Review
Browse files

Merge "Add apex_info.pb to generated OTA"

parents c25182c7 7bd09911
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1142,6 +1142,15 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None):
    else:
      logger.warning("Cannot find care map file in target_file package")

  # Copy apex_info.pb over to generated OTA package.
  try:
    apex_info_entry = target_zip.getinfo("META/apex_info.pb")
    with target_zip.open(apex_info_entry, "r") as zfp:
      common.ZipWriteStr(output_zip, "apex_info.pb", zfp.read(),
                        compress_type=zipfile.ZIP_STORED)
  except KeyError:
    logger.warning("target_file doesn't contain apex_info.pb %s", target_file)

  common.ZipClose(target_zip)

  CheckVintfIfTrebleEnabled(target_file, target_info)