Commit graph

84361 commits

Author SHA1 Message Date
Treehugger Robot
c4ebac631b Merge "Add 34.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS" 2023-06-26 12:04:42 +00:00
Mårten Kongstad
37cb74b3e4 Merge "aconfig: add proto bug field" 2023-06-26 06:27:48 +00:00
Mitch Phillips
61ce7afb21 Merge "[MTE] [gnu make] Add memtag_globals as a sanitizer target." 2023-06-26 05:50:11 +00:00
Gabriel Biren
6656e58856 Merge "Revert "Add rule to convert WIFI_FEATURE_IMU_DETECTION"" 2023-06-23 16:19:13 +00:00
Inseob Kim
77e317d852 Add 34.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS
Bug: 288517951
Test: m selinux_policy
Change-Id: I4d5b0bffbc7dd4ec3852da1674937e349e2ab322
2023-06-23 15:51:26 +09:00
Jooyung Han
bd7ef6bc94 Merge "Do not pass TARGET_FLATTEN_APEX to soong" 2023-06-23 04:09:48 +00:00
Wei Li
d952b49430 Merge "Revert "Support SBOM generation of m build unbundled APEXs."" 2023-06-22 22:35:48 +00:00
Wei Li
bab162156e Revert "Support SBOM generation of m build unbundled APEXs."
This reverts commit 7c4f064a2b.

Reason for revert: this caused some CI breakages on git_master, mainline_modules_xxxx

Change-Id: I95354db66991f6c257164d6f808b9fe4350673c1
2023-06-22 22:21:00 +00:00
Gabriel Biren
720deccc0b Revert "Add rule to convert WIFI_FEATURE_IMU_DETECTION"
This reverts commit fdcf16f55c.

Reason for revert: Variable belongs internally

Change-Id: I3af8968f36f68bed34f40c921608582b1798ca65
2023-06-22 17:32:03 +00:00
Mitch Phillips
8520f4b19e [MTE] [gnu make] Add memtag_globals as a sanitizer target.
GNU make bits for https://android-review.git.corp.google.com/c/platform/build/soong/+/2625692.

Bug: N/A
Test: Build {libc, libm, libc++, libm, and libnetd} in internal master
with these patches and an experimental compiler with the lld support.
Also, `SANITIZE_TARGET=memtag_globals m` here with in-tree compiler
without lld support.

Change-Id: I44c239ba907a90a355c46e12afbbbe96bb2e4426
2023-06-22 17:05:01 +00:00
Mårten Kongstad
1b8636bd7d aconfig: add proto bug field
Add a `bug` field on the flag_declaration and parsed_flag proto
messages. This field is optional in the sense that it can occur zero or
more times, and aconfig will simply pass any value through.

Bug fields are included in the aconfig dump format, which can be
processed by other tools.

Also unify how protos.rs checks that fields marked 'optional' in the
proto file, but in practice are 'required', are actually set.

Test: atest aconfig.test aconfig.test.java
Bug: 288261336
Change-Id: I93de0005674822c6ff4d699bdc2c6509763a7f7f
2023-06-22 16:50:33 +02:00
Joe Onorato
9ccb457588 Merge "Rename device_config --> aconfig and definitions --> declarations" 2023-06-22 13:30:53 +00:00
Treehugger Robot
0e5e1749bb Merge "Handle symlinks when extracting zipfiles" 2023-06-22 01:27:35 +00:00
Joe Onorato
6aa48f8c5f Rename device_config --> aconfig and definitions --> declarations
Bug: 285303012
Test: for x in next trunk trunk_food trunk_staging ; do lunch aosp_panther-$x-eng ; m nothing ; done
Change-Id: I174ce3e609fa9077ea6bc61679ddb83e8efe57c8
2023-06-21 15:18:15 -07:00
Kelvin Zhang
e473ce9e80 Handle symlinks when extracting zipfiles
python3.11's zipfile implementation does not handle symlinks. This
causes important symlinks in ramdisk to be broken, and later causing a
boo failure.

Test: unzip a target files with symlinks, make sure symlinks are created
Bug: 287896098

Change-Id: Ia7d6ac8ffb03807680a36ff648aa11afafb7f481
2023-06-21 13:31:26 -07:00
Wei Li
8968aa544b Merge "Support SBOM generation of m build unbundled APEXs." 2023-06-21 17:50:17 +00:00
Gabriel Biren
a58ce5e9d3 Merge "Add rule to convert WIFI_FEATURE_IMU_DETECTION to the equivalent soong variable." 2023-06-21 15:19:51 +00:00
Jooyung Han
6d273b9624 Do not pass TARGET_FLATTEN_APEX to soong
Soong no longer supports "flattened" apex. This makes
TARGET_FLATTEN_APEX no-op.

Will remove TARGET_FLATTEN_APEX later.

Bug: 279835185
Test: m && launch_cvd (cuttlefish)
Change-Id: I27c6181f5107fd27552304c5dd25d2c0a21c4bec
2023-06-21 14:22:00 +09:00
Treehugger Robot
d0c29cbdeb Merge "Remove PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES" 2023-06-21 05:18:58 +00:00
Mårten Kongstad
a3b0027fdb Merge "aconfig: make proto fields optional" 2023-06-20 18:47:08 +00:00
Wei Li
7c4f064a2b Support SBOM generation of m build unbundled APEXs.
Bug: 266726655
Test: banchan com.android.adbd arm64 userdebug && m dist
Test: build/soong/tests/sbom_test.sh
Change-Id: I7abadbc083ef66b0e8ace28de69a1a219670ec37
2023-06-20 11:23:56 -07:00
Zhi Dou
cff292f8b2 Merge "aconfig: generate Java flag name constants" 2023-06-20 16:53:53 +00:00
Treehugger Robot
23788f85a4 Merge "aconfig: use proto struct directly" 2023-06-20 15:28:58 +00:00
Jiakai Zhang
bedc1d3518 Merge "Add an entry in METADATA.txt to determine whether to use the CMC GC." 2023-06-20 13:52:04 +00:00
Jooyung Han
8cc42f429f Remove PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES
We will deprecate flattened apexes. In this change, GSI-specific make
variable (PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES) is removed. The
variable was used to install both image/flattened apexes in the GSI, so
that it works on ro.apex.updatable devices and not-updatable devices.

Now, GSI will have only image APEXes in it.

Bug: 278826656
Test: lunch gsi_arm64-userdebug && m # no flattened apexes
Change-Id: I4702973d4ee75aa693e4e7f4e57577b77059dc09
2023-06-20 14:27:10 +09:00
Wei Li
c20175155a Merge "Include static libraries information in Android SBOM." 2023-06-19 22:02:20 +00:00
Treehugger Robot
fb8c86513e Merge "Fix usage message." 2023-06-19 19:20:15 +00:00
Jiakai Zhang
96b155c018 Add an entry in METADATA.txt to determine whether to use the CMC GC.
If the device uses the CMC GC, the file will contain:
extra-args = --runtime-arg -Xgc:CMC

Otherwise, the file will contain an empty line:
extra-args =

Bug: 287652269
Test: -
  1. m dist out/dist/boot.zip
  2. unzip -p out/dist/boot.zip METADATA.txt
Change-Id: I3d50367eb2a341e1c03286d7a2cd7ed44d59708f
2023-06-19 20:20:05 +01:00
Treehugger Robot
d999938ab0 Merge "Fix godoc typos." 2023-06-19 19:10:47 +00:00
Mårten Kongstad
a2e5ab82c7 aconfig: make proto fields optional
Change all required proto fields to optional. While the proto file is
supposed to be a backwards compatible API, and fields are not supposed
to be deprecated, this commit will allow for that option if needed.

Implementation wise this change doesn't matter much: any parsed data
needs additional verification outside what the protobuf crate's parser
provides anyway, so adding checks to verify that all required fields,
even though marked optional in the proto file, were found is a minor
increase in code complexity.

If in the future a proto field should no longer be used:

  - keep the field in the proto, still marked optional and clearly
    document that it is no longer in use
  - change protos.rs from checking struct.has_field() to explicitly
    dropping any value via struct.clear_field()

Bug: 286337317
Test: atest aconfig.test
Change-Id: Iad1ccfe50ecac286ff7a796aec909bec70b9520d
2023-06-19 16:53:22 +02:00
Mårten Kongstad
a2e152a139 aconfig: generate Java flag name constants
Generate Java constants for use in @FlaggedApi(flag = ...).

Also update the generated Java code to use the constants when reaching
out to DeviceConfig instead of hard-coding (duplicate) strings.

Bug: 285288440
Test: atest aconfig.test aconfig.test.java
Change-Id: I1127cacba650cc7a7896b1533e03631d7f5ec71b
2023-06-19 16:12:01 +02:00
Mårten Kongstad
403658f9cb aconfig: use proto struct directly
Remove the hand-crafted wrappers around the structures auto-generated
from protos/aconfig.proto, and use the auto-generated structs directly
intead. This gets rid of a lot of manual repetition, and its inherent
risk.

Also unify how individual fields read from text proto are verified (e.g.
is the flag.name field a valid identifier).

Also change the intermediate cache format from JSON to binary protobuf.

The concept of a 'cache' as an intermediate internal format to represent
parsed input stays. The command line interface still refers to caches.
At the moment a cache file is identical to a parsed_file protbuf, and
the code exploits this internally.

A couple of points regarding the auto-generated structs:

  - Vectors are named in the singular (e.g. parsed_flags.parsed_flag is
    a Vec<ProtoParsedFlag>) because this improves ergonomics for all
    devs working with aconfig input files

  - The auto-generated structs have fields that are of type Option<T>
    and convenience methods (named the same as the fields) to access T

Test: atest aconfig.test aconfig.test.java
Bug: 283910447
Change-Id: I512820cc4bc6c543dea9f6a4356f863120a10be3
2023-06-19 16:04:32 +02:00
Treehugger Robot
a99ac90eb5 Merge changes from topic "aconfig-prepare-for-proto-structs"
* changes:
  aconfig: fix incorrect source path in test cache
  aconfig: reduce number of #[cfg(feature = "cargo")] uses
2023-06-19 10:43:34 +00:00
Treehugger Robot
770bfc34e3 Merge "Move ro.apex.updatable to the system partition" 2023-06-19 08:30:52 +00:00
Treehugger Robot
57c1aa7b16 Merge "Handle zip64 extra fields better" 2023-06-17 22:12:26 +00:00
Kelvin Zhang
1e774245a4 Handle zip64 extra fields better
Test: check_target_files_signatures
Bug: 283033491
Change-Id: I7da89f8389c09cc99201cff342483c158bd7e9c1
2023-06-17 09:21:46 -07:00
Wei Li
d263695cd4 Include static libraries information in Android SBOM.
Bug: 280852724
Test: CIs
Test: lunch aosp_cf_x86_64_phone-userdebug && m sbom
Change-Id: Ie2365d79ba24910b7ace132b578589be10a17d78
2023-06-16 23:02:09 -07:00
Treehugger Robot
0d2d11bc00 Merge "Use patch instead of git apply." 2023-06-17 01:56:52 +00:00
Treehugger Robot
59d662524c Merge "aconfig: change java flag method name to camelCase" 2023-06-16 21:49:22 +00:00
Gabriel Biren
fdcf16f55c Add rule to convert WIFI_FEATURE_IMU_DETECTION
to the equivalent soong variable.

Bug: 287607876
Test: Manual test - add a log message to wifi_ext that
       only prints if the proper flag is enabled.
       Check whether the log is displayed, both before
       and after this change.
Change-Id: Id9bfc81384384b915e9772a2016a9843a57897db
2023-06-16 21:11:10 +00:00
Alex Buynytskyy
bce1a51df8 Use patch instead of git apply.
Bug: 281682520
Test: run locally
Change-Id: Ia84055b7a9074836c6d7b3039ba980e39043a41e
2023-06-16 20:23:36 +00:00
Zhi Dou
af81e20653 aconfig: change java flag method name to camelCase
Before java code will directly use the flag name as the method name.
This change adds funciton to try the best to convert flag name to
camelCase, and then use the camelCase string as the method name in the
generated code.

Bug: 279483816
Test: atest aconfig.test aconfig.test.java
Change-Id: I45fc6df46c9d535cd38a657a41313202f9b660af
2023-06-16 12:40:40 +00:00
Jooyung Han
e4635b3e04 Merge "Remove --blkid_path argument" 2023-06-16 06:48:57 +00:00
Justin Yun
cf92cdff7c Merge "Use map_file_generator only for the supported file systems" 2023-06-15 23:54:29 +00:00
Bob Badour
a0b53ceac2 Fix godoc typos.
Methods got renamed, but the godoc didn't.

Test: m droid dist
Change-Id: Ia1181a2c7a876e54b8cd26ba1c91ce731ba8ac96
2023-06-15 16:26:21 -07:00
Treehugger Robot
5c73eb33db Merge changes I9c1a5346,I0a9d2c58
* changes:
  Fix python3.11's support for zip64
  Search for partition maps in IMAGES dir as well
2023-06-15 15:56:57 +00:00
Justin Yun
a8a5a3ff62 Use map_file_generator only for the supported file systems
map_file_generator can generate map files from erofs and ext# file
systems. Check the file system type and copy images and generate map
files if supported. Otherwise skip these steps.
If the image files are not copied, add_img_to_target_files will
generate the image files and map files.

Bug: 286870582
Test: lunch bertha_x86_64-userdebug && m dist
Change-Id: Ib92dd989cf61b1e376107a507eae9222ceb1d0d4
2023-06-16 00:10:33 +09:00
Mårten Kongstad
0cd8092376 aconfig: fix incorrect source path in test cache
Bug: 283910447
Test: atest aconfig.test
Change-Id: I9bc34e838a0945891f866e9788bcf9f4f6c23d3b
2023-06-15 11:43:33 +02:00
Mårten Kongstad
f94225266f aconfig: reduce number of #[cfg(feature = "cargo")] uses
Group statements with identical #[cfg(feature = "cargo")] attributes in
the same block. This reduces repetition and makes the code easier to
read and less error prone.

Bug: 284779868
Test: atest aconfig.test
Change-Id: Iebdcd20e7cd22cb641424a1af594f5c9ac57b623
2023-06-15 09:28:49 +02:00
Treehugger Robot
1cda03b44b Merge "Update LLNDK list" 2023-06-15 04:26:43 +00:00