Commit Graph

9520 Commits

Author SHA1 Message Date
Zhi Dou
1edd4485c6 only use new storage for read write
Test: atest aconfig.test.java
Bug: 349874828
Change-Id: I5af9fa6243b8b8a157f03242e6e5a411ced7be44
2024-07-19 20:37:53 +00:00
Ted Bauer
05fea28d9c feat: show if flag is locally overridden
Bug: 324436145
Test: adb shell aflags list
Change-Id: Id239a760e86e469f77d1e99f7a6f27d54cb87206
2024-07-19 13:11:42 +00:00
Ted Bauer
7e272b8bba Merge "Read from new storage in aflags" into main 2024-07-18 13:32:59 +00:00
Ted Bauer
bbbe092496 Read from new storage in aflags
Bug: 324436145
Test: adb shell aflags list --use-new-storage
Change-Id: Ib615e25bc0bc7f2b0362e286a45ce40ebf21f92d
2024-07-17 18:39:25 +00:00
Paul Duffin
9acbefe223 Use CallableItem in place of MethodItem
The `MethodItem` type represents both a normal method as well as being
the super type of `ConstructorItem`. That organization causes a number
of issues in Metalava and has lead to quite a few issues where code
that only expected to be run on methods and not constructors was run on
both. So, a new type `CallableItem` has been added that will eventually
become the super type of both `MethodItem` and `ConstructorItem` and
`ConstructorItem` will no longer extend `MethodItem`.

This change prepares this code for that change by overriding
`visitCallable(CallableItem)` instead of `visitMethod(MethodItem)`
because the latter is only called for methods not constructors.

Bug: 352481366
Test: atest check-flagged-apis-test
Change-Id: I3039bc0154b00ca57cb48c7447c5901b991b57e5
2024-07-16 13:37:30 +01:00
Inseob Kim
94d502200c Merge changes from topic "cf_system_root_files" into main
* changes:
  Add option to use Soong defined system image
  Add files installed to root to diff allowlist
2024-07-16 04:52:08 +00:00
Inseob Kim
1f3f321967 Add files installed to root to diff allowlist
system.img is built from both $OUT/system and $OUT/root. As the diff
tool doesn't check $OUT/root, this change temporarily adds two files
under root (adb_keys and init.environ.rc) to allowlist. They will be
removed once the diff tool is fixed.

Bug: 351258461
Test: build
Change-Id: I0f24dcae67c72be5619a86f6f025ec8bcb146084
2024-07-16 03:01:26 +00:00
Zhi Dou
9f8ed73934 Change java codegen to read from new storage
This change adds code in java code to read from new storage. However the
generated code won't geneerate code contains code for new storage, since
the build system won't pass `allow-instrumentation` to java codegen.

Test: atest aconfig.test.java
Bug: 349874828
Change-Id: I70983fa97de6633f467d968109d134d46f895a89
2024-07-15 19:08:33 +00:00
Zhi Dou
621323cfda add storage java reader
Test: atest aconfig_storage_read_api.test.java
Bug: 349874828
Change-Id: I4b1d5ccf4d48622a88712b6e8940ffe18e980927
2024-07-12 13:34:12 +00:00
Priyanka Advani
16c8d3c47a Revert "add storage java internal reader"
This reverts commit 70b9ac0ddd.

Reason for revert: Droidmonitor created revert due to build breakages in b/352582602.

Change-Id: I8a8e38ccf3e715e9b4746ac333aed0cc13d11969
2024-07-11 19:59:24 +00:00
Zhi Dou
70b9ac0ddd add storage java internal reader
Test: n/a
Bug: n/a
Change-Id: I852ab4080bee9240549dc4be0c09dbe1f72d06b0
2024-07-11 18:50:46 +00:00
Treehugger Robot
0d18be30ae Merge "fix: make device paths function static" into main 2024-07-11 13:48:51 +00:00
Treehugger Robot
33118a7e83 Merge "Implement storage files in Java" into main 2024-07-10 23:28:37 +00:00
Ted Bauer
ba67436d0d fix: make device paths function static
Bug: 342636474
Test: m
Change-Id: Iea745c39f8ef90543015c365ead4c02ee4ff6653
2024-07-10 23:15:08 +00:00
Zhi Dou
af8a16adf0 Implement storage files in Java
This change implements storage files in java to remove the dependencies
on JNI.

Bug: 352078117
Test: atest aconfig_storage_file.test.java

Change-Id: I34438576d09d0aa31eabc60f472e71cebf1552a0
2024-07-10 22:29:47 +00:00
Michael Merg
11670f3918 Merge "Update ide_query script to new format" into main 2024-07-10 15:33:29 +00:00
Liana Kazanova
d7343203b6 Merge "Revert "Mark FeatureFlags impl member as final"" into main 2024-07-03 18:15:27 +00:00
Liana Kazanova
8450f57c3e Revert "Mark FeatureFlags impl member as final"
This reverts commit fca73bcad3.

Reason for revert: Droidmonitor triggered revert due to build breakage in b/350978649. Will be verifying through ABTD before submission.

Change-Id: I65de159518597289f1e0e3902080f35970842afc
2024-07-03 17:56:12 +00:00
Treehugger Robot
8d3b98e1ca Merge "Mark FeatureFlags impl member as final" into main 2024-07-03 15:52:13 +00:00
Jared Duke
1006bfbae3 Merge "Reuse Java flag name constants in FeatureFlagsImpl" into main 2024-07-03 14:53:29 +00:00
Michael Merg
83f0e74924 Merge "Add prober scripts for language services features" into main 2024-07-03 08:11:32 +00:00
Treehugger Robot
f959947939 Merge "Generate system diff between KATI and SOONG" into main 2024-07-03 04:48:21 +00:00
Jared Duke
1b6d14296e Reuse Java flag name constants in FeatureFlagsImpl
This may not matter in practice due to string inlining and interning,
but might avoid any accidental name drift/bugs in the future.

Bug: 280833463
Test: atest aconfig.test
Change-Id: I53b5b3effb577493ba708800928553c04b2fdc54
2024-07-02 22:51:05 +00:00
Michael Merg
d8a48c794a Add prober scripts for language services features
Change-Id: I8c4a39a575f7977c524cfd450cf952b20c8c2c11
2024-07-02 19:32:38 +00:00
Kiyoung Kim
8376b32e42 Generate system diff between KATI and SOONG
There is an effort to generate system image with Soong, but there are
some difference in installed files between Soong defined system image
and KATI defined one. This change generates diffs between installed
files from two sources.

Bug: 346873717
Test: USE_SOONG_DEFINED_SYSTEM_IMAGE=true m -j on aosp_cf_x86_64
generated diff file.

Change-Id: I25c71f88d16a4efb873c21abe70ca9c41c6423ca
Merged-In: I25c71f88d16a4efb873c21abe70ca9c41c6423ca
2024-07-02 02:22:51 +00:00
Ivan Lozano
16266625cc Remove allow-multiple-definitions flag.
This is no longer necessary as static linkage in Rust has been fixed.

Bug: 254469782
Test: m aconfig_storage_write_api.test.cpp
Change-Id: I6b8b36882aa521eb0412fb7da03a5eec94df81d4
2024-07-01 18:28:32 +00:00
Ivan Lozano
4ed15ef2fb Merge "Replace static_rlibs usage." into main 2024-06-28 14:44:49 +00:00
Treehugger Robot
6b8d925c91 Merge "Fix bug in ota_from_raw_img when generating multiple images" into main 2024-06-27 01:17:10 +00:00
Jared Duke
fca73bcad3 Mark FeatureFlags impl member as final
Marking the member as final for non-test scenarios allows for
optimizations that may otherwise be unavailable, and avoids ambiguity
about mutability.

Bug: 280833463
Test: atest aconfig.test
Change-Id: Ia58a04c9a57ee06d68f4dd022ace5365c65f4cf5
2024-06-26 23:08:16 +00:00
Kelvin Zhang
9ef8a02782 Fix bug in ota_from_raw_img when generating multiple images
Python argparse support for multiple arguments per flag is limited,
so we need to manually do parsing here(split by ",")

Test: generate a boot image OTA with boot and dtbo partition
Bug: 349590107
Change-Id: Ia9f7e0ab0836bddf15591a74b17a667e63080373
2024-06-26 10:15:33 -07:00
Ivan Lozano
b6288a526e Replace static_rlibs usage.
static_rlibs has been folded into the normal static_libs and
whole_static_libs properties.

Bug: 254469782
Bug: 349129702
Test: m
Change-Id: I89d260f78947c3e0fe65148177c7f98d0d0c504d
2024-06-26 01:36:26 +00:00
Treehugger Robot
f8b7517b02 Merge "Switch to static_rlibs" into main 2024-06-25 21:57:39 +00:00
Ted Bauer
b64fdac839 Switch to static_rlibs
When a dependency takes multiple rust_ffi_static dependencies in its
static_libs, their symbols collide. Switch to static_rlibs, which
resolves the collisions. See b/349129702 for context.

Bug: 349129702
Test: m
Change-Id: I6cd2fe92629c7d44e22d113795b340e06175f008
2024-06-25 17:21:40 +00:00
Zhi Dou
436f1368cd flush mmap file to disk after updating
The change was applied in the file in memory. Without explicitly calling
msync, there is no guarantee that the changes are written back to disk.
Thus the flag value may not be changed.

Bug: b/348693143
Test: atest aconfig_storage_write_api.test.cpp
aconfig_storage_write_api.test.rust

Change-Id: I8b1e0cbbb90bcb3c2e5bbf418a6a1a9cd047c81b
2024-06-24 21:14:52 +00:00
Jooyung Han
972804b81e Fix a bug in the releasetools common.py script.
The script was not breaking out of the loop when a handler was found, which could lead to multiple handlers being called for the same option.

This fixes the issue that a single option can be handled in two handlers.

Bug: 345402175
Test: sign_target_files_apks -k ..
Change-Id: I9f4ef801df99a4a0f2ba5be994b3f37fbedc22c0
2024-06-21 22:42:48 +00:00
Zhuoyao Zhang
d067588a26 Support uploading host_name info in the tool event logger
host_name info is useful in several use cases including
1) to distinguish the concurrent tool invocations from the same user.
2) to understand the potential different performance from different hosts (e.g. local workstation VS cloudtop).
3) required to integrate the tool event log with the EPR system.

Test: atest tool_event_logger_test
Bug: 348482213

Change-Id: I98422b3f8ccec73d57fcdcdedac91780c448dc47
2024-06-21 21:03:03 +00:00
Jakub Czapiga
9de3473305 Merge "Drop legacy vboot support." into main 2024-06-19 07:32:35 +00:00
Treehugger Robot
8715d314e6 Merge "Support license information in SBOM writers library." into main 2024-06-18 20:41:52 +00:00
Wei Li
c6b4046787 Support license information in SBOM writers library.
Bug: 324465531
Test: CIs
Test: atest --host sbom_data_test sbom_writers_test
Test: build/soong/tests/sbom_test.sh
Change-Id: Iac2be2e65f308caabb11237e72dbdc6b047cfd55
2024-06-18 12:34:30 -07:00
Jakub Czapiga
31f6e08fc9 Drop legacy vboot support.
Bug: 291329969
Bug: 347885843
Bug: 347899892
Test: m
Test: CIs
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5071b95a067c9392b7bfa4d95957307ff0ccdcc3)
Merged-In: I5f30f63553cc2670650897e259ba51baf8ced05d
Change-Id: I5f30f63553cc2670650897e259ba51baf8ced05d
2024-06-18 15:40:14 +00:00
Treehugger Robot
bb4e87008f Merge "aflags: Ensure <partition>/aconfig_flags.pb exists before reading" into main 2024-06-18 15:27:36 +00:00
Luca Stefani
bc962db1ea aflags: Ensure <partition>/aconfig_flags.pb exists before reading
In some build targets/combinations aconfig_flags.pb
may not be generated.

For example in GSI only system/aconfig_flags.pb exists
and system-only updates won't have vendor/aconfig_flags.pb.

Test: m, aflags
Change-Id: I136345a8748bc6d80bd98e673f90e0a2ab380ab1
2024-06-18 06:59:52 +00:00
Ted Bauer
6e11172c6b Add defaults target for shared linking
Add a defaults target that all targets linking to aconfig codegen with
the new storage API dependencies will need. The target takes the new
storage APIs conditionally behind a flag, so we can disable it easily.

In this topic, we add it to a single target to see that it builds and
adds the dependency. In follow-on CLs we can add it to the rest of the
targets.

Test: m audiopolicy_tests
Bug: 347701310
Change-Id: I67643205b283301f72c5466401060212b637388f
Merged-In: I67643205b283301f72c5466401060212b637388f
2024-06-17 21:16:51 +00:00
Xin Li
3ab9f3fdb9 Merge "Merge Android 14 QPR3 to AOSP main" into main 2024-06-17 18:51:26 +00:00
Ted Bauer
5223a70887 Add root check to aflags
aflags scans the apex/ dir, which requires root access to read.
Currently the command fails with "Error: Permission denied", which
doesn't tell the user how to fix the problem. This CL adds a more
descriptive error message.

Test: adb unroot && adb shell aflags list
Bug: 347692127
Change-Id: I98a7a1ba10ef52ec47035816fa66119ea84f281d
2024-06-17 15:25:02 +00:00
Michael Merg
86cca7484c Update ide_query script to new format
This includes using a separate (but backward compatible) proto for the cc_analyzer since some of the fields/messages were removed in the new ide_query format.

Tested the ide_query.go with the old and the new cc_analyzer to ensure backward compatibility.

Change-Id: If149f5f9dd88a8f50c184274e8b258dfce117498
2024-06-12 13:07:35 +00:00
Steven Moreland
cffced3727 zipalign: succesful -> successful
Bugs: me
Change-Id: I6cc866b3d8765ed6ef553f2de80bba995bdbc095
Test: n/a
2024-06-11 17:07:44 +00:00
Mårten Kongstad
21d8395879 Merge changes from topic "check-flagged-apis-list-subcommand" into main am: ac9a2abad8
Original change: https://android-review.googlesource.com/c/platform/build/+/3121994

Change-Id: I42b6876b78e9369280b2737b82c5d04233faff77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-11 12:51:22 +00:00
Mårten Kongstad
1692a36da7 check-flagged-apis: add list subcommand
Add a new subcommand to list all flagged APIs and corresponding flags.
This provides an overview of what flagged APIs exist in the Android
tree.

Bug: 345207706
Test: build/tools/check-flagged-apis/check-flagged-apis.sh list
Test: atest check-flagged-apis-test
Flag: EXEMPT host side tool
Change-Id: Icc224f3787480353baabbd3946f36f003f35db59
2024-06-11 13:11:28 +02:00
Mårten Kongstad
576e818880 check-flagged-apis: extract argument names into constants
Extract the command line argument names (and help texts) into constants.
This will allow future subcommands to re-use the same names and keep
things consistent.

Bug: 345207706
Test: atest check-flagged-apis-test
Flag: EXEMPT host side tool
Change-Id: I430f36c99f28aab8511a357f572086ee238d653b
2024-06-10 16:26:17 +02:00