Support relative key path in VerifiedBootVersion2VerityImageBuilder
Otatools archive can be unpacked to an arbitrary directory together with bundled external/avb/test/data keys. Calling add_img_to_target_files from a different directory fails to build an image which has avb_{}_key_path pointing to the bundled key since add_hash_footer can't find the key file. Fix this by applying the same logic as in common.AppendAVBSigningArgs. Steps to reproduce: $ . build/envsetup.sh && lunch aosp_cf_arm64_phone-userdebug && make dist $ cd out/dist && rm -rf otatools && unzip otatools.zip -d otatools $ zip -d aosp_cf_arm64_phone-*target_files*.zip IMAGES/system_other.img $ otatools/bin/add_img_to_target_files -a -v -p otatools \ aosp_cf_arm64_phone-target_files-*.zip Bug: 218531463 Test: manual, see "steps to reproduce" above Change-Id: Id3f7cf2678e998ef1beda2b6741944c6455c2404
Loading
Please register or sign in to comment