platform_build/tools/releasetools
Tao Bao 93c2a01268 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
2018-06-20 13:49:57 -07:00
..
testdata releasetools: Fix an issue in GetMinSdkVersion. 2018-03-22 10:27:04 -07:00
add_img_to_target_files store images in target-files 2014-07-31 11:06:30 -07:00
add_img_to_target_files.py Write combined bpt definition directly into META/partition-table.bpt 2018-04-26 12:43:27 -07:00
blockimgdiff.py releasetools: Allow generating BBOTA for images with shared blocks. 2018-02-13 11:14:23 -08:00
build_image.py releasetools: Default journal size to 0 for system images. 2018-04-22 22:04:21 -07:00
check_ota_package_signature.py releasetools: Capture stderr output when calling delta_generator. 2018-02-05 23:39:23 -08:00
check_target_files_signatures Make releasetools pylint clean. 2015-03-24 11:05:16 -07:00
check_target_files_signatures.py releasetools: Call Cleanup() in check_target_files_signatures.py. 2018-03-01 10:12:39 -08:00
common.py Revert "Support regenerating partition table with bpttool in sign_target_files_apks" 2018-04-27 19:02:51 +00:00
edify_generator.py releasetools: Add a BuildInfo class. 2018-01-09 15:08:23 -08:00
img_from_target_files Allow to build the update.zip for emulator build. 2014-06-04 17:04:14 +00:00
img_from_target_files.py releasetools: Don't return ZipFile from common.UnzipTemp(). 2018-03-01 10:03:31 -08:00
make_recovery_patch Make releasetools pylint clean. 2015-03-24 11:05:16 -07:00
make_recovery_patch.py releasetools: Replace print stmt with print(). 2017-01-13 14:55:14 -08:00
ota_from_target_files Fix build. 2015-09-15 07:50:10 +00:00
ota_from_target_files.py releasetools: Explicitly pass the SHA-1 of source boot image to PatchCheck. 2018-06-12 15:04:08 -07:00
ota_package_parser.py Add a script to parse an block-based ota package 2017-05-09 21:01:19 +00:00
OWNERS Add OWNERS in build/make 2017-06-21 16:09:56 -07:00
pylintrc releasetools: Remove deprecated pylint options. 2017-12-04 12:15:23 -08:00
rangelib.py releasetools: RangeSet.monotonic is not an optional attribute. 2018-02-06 16:00:52 -08:00
sign_target_files_apks Make releasetools pylint clean. 2015-03-24 11:05:16 -07:00
sign_target_files_apks.py releasetools: Skip signing APKs with given prefixes. 2018-06-20 13:49:57 -07:00
sparse_img.py releasetools: Allow generating BBOTA for images with shared blocks. 2018-02-13 11:14:23 -08:00
target_files_diff.py target_files_diff: Fix the issue with file type change. 2016-04-25 18:35:20 +00:00
test_add_img_to_target_files.py releasetools: Stop copying images from RADIO/ to IMAGES/. 2018-04-20 10:20:42 -07:00
test_blockimgdiff.py releasetools: Remove the unconditional fallback to bsdiff. 2018-02-13 11:06:20 -08:00
test_build_image.py releasetools: Move assertions into CheckHeadroom(). 2018-01-03 11:52:16 -08:00
test_common.py releasetools: Fix an issue in GetMinSdkVersion. 2018-03-22 10:27:04 -07:00
test_ota_from_target_files.py Merge "releasetools: Use "ota-downgrade=yes" for --override_timestamp." 2018-05-15 16:58:11 +00:00
test_rangelib.py Analyze unchanged blocks in odex files. 2016-09-23 12:15:23 -07:00
test_sign_target_files_apks.py releasetools: Skip signing APKs with given prefixes. 2018-06-20 13:49:57 -07:00
test_utils.py releasetools: Handle two edge cases in FinalizeMetadata(). 2018-03-19 13:35:38 -07:00
test_validate_target_files.py Remove the hard-coded path of build_verity_metadata.py. 2018-03-21 21:15:59 +00:00
validate_target_files.py releasetools: Skip checking files with non-monotonic ranges. 2018-05-17 19:45:16 -07:00