SHELL environment variable cannot be relied on because the rbcrun
can be run as `env - rbcrun ...`
Fixes: 184278019
Test: build/soong/soong_ui.bash --make-mode USE_BAZEL=1 TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug droid dist platform_tests
Change-Id: Id8fc7fd1ae8f2e674028ba5ffb3616f87eea6bc4
Added SPDX-license-identifier-Apache-2.0 to:
tools/rbcrun/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Exempt-From-Owner-Approval: janitorial work
Change-Id: I6a1c75458115b15d9d0d9f0dbc11e0acffc1fe7b
This change intends to fix if ramdisk is not "lz4" compression.
Legacy is "minigzip" compression.
If not lz4, the following error will happen when exec build_super_image.py:
Unable to get boot image build props: Failed to run command '['lz4', '-d', '/tmp/boot_omdZZ8.img/ramdisk', '/tmp/boot_omdZZ8.img/uncompressed_ramdisk']' (exit code 44):
Error 44 : Unrecognized header : file cannot be decoded
Change-Id: I71248387bbeecbf184e0c24e6346c235d728518e
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
This reverts commit ccfea17fb7.
Reason for revert: Original bug was resolved by updating branch config
Change-Id: I2327092261a2147fa8f2be3d878db04228e65511
This change doesn't change the condition for building super_empty.img,
it just add a toggle PRODUCT_BUILD_SUPER_EMPTY_IMAGE that product
makefiles can use to skip building super_empty.img.
Products that don't use super_empty at all, for example GSI, can set
this option to ensure the super_empty.img is not built.
Bug: 183068624
Test: "m dist" on GSI and check the build artifacts under OUT and DIST
directories, and check the contents of *-img-*.zip
Change-Id: I54943952873d2d297fd9d18cbe14742bc12ae9c6
Commit I9967d06bde0e18a12b84b5b0b568db09765fe305 supports adding a
generic boot_signature into boot.img v4. This change allows replacing
the boot_signture signing key with a release key during the release
process.
The default GKI signing key can be specified in a BoardConfig.mk via:
BOARD_GKI_SIGNING_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_GKI_SIGNING_ALGORITHM := SHA256_RSA2048
BOARD_GKI_SIGNING_SIGNATURE_ARGS := --prop foo:bar
The release signing key/algorithm can be specified by the following options
when invoking sign_target_files_apks:
--gki_signing_key=external/avb/test/data/testkey_rsa4096.pem
--gki_signing_algorithm=SHA256_RSA4096
Additional arguments for generating the GKI signature can be
specified as below:
--gki_signing_extra_args="--prop gki:prop1 --prop gki:prop2"
Bug: 177862434
Test: make dist
Test: sign_target_files_apks \
--gki_signing_key=external/avb/test/data/testkey_rsa4096.pem \
--gki_signing_algorithm=SHA256_RSA4096 \
--gki_signing_extra_args="--prop gki:prop1 --prop gki:prop2" \
./out/dist/*-target_files-eng.*.zip signed.zip
Test: Checks GKI boot_signature is expected after signing:
`unzip signed.zip IMAGES/boot.img`
`unpack_bootimg --boot_img IMAGES/boot.img --out unpack`
`avbtool info_image --image unpack/boot_signature`
Test: unit test: releasetools_test and releasetools_py3_test
Change-Id: I61dadbc242360e4cab3dc70295931b4a5b9422a9
The application rbcrun executes Starlark scripts that define Android product configurations.
See README.md for details.
Test: go test
Fixes: 180529448
Change-Id: I7d728b47d3f381b7052a0d7d51c9e698e5c2e316
verity_utils.py gets an entry point and becomes a host binary. This is
to support signing images from the "bootimg" module type. Previously
this was done by directly invoking "avbtool" from the soong module, but
that required people to know the partition_size priori. The partition
size may not be known before actually building the partition image
especially when the partition is not for a physical partition but for a
partition in a composite image.
verity_utils.py, when the partition_size is not given, is capable of
calculating the mininum required partition size based on the size of the
unsigned input image file.
Bug: 180676957
Test: m microdroid_boot-5.10
Change-Id: I7bef292fb141c90899b7bdc0748895f95f964829
The maximum size of all dynamic partition groups should not exceed
the super size - DAP metadata size. Today the configuration of
some devices don't take the metadata into acount. So turn the CheckLe
into CheckLt.
Also, display a warning if the reserved size for DAP metadata is less
than 1M.
Bug: 182431975
Test: mm -j32 check-all-partition-sizes
Change-Id: Ie278f224321083e457d68da000c2b22ec8a54085
Fail the signing if the AVB_FOOTER_ARGS_BY_PARTITION isn't in sync
with common.AVB_PARTITIONS.
Bug: 181787095
Test: run sign_target_files_apks on a S image
Change-Id: I6ccf5fb9f39b92c1da2554f5b3826d2cd87d84d7
If we miss these entries, the signing script won't correctly update
the avb prop to build the vbmeta. This cl adds the missing partitions
for R build.
In the followup, we need to make the map in sync with AVB_PARTITIONS in
common.py
Bug: 181787095
Test: run sign_target_files_apks
Change-Id: I39a308fb7028b45ce08f0ca3c6ad61a6c13e8082
In aosp/1581143 , we banned generation of SPL downgrade OTAs. However,
caller of OTA script can still force an SPL downgrade OTA by passing
--spl_downgrade flag. If this flag is specified, we propagate it to OTA
metadata so that GOTA server can properly honor this flag.
Test: th
Change-Id: Ic8cdc850d2210f4149ad9121fa4ed2e5a4f59bcc
Fix incorrect report "Failed to find the ZIP entry" error when
generate OTA package.
This happens when we have a file in ROOT which name contains 'system'
such as init.system_init.rc, and init.system_init.rc will be rename to
init.SYSTEM_init.rc incorrectly, so we failed to find the entry in ZIP.
Test: manual test
Change-Id: I97359e513aaca7521fe9c035f6a4264a2053b86d
Signed-off-by: wangshumin <wangshumin@xiaomi.com>
If ALLOW_RULES_IN_PRODUCT_CONFIG is set, pass it to kati via
.KATI_ALLOW_RULES, to issue warnings or errors about rules
during product configuration.
Test: CHECK_FOR_RULES=true ./build/make/tools/product_config/test.sh
Test: ALLOW_RULES_IN_PRODUCT_CONFIG=error m nothing
Test: ALLOW_RULES_IN_PRODUCT_CONFIG=warning m nothing
Test: m nothing
Change-Id: I35dd9ffe4ec71f97beaa8b8a2f10d80502088af2
This follows the same steps as OpenSplitPolicy() in
system/core/init/selinux.cpp on the device.
Bug: 178864050
Test: merge_target_files for R+S and S+S devices
Test: test_merge_target_files
Change-Id: Ia41a436bfda8e2cb65706122f0ff3805b99d16e1
Gather all BOARD_BOOTCONFIG parameters.
Create vendor-bootconfig.img with parameters seperated by newlines. Pass
that file to mkbootimg as --vendor_bootconfig to add it to the
vendor_boot.img.
Test: Add BOARD_BOOTCONFIG parameters in cuttlefish .mk file
Check vendor-bootconfig.img for expected output
Verify expected vendor_boot.img format with:
unpack_bootimg --boot_image vendor_boot.img
Test: Update Cuttlefish bootloader to handle the new vendor_boot.img and
check /proc/bootconfig for the expexted parameters.
Bug: 173815685
Change-Id: Iaa9b71b4bc64375777a5353396e83bb2beb25c47
Doesn't include tests. More of those will come later.
Test: build/make/tools/product_config/test.sh
Change-Id: Icd2b455ac5f7b4773ba332fc40e994dc6f024f1b
It's used more than I originally thought it would be and it's
unnecessarily nested.
Test: rm -rf out/config/ && m product-config-test product-config && java -jar out/host/linux-x86/testcases/product-config-test/product-config-test.jar && time ( product-config --ckati_bin /source/kati/ckati > ~/Desktop/out.txt )
Change-Id: Id5a075863151e37ec60e5d9dbeb817c2df245bc7
* changes:
Keep the first and last snapshot of variables.
Generate GenericConfig objects from MakeConfig objects.
Emit and parse the product config variables from kati/make
Add class to fork and exec kati, based on the commandline option given.
Add a CSV parser to parse the output from kati.
The pvmfw is included in an `m` build but not in the distribution files.
Apply the same treatment as the dtbo partition to copy the pvmfw
partition to dist/ since, similar to the dtbo image, the pvmfw image is
generally provided as a prebuilt image.
Test: make dist
Bug: 174457787
Change-Id: I6f42517ba42db92e90048d1236d7255ccbd73f73
Bug:180682930
Test: erofs image can be set to input timestamp and UUID
Change-Id: I71e455350db51096e18ab5a03123500d56ebe252
Signed-off-by: Huang Jianan <huangjianan@oppo.com>
Bundle APEXes may exist on other partitions than system, e.g. vendor,
system_ext. And leaving them unsigned may cause security problems.
Bug: 180675334
Test: run sign_target_files_apks
Change-Id: Ib912a026f4010d818161a89b11f818180208843f
This is needed for partial builds that do not have the apex directory in
their target files package.
Test: build target files for a partial vendor-only build.
Change-Id: I076bfbd1a81cccddcef795f5edeaf2b51538cdec
Applies heuristics to the sequence of Blocks to do so.
Test: rm -rf out/config/ && m product-config-test product-config && java -jar out/host/linux-x86/testcases/product-config-test/product-config-test.jar && time ( out/host/linux-x86/bin/product-config --ckati_bin /source/kati/ckati > ~/Desktop/out.txt )
Change-Id: Id6763781bc876e2b2e0be320a7259c1ed41c2334
(Yet another class that would be great for android to have in a host
tools library)
Test: m product-config-test && java -jar out/host/linux-x86/testcases/product-config-test/product-config-test.jar
Change-Id: I7d74b2265393e4f340729ca5ba82d1ec92a20f85
* changes:
Rearrange the methods on ErrorReporter to be more convenient.
Add glue to run product-config-test as a standalone commandline executable.
CommandException to cleanly exit product-config on error.