Commit graph

85568 commits

Author SHA1 Message Date
Jingwen Chen
f3406e64f7 Make auto_gen_test_config available to Bazel.
In the Bazel rule, the actual AndroidManifest.xml file isn't available
in the providers of the android_binary dependency. And for good reason,
we should also rely on aapt2 to dump the manifest contents from the
final packaged APK anyway, but this auto gen script doesn't support
reading the output of aapt2 dump.

This CL adds a simple reader of the output of `aapt2 dump xmltree`, and
enabled if the xmltree content is passed to this tool instead of
AndroidManifest.xml.

Also fixup auto_gen_test_config_test.py. The test was completely failing.

Test: atest auto_gen_test_config_test
Test: presubmits

Change-Id: I7fecd927d0ed7847b6463d964b3698f4164b0177
2023-09-18 12:34:29 +00:00
Liz Kammer
5922b630c5 Merge "Cleanspec to remove tools/metalava subdir" into main 2023-09-15 20:32:43 +00:00
Liz Kammer
c4d9d32fe8 Cleanspec to remove tools/metalava subdir
Test: CI
Change-Id: I412a093ef3964fcecf2b726cbfe0f78032242e95
2023-09-15 14:09:09 -04:00
Treehugger Robot
b25e443bc5 Merge "Respect framework partition set while merging meta files" into main 2023-09-15 17:52:17 +00:00
Yu Liu
fc68cf4d45 Merge "Support aconfig_declarations, aconfig_values and aconfig_value_set" into main 2023-09-15 16:46:01 +00:00
Ted Bauer
202eab9b14 Merge "Dump Aconfig flags pb file alongside textproto." into main 2023-09-15 14:19:26 +00:00
Dennis Song
36ce326f95 Respect framework partition set while merging meta files
The framework_partition_set would be generated from
framework_item_list and we should respect this partition
set while merging META/ab_partitions.txt.

This is to handle the case when we use a complete merged
target files package as the framework-target-files, where
its ab_partitions.txt may have non-framework partitions.
So we need to filter them out to prevent from the merged
meta file has some partitions that don't exist.

Test: merge_target_files &&
        add_img_to_target_files &&
	img_from_target_files &&
	flash device
Bug: 300193612
Change-Id: I0a76d706a20dcaffa2533278db7383563f03ec02
2023-09-15 06:20:19 +00:00
Treehugger Robot
2a65d6a7e9 Merge "Define PRODUCT_PRODUCT_VNDK_VERSION as current by default" into main 2023-09-14 22:19:02 +00:00
Zhi Dou
c20d115562 Merge "aconfig: throw exception if reading from DeviceConfig fails" into main 2023-09-14 19:28:16 +00:00
Treehugger Robot
2cb7622dca Merge "aconfig: Fix missing header in the generated c/cpp code" into main 2023-09-14 19:13:34 +00:00
Treehugger Robot
2fd4abc212 Merge "Add cog setup scripts" into main 2023-09-14 18:20:52 +00:00
Dennis Shen
a1de8fd435 aconfig: Fix missing header in the generated c/cpp code
Test: atest aconfig.test
Change-Id: I0c23299ad366cb5c61b84b738dd9e6bf3428435c
2023-09-14 17:40:13 +00:00
Alyssa Ketpreechasawat
6e1c947d59 Merge "Add mainline_module_prebuilt_* in BLUEPRINT_INCLUDE_TAGS_ALLOWLIST." into main 2023-09-14 17:24:52 +00:00
Kousik Kumar
ec5416c9ad Add cog setup scripts
This script has the following functionality:
1. Sets up the `out` symlink to point to a default location on disk
2. Copies RBE binaries outside Cog (temporary fix for build stall problem) - b/289391270
3. Exports ANDROID_BUILD_ENVIRONMENT_CONFIG variable to point to googler-cog.json file. This file will be available in aosp-main-with-phones and goog/main and downstream branches.

TESTED=ran the script within and outside the Cog workspace to test it.

Bug: b/295053716
Change-Id: I59cd6d2d5f954be6f7e4ecd7d64de1e63e51b72e
2023-09-14 17:11:45 +00:00
Ted Bauer
98bedd8854 Dump Aconfig flags pb file alongside textproto.
Bug: 299907996
Test: manually confirmed that pb file is gen'd and cp'd to device
Change-Id: I8e5c7bb8b1ad234bd6f0dba4de1cbe3fe1df19ae
2023-09-14 15:28:12 +00:00
Justin Yun
9ccc880aa6 Define PRODUCT_PRODUCT_VNDK_VERSION as current by default
It has been mandatory since Android 11 (rvc) launching devices. Now we
can enable the product variants by default to all devices.

Bug: 300371698
Test: TH
Change-Id: I6b2d2e8e105ca35c38db8132486b1cb3bdbab40f
2023-09-14 13:11:46 +00:00
Zhi Dou
73a34ce10a aconfig: throw exception if reading from DeviceConfig fails
Reading value from DeviceConfig may fail if the provider is not ready.
Since DeciceConfig, and Settings class are static wrapper on top of
the provider, it won't cause the instance  initialization issue.
Thus when the issue happens it means the provider is not initialized.

Test: atest aconfig.test.java and manually make a change in the
framework and check the exception message
Bug: 299471646

Change-Id: Ic08d7a9cd32a8810a7274b6d93c249abccb50b9e
2023-09-14 13:00:45 +00:00
Sebastian Pickl
91646be0a5 Merge "Revert "Install CAS HAL APEX"" into main 2023-09-14 12:26:38 +00:00
Sebastian Pickl
5d6da97ed0 Revert "Install CAS HAL APEX"
Revert submission 2742398-cas-apex

Reason for revert: culprit for flake b/300311777, verified with go/abtd with 15 runs to make sure the flake is gone https://android-build.googleplex.com/builds/abtd/run/L46500000963034919

Bug:300311777

Change-Id: I2b566413ac1869f9bf3e974da7d84662047e436a
2023-09-14 12:25:49 +00:00
Alyssa Ketpreechasawat
8894e1f02e Add mainline_module_prebuilt_* in BLUEPRINT_INCLUDE_TAGS_ALLOWLIST.
The newly added mainline_module_prebuilt_nightly and mainline_module_prebuilt_monthly_release are possible values for RELEASE_MAINLINE_MODULE_PREBUILT_VERSION (build flag in trunk stable). By adding these in BLUEPRINT_INCLUDE_TAGS_ALLOWLIST, we would be able to choose mainline modules prebuilts (apks) based on release config.

Bug: 294969202
Test: DEFAULT_MODULE_BUILD_FROM_SOURCE=false m (with 2 versions of apks, different blueprint_package_includes)
Change-Id: Ifcc49e5499d4659b73179fff715945cd2e3ca4fa
2023-09-14 11:08:20 +00:00
Treehugger Robot
1e042d4635 Merge "Do not freeze VNDK in trunk stable" into main 2023-09-14 00:16:18 +00:00
Cole Faust
386470f7d7 Merge "Change default logging level to WARNING" into main 2023-09-13 20:22:22 +00:00
Cole Faust
b870b9c933 Merge "Mention LOCAL_POST_INSTALL_CMD when talking about BUILD_BROKEN_INCORRECT_PARTITION_IMAGES" into main 2023-09-13 18:08:22 +00:00
Colin Cross
708dc5bf81 Merge "Update LOCAL_JAVA_LANGUAGE_VERSION logic to match Soong" into main 2023-09-13 16:48:35 +00:00
Mårten Kongstad
65d19d1403 Merge "aconfig: explicitly @hide FLAG_ constants" into main 2023-09-13 11:58:22 +00:00
Mårten Kongstad
fb10840da5 aconfig: explicitly @hide FLAG_ constants
Because of a bug in metalava [1], the flag constants are incorrectly
considered not-hidden when metalava generates the API signature files.
This means the FLAG_ constant name will be used, instead of the FLAG_
constant value, which is what we want.

While waiting for b/300211291 to be fixed, explicitly mark the FLAG_
constants as hidden (and keep marking the classes as such).

This CL can be reverted when b/300211291 is fixed.

1. Item.isHiddenOrRemoved does not check if its parent item is hidden,
   tracked in b/300211291

Bug: 297881670
Test: atest aconfig.test aconfig.test.java
Change-Id: I05de8344ccb424bee51c39f9609489ad312397ce
2023-09-13 10:15:01 +02:00
Daniel Zheng
2860f5f574 Merge "remove --apply-vbmeta from vbmeta_vendor" into main 2023-09-13 07:26:43 +00:00
Colin Cross
82df516665 Update LOCAL_JAVA_LANGUAGE_VERSION logic to match Soong
Support LOCAL_JAVA_LANGUAGE_VERSION := 11 or 17 and match the default value of 17 used
in Soong.

Bug: 298613711
Bug: 299937334
Test: m javac-check
Change-Id: I19aa24cc5197ab0e6cb03361124c36ce3e316810
2023-09-13 04:53:17 +00:00
Justin Yun
e9525900e5 Do not freeze VNDK in trunk stable
VNDK will be frozen only if the VNDK version is less than or equal to
34. Otherwize do not freeze the VNDK libraries.

Bug: 297542516
Bug: 299867815
Test: lunch cf_x86_64_phone-next-userdebug; m
Change-Id: Icdd288f65c5f7bdb5b4899c8e96820c2a147a011
2023-09-13 13:07:34 +09:00
Jooyung Han
be6ba681e9 Merge "Install CAS HAL APEX" into main 2023-09-13 00:51:34 +00:00
Cole Faust
98142f8446 Change default logging level to WARNING
To avoid spam in the build.

Test: Presubmits
Change-Id: I45db6cd92babda7f83582fd438210cae02c54708
2023-09-12 17:39:47 -07:00
Cole Faust
c6a0d4dd2c Mention LOCAL_POST_INSTALL_CMD when talking about BUILD_BROKEN_INCORRECT_PARTITION_IMAGES
Bug: 205632228
Test: None
Change-Id: I9eda7de5cf48881f8bbe1404ee1a17deb2608c61
2023-09-12 16:54:19 -07:00
Daniel Zheng
ba67aa4aee remove --apply-vbmeta from vbmeta_vendor
Removing this flag as --apply-vbmeta should only be used for root vbmeta
partitions.

Test: m fastboot_info, fastboot flashall
Bug: 299440104
Change-Id: I4910008635b16c4f4194ebd45da26bd1a8875fc1
2023-09-12 09:43:09 -07:00
Alice Wang
4f4f965f38 Merge "[avf] Add build-time flag for pVM remote attestation" into main 2023-09-12 07:55:50 +00:00
Jooyung Han
f3c3f40c3b Merge "Run apex_sepolicy_tests for all installed APEXes" into main 2023-09-11 22:30:20 +00:00
Daniel Zheng
d6178ee812 Merge "Turn on fastboot-info for img_from_target_files" into main 2023-09-11 21:05:36 +00:00
Yu Liu
d793c271c3 Support aconfig_declarations, aconfig_values and aconfig_value_set
Bug: 297356603
Test: Unit tests
Change-Id: Iefa0e056cd6185499ffa92492b261c31a5d27af2
2023-09-11 10:57:16 -07:00
Cole Faust
548775d247 Merge "Clean staging dirs in build_image.py" into main 2023-09-11 17:25:19 +00:00
Daniel Zheng
89a85ba933 Turn on fastboot-info for img_from_target_files
Use fastboot-info for fastboot update

Test: m update_package
Bug: 299854419
Change-Id: I9f7c93f8309a2c136ee81cad1391f93b2feb8156
2023-09-11 09:58:32 -07:00
Gurpreet Singh
a2d9728449 Merge "Add OWNERS for sdk extensions version updates" into main 2023-09-11 14:30:11 +00:00
Mårten Kongstad
72c3b38a1d Merge "Revert "Revert "aconfig: @hide generated Java code""" into main 2023-09-11 14:08:55 +00:00
Treehugger Robot
1ee8f4d232 Merge "aconfig: remove unnecessary clones" into main 2023-09-11 12:51:17 +00:00
Mårten Kongstad
65efa27f71 Revert "Revert "aconfig: @hide generated Java code""
This reverts commit c0e8ffea41.

Reason for revert: The detected build breakage was unrelated to the aconfig change. Details in b/297881670#comment11.

Change-Id: Ia32bc2e796ed3de7fa049c2c2db340f4325a2853
2023-09-11 12:17:25 +00:00
Mårten Kongstad
4afc5d7b2b Merge "Revert "aconfig: @hide generated Java code"" into main 2023-09-11 11:06:14 +00:00
Mårten Kongstad
c0e8ffea41 Revert "aconfig: @hide generated Java code"
This reverts commit 379e09d157.

Reason for revert: Seems to have broken the build. Reverting while investigating.

Change-Id: I37c9a065853ef07b1f1c18355205a2f49dd816c4
2023-09-11 11:00:42 +00:00
Mårten Kongstad
fd6cd13947 Merge "aconfig: @hide generated Java code" into main 2023-09-11 10:44:23 +00:00
Mårten Kongstad
b5133f6ad4 aconfig: remove unnecessary clones
Improve performance slightly: remove unnecessary clone operations, or
use references where a new object is not needed.

Bug: 283910447
Test: atest aconfig.test
Change-Id: I75205ffa1723dd2654039baac882c225d2653c86
2023-09-11 11:10:21 +02:00
Mårten Kongstad
379e09d157 aconfig: @hide generated Java code
Flagged APIs are annotated using `@FlaggedApi(Flags.FLAG_NAME)`, where
Flags.FLAG_NAME was auto-generated by aconfig.

When metalava generates an API signature file, it can either

  a) insert the value of the constant ("com.foo.bar.flag_name"), or
  b) insert the name of the constant (FLAG.NAME)

In the case of @FlaggedApi, we want a). This requires that

  x) metlava has access to the definition of the constant while generating the API signature file, and
  y) the constant is not part of the API surface of the API signature file

x) is handled by the build system, y) is handled by the aconfig code
generation.

This CL @hide:s all generated Java code, to make sure it is accessible
within the platform, but never part of any API surface.

Bug: 297881670
Test: atest aconfig.test aconfig.test.java
Change-Id: I328ed1a652a4e5e293f2f4b11f916d29fc2fbcbd
2023-09-11 10:31:46 +02:00
Alice Wang
8d9b3c5d3c [avf] Add build-time flag for pVM remote attestation
Bug: 299604057
Test: m
Change-Id: Iaa1d1934ca05f2fe6d5e1b55a81caa051813e5b5
2023-09-11 07:15:57 +00:00
Jooyung Han
e78ad74b2b Run apex_sepolicy_tests for all installed APEXes
This is to check if unknown file context labels are used in APEX. The
reason why this is done in Makefile is to cover vendor-specific SE
policy and prebuilt APEXes. Note that there's already a validation check
when building APEXes (in Soong), which only checks the generic rules,
not vendor-specific.

Bug: 299391194
Test: atest apex_sepolicy_tests_test
Test: m
Change-Id: I4378b7530e8433d2bf188db95cb5bf791e3bf778
2023-09-11 13:40:52 +09:00