Previously the key mapping in releasetool/sign_target_files_apks.py
is missing the aforementioned keys that introduced in Android 13, so
it's writing corrupted signatures in plat_mac_permissions.xml.
Test: make target-files-package otatools
sign_target_files_apks -o -d <CERT_ROOT> ...
Change-Id: If42907cffbd500281876f8f822cbb645583d06ed
Signed-off-by: RITEFANG <1721985272@qq.com>
payload_signer_args is a list returned from shlex.split, need to unparse
it before passing to shell CLI
Test: th
Bug: 354019928
Change-Id: I4d308557b5bb808bf34c9d4514408c21176c81f6
Release key signing passes more args than just --package_key, honor
these flags properly in signing script.
Test: th
Bug: 354019928
Change-Id: I49215e92f28da2ac4cd72fb9e5c6bbc94a3e3f02
This allows incremental dev option to be used on release-key devices.
Boot images are signed during the signing process, and hence the dev
option OTAs(which are derivative of boot image) need to be re-generated.
Previously we only re-generate full OTAs, now we support incrementals
too.
Previous land of the CL had a bug where AddDtbo() is called even for
devices which do not have a DTBO partition, causing signing failures.
This reland fixes the issue above by checking "has_dtbo" in
misc_info.txt
Test: th
Bug: 339658378
This reverts commit 29c7842c02.
Change-Id: Ifb080aaa15faf752ab1cff687c54d00290c1bfa6
This reverts commit 5fcaa1f635.
Reason for revert: Droidmonitor created revert due to b/363090380.
Change-Id: I366b12a303190f73e6ac16a1fcff83b1e16ebf2d
This allows incremental dev option to be used on release-key devices.
Boot images are signed during the signing process, and hence the dev
option OTAs(which are derivative of boot image) need to be re-generated.
Previously we only re-generate full OTAs, now we support incrementals
too.
Test: th
Bug: 339658378
Change-Id: I4755379b49ff8adf351ccaf76fe38f19c1685e9e
Currently, dev option OTAs are generated using dev-key signed boot.img
On release-key devices, OTA will install successfully, but user would be
using dev-key signed boot image after reverting to 4K mode, and
subsequent OTAs would fail. This CL re-generates 4K boot OTA using
release-key signed boot.img , which allows normal OTAs after toggling
dev options.
Test: th
Bug: 354019928
Change-Id: I40811d6ed7a37f50edea77d245bf559b66da5a71
Test: Sign target files package where
SYSTEM/product/media/bootanimation-dark.zip is a symlink to
bootanimation.zip.
Change-Id: I4648c3c39c094cb090cbe337c566c3e9ad894691
microdroid_vendor.img is vendor image for running Microdroid, a type of
VM run on top of Android. microdroid_vendor.img is currently stored in
host device's vendor partition. However the original key signed for
microdroid_vendor.img is not enrolled in the signing server, so it can
make possible test breakage if there's a test checking all files in the
partition is signed with trusted key.
Therefore, this is the patch to resign micrdoroid_vendor.img with
avb_vendor_key. When vendor image of host device is resigned with that
key, microdroid_vendor.img would be resigned as well with the same key.
Bug: 285855442
Test: First, for testing, modify the script to skip all files except
VENDOR/etc/avf/microdroid/microdroid_vendor.img in ProcessTargetFiles.
Second, run following commands and check if script doesn't throw any
error until ProcessTargetFiles ends.
- sign_target_files_apks --avb_vendor_key external/avb/test/data/testkey_rsa2048.pem --avb_vendor_algorithm SHA256_RSA2048 <source_zip_file> <target_zip_file>
- sign_target_files_apks --avb_vendor_key external/avb/test/data/testkey_rsa4096.pem --avb_vendor_algorithm SHA256_RSA4096 <source_zip_file> <target_zip_file>
- sign_target_files_apks --avb_vendor_key external/avb/test/data/testkey_rsa8192.pem --avb_vendor_algorithm SHA256_RSA8192 <source_zip_file> <target_zip_file>
Third, `unzip <target_zip_file>` and do `avbtool info_image`
Change-Id: I5337f61ab9eca7e6d0f92860486bc820b6e09eac
(Re-land of Ie882fccd864920289e48366e99a4ebd67e784d0d)
We no longer build GKIs from the platform tree.
These build commands were neither used nor maintained anymore, so clean
them up to reduce maintenance effort.
Keep the command line options as no-op, so existing scripts that still
specifies the deprecated options don't break.
Bug: 229701033
Test: presubmit
Change-Id: I0f7d05562dbc3eed29e902d6dc9a0f2e4083aaa6
Some apps are signed with default sdk_sandbox key.
It results in failure of GtsPackageSignatureTest
Bug: 318798881
Test: run gts -m GtsPackageSignatureTest
Change-Id: I676f48eb2844866f4e61af60d78026a87303d15a
This variable is always false or empty now, so clean up remaining
references to the variable.
Bug: 241346584
Test: Presubmit
Change-Id: I5dd3d356729d0bd2639633580bbb85f8b03582cf
We no longer build GKIs from the platform tree.
These build commands were neither used nor maintained anymore, so clean
them up to reduce maintenance effort.
Bug: 229701033
Fix: 229701033
Test: presubmit
Change-Id: Ie882fccd864920289e48366e99a4ebd67e784d0d
Check BOARD_AVB_$(call to-upper,$(partition))_KEY_PATH to decide whether custom_image should sign AVB or not. If key path isn't set, the custom image will be excluded from AVB and copied to /IMAGES in target-files directly. This allows vendor to use custom_images flow packing unsigned image.
And to every non-avb custom partition, one image whose name is partition name must be added in its BOARD_<CUSTOM_PARTITION>_IMAGE_LIST.
BOARD_CUSTOMIMAGES_PARTITION_LIST := tvconfig
BOARD_TVCONFIG_IMAGE_LIST := \
device/xxxx/yyyy/tvconfig.img \
device/xxxx/yyyy/tvconfig_custom1.img
Test:
1) Build image, target-files, OTA package by m and m dist
2) Sign images by sign_target_files_apk.py
Fix: 285227850
Change-Id: I7477dafe023e4b168f0f08fb7aedd9e511a60e1b
default.prop can be linked to prop.default. To rewrite the fingerprints,
the original prop.default should be overwritten.
Bug: 264853953
Test: sign_target_files_apks, check artifacts
Change-Id: I8d22b8391dbfe13e74880ffad0619ef7fc4e20e0
Under some build configuration, there could be build prop stored under
path VENDOR_BOOT/RAMDISK_FRAGMENTS/recovery/RAMDISK/default.prop .
When signing, we must overwrite all build props, or device would display
incorrect build fingerprint.
Bug: 264853953
Change-Id: Id3b176b4ce4efa348ecfb3c9848f72273c5ccca8
In the old days, we hacked values of ZIP64LIMIT to get around size
limitations of non-zip64 supported zip files. Now that we switched to
python3 + zip64, there's no point in keeping those hacks.
Test: th
Bug: 255683436
Change-Id: I913db33dad5503736c68a7a1f1321aa952019f60
vbmeta_system does not need to be rebuilt with vendor side
Signed-off-by: jiangxu5 <jiangxu5@xiaomi.com>
Change-Id: Ieb2076055aa3342a6071ec2ed5c976e22f59acd1
We are removing VB support from release tools. This change aims to
remove the args related to replace verity key.
Bug: 242672222
Test: atest under build/make
Change-Id: I446a0b16e482c43542a1c0e41b24e80eb9fbc8e6
Currently, if we want to override all apex/apk key, we must specify all apk/apex names exhaustively. This causes CLI arguments to be very long and sometimes exceeds OS's limit.
Test: run signing test locally on build 8862875 on git_master
Bug: 239991438
Change-Id: Idbd3b7eef9b2a27236f4ca7a27449fcdf0d2dd3f
The intention was to make extra_apex_payload_key take a comma separted
list of keys. Iterating over a string will only iterate over each
characters individually. Must split by "," to iterate over keys.
Test: Run signing test locally using tradefed.sh
Bug: 239991438
Change-Id: I51bfed53a43b1b0fc1e33e0dc3d418a727e6ff15
When running tests, we might need to add many
extra_payload_keys. Currently we have to add --extra_apex_payload_key
for each key pair we pass, resulting in extremely long argument list.
Test: th
Bug: 239991438
Change-Id: I3e5f9d76c7f45822fb986b603dc089407c35b76b
Uniform the split() function
str.split() will return a list split all spaces in str,
while str.split(' ') will return a list might contain ''
which might have potential issues.
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
Change-Id: I0961659b140f800bdbe285f63bb4f02b8459ff8b
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
add_img_to_target_files.py will re-make image and build a new
signed vbmeta.img with new images in target-file.
We need to add vendor_kernel_boot into AVB signing list and make it
support that image.
Test: make dist -j110 and check vbmeta.img
Bug: 214409109
Signed-off-by: Lucas Wei <lucaswei@google.com>
Change-Id: Id07433f3dc33f95e2edd49de890f1e098cb9ef31