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

Commit 7bd09911 authored by Kelvin Zhang's avatar Kelvin Zhang
Browse files

Add apex_info.pb to generated OTA

Test: generate an OTA, make sure apex_info.pb is in

Bug: 172911822

Change-Id: I13a6ef4bc1f6ed2d146922f3031ea24700ba06f4
parent 22c687c5
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)