Commit graph

73641 commits

Author SHA1 Message Date
George Chang
bf42125c2d Merge "Add nfc HAL ndk to gsi" 2022-01-22 01:46:41 +00:00
Treehugger Robot
7ef84931aa Merge "Generalize @Keep annotation Proguard rules" 2022-01-21 23:27:25 +00:00
Ramji Jiyani
1065523a5e Add support to build system_dlkm.img
There are 2 choices to build system_dlkm.img for
the system_dlkm partition for Android T launch
devices and must choose one.

1. Use kernel prebuilt system_dlkm.img
   - BOARD_PREBUILT_SYSTEM_DLKM_IMAGE to point image
2. Build from kernel prebuilt system_dlkm_staging
   - PRODUCT_BUILD_SYSTEM_DLKM_IMAGE

Both requires: BOARD_SYSTEM_DLKM_PARTITION_SIZE and
must be 64MB or higher in size (enforced via vts).

Bug: 200082547
Test: TH
Test: atest vts_system_dlkm_partition_test
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I83435123bd8aa3d04ab8a8b650a95fbab0bc49f2
2022-01-21 21:39:15 +00:00
Jared Duke
4bd749bf38 Generalize @Keep annotation Proguard rules
Consolidate the Proguard rules for @Keep annotations for:
  * android.support.annotation.Keep (existing)
  * androidx.annotation.Keep (existing)
  * com.android.internal.annotation.Keep (new)

This ensures consistent semantics for clients using these annotations
across the codebase. Ideally there would be a single annotation, but
the support libraries are not available everywhere. In practice, this
change should be a no-op.

Bug: 210510433
Test: m + validate identical artifact sizes
Change-Id: Iab494e03269e5758d7f860331e971826ecc08cdd
2022-01-21 19:50:15 +00:00
Chih-hung Hsieh
95ec3b899e Merge "Lower severity of 3 tidy warnings" 2022-01-21 03:53:45 +00:00
Chih-Hung Hsieh
02f0df83fc Lower severity of 3 tidy warnings
* bcmp/bcopy/bzero are not insecureAPI on Android.
* Android projects may enable/disable clang-tidy checks locally;
  warn/*patterns.py keep global classification of all warnings.

Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: I7720f7babd0a33c1b6602c9a8bb67565c45db94e
2022-01-20 16:13:12 -08:00
Devin Moore
35b69f698d Fix initbootimage .PHONY target
This was assigning the INSTALLED_INIT_BOOT_IMAGE_TARGET to bootimage
instead of initbootimage.

Test: m
Bug: 203698939
Change-Id: I5fc6e2296dac8cc35c4d46601fea6ab0ee18fd18
2022-01-20 15:26:47 +00:00
George Chang
5baca438e6 Add nfc HAL ndk to gsi
Bug: 204868826
Test: m
Change-Id: I5f590bcc401170b565fb6684ac343d84fb0bdc5e
2022-01-20 03:49:15 +00:00
Paul Hu
89d7061ed3 Merge "Add framework-connectivity-tiramisu to PRODUCT_APEX_BOOT_JARS" 2022-01-20 03:02:56 +00:00
Nicolas Geoffray
4ff406c4a1 Revert "Set an empty persist.sys.dalvik.vm.lib.2 to simplify debug apex testing."
This reverts commit 50930076a2.

Bug: 214049018

Reason for revert: Not needed after all.

Change-Id: Ifbf3053fd70c5880e58136821a2fb8b783c48e2a
2022-01-19 16:22:07 +00:00
Pirama Arumuga Nainar
5fe798bea0 Merge "Revert "Set a BIONIC_COVERAGE .mk variable"" 2022-01-19 06:03:25 +00:00
Treehugger Robot
d698e3e0b0 Merge "Add erofs compressor type param" 2022-01-19 02:32:30 +00:00
Treehugger Robot
5d14dfa2fd Merge "Fix formatting error" 2022-01-18 23:51:38 +00:00
Pirama Arumuga Nainar
e6b8497408 Revert "Set a BIONIC_COVERAGE .mk variable"
This reverts commit b1b4e1e38b.

Bug: http://b/194128476

Coverage metrics dropped for ~10 of the 40 modules.  There are also
regressions in mainline when running tests on older platform builds.

Test: presubmit
Change-Id: Ib34f607292cd64e7cb9fe35c59a4f79b46904ab8
2022-01-18 13:09:01 -08:00
Kelvin Zhang
6fe2fc031f Add erofs compressor type param
Test: th
Bug: 206729162
Change-Id: I3ddd1a55e1544a8a4d24ed445562f05ad0aaad2c
2022-01-18 10:17:49 -08:00
Kelvin Zhang
554c8bee14 Fix formatting error
Test: th
Bug: 214388458
Change-Id: I2dc72884aad4f440b4b68566e2e29f9f6f5aa73e
2022-01-18 10:17:49 -08:00
Kelvin Zhang
4a376986ea Merge "Fix check_tf failure when duplicate package names are present" 2022-01-18 18:14:02 +00:00
Treehugger Robot
6c38edc0b9 Merge "Migrate java-event-logs-tags.py to python3." 2022-01-18 10:02:55 +00:00
Jingwen Chen
2a31f3df87 Migrate java-event-logs-tags.py to python3.
These are used in the Bazel Android app builds.

Test: m droid
Test: CI
Test: b run //build/make/tools:java-event-log-tags

Change-Id: Iaffe6f974008d1a0532a849353d25df02197afd2
2022-01-17 13:02:53 +00:00
Nicolas Geoffray
00a48b3df7 Merge "Set an empty persist.sys.dalvik.vm.lib.2 to simplify debug apex testing." 2022-01-17 12:23:19 +00:00
Yi-yo Chiang
4fe2a45dc7 Merge "Add boot*.img to default dist target if PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST" 2022-01-17 05:29:40 +00:00
Yi-yo Chiang
8b4e2fd6c0 Merge changes from topic "gki-avb-vts"
* changes:
  releasetools: Android T GKI certification scheme
  Android T GKI certification scheme
2022-01-17 04:52:28 +00:00
Treehugger Robot
3cf8f4b061 Merge "Remove clatd" 2022-01-14 23:59:36 +00:00
Muhammad Haseeb Ahmad
d562eb5f1c Merge "Add PHONY target to make haiku-java target" 2022-01-14 18:13:12 +00:00
Nicolas Geoffray
50930076a2 Set an empty persist.sys.dalvik.vm.lib.2 to simplify debug apex testing.
Keep the property for now to keep the ability to toggle on/off the
library we want. If we want to remove this functionality,
we need to cleanup all references to persist.sys.dalvik.vm.lib.2.

Test: build and boot with debug apex
Bug: 214049018
Change-Id: I66c7eb510f5a8b7974391ceafd309fba59a524a1
2022-01-14 16:07:07 +00:00
Nucca Chen
aa5fc6ecbd Remove clatd
clatd have been moved to apex module.

Test: TH

Change-Id: Ibcb32225098883b4098807da6468a539e1c41c0c
2022-01-14 14:02:05 +00:00
Yi-Yo Chiang
36054e2daf releasetools: Android T GKI certification scheme
Companion change of Iaf48a6e3d4b97fa6bfb5e1635a288b045baa248f
To support new GKI certification scheme for boot.img and
init_boot.img on upgrading and launching device combinations.

Bug: 210367929
Bug: 211741246
Bug: 203698939
Test: atest --host releasetools_test:test_common
Test: unpack_bootimg --boot_img boot.img
Test: unpack_bootimg --boot_img init_boot.img
Test: avbtool info_image --image out/boot_signature
Change-Id: I3749297c09c3899046550e4be776acbeea37ef2e
2022-01-14 19:50:32 +08:00
Treehugger Robot
2f1f985480 Merge "Add option to enable lz4diff" 2022-01-13 20:33:31 +00:00
Kelvin Zhang
67553739e3 Fix check_tf failure when duplicate package names are present
Test: check_target_files_signatures sdk_gphone64_x86_64-target_files-8069754.zip
Bug: 214388458

Change-Id: I0a8a0d0596c04a9da4283d4d4caeb3bb62762ccc
2022-01-13 12:30:22 -08:00
Treehugger Robot
9e81c44875 Merge "Dump soong config variables in dump-variables-rbc" 2022-01-13 20:21:33 +00:00
Muhammad Haseeb Ahmad
cced136e8c Add PHONY target to make haiku-java target
This build creates artifacts for java fuzzers for Haiku.

Bug: 213225119
Test: build/soong/soong_ui.bash --make-mode -j86 haiku-java showcommands
dist DIST_DIR="."

Change-Id: I1ec16c39c3cd0ca008acc38bc51a3c3fa2ecdc9f
2022-01-13 19:53:40 +00:00
Cole Faust
c7226590e6 Dump soong config variables in dump-variables-rbc
There are some products whose board configurations
use soong_config_get to read the values of soong config
variables that were set in the product configuration.
These variables were being lost, as dump-variables-rbc
was skipping the soong config variables because mk2rbc
couldn't handle converting the raw SOONG_CONFIG_* variables.
To fix that issue, dump-variables-rbc now dumps them as
calls to soong_config_set instead.

Bug: 201700692
Test: m RBC_BOARD_CONFIG=1 nothing on certain products
Change-Id: I91ca8418635a94cf80362cad1729f48854f6bc98
2022-01-12 21:25:02 -08:00
Kelvin Zhang
f2728d615e Add option to enable lz4diff
When lz4diff is enabled, we inject the host copy of liblz4.so in
target_file to delta_generator. This is to ensure that host tooling can
produce same compressed output as the device.

Test: th
Bug: 206729162

Change-Id: I2d8206f7ec54fadedea16bf3d811b8353bc9414d
2022-01-12 17:21:00 -08:00
Treehugger Robot
d36d4d8608 Merge "Generate .fsv_meta for more files" 2022-01-13 01:06:01 +00:00
Treehugger Robot
3a0656307c Merge "Regression testcase for shipped vs nonshipped." 2022-01-12 23:35:17 +00:00
Treehugger Robot
710813e871 Merge "Fix typo in doc: code segment for container dot" 2022-01-12 22:31:40 +00:00
Treehugger Robot
49c9d1867a Merge "Add TARGET_RECOVERY_FSTAB_GENRULE" 2022-01-12 20:55:38 +00:00
Treehugger Robot
35efbedb4f Merge "Updates OWNERS file" 2022-01-12 03:37:34 +00:00
Bob Badour
00bf3d9b29 Regression testcase for shipped vs nonshipped.
Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Test: m systemlicense
Test: m listshare; out/soong/host/linux-x86/bin/listshare ...
Test: m checkshare; out/soong/host/linux-x86/bin/checkshare ...
Test: m dumpgraph; out/soong/host/linux-x86/dumpgraph ...
Test: m dumpresolutions; out/soong/host/linux-x86/dumpresolutions ...

where ... is the path to the .meta_lic file for the system image. In my
case if

$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)

... can be expressed as:

${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic

Change-Id: I17221ec8fe429b5f745c0733f8bb1ab0ea2f4567
2022-01-11 16:38:55 -08:00
Treehugger Robot
49380ebecf Merge changes Ia2ec1b81,Ibc831ae8
* changes:
  Performance and scale.
  Use struct{}
2022-01-12 00:27:41 +00:00
Treehugger Robot
b3f3e7b3f7 Merge "Fold annotations." 2022-01-12 00:27:35 +00:00
Bob Badour
99dba55b4b Fix typo in doc: code segment for container dot
Test: not applicable
Change-Id: Ibaadc6e8fd4a267b50a46feb2dd6278ff1f5ace1
2022-01-11 14:46:22 -08:00
Treehugger Robot
d6bdfb3993 Merge "Remove win_sdk" 2022-01-11 22:25:02 +00:00
Bob Badour
103eb0f9bc Performance and scale.
Defer edge creation.

Don't create edges until the count is known to avoid repeated allocate+
copy operatios.

Limit resolutions.

Allow only a single resolution condition set per target, and overwrite
intermediate results. Reduces memory and obviates allocations.

Propagate fewer conditions.

Instead of propagating notice conditions to parents in graph during
initial resolve, leave them on leaf node, and attach to ancestors in
the final walk. Reduces copies.

Parallelize resolutions.

Use goroutines, mutexes, and waitgroups to resolve branches of the
graph in parallel. Makes better use of available cores.

Don't accumulate resolutions inside non-containers.

During the final resolution walk, only attach actions to ancestors from
the root down until the 1st non-aggregate. Prevents an explosion of
copies in the lower levels of the graph.

Drop origin for scale.

Tracking the origin of every potential origin for every restricted
condition does not scale. By dropping origin, propagating from top
to bottom can prune many redundant paths avoiding an exponential
explosion.

Conditions as bitmask.

Use bit masks for license conditions and condition sets. Reduces maps
and allocations.

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Test: m systemlicense
Test: m listshare; out/soong/host/linux-x86/bin/listshare ...
Test: m checkshare; out/soong/host/linux-x86/bin/checkshare ...
Test: m dumpgraph; out/soong/host/linux-x86/dumpgraph ...
Test: m dumpresolutions; out/soong/host/linux-x86/dumpresolutions ...

where ... is the path to the .meta_lic file for the system image. In my
case if

$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)

... can be expressed as:

${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic

Change-Id: Ia2ec1b818de6122c239fbd0824754f1d65daffd3
2022-01-11 10:40:50 -08:00
Bob Badour
5446a6f8e1 Use struct{}
Using struct{}{} as the payload for set maps reduces memory use for
large sets.

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Test: m systemlicense
Test: m listshare; out/soong/host/linux-x86/bin/listshare ...
Test: m checkshare; out/soong/host/linux-x86/bin/checkshare ...
Test: m dumpgraph; out/soong/host/linux-x86/dumpgraph ...
Test: m dumpresolutions; out/soong/host/linux-x86/dumpresolutions ...

where ... is the path to the .meta_lic file for the system image. In my
case if

$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)

... can be expressed as:

${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic

Change-Id: Ibc831ae80fc50f35e1000348fb28fc0167d0ebed
2022-01-11 10:40:50 -08:00
Bob Badour
67d8ae390a Fold annotations.
Use annotation slices looked up from map instead of read from disk to
reduce copies.

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Test: m systemlicense
Test: m listshare; out/soong/host/linux-x86/bin/listshare ...
Test: m checkshare; out/soong/host/linux-x86/bin/checkshare ...
Test: m dumpgraph; out/soong/host/linux-x86/dumpgraph ...
Test: m dumpresolutions; out/soong/host/linux-x86/dumpresolutions ...

where ... is the path to the .meta_lic file for the system image. In my
case if

$ export PRODUCT=$(realpath $ANDROID_PRODUCT_OUT --relative-to=$PWD)

... can be expressed as:

${PRODUCT}/gen/META/lic_intermediates/${PRODUCT}/system.img.meta_lic

Change-Id: Ibf6f7d319092e0d54ab451ffbbd35dcd7d0080e0
2022-01-11 10:40:39 -08:00
Cole Faust
fdc2cd300e Remove win_sdk
win_sdk is deprecated, if given on the command line
sdk will be build instead.

Bug: 212724080
Test: Presubmits
Change-Id: Ib3bd51923142b00100b49585ad88bc1292da2463
2022-01-11 10:31:11 -08:00
Treehugger Robot
7297032a8d Merge "Make com.android.sepolicy mandatory" 2022-01-11 14:11:37 +00:00
Yi-Yo Chiang
f282f5521d Add boot*.img to default dist target if PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST
Right now if PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST is given,
  $ m dist bootimage
would copy boot*.img to the dist dir.

After this change, both
  $ m dist  # droidcore
  $ m dist bootimage
would copy boot*.img to the dist dir, the difference is that the latter
builds & copies *only* the boot images.

Bug: 212486689
Test: m dist bootimage
Test: m dist => boot*.img are copied to dist dir
Change-Id: I1c714ce5d75eba93e32078b1ac291a181b05405a
2022-01-11 17:31:16 +08:00
Yi-Yo Chiang
44fb3619d1 Android T GKI certification scheme
New scheme is to certify kernel & ramdisk image separately, and
effectively decouple kernel & user space ramdisk image.

Under the new scheme, the --os_version and --os_patch_level boot header
field must be empty in order to maintain consistency.
Instead, these values must be in the vbmeta hash descriptor and
GKI certificate.

The new scheme also validates the image metadata, including the security
patch level.

The 'generic_kernel' certificate is associated with the 'boot' partition
and 'generic_ramdisk' certificate with 'init_boot' partition.

The 'generic_ramdisk' certificate may be packed into the 'boot' image if
product configuration doesn't have 'init_boot' image, this is only for
testing purposes and would be removed eventually.

Bug: 210367929
Bug: 211741246
Bug: 203698939
Test: unpack_bootimg --boot_img boot.img
Test: unpack_bootimg --boot_img init_boot.img
Test: avbtool info_image --image out/boot_signature
Change-Id: Iaf48a6e3d4b97fa6bfb5e1635a288b045baa248f
2022-01-11 15:14:38 +08:00