`make custom_images` supports to build different kinds of *non-droid* images,
e.g., odm.img. Adding the support of signing them with either AVB HASH footer
or AVB HASHTREE footer. The user can use HASH for small images and
HASHTREE for large images.
Sample signing configurations:
* AVB HASH footer:
- CUSTOM_IMAGE_AVB_HASH_ENABLE := true
- CUSTOM_IMAGE_AVB_ADD_HASH_FOOTER_ARGS := --append_to_release_string my_odm_image
* AVB HASHTREE footer:
- CUSTOM_IMAGE_AVB_HASHTREE_ENABLE := true
- CUSTOM_IMAGE_AVB_ADD_HASHTREE_FOOTER_ARGS := --fec_num_roots 8
* Using custom signing key:
- CUSTOM_IMAGE_AVB_ALGORITHM := SHA256_RSA2048
- CUSTOM_IMAGE_AVB_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
Bug: 36701014
Test: `make custom_images` with AVB HASH footer
Test: `make custom_images` with AVB HASHTREE footer
Test: `make droid` to check system.img is still properly signed with AVB HASHTREE
Test: `make droid` to check vendor.img is still properly signed with AVB HASHTREE
Change-Id: I8dc420e12e37e9a631345c0cd883339db05d489f
Set CUSTOM_IMAGE_AVB_ENABLE := true to enable avb, add_hashtree_footer
args can be added in CUSTOM_IMAGE_AVB_ADD_HASHTREE_FOOTER_ARGS.
Bug: 38319818
Test: m custom_images
Change-Id: Ia452dc5ce8b55bcbd3abba9e965b72e78fd8c104
The vr platform lib was renamed from com.google.vr.gvr.platform to
com.google.vr.platform, so update the whitelist accordingly. Also narrow
the whitelist to just the .platform subpackage.
Bug: 38134403
Test: Booted a Marlin.
Change-Id: I9243ed3ab7a918e0bc716a7ddafe0b3c068700de
Sort the inputs to remove duplicates, which fixes:
found two file paths to be copied into dest path: "target/testcases/minikin_perftests/minikin_perftests", both ["target/testcases/minikin_perftests/minikin_perftests"]"out/target/product/bullhead/testcases/minikin_perftests/minikin_perftests" and ["target/testcases/minikin_perftests/minikin_perftests"]"out/target/product/bullhead/testcases/minikin_perftests/minikin_perftests"!
Test: m -j device-tests
Change-Id: I8d7e83cd077c62461c9a08e7f1b49c321fbcb0e3
Replace it with finer grained exemptions. These aren't fine grained
enough, but they're a start.
Bug: 37266786
Test: make
Change-Id: I986f215c08461df2291753a6eb02ad9390dcbedc
All the new features are turned off for now, since multiple branches and
products need to be verified before they can be turned on. So everything
should behave the same as today, except for no partition-based
warnings.
Instead of the current link type checks that happen during the build,
run as many as possible immediately after loading all the Android.mk
files. If we're allowing missing dependencies ('mm',
ALLOW_MISSING_DEPENDENCIES, tapas, etc), we'll defer the link type
checks to during the build. If we're not allowing missing dependencies,
we'll produce a better error message to the user about the missing
dependencies.
See core/main.mk for a description of the storage format.
This also remove the partition-based type checking. It hasn't worked all
that well, particularly with ASAN builds. The new VNDK checks will
handle the most pressing cases.
Test: Verify all link_type files and dependencies are the same:
grep link_type: out/build-aosp_arm64.ninja | sed -E "s/ rule[0-9]+//" | sort
Change-Id: Id643658b9d9e84f99f5db0d526aad88c1f5d3417
This CL addresses the problem that native tests build for multiple
architectures and also build for host.
First it restructures each testcase folder to the following layout:
<testcase>/<testcase>.config
<testcase>/<arch 1>/testcase
<testcase>/<arch 2>/testcase
Secondly it now uses the new soong-zip prefix capability to
separate out host and target testcases in the device-tests &
general-tests zip files.
Bug:36692141
Test: `make device-tests general-tests cts -j` &
ensured all built successfully.
Change-Id: I4e8b084ee56fa8940914911649ff35507d87eb27
Using ; to join commands in a rule causes failures to be ignored by
make. Use && instead, and add true at the end as the second operand
to the last && operator.
Also inline copy-test-in-batch, batching is no longer necessary as
kati will fall back to a shell script if the recipe is too long to
fit in a command line.
Test: builds
Change-Id: I4a2528bf2a15106cfabaae0336662c4a0464271d
This also makes the resulting zip files more repeatable -- the file list
is sorted and the entries have static timestamps.
On my machine, this saves ~30 seconds for android-cts.zip, it now takes
less than a second.
Test: m -j cts; compare output from without this change
Change-Id: Ia71e35878ff98ba9775115860530e87eee47739f
Include the calling makefile and package name instead of just a warning
pointing to package-modules.mk
Test: multiproduct_kati, grep logs
Change-Id: I4fa35540b9695b44eea6c23463e137ec37d1d2c9
Adds the device-tests and general-tests makefiles and
added include lines to main.mk so that individual test
modules can be built properly.
These targets do not build any special tradefed wrapper
that normal *TS's usually employ. They are not necessary
here.
Bug: 35350788
Test: Updated several CTS test modules to belong to these
suites instead and ran:
`rm -rf out; make clean; make device-tests general-tests -j`
then verified the output.
Change-Id: I40e3958375f7b39cb56508f2812ce9760d403f6f
When building test modules, dependencies added by the test modules get
build but don't get included in the packaged tests .zip file.
When packaging modules into a .zip file, this patch includes the modules
explicitly listed as a dependency in LOCAL_REQUIRED_MODULES for the
requested modules to package.
If these LOCAL_REQUIRED_MODULES dependencies are not used in the base
system image, they were build as part of the "tests" target but weree
not included in the package nor in the system image. This patch includes
those modules, making it easier to define dependencies of a test
module in the Android.mk file that defined said module, instead of
requiring to re-list all the dependent modules when packaging test
modules.
Bug: 27348226
Change-Id: Ic6f60cf2916b3fae0fa39f84aee8a4f440af9539
HOST_OUT_EXECUTABLES is already added to the PATH variable,
so it is not needed to add the path info for binaries in
misc_info.txt and <partition>_image_info.txt.
Earlier the mkuserimg item in the build_image dictionary is
hardcoded to "mkuserimg.sh", but now it is customized for
mkuserimg.sh and mkuserimg_mke2fs.sh, and maintained in
dictionary "ext_mkuserimg=$(MKEXTUSERIMG)" in misc_info.txt
and <partition>_image_info.txt, where it is used in the
build_image script while creating the images.
The problem here is the value for this key is set to build
path of the file mkuserimg file
$(HOST_OUT_EXECUTABLES)/mkuserimg.sh,
i.e. out/host/linux_x86/bin/mkuserimg.sh,
there by standalone signing the images using otatools is
not working as the executables are packed in bin folder.
Test: tools/releasetools/sign_target_files_apks
-p <extracted ota-tools.zip folder>
--extra_signapk_args=-f /etc/opt/cert_data.dat
-v
--replace_verity_private_key ~/build/target/product/security/verity
--replace_verity_public_key ~/build/target/product/security/verity.x509.pem
-k <key maping>
<input target files zip>
<output target files zip>
Change-Id: I57af1025ec38f3794f779c49faa0bf965afc6a5d
The core-junit library has been replaced with the legacy-test
library. The latter included everything that was in core-junit
plus some android.test classes that were in frameworks.
Bug: 30188076
Test: make checkbuild
Change-Id: Id2ba827705dbd2c27a1183e1153b03c11a8a4074
Bug: 31788743
Test: $ make cts dist
# check contents of generated package and API coverage
# report
$ make checkbuild
Merged-In: Ieec069bafbcc6df5a5b3b06befb4a3a5678a06fd
Change-Id: Ieec069bafbcc6df5a5b3b06befb4a3a5678a06fd
(cherry picked from commit f8f0880b3b8fb6a80ed766068d5f1714625b8960)
Bug: 31788743
Test: $ make cts dist
# check contents of generated package and API coverage
# report
$ make checkbuild
Change-Id: Ieec069bafbcc6df5a5b3b06befb4a3a5678a06fd
The introduction of java.lang.invoke.MethodType and its supporting
classes, in particular.
bug: 30550796
test: make checkbuild
Change-Id: Id2b84d3bb911f4bc5aef0761d357b1e9121030ab
Tracks libcore change that adds the first classes from this package
to core-oj.jar. Note that packages need to be whitelisted even if
the classes in question aren't public API.
Test: make checkbuild docs
Change-Id: I917dc63899124ca30bbeb2902787faea6754bb43
Allow exceptions specified by module (VENDOR_EXCEPTION_MODULES) and
path (VENDOR_EXCEPTION_PATHS, not including leading vendor/).
BUG=26968426
Change-Id: I068e43f3eae14f8793c33ae916d46979ab1681d1
This reverts commit 1d4ad6a527.
This topic has been reverted because it causes build flakiness and
bogus verification failures on most active changes.
Change-Id: I4a935c9a861e063e28ddc1c35bc3fa015174e81d
With some core classes moved to separate core-oj jar
we need to use the new jar.
(cherry picked from commit 89b94c827f)
Change-Id: I025c0adc70535bf23def3ab0ce28a1bfaef72514
Enable client-side dynamic config code to access the suite-level dynamic
config files by placing them in the testcases directory. Also update
cts_v2.mk to define the location of its corresponding dynamic config file.
bug:23625592
Change-Id: Id11dea4b6acbe8ea7e5e9579e369a2be5873a224
ziptime fails on zip file larger than 2GB.
These zip files won't installed on device and we don't care that much
about their reprodudcibility across builds.
Change-Id: I47062928d075a59eda92dd5333e59502f490d1cb
Pass -X to zip so that Unix UID/GID and extra timestamps aren't
saved into the zip files.
Add a new tool, ziptime, that uses a very stripped down copy of
zipalign. It no longer depends on libandroidfw, and now rewrites the
timestamps in place instead of making a copy of the zipfile. This should
improve speed and reduce disk requirements, especially with the large
packaging zip files.
Bug: 24201956
Change-Id: I50f68669f659da1b4393e964ad40b6aafb00c1e7
This reverts commit 3c2c064c87.
zipalign depends on libandroidfw, and some setups don't include frameworks/base.
Bug: 24201956
Change-Id: I48ee95808924f6b2221f0a49ab205c2565096b1f
Pass -X to zip so that Unix UID/GID and extra timestamps aren't
saved into the zip files.
Add a new option to zipalign, -t, to replace all timestamps with static
timestamps (2008 Jan 1 00:00:00). Use this for all non-APK zip files.
APK zip timestamps are set based on the certificate date in SignApk.
Bug: 24201956
Change-Id: Ifb619fc499ba9d99fc624f2acd5f8de36d78ef8e
- For unmodified "make product-graph" and "make dump-products",
load only the current product configuration makefiles. This is much
faster than loading all product makefiles.
- For "make product-graph ANDROID_PRODUCT_GRAPH=--all",
"make dump-products ANDROID_DUMP_PRODUCTS=all", load all product
makefiles.
- Move product-graph.mk out of build tasks, so we can skip loading all
the Android.mks, which takes long and we don't really need them.
More importantly, with all product makefiles loaded, modules in
Android.mks are prone to clash (if they are conditionally included
by variables set up in product makefiles) and lead to parse-time
error.
Change-Id: Idc1d6b0c23eb2c8bb34fdd7a1fa4d56171768d21
The catch all "org" package was catching several thousand
org.apache.harmony.tests.* tests that are already covered by
other packages. Replace the catch-all org.* with specific prefixes.
Needs additional support in CollectAllTests to handle multiple
prefixes. This is implemented in the companion change.
bug: 20862863
Change-Id: I44348052d20312d478bdbf6df0e561db63e18cd8
Print modules and their transitive dependencies with license files.
To invoke, run
"make deps-license PROJ_PATH=<proj-path-patterns> DEP_PATH=<dep-path-patterns>".
PROJ_PATH restricts the paths of the source modules;
DEP_PATH restricts the paths of the dependency modules.
Both can be makefile patterns supported by makefile function $(filter).
Example:
$ make deps-license packages/app/% external/%
prints all modules in packages/app/ with their dpendencies in external/.
The printout lines look like "<module_name> :: <module_paths> :: <license_files>".
Bug: 20823995
Change-Id: I06b66e85ff56c8628bffa3d948085ed45870100f
(cherry-pick from 39b9b690a8)
Commit 28acbeab18f6083299c07f9ebe769d22e49f8107 removed the dependency of
sepolicy-analyze on libc++, eliminating the only consumer of the library for the
cts host-side tests. Remove the library since it is no longer needed but leave
the ability to add other shared libs in the future.
(cherry-pick of commit: 214a171424)
Bug: 19566396
Change-Id: I36f45c3e92c2d6370e98baa4c527835af66691fa
Add ability to include dirs to the cts distribtion to enable bundling of shared
libraries on which host-side executables rely.
Bug: 19566396
Change-Id: Id501874244ae98fbfef2aa591885c88dee5b8b02
The build was working on AOSP, but fails downstream when using
Jack because the javalib.jar file needed by CTS is not being
built by default there.
Change-Id: I8dd836b33a4e1bae5af623db3822de99e9b05cf0
Fix the bug that build is still success when boot jars contain
non-whitelisted classes. Now, check-boot-jars.py correctly
finishes with exit code 1 when non-whitelisted classes are found.
Change-Id: Id5c80ef9fdb70213d878d569f6033be2c9eb90d3
New custom image configuration variables:
- CUSTOM_IMAGE_SELINUX, set to "true" if the image supports selinux.
- CUSTOM_IMAGE_SUPPORT_VERITY, set to "true" if the product supports verity.
- CUSTOM_IMAGE_VERITY_BLOCK_DEVICE
Also changed the staging directory name to the mount point, like we do
for other images built by the build system.
Bug: 19609718
Change-Id: I6bbf06b79eee63e4c77834f2e6f1d5a7f7e00a12
(cherry picked from commit 7d51a40295)
New custom image configuration variables:
- CUSTOM_IMAGE_SELINUX, set to "true" if the image supports selinux.
- CUSTOM_IMAGE_SUPPORT_VERITY, set to "true" if the product supports verity.
- CUSTOM_IMAGE_VERITY_BLOCK_DEVICE
Also changed the staging directory name to the mount point, like we do
for other images built by the build system.
Bug: 19609718
Change-Id: I6bbf06b79eee63e4c77834f2e6f1d5a7f7e00a12
Build additional images requested by the product makefile.
This script gives the ability to build multiple additional images and
you can configure what modules/files to include in each image.
1. Define PRODUCT_CUSTOM_IMAGE_MAKEFILES in your product makefile.
PRODUCT_CUSTOM_IMAGE_MAKEFILES is a list of makefiles.
Each makefile configures an image.
For image configuration makefile foo/bar/xyz.mk, the built image
file name
will be xyz.img. So make sure they won't conflict.
2. In each image's configuration makefile, you can define variables:
- CUSTOM_IMAGE_MOUNT_POINT, the mount point, such as "oem", "odm"
etc.
- CUSTOM_IMAGE_PARTITION_SIZE
- CUSTOM_IMAGE_FILE_SYSTEM_TYPE
- CUSTOM_IMAGE_DICT_FILE, a text file defining a dictionary
accepted by BuildImage() in tools/releasetools/build_image.py.
- CUSTOM_IMAGE_MODULES, a list of module names you want to include
in the image; Not only the module itself will be installed to proper
path in the image, you can also piggyback additional files/directories
with the module's LOCAL_PICKUP_FILES.
- CUSTOM_IMAGE_COPY_FILES, a list of "<src>:<dest>" to be copied to
the image. <dest> is relativ to the root of the image.
To build all those images, run "make custom_images".
Bug: 19609718
Change-Id: Ic73587e08503a251be27797c7b00329716051927
(cherry picked from commit 5fcf1094f9)
Build additional images requested by the product makefile.
This script gives the ability to build multiple additional images and
you can configure what modules/files to include in each image.
1. Define PRODUCT_CUSTOM_IMAGE_MAKEFILES in your product makefile.
PRODUCT_CUSTOM_IMAGE_MAKEFILES is a list of makefiles.
Each makefile configures an image.
For image configuration makefile foo/bar/xyz.mk, the built image
file name
will be xyz.img. So make sure they won't conflict.
2. In each image's configuration makefile, you can define variables:
- CUSTOM_IMAGE_MOUNT_POINT, the mount point, such as "oem", "odm"
etc.
- CUSTOM_IMAGE_PARTITION_SIZE
- CUSTOM_IMAGE_FILE_SYSTEM_TYPE
- CUSTOM_IMAGE_DICT_FILE, a text file defining a dictionary
accepted by BuildImage() in tools/releasetools/build_image.py.
- CUSTOM_IMAGE_MODULES, a list of module names you want to include
in the image; Not only the module itself will be installed to proper
path in the image, you can also piggyback additional files/directories
with the module's LOCAL_PICKUP_FILES.
- CUSTOM_IMAGE_COPY_FILES, a list of "<src>:<dest>" to be copied to
the image. <dest> is relativ to the root of the image.
To build all those images, run "make custom_images".
Bug: 19609718
Change-Id: Ic73587e08503a251be27797c7b00329716051927
This allows developers to build the test packages individually without
needing to build the entire CTS release.
bug: 18945639
Change-Id: Iedc162059617f683a16a6b80cb7b1a6e0674bba4
It's pain to maintain an inactive product's list of
PRODUCT_FACTORY_RAMDISK_MODULES or PRODUCT_FACTORY_BUNDLE_MODULES.
Just show a warning if a module name becomes dangling.
Bug: 18779515
Change-Id: I3d137ed59feb005b186ed2a3519465da3d8f45c3