platform_build/tools/releasetools
Tao Bao ba557707d8 releasetools: Support validating Verified Boot images.
For a given (signed) target-files.zip, this CLs allows verifying the
Verified Boot related images. It works with both of VB 1.0 and VB 2.0
images.

As part of the CL, it also moves validate_target_files.py to argparse,
which is more flexible than the traditional getopt module.

Also add unittests for the VB 1.0 path. VB 2.0 tests will be added in
follow-up CL.

Example usage:

- Run the script on aosp_bullhead target-files.zip.

$ ./build/make/tools/releasetools/validate_target_files.py \
    --verity_key build/target/product/security/verity.x509.pem \
    --verity_key_mincrypt build/target/product/security/verity_key \
    aosp_bullhead-target_files-4522605.zip

- Run the script on aosp_walleye target-files.zip.

$ ./build/make/tools/releasetools/validate_target_files.py \
    --verity_key external/avb/test/data/testkey_rsa4096.pem \
    aosp_walleye-target_files-4627254.zip

Bug: 63706333
Bug: 65486807
Test: Run validate_target_files.py on target_files.zip files.
Test: PYTHONPATH=build/make/tools/releasetools python -m unittest \
          test_validate_target_files
Change-Id: I170f14d5828d15f3687d8af0a89a816968069057
2018-03-12 00:17:09 -07:00
..
testdata releasetools: Support validating Verified Boot images. 2018-03-12 00:17:09 -07:00
add_img_to_target_files
add_img_to_target_files.py releasetools: Don't return ZipFile from common.UnzipTemp(). 2018-03-01 10:03:31 -08:00
blockimgdiff.py releasetools: Allow generating BBOTA for images with shared blocks. 2018-02-13 11:14:23 -08:00
build_image.py Support /product partition 2018-01-25 09:33:58 +09: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
check_target_files_signatures.py releasetools: Call Cleanup() in check_target_files_signatures.py. 2018-03-01 10:12:39 -08:00
common.py releasetools: Don't return ZipFile from common.UnzipTemp(). 2018-03-01 10:03:31 -08:00
edify_generator.py releasetools: Add a BuildInfo class. 2018-01-09 15:08:23 -08:00
img_from_target_files
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_recovery_patch.py releasetools: Replace print stmt with print(). 2017-01-13 14:55:14 -08:00
ota_from_target_files
ota_from_target_files.py releasetools: Create StreamingPropertyFiles class. 2018-03-08 14:59:42 -08: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
sign_target_files_apks.py releasetools: Check for duplicate entries in ReplaceCerts(). 2018-02-20 10:22:30 -08: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
test_add_img_to_target_files.py releasetools: Add unittests for GetCareMap() and AddCareMapTxtForAbOta(). 2018-02-22 00:10:05 -08: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: Don't return ZipFile from common.UnzipTemp(). 2018-03-01 10:03:31 -08:00
test_ota_from_target_files.py releasetools: Create StreamingPropertyFiles class. 2018-03-08 14:59:42 -08: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: Check for duplicate entries in ReplaceCerts(). 2018-02-20 10:22:30 -08:00
test_utils.py releasetools: Add unittest for common.GetSparseImage(). 2018-02-14 15:12:52 -08:00
test_validate_target_files.py releasetools: Support validating Verified Boot images. 2018-03-12 00:17:09 -07:00
validate_target_files.py releasetools: Support validating Verified Boot images. 2018-03-12 00:17:09 -07:00