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

Commit a660e48e authored by Doug Zongker's avatar Doug Zongker Committed by Android Git Automerger
Browse files

am 4cac8afc: am 714111cb: include pre-signed prebuilt .apks in apkcerts.txt

Merge commit '4cac8afc'

* commit '4cac8afc':
  include pre-signed prebuilt .apks in apkcerts.txt
parents 3a104c86 4cac8afc
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -51,7 +51,12 @@ ifeq ($(LOCAL_CERTIFICATE),)
else ifeq ($(LOCAL_CERTIFICATE),PRESIGNED)
  # The magic string "PRESIGNED" means this package is already checked
  # signed with its release key.
  # Can't re-sign this package, so predexopt is not available.
  #
  # By setting .CERTIFICATE but not .PRIVATE_KEY, this package will be
  # mentioned in apkcerts.txt (with certificate set to "PRESIGNED")
  # but the dexpreopt process will not try to re-sign the app.
  PACKAGES.$(LOCAL_MODULE).CERTIFICATE := PRESIGNED
  PACKAGES := $(PACKAGES) $(LOCAL_MODULE)
else
  # If this is not an absolute certificate, assign it to a generic one.
  ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./)
+9 −3
Original line number Diff line number Diff line
@@ -89,9 +89,15 @@ def GetApkCerts(tf_zip):
    if not line: continue
    m = re.match(r'^name="(.*)"\s+certificate="(.*)\.x509\.pem"\s+'
                 r'private_key="\2\.pk8"$', line)
    if not m:
      raise SigningError("failed to parse line from apkcerts.txt:\n" + line)
    if m:
      certmap[m.group(1)] = OPTIONS.key_map.get(m.group(2), m.group(2))
    else:
      m = re.match(r'^name="(.*)"\s+certificate="PRESIGNED"\s+'
                 r'private_key=""$', line)
      if m:
        certmap[m.group(1)] = None
      else:
        raise ValueError("failed to parse line from apkcerts.txt:\n" + line)
  for apk, cert in OPTIONS.extra_apks.iteritems():
    certmap[apk] = OPTIONS.key_map.get(cert, cert)
  return certmap