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

Commit 09791850 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "validate_target_files: support gki_arm64" am: e910accc am: d8bdea34

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

Change-Id: I8a4b280a64b931f6532cd3a369c7b17bb93b5804
parents ea4fc431 d8bdea34
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -471,10 +471,6 @@ class BuildInfo(object):
  def oem_props(self):
  def oem_props(self):
    return self._oem_props
    return self._oem_props


  @property
  def avb_enabled(self):
    return self.get("avb_enable") == "true"

  def __getitem__(self, key):
  def __getitem__(self, key):
    return self.info_dict[key]
    return self.info_dict[key]


+5 −6
Original line number Original line Diff line number Diff line
@@ -131,7 +131,9 @@ def ValidateFileConsistency(input_zip, input_tmp, info_dict):
    logging.warning('Skipped due to target using non-sparse images')
    logging.warning('Skipped due to target using non-sparse images')
    return
    return


  # Verify IMAGES/system.img.
  # Verify IMAGES/system.img if applicable.
  # Some targets, e.g., gki_arm64, gki_x86_64, etc., are system.img-less.
  if 'IMAGES/system.img' in input_zip.namelist():
    CheckAllFiles('system')
    CheckAllFiles('system')


  # Verify IMAGES/vendor.img if applicable.
  # Verify IMAGES/vendor.img if applicable.
@@ -259,9 +261,6 @@ def symlinkIfNotExists(src, dst):


def ValidatePartitionFingerprints(input_tmp, info_dict):
def ValidatePartitionFingerprints(input_tmp, info_dict):
  build_info = common.BuildInfo(info_dict)
  build_info = common.BuildInfo(info_dict)
  if not build_info.avb_enabled:
    logging.info("AVB not enabled, skipping partition fingerprint checks")
    return
  # Expected format:
  # Expected format:
  #  Prop: com.android.build.vendor.fingerprint -> 'generic/aosp_cf_x86_64_phone/vsoc_x86_64:S/AOSP.MASTER/7335886:userdebug/test-keys'
  #  Prop: com.android.build.vendor.fingerprint -> 'generic/aosp_cf_x86_64_phone/vsoc_x86_64:S/AOSP.MASTER/7335886:userdebug/test-keys'
  #  Prop: com.android.build.vendor_boot.fingerprint -> 'generic/aosp_cf_x86_64_phone/vsoc_x86_64:S/AOSP.MASTER/7335886:userdebug/test-keys'
  #  Prop: com.android.build.vendor_boot.fingerprint -> 'generic/aosp_cf_x86_64_phone/vsoc_x86_64:S/AOSP.MASTER/7335886:userdebug/test-keys'
@@ -398,7 +397,7 @@ def ValidateVerifiedBootImages(input_tmp, info_dict, options):
          verity_key_mincrypt, stdoutdata.rstrip())
          verity_key_mincrypt, stdoutdata.rstrip())


  # Handle the case of Verified Boot 2.0 (AVB).
  # Handle the case of Verified Boot 2.0 (AVB).
  if info_dict.get("avb_enable") == "true":
  if info_dict.get("avb_building_vbmeta_image") == "true":
    logging.info('Verifying Verified Boot 2.0 (AVB) images...')
    logging.info('Verifying Verified Boot 2.0 (AVB) images...')


    key = options['verity_key']
    key = options['verity_key']