sys.exit(args.apk+": Prebuilt, presigned apks with targetSdkVersion >= 30 (or a codename targetSdkVersion) must set preprocessed: true in the Android.bp definition (because they must be signed with signature v2, and the build system would wreck that signature otherwise)")
sys.exit(args.apk+': Contains compressed dex files and is privileged')
returnTrue
returnFalse
defmain():
parser=argparse.ArgumentParser()
parser.add_argument('--aapt2',help="the path to the aapt2 executable")
parser.add_argument('--zipalign',help="the path to the zipalign executable")
parser.add_argument('--skip-preprocessed-apk-checks',action='store_true',help="the value of the soong property with the same name")
parser.add_argument('--preprocessed',action='store_true',help="the value of the soong property with the same name")
parser.add_argument('--privileged',action='store_true',help="the value of the soong property with the same name")
parser.add_argument('apk',help="the apk to check")
parser.add_argument('stampfile',help="a file to touch if successful")
args=parser.parse_args()
ifnotargs.preprocessed:
check_target_sdk_less_than_30(args)
elifargs.skip_preprocessed_apk_checks:
ifnothas_preprocessed_issues(args):
sys.exit('This module sets `skip_preprocessed_apk_checks: true`, but does not actually have any issues. Please remove `skip_preprocessed_apk_checks`.')