diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index 837eaf9c1e..09d0b10a42 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -1032,7 +1032,7 @@ def ReplaceVerityKeyId(input_zip, output_zip, key_path): keyid, stderr = p.communicate() assert p.returncode == 0, "Failed to dump certificate: {}".format(stderr) keyid = re.search( - r'keyid:([0-9a-fA-F:]*)', keyid).group(1).replace(':', '').lower() + r'Authority Key Identifier:\s*(?:keyid:)?([0-9a-fA-F:]*)', keyid).group(1).replace(':', '').lower() print("Replacing verity keyid with {}".format(keyid)) out_buffer.append("veritykeyid=id:%s" % (keyid,))