Bug: 285303012
Test: for x in next trunk trunk_food trunk_staging ; do lunch aosp_panther-$x-eng ; m nothing ; done
Change-Id: I174ce3e609fa9077ea6bc61679ddb83e8efe57c8
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
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
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
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
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
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
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
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
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
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
The decision to support updatable APEX or not used to be SoC-specific
because updatable APEX (aka non-flattened APEX) requires some kernel
feature support like loopback device. Kernel was considered as part of
BSP then. Therefore, ro.apex.updatable property was in the vendor
partition.
However, with GKI, kernel is no longer SoC-specific. And most APEXes are
installed to the system partition, which means that the decision affects
how the system partition is built. Thus, this CL moves the property to
the system partition. This enables some partners who have been using
flattened APEX to be able to upgrade to non-flattened APEX without
having to upgrade the vendor partition.
Bug: 281007951
Test: check system/build.prop
Change-Id: I81874076862f6047b9daa14518b95adcb5275064
Partition images are allowed to be in either IMAGES/ or RADIO/ dir of a
target_files zip, so when searching for .map files we should look in
both dirs.
Test: th
Bug: 227848550
Change-Id: I0a9d2c582d8f5d570237434902fac012513c9aad
map_file_generator need to invoke binaries such as `unsquashfs` .
These binaries are built from android source tree, so add host binary
output directory to PATH variable so that map_file_generator can use
these binaries.
Test: th
Bug: 286870582
Change-Id: I56634293ee885fc4612627578a22cdf57bc13bfc