When building a system image with system_root_image enabled, the size
computation should include files under both of in_dir (i.e. /system
files) and root (pointed by 'root_dir'). Because files from both
locations will end up into the built image. The files under root are
usually only a few MiBs, but should be accounted for especially in the
context of logical partitions (where the partition size will be
allocated based on the actual need). Note that we will still need some
"reserved space" (defined via BOARD_*_PARTITION_RESERVED_SIZE) to cover
the cost for filesystem and/or verity metadata.
This CL moves the combination of the two dirs up, before parsing and
computing other properties. This doesn't affect anything for a
successful image building path. It may however increase the time to
error out in certain error path, since it copies the files earlier now.
Test: python -m unittest test_build_image
Test: `make dist`
Test: Setup a target with PRODUCT_USE_LOGICAL_PARTITIONS == true and
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE == 20MiB. Build system
image successfully.
Test: Setup a target with PRODUCT_USE_LOGICAL_PARTITIONS == true and
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE == 20MiB. Write a large
file to root dir (PRODUCT_OUT_ROOT). The image building fails, but
reporting a size that accounts for both of /system and root.
Change-Id: Idfb26b8e259626ba57ec3bd4f85d357c30e56163
This will add ro.vendor.build.security_patch to /vendor/build.prop on
device
Bug: 76428542
Test: ro.vendor.build.security_patch entry shows up under
/vendor/build.prop
Change-Id: I3d3ec2d0e76fc5e62cd283ed4bce3894423cabdd
Merged-In: I4f783e996cb425a49c2b12ae4f364e12c6ca7784
(cherry picked from 56d444b98f)
auto_test_config will only be set once for the same
$(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)
ATest should also treat the multilib variant modules as testable.
Fix auto_generated config may have chance to be set as 2nd_arch name
BUG: 111397357
BUG: 110820867
BUG: 80298359
Test: . build/envseup.sh
lunch aosp_x86_64-eng
make -j out/target/product/generic_x86_64/module-info.json
(check module-info.json for hello_world_test)
make -j hello_world_test
cat out/target/product/generic_x86_64/testcases/hello_world_test/hello_world_test.config
Change-Id: I69895b6373476c0053f2c6e657770d606ccfbcd1
libclang_rt.ubsan* VNDK core libraries are no longer built
for all arch flavors. Now, only the TARGET[_2ND]_ARCH-specific
libs are builts. Therefore no need to filter-out and re-add
libclang_rt.ubsan* VNDK core libraries.
Test: m -j vndk
Change-Id: I48080c1cd546cfc9f14313a3c9559d5c1bb2fdbe
manifest_fixer.py needs to know the difference between apps
and android libraries in order to change its behavior around
inserting targetSdkVersion.
Bug: 111347801
Test: m checkbuild
Change-Id: Ic21f1b98e3bcbd782612370c46134fc9dd157512
This path is never used, otherwise the dependency on
proguard.classes.jar would have triggered the checkbuild
dangling rules errors. Remove the dependency on the
proguarded classes, which don't exist any more, and depend
on the proguard_options and proguard_dictionary files
instead.
Test: none
Change-Id: Ia3ebc3bc71f0d6fdfa4a7a6850e2f7021adfdd1a
Manifest fixing is getting complicated, move it to a separate rule
so that it doesn't have to be a function in definitions.mk.
Bug: 111347801
Test: m checkbuild
Change-Id: Ibc60ad79c9c4f4a63a0e1c8f7779534954fb6585
metalava-api-stubs-docs_annotations.zip needs to be added as part of
sdk.atree dependencies.
Bug: b/78245848
Test: make -j80 PRODUCT-sdk_x86-sdk sdk_repo; and check ninja file.
Change-Id: I6be5d59c6f91a519f8d16ff273daa35c349d18aa
When verity is enabled, `partition_size` has the "adjusted" partition
size for holding the filesystem files (i.e. excluding verity hashtree,
and FEC metadata if applicable), whereas `original_partition_size` has
the one for the actual image returned by build_image.py.
`partition_size` must be smaller than `original_partition_size`. As a
result, the later assertion in Makefile (e.g. assert-max-image-size) may
fail to hold when using `partition_size`.
This CL addresses the issue by returning the value in
`original_partition_size` instead, if available. It also changes to
include both values when dumping the size info on image creation
failure.
Fixes: 79106666
Test: `m dist` with aosp_walleye-userdebug
Test: Set up walleye to use logical partitions, with a reserved size of
20MiB. `m systemimage` no longer fails.
Test: Set up walleye that doesn't use verified boot. Use `m systemimage`
to build an oversized image. Check the error message.
Change-Id: I41d77bffa85e8eadfbf4a2a7dcd2e798fadfdab7
Uses the new class2greylist tool to extract API descriptors from .class
files.
Also add these generated greylist.txt files as dependencies of
INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST so they can be merged later in
the build.
Bug: 110868826
Test: m
Change-Id: I406587732b537f9b56768ad9909039dfab34c334
The installed files lists are wildly inaccurate unless all the
makefiles in the tree have been parsed, so the "redundant whitelist"
computation will be too trigger-happy in this case.
Bug: 111757442
Test: mmm -j system/extras/partition_tools
Test: m out/target/product/generic_arm64/offending-artifacts.txt
Change-Id: Id3a9f61d2366de77cdedf9cb1e4e39f7d18ade6f
So that we can start restricting non-phony targets to $OUT_DIR and
$DIST_DIR.
Test: add --writable=out/, see fewer warnings
Change-Id: I411fe4af732b1bce35d4a4c1e2a47b5f8a15e6b8
Since TARGET_USES_64_BIT_BINDER could be not set, first check
TARGET_IS_64_BIT when determining binder bitness.
Test: lunch aosp_walleye-userdebug && m -j vndk, then check
directory structure
Bug: 111773572
Change-Id: If75d5946b38d7b5bc15798b273e0450035c8c43a
For example, verify a target_files.zip that has system AVB-signed as a
chained partition.
$ build/make/tools/releasetools/validate_target_files.py \
signed-target_files-4904652.zip \
--verity_key verifiedboot_pub.pem \
--avb_system_key_path system_pub.pem
Note that verifiedboot_pub.pem should be the key (either public or
private) to verify vbmeta.img, and 'system_pub.pem' should be the key
(either public or private) for the chained partition of system.
testdata/testkey.key is the private key converted from
testdata/testkey.pk8 for testing purpose (`openssl pkcs8 -in
testdata/testkey.pk8 -inform DER -out testdata/testkey.key -nocrypt`).
Bug: 63706333
Test: python -m unittest test_common
Test: python -m unittest test_add_img_to_target_files
Test: `m dist` on aosp_walleye-userdebug; Run validate_target_files.py
on the generated target_files.zip.
Test: Set up walleye with chained system partition; `m dist`; Run
validate_target_files.py on the generated target_files.zip.
Change-Id: I38517ab39baf8a5bc1a6062fab2fe229b68e897d
The original code doesn't use the size of images that
is calculated at build time, but instead use BOARD_*IMAGE_PARTITION_SIZE
variables. Update the logic to use the actual size of the images at
build time.
Test: builds with a device defining the value and
BOARD_SUPER_PARTITION_PARTITION_LIST := system vendor product productservices
Bug: 79106666
Change-Id: I07b3ee466482bd8f5cf709e13e16a7f187099aaf