am 4cac8afc: am 714111cb: include pre-signed prebuilt .apks in apkcerts.txt
Merge commit '4cac8afc21a356ce3ca074f12383cf1526d44156' * commit '4cac8afc21a356ce3ca074f12383cf1526d44156': include pre-signed prebuilt .apks in apkcerts.txt
This commit is contained in:
commit
a660e48ea7
|
@ -51,7 +51,12 @@ ifeq ($(LOCAL_CERTIFICATE),)
|
||||||
else ifeq ($(LOCAL_CERTIFICATE),PRESIGNED)
|
else ifeq ($(LOCAL_CERTIFICATE),PRESIGNED)
|
||||||
# The magic string "PRESIGNED" means this package is already checked
|
# The magic string "PRESIGNED" means this package is already checked
|
||||||
# signed with its release key.
|
# 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
|
else
|
||||||
# If this is not an absolute certificate, assign it to a generic one.
|
# If this is not an absolute certificate, assign it to a generic one.
|
||||||
ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./)
|
ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./)
|
||||||
|
|
|
@ -89,9 +89,15 @@ def GetApkCerts(tf_zip):
|
||||||
if not line: continue
|
if not line: continue
|
||||||
m = re.match(r'^name="(.*)"\s+certificate="(.*)\.x509\.pem"\s+'
|
m = re.match(r'^name="(.*)"\s+certificate="(.*)\.x509\.pem"\s+'
|
||||||
r'private_key="\2\.pk8"$', line)
|
r'private_key="\2\.pk8"$', line)
|
||||||
if not m:
|
if m:
|
||||||
raise SigningError("failed to parse line from apkcerts.txt:\n" + line)
|
certmap[m.group(1)] = OPTIONS.key_map.get(m.group(2), m.group(2))
|
||||||
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():
|
for apk, cert in OPTIONS.extra_apks.iteritems():
|
||||||
certmap[apk] = OPTIONS.key_map.get(cert, cert)
|
certmap[apk] = OPTIONS.key_map.get(cert, cert)
|
||||||
return certmap
|
return certmap
|
||||||
|
|
Loading…
Reference in New Issue