releasetools: Skip signing APKs with given prefixes.
We may pack prebuilts that end with ".apk" into target_files zip, via PRODUCT_COPY_FILES. META/apkcerts.txt won't contain the cert info for such files, and we want to keep them as is while signing, despite of the ".apk" extension. This CL adds "--skip_apks_with_path_prefix" option to sign_target_files_apks.py. APKs with matching prefixes will be copied verbatim into the signed images. The prefix should match the entry names in the target_files (e.g. "SYSTEM_OTHER/preloads/"). The option may be repeated to specify multiple prefixes. Note that although we may skip signing an APK file with "-e ApkName=". This would skip *all* the APK files with the matching basename. "--skip_apks_with_path_prefix" allows matching the exact prefix. For example: $ ./build/make/tools/releasetools/sign_target_files_apks.py \ --skip_apks_with_path_prefix SYSTEM_OTHER/preloads/ \ --skip_apks_with_path_prefix PRODUCT/prebuilts/PrebuiltApp1 \ --skip_apks_with_path_prefix VENDOR/app/PrebuiltApp2.apk \ target_files.zip \ signed-target_files.zip Bug: 110201128 Test: Run the command above and check the logs. Test: `python -m unittest test_sign_target_files_apks` Change-Id: I7bd80b360917cef137cf1e7e8cfa796968831f47
Loading
Please register or sign in to comment