Commit graph

85337 commits

Author SHA1 Message Date
Wei Li
1c950f7a76 Merge "Include flags files in product SBOM." into main 2023-08-09 21:28:54 +00:00
Daniel Zheng
31694e3f83 Merge "Adding option to configure compression level" into main 2023-08-09 20:03:44 +00:00
Zhi Dou
de521a1bbe Merge changes from topic "fakefeatureflagsimpl" into main
* changes:
  Add setFlag and resetAll in FeatureFlags test mode
  Generate FakeFeatureFlagsImpl in test mode
2023-08-09 19:39:04 +00:00
Devin Moore
aea0819fc7 Merge "Let assemble_vintf create the output fragments" into main 2023-08-09 15:29:05 +00:00
Zhi Dou
a7200115c5 Add setFlag and resetAll in FeatureFlags test mode
Add methods setFlag and resetAll in FeatureFlags in test mode. For the
injection usecase, user will use the interface FeatureFlags in the code
to control the flags.

Add tests for test mode.

Bug: 280833463
Test: Atest AconfigJavaHostTest --host
Change-Id: Ib59ba35a9011a6400af42fc9c283d37193577997
2023-08-09 01:14:57 +00:00
Wei Li
9b4cf43335 Include flags files in product SBOM.
Bug: 272358980
Test: build/soong/tests/sbom_test.sh
Change-Id: Ifcb2f26044c346c54e60d1d4fb85fc4001f64210
2023-08-08 17:26:49 -07:00
Treehugger Robot
8c656ae6f8 Merge "Remove duplicate in unbundled build moduels defined in TARGET_BUILD_APPS." into main 2023-08-08 23:43:06 +00:00
Wei Li
604ab2f175 Remove duplicate in unbundled build moduels defined in TARGET_BUILD_APPS.
Bug: 294786322
Test: banchan com.android.adbd com.android.adbd module_arm64 userdebug && m sbom
Change-Id: I60c403d530299741d6250b816095eafedf5bcd3d
2023-08-08 13:59:55 -07:00
Zhi Dou
5aaeee3749 Generate FakeFeatureFlagsImpl in test mode
Before FeatureFlagsImpl will be used as a fake for testing. This change
adds new class FakeFeatureFlagsImpl. The FeatureFlagsImpl will keep the
same as production. FakeFeatureFlagsImpl can be used as fake for
testing.

FakeFeatureFlagsImpl, and FeatureFlagsImpl will be generated in both
test and prod mode. In test mode FeatureFlagsImpl will just be a stub,
and in prod mode FakeFeatureFlagsImpl will just be a stub.

Bug: 280833463
Test: atest aconfig.test
Change-Id: I11c1e716a9ea00d55600e5e9d5fb6442420762e6
2023-08-08 20:35:18 +00:00
Treehugger Robot
cadce2a071 Merge "Clean up after ourselves in the Rust Benchmark Template" into main 2023-08-08 18:02:48 +00:00
Jim Shargo
980052abf6 Clean up after ourselves in the Rust Benchmark Template
There's a compliance check for tradefed that ensures that configs for
tests are set to cleanup after themselves. See: https://cs.android.com/android/platform/superproject/main/+/main:tools/tradefederation/core/javatests/com/android/tradefed/presubmit/GeneralTestsConfigValidation.java;l=425-429;drc=1fb7fe35bf7c843b5bac510476d63e4c8b436a48

This causes new benchmarks to fail presubmits.

Test: CLs with rust benchmarks pass presubmits now
Change-Id: I14f64ee3343bcf9bd2d77f547dc16b9c15bf4082
2023-08-08 16:57:42 +00:00
Daniel Zheng
74955f8883 Adding option to configure compression level
Adding option to ota_from_target_files to configure compression level.
This option can be configured via the --vabc_compression_param flag.
e.g. --vabc_compression_param=gz,9 specifies gz compression algorithm
using level 9 compression

Test: ota_from_target_files
Change-Id: Ifc851faccbb3fba466d45c9695aaab322a362081
2023-08-08 08:09:15 -07:00
Dennis Song
1afb7ffec2 Merge "Remove system_dlkm from _FRAMEWORK_PARTITIONS" into main 2023-08-07 01:25:25 +00:00
Dennis Song
a380533f13 Remove system_dlkm from _FRAMEWORK_PARTITIONS
system_dlkm partition is related to GKI, so it should be
in the same category as boot image.

Test: merge_target_files \
        --path otatools \
        --framework-target-files framework-target_files.zip \
	--vendor-target-files vendor-target_files.zip \
	--output-target-files merged-target_files.zip
Bug: 294482075
Change-Id: Ie8f60d72f44d31e1bc3b556735b92ed0a2fda662
2023-08-04 07:08:17 +00:00
Treehugger Robot
196c70bf23 Merge "Adding supported compression methods" into main 2023-08-04 00:04:22 +00:00
Daniel Zheng
3bff72fbc6 Adding supported compression methods
Adding in supported compression methods to help

Test: m ota_from_target_files
Change-Id: I1c3101f983eb8b38d43752530bd9f61a85fddba4
2023-08-03 15:32:29 -07:00
Treehugger Robot
392398cd40 Merge "Minify the sdk targets" into main 2023-08-02 23:31:35 +00:00
Cole Faust
92d921ce24 Minify the sdk targets
Previously, the "sdk" target was a minimal lunch target that only
included enough to build the sdk. But the "sdk_<arch>" targets
redirected to the "sdk_phone_<arch>" targets, which are much bigger
and capable of building a whole emulator.

Building the sdk on products that can build a whole device complicates
the rest of the build system (for example, it starts enforcing dexpropt
works)

Bug: 290798660
Test: m sdk dist sdk_repo device-tests platform_tests on sdk_x86_64-userdebug
Change-Id: I76f38cf19172a5f5fae423175d5e03670137a0df
2023-08-02 15:36:59 -07:00
Jason Wu
8e1baff3d3 Merge "Revise minSdkVersion to fix failed mainline_modules_bundles-userdebug" into main 2023-08-02 21:15:25 +00:00
James Wu
c5e321a06e Revise minSdkVersion to fix failed mainline_modules_bundles-userdebug
Test: abtd tests
Bug: 293456031
Change-Id: I674c50690bd04b7e4867c4aceb31d5bdcb53be84
2023-08-02 19:25:58 +00:00
Wei Li
fb55377c4b Merge "Fix the calculation of package verification code which should not include algorithm information." into main 2023-08-02 19:10:52 +00:00
Treehugger Robot
8cad379e98 Merge "Revert "Revert "Add system staging dir stamp file for bazel sand..."" into main 2023-08-02 04:11:10 +00:00
Treehugger Robot
092719a471 Merge "Remove OPTIONS.host_tools" into main 2023-08-02 01:52:27 +00:00
Cole Faust
6833d7d47a Remove OPTIONS.host_tools
It appears to be unused.

Test: Presubmits
Change-Id: Idd7f9dda996458b93da77c783a546cdb3d1e0047
2023-08-01 18:00:37 -07:00
Treehugger Robot
d5474ac3da Merge "Add the option for custom_image to be AVB or NONAVB" into main 2023-08-01 19:08:06 +00:00
Treehugger Robot
8aeb450a98 Merge "Support generating secondary OTAs from directories" into main 2023-08-01 18:14:37 +00:00
Treehugger Robot
7383a91737 Merge "Adding an option to disable puffdiff" into main 2023-08-01 18:09:43 +00:00
Kelvin Zhang
5b9ca88501 Support generating secondary OTAs from directories
Test: ota_from_target_files --include_secondary
Change-Id: I1004defdb4fe601a6ec733a7ceb213de7d540174
2023-08-01 10:04:08 -07:00
Kelvin Zhang
456c6d9a67 Adding an option to disable puffdiff
This is handy for quick OTA generation during development.

Change-Id: I878f7cb3479d6338c04aca44d16e48e83270252c
2023-08-01 10:03:54 -07:00
Cole Faust
4ad906d6a4 Revert "Revert "Add system staging dir stamp file for bazel sand..."
Revert submission 2685589-revert-2651299-bazel_sandwich-TVXWOASJNU

Reason for revert: It was not the cause of b/293883239

Reverted changes: /q/submissionid:2685589-revert-2651299-bazel_sandwich-TVXWOASJNU

Change-Id: I98ca2be7490a4e38d35e4e640a0d027711b67030
2023-08-01 16:38:58 +00:00
Jooyung Han
068da3ef96 Merge "Revert "Add system staging dir stamp file for bazel sandwich"" into main 2023-08-01 06:50:26 +00:00
Jooyung Han
f6a2234a54 Revert "Add system staging dir stamp file for bazel sandwich"
Revert submission 2651299-bazel_sandwich

Reason for revert: b/293883239, checking if this breaks the build.

Reverted changes: /q/submissionid:2651299-bazel_sandwich

Change-Id: I40661772148434adf5fbec9568b4c303ff7eaf1c
2023-08-01 05:15:28 +00:00
Treehugger Robot
e88ddaecc9 Merge "Add system staging dir stamp file for bazel sandwich" into main 2023-07-31 23:00:55 +00:00
Wei Li
f99db9977c Fix the calculation of package verification code which should not include algorithm information.
Bug: 293304694
Test: atest --host sbom_data_test
Test: build/soong/tests/sbom_test.sh
Change-Id: I94ea42284a9a6b5cc787a3489bfa575aa7663282
2023-07-31 15:09:16 -07:00
Devin Moore
c33aec868b Let assemble_vintf create the output fragments
Instead of checking, then copying the fragments into the out directory,
we pass in the output file and let assemble_vintf create the output
file.

Test: m
Bug: 290265210
Change-Id: I65c2ee826de73b805b48dc95f20c2405250587f8
2023-07-31 16:10:59 +00:00
Treehugger Robot
9997fdbacf Merge "aconfig: require exactly one bug field" into main 2023-07-28 07:14:42 +00:00
Treehugger Robot
4d37a829dd Merge "aconfig: improve error messages" into main 2023-07-27 18:09:37 +00:00
Treehugger Robot
0c8b7efdcc Merge "Fix test failures in releasetools" into main 2023-07-27 18:07:47 +00:00
Cole Faust
82222146ee Add system staging dir stamp file for bazel sandwich
This stamp file is an alias to request that the system staging directory
be built. The bazel sandwich cannot know the full list of files in the
staging directory at analysis time, so it will just depend on this
instead, and then find all the files in the staging dir at execution
time.

Bug: 265127181
Test: m bazel_sandwich
Change-Id: Iee3dff4f77c9e7054b4e8297e5d96b4ef8bf1cbb
2023-07-27 10:14:36 -07:00
Juan Yescas
e74d66b42f Merge "16k: core: Check that TARGET_MAX_PAGE_SIZE_SUPPORTED is greater than 4096 only for ARM archs." into main 2023-07-27 14:00:22 +00:00
Mårten Kongstad
cd414d4c2e aconfig: improve error messages
Propagate anyhow errors to main.rs and commands.rs to improve the error
message. As an example. instead of just "bad flag declaration: exactly
one bug required", aconfig will now print the following.

---- 8< ----
Error: failed to create cache

Caused by:
    0: failed to parse build/make/tools/aconfig/tests/test.aconfig
    1: bad flag declaration: missing description
---- >8 ----

Error messages can be improved further by including additional
information in the protos.rs error cases. This will be handled in a
follow-up CL.

Bug: 290300657
Test: manual: introduce error in an aconfig file and run `m all_aconfig_declarations`
Test: atest aconfig.test
Change-Id: Id278f4877e5794b95913ae8ba0ca3ee211293f38
2023-07-27 15:54:45 +02:00
Mårten Kongstad
6353c6c635 aconfig: require exactly one bug field
Some consumers of `aconfig dump` do not support multiple bugs. At the
same time, we want all flags to be associated with at least one bug.

Teach aconfig to require that the bug field in the flag_declaration and
parsed_flag proto messages appear exactly once.

This change could have been implemented as a change of `repeated` to
`optional` in the proto definition. However, the chosen approach, with a
runtime check, is easier to revert if we want to support multiple bugs
in the future.

Bug: 293156797
Test: m all_aconfig_declarations && printflags
Test: atest aconfig.test aconfig.test.java aconfig.test.cpp
Change-Id: Ib87dac68b392986a8daa64e56cd85477c92fbe83
2023-07-27 09:44:00 +02:00
Juan Yescas
6196841f4d 16k: core: Check that TARGET_MAX_PAGE_SIZE_SUPPORTED is greater than 4096 only for ARM archs.
For arm archs, PRODUCT_MAX_PAGE_SIZE_SUPPORTED  values can be 4096, 16384, 65536.
For other archs, PRODUCT_MAX_PAGE_SIZE_SUPPORTED can only be 4096.

Note: The linker flag max-page-size is configured by PRODUCT_MAX_PAGE_SIZE_SUPPORTED flag.

Bug: 289419664

Test: source build/envsetup.sh
      lunch aosp_cf_x86_64_phone
      build/make/core/config.mk:448: error: TARGET_MAX_PAGE_SIZE_SUPPORTED=65536 is greater than 4096. Only supported in ARM arch.

      source build/envsetup.sh
      lunch aosp_raven_64-userdebug

Change-Id: I887d6f12835f1bea4c6b92d7d836440b8d3fd6a8
2023-07-27 00:13:50 +00:00
Devin Moore
11db0915df Merge "Add new Release_aidl_use_unfrozen soong variable" into main 2023-07-26 21:42:52 +00:00
Jiakai Zhang
c07b049aba Merge "Add core-icu4j and consrypt to the ART boot image for testing." into main 2023-07-26 16:46:13 +00:00
Ray-cy.lee
e97e0cb16b Add the option for custom_image to be AVB or NONAVB
Check BOARD_AVB_$(call to-upper,$(partition))_KEY_PATH to decide whether custom_image should sign AVB or not. If key path isn't set, the custom image will be excluded from AVB and copied to /IMAGES in target-files directly. This allows vendor to use custom_images flow packing unsigned image.
And to every non-avb custom partition, one image whose name is partition name must be added in its BOARD_<CUSTOM_PARTITION>_IMAGE_LIST.

BOARD_CUSTOMIMAGES_PARTITION_LIST := tvconfig
BOARD_TVCONFIG_IMAGE_LIST := \
    device/xxxx/yyyy/tvconfig.img \
    device/xxxx/yyyy/tvconfig_custom1.img

Test:
1) Build image, target-files, OTA package by m and m dist
2) Sign images by sign_target_files_apk.py

Fix: 285227850
Change-Id: I7477dafe023e4b168f0f08fb7aedd9e511a60e1b
2023-07-26 20:21:29 +08:00
Jooyung Han
68b4cbecb9 Merge "Support .(dot) files in root" into main 2023-07-26 01:00:19 +00:00
Treehugger Robot
08d991834d Merge "Support transitive resource packages from Soong" into main 2023-07-26 00:34:57 +00:00
Colin Cross
d9d5c2a95e Support transitive resource packages from Soong
Soong is improving resource handling by not squashing resources from
all dependencies into every android_library.  This causes problems
when the android_library is exported to Make, as Make is still using
the old squashing behavior.

Add a file to every static java library that lists the resource packages
of its transitive dependencies.  For modules defined in Andorid.mk files
leave the file empty, but for Soong modules populate it with the list
of transtiive dependencies.  Pass the contents all of the files from
direct dependencies to aapt2 link to include any transitive dependencies.

Bug: 284023594
Test: m Dialer
Change-Id: I4e8ace497d701a9645a62dd5a6ac12e9a6830dcf
Merged-In: I4e8ace497d701a9645a62dd5a6ac12e9a6830dcf
2023-07-25 21:30:38 +00:00
Juan Yescas
a5043704ed Merge "16k: core: Add flag to make AOSP page size agnostic" into main 2023-07-25 14:24:40 +00:00