Commit graph

8666 commits

Author SHA1 Message Date
Treehugger Robot
7677eb46cd Merge "Add per partition timestamp to 16K boot OTA" into main am: 6f0db025d0
Original change: https://android-review.googlesource.com/c/platform/build/+/2744293

Change-Id: I96a6db27c937060b3c374802921590598693ecf0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-08 22:54:42 +00:00
Treehugger Robot
6f0db025d0 Merge "Add per partition timestamp to 16K boot OTA" into main 2023-09-08 22:25:29 +00:00
Firman Prayoga
e4a3296f1d Merge "Revert "Clean staging dirs in build_image.py"" into main am: 44d86b138b
Original change: https://android-review.googlesource.com/c/platform/build/+/2746515

Change-Id: Ibe31fc87779099b74bb20625ce1ee931907d0708
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-08 04:31:46 +00:00
Firman Prayoga
44d86b138b Merge "Revert "Clean staging dirs in build_image.py"" into main 2023-09-08 04:06:57 +00:00
Firman Prayoga
df21706765 Revert "Clean staging dirs in build_image.py"
Revert submission 2736954-proper_installclean

Reason for revert: Potential culprit for build breakage b/299545346

Reverted changes: /q/submissionid:2736954-proper_installclean

Change-Id: I2b0671bd40b7a74ef02923a777ec899401691454
2023-09-08 01:24:45 +00:00
Treehugger Robot
cb4bb177bd Merge "[zip] Set all entry times before 1980 to 1980-01-01" into main am: 05a03698b7
Original change: https://android-review.googlesource.com/c/platform/build/+/2744613

Change-Id: I5435006901820b183b2530d4c178d864ded77296
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 19:52:10 +00:00
Treehugger Robot
05a03698b7 Merge "[zip] Set all entry times before 1980 to 1980-01-01" into main 2023-09-07 18:54:47 +00:00
Cole Faust
8af587010b Merge "Clean staging dirs in build_image.py" into main am: c383825953
Original change: https://android-review.googlesource.com/c/platform/build/+/2736954

Change-Id: I8731127af428888c1be3035c0e9f3244964ab7e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 17:18:12 +00:00
Cole Faust
c383825953 Merge "Clean staging dirs in build_image.py" into main 2023-09-07 16:41:45 +00:00
Mark Punzalan
0d7190b413 [zip] Set all entry times before 1980 to 1980-01-01
Before this change, entry times before 1980 had the year changed to 1980
but the month/day/hour/minutes/seconds were all kept as-is.

Bug: 277978832
Test: atest zipalign_tests
Change-Id: I9f87e98a6b985002578490b87c654fee86c65d62
2023-09-06 21:44:40 +00:00
Kelvin Zhang
b5661d6ef5 Add per partition timestamp to 16K boot OTA
update_engine requiers per partition timestamp if this partition's build
prop includes build.date.utc.

Test: th
Bug: 293313353
Change-Id: I6bf3de8e855f0830b26bdbe2cbdc78ba891662a7
2023-09-06 13:02:19 -07:00
Treehugger Robot
8b0299785e Merge "Use localtime_r() on Windows too." into main am: 2462269f1f
Original change: https://android-review.googlesource.com/c/platform/build/+/2741081

Change-Id: I69aaad5de1db6ebfc204a41a29034a8dc4f6779b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 18:57:56 +00:00
Cole Faust
48b81e7386 Clean staging dirs in build_image.py
build_image.py now accepts a --input-directory-filter-file argument
that contains a list of files to consider from the input directory.
A new, temporary input directory will be created, and only the
considered files will be copied to it.

This removes most of the need for `m installclean`, as old files or
files built manually will no longer end up on the partition.

Bug: 205632228
Test: Presubmits
Change-Id: I4c82ac7f1ed49a37271755749c8f72afeeb7f295
2023-09-06 11:51:13 -07:00
Treehugger Robot
2462269f1f Merge "Use localtime_r() on Windows too." into main 2023-09-06 18:12:22 +00:00
Zhi Dou
a5b2b5d6a8 Merge "aconfig: flag java lib enable optimization" into main am: 58fd788f51
Original change: https://android-review.googlesource.com/c/platform/build/+/2741013

Change-Id: Ide04bb0809d46e45dcb044b2c05e6d4860e3c4c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 13:30:20 +00:00
Zhi Dou
deafa792eb aconfig: flag java lib enable optimization
This change adds annotation in the generated code. If the flag is read
only, annotations @com.android.aconfig.annotations.AssumeTrueForR8 or
@com.android.aconfig.annotations.AssumeFalseForR8 will be added in to
the corresponding methods in the interface FeatureFlags, and class
Flags.

Test: atest aconfig aconfig.test.java
Bug: 295328116
Change-Id: Ic1b62a86f0945a5e72ae2c4987cce77fe3f172e9
2023-09-06 12:55:09 +00:00
Elliott Hughes
16caa44298 Use localtime_r() on Windows too.
I don't know why I didn't clean these up when I learned about this
trick.

Test: treehugger
Change-Id: I16e7d92fd79c2dfc006612442bbb924b35a5f213
2023-09-05 21:37:01 +00:00
Treehugger Robot
6a5b171816 Merge changes from topic "aconfig-misc-fixes-2023-09-04" into main am: 6c4627369e
Original change: https://android-review.googlesource.com/c/platform/build/+/2738374

Change-Id: Id1108f202bdd118455ea80f2d72f5a3ab26b1bf7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-05 18:12:48 +00:00
Treehugger Robot
6c4627369e Merge changes from topic "aconfig-misc-fixes-2023-09-04" into main
* changes:
  aconfig: add invariant checks for `is_fixed_read_only`
  aconfig: re-enable development with cargo
2023-09-05 17:21:22 +00:00
Mårten Kongstad
21717e744e aconfig: add invariant checks for is_fixed_read_only
Update parsed_flag::verify_fields to verify that the invariant "if a
parsed flag is_fixed_read_only, its permission must be READ_ONLY".

Note: commands.rs will ensure that no value files are used to create an
invalid parsed flag when flag declarations and values are parsed, but
the invariant check should still be added for completeness sake, and to
make sure no invalid hand-crafted test data exists.

Also fix invalid test data found by adding this invariant.

Bug: 298935897
Test: atest aconfig.test
Change-Id: I8cea5c4d28c458525b7034d78ecb34dd09272771
2023-09-04 20:25:59 +02:00
Mårten Kongstad
5cfad6abd2 aconfig: re-enable development with cargo
The integration tests introduced in 906405f5c9 depend on libraries
auto-generated by running aconfig. This works fine for the Android build
system, but breaks `cargo t`.

Disable the tests when using `cargo t` for local development. Cargo can
be used for rapid local development, including running unit tests;
integration tests should be run using atest.

Bug: 298904077
Test: cargo t
Test: atest aconfig.test_mode.test.rust aconfig.prod_mode.test.rust
Change-Id: Ifcd374fa6efdc121cbfd4c4ac4fb43cf9cacc192
2023-09-04 13:22:28 +02:00
Kelvin Zhang
62d130b2c2 Merge "Use seek() instead of writing 0s" into main am: dfa0c85705
Original change: https://android-review.googlesource.com/c/platform/build/+/2734171

Change-Id: Iccf7a483cc5202e913293e8692d8af244df3b7c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 18:09:08 +00:00
Treehugger Robot
892071ae93 Merge "Mark boot OTAs as partial OTAs" into main am: 145ca3034f
Original change: https://android-review.googlesource.com/c/platform/build/+/2733819

Change-Id: Icdbfc74189a368807ae0d7f3ebf6384e4a3d672d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 18:08:19 +00:00
Kelvin Zhang
dfa0c85705 Merge "Use seek() instead of writing 0s" into main 2023-09-01 17:00:52 +00:00
Treehugger Robot
145ca3034f Merge "Mark boot OTAs as partial OTAs" into main 2023-09-01 16:58:26 +00:00
Kelvin Zhang
8aa6525ad7 Use seek() instead of writing 0s
test_ZipWrite_large_file need to write a 4GB file to zipfile for
testing. Instead of writing sequence of 0s to the test file, use seek().

Test: th
Bug: 298138109
Change-Id: I886bfa0c3f21664e529ba7de9688909518148f61
2023-08-31 12:17:14 -07:00
Kelvin Zhang
c4f737406a Mark boot OTAs as partial OTAs
Boot partition only OTA must be marked as "partial". This is required
for update_engine to correctly copy non-updated partitions to the target
slot.

Test: th
Bug: 293313353
Change-Id: Ic89d03f214e12fa43f686d37854d6fed1d78a6a3
2023-08-31 12:17:14 -07:00
Treehugger Robot
69c8926522 Merge "Avoid calling MergeUpdateEngineConfig for non-ab target" into main am: c20ef7ca4a
Original change: https://android-review.googlesource.com/c/platform/build/+/2653761

Change-Id: I12468fb66e3c0915cbd92723c9206950b9721393
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-31 15:31:37 +00:00
Treehugger Robot
c20ef7ca4a Merge "Avoid calling MergeUpdateEngineConfig for non-ab target" into main 2023-08-31 14:30:17 +00:00
Treehugger Robot
0a60fcee26 Merge "make fake_device_config buildable on host" into main am: f153237a03
Original change: https://android-review.googlesource.com/c/platform/build/+/2734157

Change-Id: I2f847e86600ad023f02697c3e5459c86de7c610b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-30 20:11:53 +00:00
Joe Onorato
cede86dd28 make fake_device_config buildable on host
Test: treehugger
Bug: 277916185
Change-Id: I002669bbb605b7968b81c66d1cbf0ff3caa0c699
Merged-In: I002669bbb605b7968b81c66d1cbf0ff3caa0c699
2023-08-30 11:39:29 -07:00
Treehugger Robot
f45586061b Merge "Add timestamp to 16K boot OTA" into main am: 132be7e516
Original change: https://android-review.googlesource.com/c/platform/build/+/2726999

Change-Id: I2286092b17ee5290db318b1726dfc28b6250197e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-30 04:49:01 +00:00
Kelvin Zhang
506a30851e Add timestamp to 16K boot OTA
Test: th
Bug: 297536338
Change-Id: Id4919d2437079e36899cd4c56da011a29aa0b470
2023-08-29 19:38:19 -07:00
Jerry Jia
dac2660623 Merge "Add libaconfig_python_proto target for Mobly host-based tests" into main am: e40f2800af
Original change: https://android-review.googlesource.com/c/platform/build/+/2726480

Change-Id: Ib5049d49260af3763aa77ace9117924655afc3ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-29 23:13:15 +00:00
Jerry Jia
e40f2800af Merge "Add libaconfig_python_proto target for Mobly host-based tests" into main 2023-08-29 22:33:32 +00:00
Zhi Dou
f1b494624c Merge "aconfig: generate full fakefeatureflagsimpl in prod mode" into main am: 401be560de
Original change: https://android-review.googlesource.com/c/platform/build/+/2709686

Change-Id: I93519fc9229e061278ffbbc18d0458dbaabad808
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-29 14:23:36 +00:00
Zhi Dou
401be560de Merge "aconfig: generate full fakefeatureflagsimpl in prod mode" into main 2023-08-29 13:29:31 +00:00
Treehugger Robot
6ca8e44d67 Merge "ota_from_target_files requires apexd_host" into main am: 4b00773378
Original change: https://android-review.googlesource.com/c/platform/build/+/2730213

Change-Id: I256a556121da78c37923510786e34a5bef5049c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-29 03:28:47 +00:00
Jooyung Han
ccec6ad2ec ota_from_target_files requires apexd_host
apexd_host is invoked in check_target_files_vintf.py
to prepare the apex directory before invoking checkvintf. ota_from_target_files uses check_target_files_vintf.py via (python_library) releasetools_check_target_files_vintf.

Since soong doesn't inherit "required:" property from library to binary, adding the dependency manually to ota_from_target_files.

Bug: n/a
Test: $ m ota_from_target_files # should build apexd_host
Change-Id: Ie7e6c3acf376c23960f242294f5a9bf99fec26aa
2023-08-29 01:28:40 +00:00
Xin Li
c76319f88c Merge "Merge Android U (ab/10368041)" into aosp-main-future 2023-08-28 22:13:35 +00:00
Zhi Dou
06a448fac7 aconfig: generate full fakefeatureflagsimpl in prod mode
This change will generate full fakefeatureflagsimpl in prod mode.
FakeFeatureFlagsImp will be the same in test mode and the prod mode.
FeatureFlagsImpl will be all unimplemented in test mode. setFlag,
resetAll are added into the interface FeatureFlags.

The reason to make this change is for project using injection pattern,
the project doesn't have to use test mode to test the flag guarded code.
The project can directly use the FakeFeatureFlagsImpl for testing.

Bug: 294838180
Test: atest AconfigJavaHostTest --host AND atest aconfig.test.java
Change-Id: Ib6d40fd3a9ef872e01594fd4f8d6c4cb10bb173a
2023-08-28 16:54:15 +00:00
Kelvin Zhang
f6fe0a9c9c Reduce OTA tools's dependency on brillo_update_payload
brillo_update_payload is thin bash wrapper for delta_generator, and
OTA tools are wrappers around brillo_update_payload. This is
inconveinent, as adding a new flag requires changing 3 places. Since
brillo_update_payload is really thin, skip it and invoke delta_generator
directly.

Test: th
Bug: 293313353
Change-Id: I2fd5af95c571ea45aea62f9eec475f0f4e864953
2023-08-25 13:49:09 -07:00
Xin Li
be1435290d Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: If9360ebd0acebe85f42f89a268c316d51c765708
Change-Id: I58470464a3239a2ad8e82e4821bb27a2892a8302
2023-08-25 13:25:26 -07:00
Zhi Dou
feac202f19 Merge "aconfig: add fixed read only flag" into main 2023-08-25 13:37:37 +00:00
Cole Faust
1f89cbb484 Fixes for python 3.11
Bazel previously had a bug where the source directory of the entrypoint
python script would be added to the path. They added PYTHONSAFEPATH
to the enviornment to fix it, which was introduced in python 3.11.

Now that python is being updated to 3.11, the fix is in, which breaks
some scripts that don't properly specify import folders.

Add the import folders where required.

Bug: 278602456
Test: ./build/bazel/ci/bp2build.sh
Change-Id: I5b87f83247dfdfcb8bdb4f962466cbf522cc29c6
2023-08-24 17:44:01 -07:00
Xianyuan Jia
3a070a634e Add libaconfig_python_proto target for Mobly host-based tests
Bug: 297431521
Test: unit tests (mobly_device_flags_test)
Change-Id: Ic377cb7c6f651033145a14c83c987e6d779cca6b
2023-08-24 16:49:38 -07:00
Kalesh Singh
78ecdf05c4 Merge changes I890db067,I4150dbd4 into main
* changes:
  zipalign: Allow specifiying the target page size
  zipalign: Fix pageAlignSharedLibs arg in tests
2023-08-24 22:59:42 +00:00
Kalesh Singh
55405b61be zipalign: Allow specifiying the target page size
Allow apps to specify the target page size for aligning their
uncompressed shared libraries.

This allows apps that want to support larger page sizes to do
so by specifiying the -P <pagesize_kb> flag.

However, apps built for 4k-only devices are unaffected as they
can continue to use -p flag for 4kB page alignment of uncompressed
shared libraries.

Bug: 276963821
Test: atest -c zipalign_tests
Change-Id: I890db067b8f898045f73e86788662f94a48af772
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-08-24 14:46:13 -07:00
Zhi Dou
71f1b35fb4 aconfig: add fixed read only flag
Add a new field in the declaration to indicate whether
the permission can be overridden.

When the field “is_fixed_read_only” is set to true,
the flag permission will be set as fixed “READ_ONLY”,
and the permission should not be changed by Gantry.

Bug: 292521627
Test: atest aconfig.test
Change-Id: Ic9bcd7823bccb8b947cf05568c7ced3763490a23
2023-08-24 17:35:18 +00:00
Kelvin Zhang
c7441e5907 Add a tool to generate OTA from images
During build, we will need to generate an OTA for boot partition using a
16K boot image. Typically, OTA is generated from target_files.zip . To
avoid relying on target_files.zip as a dependency for 16K OTA, add a
tool to generate OTA directly from a raw image.

Test: th, ota_from_raw_img --partition_name boot --output ota.zip $OUT/boot_16k.img
Bug: 293313353
Change-Id: I2076332faf2a8dc573450597efd481e285a49545
2023-08-23 12:37:29 -07:00
Kalesh Singh
7e0aa04637 zipalign: Fix pageAlignSharedLibs arg in tests
zipalign_test is passing (int)4096 instead of required bool
for the pageAlignSharedLibs parameter. Update the test to use
the correct type.

Bug: 276963821
Test: atest -c zipalign_tests
Change-Id: I4150dbd411e5a40427281645aa03262f7b0c9e3a
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-08-22 11:26:23 -07:00
Yihan Dong
8c0cb8f5e3 Merge "Create the TEST_MAPPING file" into main 2023-08-22 08:39:36 +00:00
Himanshu Jakhmola
21ef2c600b Avoid calling MergeUpdateEngineConfig for non-ab target
super image generation is failing for non-ab target as it is not able to find update_engine_config.txt while calling MergeUpdateEngineConfig.

META/update_engine_config.txt exists when AB_OTA_UPDATER is true.
Avoid calling MergeUpdateEngineConfig for non-ab target.

Bug: 290811619
Change-Id: Ie88b31adce15df87f73031e1f5bff0d825601e0c
2023-08-22 04:08:01 +00:00
Yihan Dong
c2b7632423 Create the TEST_MAPPING file
Add FlagMacrosTests in presubmit to ensure that test filtering rule
always work as expected.

Bug: 292707070
Test: atest --test-mapping
Change-Id: I7a08b7e41e95063fb3c188da784f56e0973d4fae
2023-08-21 17:23:14 +08:00
Joe Onorato
03d53f7d2d Add a fake library that contains the minimum DeviceConfig that aconfig code needs to compile.
The aconfig-generated code in the framework is added with srcjars. To
get those srcjars, we still need a java_aconfig_library.  This class is
there to allow that to compile, even though those compiled .jar files
are not actually used.

Bug: 293195086
Test: m
Change-Id: I34c21925fbc5912a34fea3e7796d5e0c77c9a4af
2023-08-20 07:40:44 -07:00
Vinh Tran
73b4f2d4e2 Merge changes from topic "rust_aconfig-test-mode" into main
* changes:
  Add rust_test with rust_aconfig_library in test mode
  Fix rust aconfig test
2023-08-17 14:48:37 +00:00
Dennis Shen
f3ef7363a2 Merge "Update codegen to use single channel in sys prop" into main 2023-08-17 14:29:06 +00:00
Dennis Shen
b352b9d33f Update codegen to use single channel in sys prop
Update sys prop name from persist.device_config.<namespace>.<flag> to persist.aconfig_flags.aconfig_flags.<namespace>.<flag>

Bug: b/295379636
Change-Id: I78f00daa574dc016902dce4b9b4ec961f973693c
2023-08-17 13:48:42 +00:00
Treehugger Robot
ef9ba4d22b Merge "Check device's launch API level before using new compresison algo" into main 2023-08-17 00:35:36 +00:00
Kelvin Zhang
8f83000732 Check device's launch API level before using new compresison algo
If a T launch device later changes to LZ4(which is supported since U),
we will fallback to older compression algorithms, because if the full
OTA is applied on an T build, the update_engine on device won't support
lz4.

Bug: 295989519
Test: generate full OTA for T launched devices, make sure lz4 is not
used

Change-Id: I82fdf788e47e2a6daeaa4479bfecf317d8ebb5d5
2023-08-16 13:16:48 -07:00
Zhi Dou
5f81b7dc96 Merge "aconfig: add default-permission argument for create-cache command" into main 2023-08-14 14:12:27 +00:00
Vinh Tran
906405f5c9 Add rust_test with rust_aconfig_library in test mode
Using test mode in aconfig  allows us to override the flag for unit
testing

Test: atest aconfig.test_mode.test.rust
Change-Id: I890fb20fd8cf83e6033defc7093430e3a77e4de4
2023-08-11 21:41:13 +00:00
Vinh Tran
36fcf63c4e Fix rust aconfig test
Test: atest aconfig.test.rust --start-avd
Change-Id: Ife50e8f81999042b8af91828f5682e84fc7b3811
2023-08-11 17:36:15 -04:00
Zhi Dou
24a0b6a20c aconfig: add default-permission argument for create-cache command
Aconfig set flag default permission as READ_WRITE regardless of the
release configuration. This change enables the caller of create-cache to
set the default permission for all flags, if the flag doesn't have a
value.

Test: atest aconfig.test
Bug: 294417368
Change-Id: I1ba19e1ba793cd2ae59923b136b9b50a92315ece
2023-08-10 21:39:59 +00:00
David Iserovich
babdafe97e [config] Dist supports custom super image script
Some boards need to supply a custom super image script, and this
is supported via the BOARD_CUSTOM_BUILD_SUPER_IMAGE variable.

However, this variable is not used by img_from_target_files.py.

Change img_from_target_files.py to call the supplied script.

Bug: None
Change-Id: I6bca937534f58459d3419139ee7a37a10138ab8f
2023-08-10 18:12:44 +00:00
Dennis Shen
908aba1147 Merge "Add rust_test for aconfig" into main 2023-08-10 17:10:29 +00:00
Daniel Zheng
31694e3f83 Merge "Adding option to configure compression level" into main 2023-08-09 20:03:44 +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
Vinh Tran
4559309aaf Add rust_test for aconfig
Test: atest aconfig.test.rust
Change-Id: Ic1b201d05fb216c8d881667461e7750949752b4a
2023-08-08 21:25:22 +00: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
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
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
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
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
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
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
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
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
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
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
Kelvin Zhang
43df0805c2 Fix test failures in releasetools
new_path used before assignment, use `path` instead.

Bug: 280425458
Change-Id: I55086f92cf109af67032614cefde60e6478bb149
2023-07-24 13:16:03 -07:00
Mårten Kongstad
af3da9d1be aconfig: restructure integration tests
Consolidate integration tests under tests/. Rename build targets to
follow the same pattern.

The important aconfig build targets are:

  - aconfig           : the aconfig binary
  - aconfig.test      : the aconfig unit tests
  - aconfig.test.java : the Java integration tests
  - aconfig.test.cpp  : the C++ integration tests
  - aconfig.test.rust : the Rust integration tests (not implemented yet)

Note: the Rust integration tests are blocked until the build system has
added support for aconfig Rust libraries.

Note: the flags used in the integration are not set correctly. A
follow-up CL will fix this.

Bug: 283911467
Test: atest aconfig.test.java aconfig.test.cpp
Change-Id: Idb8dad4c38a49231c2e89228775bacf065ee1f57
2023-07-24 13:05:43 +02:00
Joe Onorato
ac692c5eae Make aconfig c++ generate only one header and only one .cc file
Bug: 283479529
Test: m aconfig_hello_world_cc && adb push $TOP/out/target/product/panther/system/bin/aconfig_hello_world_cc /system/bin && adb shell aconfig_hello_world_cc
Change-Id: I1890aff70262343e18a62fb2efb2fd0e13a48fb2
2023-07-21 09:12:01 -07:00
Treehugger Robot
08cb169cbe Merge changes from topic "aconfig-improve-dump-formats" into main
* changes:
  aconfig: add 'verbose' dump format
  aconfig: improve the 'text' dump format
  aconfig: remove the 'debug' dump format
2023-07-20 12:35:57 +00:00
Mårten Kongstad
2d5309cab1 aconfig: fix broken auto-generated Rust code
Fix syntax error in auto-generated Rust code that prevents the code from
compiling.

For reference, the error was:

---- 8< ----
error: expected `where`, `{`, `(`, or `;` after struct name, found keyword `impl`
 --> .../src/lib.rs:6:1
  |
6 | impl FlagProvider {
  | ^^^^ expected `where`, `{`, `(`, or `;` after struct name
---- >8 ----

Bug: 292052163
Test: manual: create sample based on auto-generated Rust lib
Change-Id: I4c029c0ee16ea3849e7bbe381717a10402c9cb81
2023-07-20 11:33:19 +02:00
Mårten Kongstad
ea4981407b aconfig: add 'verbose' dump format
Add a new --format=verbose dump output format. This is identical to the
default 'text' format but includes the source files from which the flag
declaration and values were read, and is intended to help debug why a
flag isn't set to some expected value.

Bug: 283910447
Test: atest aconfig.test
Test: printflags --format=verbose # manually inspect output
Change-Id: I03a1c8d940e7a0c6f91e986c5bafa4aa6cd1125a
2023-07-20 11:07:35 +02:00
Mårten Kongstad
3fa2f078ff aconfig: improve the 'text' dump format
Standardize the flag values as '<permission> + <state>', e.g.
'READ_ONLY + ENABLED'.

Bug: 283910447
Test: atest aconfig.test
Test: printflags # manually inspect output
Change-Id: I60f74196816327613bd8165a688f8b36da5bdac7
2023-07-20 09:35:05 +02:00
Mårten Kongstad
9338007cff aconfig: remove the 'debug' dump format
The --format=debug dump output format is largely superseded by the
textproto format now that aconfig doesn't use hand-written wrappers
around the auto-generated proto struct anymore. Remove the format to
reduce the risk of code rot.

Bug: 283910447
Test: atest aconfig.test
Change-Id: I6700fc4eafd3fa3a63952109c0105d34c7ffd98b
2023-07-20 09:25:56 +02:00
Zhi Dou
92cf0ec232 Aconfig: sort the parsed flag order in create-cache
This change will sorted the parsed flags from the declarations. Without
this change the code will expect the passed in declarations sorted.
After this change the code will still guarantee the parsed flags in the
cache is sorted, but it won't expect the passed in declarations are
sorted

Test: atest aconfig.test
Bug: 291926035
Change-Id: I5f0637fe770003224b128591890e04277bc09345
2023-07-20 02:32:00 +00:00
Dennis Shen
3cfbcf5384 aconfig: Rust codegen 2nd iteration
Introduce rust codegen 2nd iteration with unit test support. The design
is described in detail in the design doc (go/aconfig_rust_codegen). The general idea is to generate
different code with the same signature for production and test build
targets, just like java/c/cpp codegen.

We will have a FlagProvider struct that has flag methods implementation.
This flag provider instance can then be used in injection pattern. In
additon, we also generate top level functions that wraps around flag
provider call so it can be used in static function style.

Things to be decided later:

should we just generate one set of code, and use cfg! as compile
time marco to compile the right code for the right targets.

Bug: b/279483360
Test: atest aconfig.test
Change-Id: Ic75cedbd0d27b5242014c3ac7fc80692d2ab4589
2023-07-18 20:14:46 +00:00
Dennis Shen
01332169f3 Merge "Minor c/c++ codegen update" into main 2023-07-17 12:58:23 +00:00
Justin Yun
22ce9479be Disable copying images for target_files.zip
For the OTA build, target_files.zip requires setting fixed timestamp
for images. However, it caused regression on 'adb sync'.
Restoring image build process for target_files.zip instead of copying
them from the PRODUCT_OUT, only the images in target_files.zip set the
fixed timestamp.
By setting COPY_IMAGES_FOR_TARGET_FILES_ZIP flag, we still may copy
the images for target_files.zip for future use.

Bug: 287534409
Test: m; flashall; adb sync
Test: m dist; flash images from target_files.zip and check the timestamp
Change-Id: I4135eb721c33581f191621847e6595833263d707
2023-07-17 07:46:48 +09:00
Dennis Shen
5c2421394c Minor c/c++ codegen update
1, Moved "#include <string>" from exported header to test flag provider
header file.

2, For production target and read only flags, the generated c
api should just return default value instead of calling into c++ api

3, Remove using namespace server_configurable_flags from header, instead
of just having the namespace to be spelled out in each api call. Having
using namespace xxx in header is not a c++ best practice.

4, Replace #ifdef #def #endif with #pragma once

Bug: b/279483801
Test: atest aconfig.test
Change-Id: I3e55a7b14301f3de419795467f33e2dc889d371e
2023-07-14 16:09:35 +00:00
Dennis Shen
17a08eeca0 aconfig: update c/c++ codegen
Two major changes to c/c++ codegen

(1) explicit setter for each flag instead of a generic flag setter
void override_flag(std::string name, bool val) is replaced with

void <flag name>(bool val) for each flag name

This has several advantages:
  (a) generated code is more c++ idomatic
  (b) no longer need to create flag name string constants
  (c) any typo in the code is caught early in the build time

(2) remove flag setter and flag override reset methods/functions when
generating code targets for production. If developers want to update
their main function to take command line arg for flag overrides, they
can use compile time macros to decide if the flag override code should
be included.

Bug: b/279483801
Test: atest aconfig.test
Change-Id: I6141f7f979b32fe0426154d578edeb997ae5ff7c
2023-07-14 11:40:49 +00:00
Dennis Shen
7321f4f6f1 aconfig: add c codegen
c codegen can be done at the same time with cpp codegen, the idea is to
create a c compatible header that defines the flag apis, including flag
override apis for test. then in the corresponding cpp file, the
implementation simply calls into cpp api.

c header supports static method interface, and unit test override, but
it does not support injection pattern compared to cpp header

Bug: b/279483801
Test: atest aconfig.test
Change-Id: Ie62b76d6524e443de5d3c2f9000f7f66623ab571
2023-07-13 13:55:06 +00:00
Tiffany Yang
b8306086d3 Merge "Make common signature system property definitions optional" into main 2023-07-12 18:35:37 +00:00
Cole Faust
f5350e965b Merge "Remove BOARD_BPT* variables and the bpt parition table image" into main 2023-07-12 01:26:51 +00:00
Cole Faust
4f3dc8759f Remove BOARD_BPT* variables and the bpt parition table image
These variables appear to never be set.

Test: Presubmits
Change-Id: If4b89376f73204ad5780dff421f1216da255c3eb
2023-07-11 16:58:06 -07:00
Tiffany Yang
19450e3a0b Make common signature system property definitions optional
This change allows ARC to define ARC-specific system properties in
Android build without changing these property definitions for other
Android builds. Please see go/arc-sigprop-changes and
go/arc-android-sigprop-sync for additional details.

Bug: 195609932
Test: built bertha_x86_64 with forward declarations
Change-Id: I22bd9d60c2491506fe5c633dbbb9e7516f529b35
2023-07-11 22:40:19 +00:00
Kelvin Zhang
f3f6d0569b Merge "Mark extracted files as executable" into main 2023-07-11 17:39:31 +00:00
Elliott Hughes
c1577ff58b Merge "Switch from minigzip to gzip." into main 2023-07-11 15:52:27 +00:00
Kelvin Zhang
4cb28f6f80 Mark extracted files as executable
Python's zipfile doens't restore file permission by default, so we need
to manually restore permission.

Test: th
Bug: 290643514
Change-Id: I89c1e2ee178b534fa7e3f02afd04d170100d37e7
2023-07-10 13:03:07 -07:00
Dennis Shen
e398144643 aconfig: cpp codegen update: Move server_configurable_flags header include
Move server_configurable_flags header include away from exported header,
instead put it in the flag provider headers. Otherwise, it can cause
compilation error if the source code who wants to use the generated c flag lib has
not added dependency on server_configurable_flags yet.

Bug: b/279483801
Test: atest aconfig.test
Change-Id: Ib75877ee88f995caf72b3fd2554c3da195032c14
2023-07-10 18:19:44 +00:00
Mårten Kongstad
206a382d4e aconfig: improve duplicate flags error message: include paths
Improve the error message returned when `aconfig dump` is fed multiple
declarations of the same flag: include the paths to the declaration
files.

In general all error messages from the protos::*::verify_* functions
should include paths to the offending files. This will be handled in a
follow-up CL.

Bug: 290300657
Test: atest aconfig.test
Test: manual: add duplicate flag and run `m all_aconfig_declarations`, inspect error message
Change-Id: I46dc23f7128dd5c68ced9f2e8518cfa89d81c2df
2023-07-07 08:52:52 +02:00
Wenshan Fu
a2d93ae1eb Merge "aconfig: create java libraries for aconfig proto" 2023-07-06 01:51:08 +00:00
Dennis Shen
8d544f7439 cpp codegen redesign, unit test support
cpp codegen iteration 2, based on discussions with three internal teams
that use c++. Refer to the design doc "aconfig c++ codegen" for detailed
design. At a high level, we generate two sets of code artifacts with the
same signatured api: one for production that without any local flag
override capability, one for unit test that allows local flag overrides.
It supports static methods style interface as well as injection pattern.

Refer to the test points in the codegen_cpp.rs for examples of generated
code.

for production target codegen: aconfig create-cpp-lib --cache <cache> --out <out dir>
for test target codegen: aconfig create-cpp-lib --cache <cache> --out
<out dir> --mode test

Bug: b/279483801
Test: atest aconfig.test
Change-Id: I92fefb9623d5435525339a74f57bbd36d0afef08
2023-07-05 14:05:44 +00:00
Wenshan Fu
89467c3109 aconfig: create java libraries for aconfig proto
Host side test infra needs the library to consume the dumped flags info
generated by aconfig.

Test: m libaconfig_java_proto_lite libaconfig_java_proto_full
Bug: 289906970
Change-Id: I9891cb8445b90f7269e0c679ceaae6bc102bbb0c
2023-07-05 13:57:19 +00:00
Wenshan Fu
e0b709b9a6 Merge "Create the TEST_MAPPING file" 2023-07-04 00:44:05 +00:00
Zhi Dou
7734879e69 Merge changes I4bf1d3ba,I33605054
* changes:
  aconfig: Add resetAll method to test mode FeatureFlagsImpl
  aconfig: remove extra new lines and spaces in generated java code
2023-06-30 13:23:28 +00:00
Treehugger Robot
32efc846f5 Merge "Add --classes optional flag in list_files" 2023-06-30 09:36:42 +00:00
Wenshan Fu
13be0a5f98 Create the TEST_MAPPING file
Add FlagAnnotationTests in presubmit to ensure that test filtering rule
always works as expected.

Test: atest --test-mapping
Bug: 277819423
Change-Id: I7cc3a70495f8d62ed7a5b26edc4fd240e73ccf61
2023-06-30 03:28:02 +00:00
Zhi Dou
8d27cc39b1 aconfig: Add resetAll method to test mode FeatureFlagsImpl
Add resetAll method to test mode FeatureFlagsImpl. This method
is used to reset all the flags values to null. It provides convenient
way to the test tools to reset the flags values.

Bug: 280833463
Test: atest aconfig.test
Change-Id: I4bf1d3ba69ee106ef8d0c1cc62c00bbeca1b72aa
2023-06-29 15:15:32 +00:00
Zhi Dou
a41cc5ecf9 aconfig: remove extra new lines and spaces in generated java code
Change the java template to remove the extra new lines and spaces
in generated java code.

Bug: 280833463
Test: atest aconfig.test
Change-Id: I336050540f8a2b0966bf21cf6e034a8fa701458e
2023-06-29 15:05:18 +00:00
Mårten Kongstad
19776d19e6 aconfig: package fields must contain at least one dot char
Introduce a new requirement on package fields: a package must contain at
least one dot character.

Bug: 289336036
Test: atest aconfig.test
Change-Id: Idadcd2a76783a484cc5c6d6e94778c0248fa475f
2023-06-29 10:38:02 +02:00
Mårten Kongstad
c0d618c3a4 aconfig: fix incorrect check in create_device_config_ident
Use is_valid_name_ident to check the flag name, not
is_valid_package_ident.

Bug: 283910447
Test: atest aconfig.test
Change-Id: I3718e7de565b975a1696190e8effbcb077e5fde2
2023-06-29 10:18:20 +02:00
Mårten Kongstad
60ee8a633f aconfig: improve package identifier test readability
Rearrange the tests in test_is_valid_package_ident to make it more
apparent what constitutes a valid package pattern, and what doesn't.

Bug: 283910447
Test: atest aconfig.test
Change-Id: I3d2b87aed008d0ed3a0aa6e483e655178dda7277
2023-06-29 10:03:38 +02:00
Treehugger Robot
0dc5eeaaca Merge "Make test more deterministic by setting search_path to None" 2023-06-28 22:28:28 +00:00
Jooyung Han
c269ec3538 Merge changes from topic "apexd_host"
* changes:
  Use apexd_host for host-side APEX extraction
  Deprecate flattened apexes
2023-06-28 17:36:15 +00:00
Kelvin Zhang
03dc6ee96f Make test more deterministic by setting search_path to None
Test: th
Bug: 2640751
Change-Id: I9779dfa40c1e8319cb67ae0928c977f5a10cda5f
2023-06-28 10:10:39 -07:00
Zhi Dou
514f99b205 Merge "aconfig: add java codegen test mode" 2023-06-28 13:01:01 +00:00
Treehugger Robot
59f99b31eb Merge "Fix test flake" 2023-06-28 01:18:55 +00:00
Elliott Hughes
97ad120adb Switch from minigzip to gzip.
Bug: http://b/288169261
Test: treehugger
Change-Id: I404cbcb850734ed8291c2215a4329fb372806d63
2023-06-27 15:39:05 -07:00
Zhi Dou
8ba6aa71b1 aconfig: add java codegen test mode
Add java codegen test mode. The test mode will generate Flags.java and
FeatureFlagsImpl.java differently.
    * Flags.java will have getter and setter function to switch the
      FeatureFlagsImpl. Flags.java will not initialize the instance
      of FeatureFlagsImpl during initialization, thus it will force the
      user to set up the flag values for the tests.
    * FeatureFlagsImpl removes the dependency on DeviceConfig, and
      allows the caller to set the values of flags.

Command changes
This change adds a new parameter `mode` to `create-java-lib` subcommand.
The default value of `mode` is production, which will generate files for
production usage, and keeps the same behavior as before.

The new `mode` test is added to trigger the test mode. The command is
aconfig create-java-lib --cache=<path_to_cache> --out=<out_path>
--mode=test

Test: atest aconfig.test
Bug: 288632682
Change-Id: I7566464eb762f3107142fe787f56b17f5be631b7
2023-06-27 18:57:35 +00:00
Kelvin Zhang
97a5afe0f3 Fix test flake
Test: th
Bug: 289013326
Change-Id: Ib233978ff861b010bdc3bd1a02ea9baefe6a3489
2023-06-27 10:30:48 -07:00
Jooyung Han
c9542abbbd Use apexd_host for host-side APEX extraction
Host-side simulation of APEX activation is done by a new tool
'apexd_host'. This simplies checkvintf invocation for local builds and
for target-files.

For local builds, checkvintf no londer depends on $OUT/apex, a flattened
view of APEXes. In fact, the build system doesn't need to install
$OUT/apex. They are installed for now only for its side-effect of
installing symbol files. We'd better not rely on $OUT/apex.

For target-files, scanning/activating apexes are extracted and moved to
the new tool. Now check_target_files_vintf is not more efficient because
it doesn't copy .apex files to a temporary directory.

Bug: 260358957
Bug: 288826922
Test: m (running checkvintf) # for local builds
Test: m target-files-package && check_garget_files_vintf target-files.zip
Test: atest releasetools_test
Change-Id: Iba23f429d96f9ec31814196aa14bdbb800649218
2023-06-27 17:00:06 +09:00
Jihoon Kang
c8e1d69687 Add --classes optional flag in list_files
The flag enables list_files to output a list of .class files pattern
that will be generated when compiling the java files in the input
directory. The flag can be used to extract the appropriate class files
from stub jar file provided via dep_api_srcs in per api scope
sdk_library generated java_api_library modules.

Test: m --build-from-text-stub in same topic
Bug: 275570206
Change-Id: I134fcd9781024dcb6781297d02645f5fb9befb18
2023-06-27 04:46:50 +00:00
Jooyung Han
2ac1f2fabc Deprecate flattened apexes
Flattened apexes are deprecated. mege_dexopt does not need to care about
flattened apexes.

Bug: 278826656
Test: m otapackage
Change-Id: I527eed64c5f1a7466e2c48d73360f47f6cfa0911
2023-06-27 13:01:56 +09:00
Xin Li
24c928cda8 Merge "Merge Android 13 QPR3" 2023-06-26 22:29:55 +00:00
Mårten Kongstad
3228b29cac aconfig: add dump --format=textproto
Teach `aconfig dump` to print its as text protobuf.

Bug: 288713733
Test: atest aconfig.test aconfig.test.java
Change-Id: Id31ce53226162a563fbe2d4841a8f6cf96c22436
2023-06-26 10:17:42 +02:00
Mårten Kongstad
37cb74b3e4 Merge "aconfig: add proto bug field" 2023-06-26 06:27:48 +00:00
Joe Onorato
4a80353011 Merge "Rename device_config --> aconfig and definitions --> declarations" am: 9ccb457588 am: 958b906ed8 am: a83f50d161
Original change: https://android-review.googlesource.com/c/platform/build/+/2633872

Change-Id: If9360ebd0acebe85f42f89a268c316d51c765708
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-22 15:36:36 +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
958b906ed8 Merge "Rename device_config --> aconfig and definitions --> declarations" am: 9ccb457588
Original change: https://android-review.googlesource.com/c/platform/build/+/2633872

Change-Id: I0cb0c21ac2df9a34caf4e82346007674f49c97d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-22 14:10:22 +00:00
Joe Onorato
9ccb457588 Merge "Rename device_config --> aconfig and definitions --> declarations" 2023-06-22 13:30:53 +00:00
Treehugger Robot
767b6bc6e8 Merge "Handle symlinks when extracting zipfiles" am: 0e5e1749bb am: f6399f8b17 am: 444bb1c08e
Original change: https://android-review.googlesource.com/c/platform/build/+/2632808

Change-Id: Iaa75915a875a76df5d654cc60001dce4a52ad6d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-22 03:59:23 +00:00
Treehugger Robot
f6399f8b17 Merge "Handle symlinks when extracting zipfiles" am: 0e5e1749bb
Original change: https://android-review.googlesource.com/c/platform/build/+/2632808

Change-Id: I4316f46baf8d79390a892c1391b89ea50487e4e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-22 02:29:29 +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
Mårten Kongstad
2302e3c4be Merge "aconfig: make proto fields optional" am: a3b0027fdb am: 0201a71f0c am: a34196902b
Original change: https://android-review.googlesource.com/c/platform/build/+/2627237

Change-Id: I6c0d6c0195b41a71c5f8cb9701784e55ae2ef9f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 21:34:06 +00:00
Mårten Kongstad
0201a71f0c Merge "aconfig: make proto fields optional" am: a3b0027fdb
Original change: https://android-review.googlesource.com/c/platform/build/+/2627237

Change-Id: I697af95c091cf919fe0f094c03d83f99834d4ad0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 20:05:02 +00:00
Zhi Dou
5ace4a9cc3 Merge "aconfig: generate Java flag name constants" am: cff292f8b2 am: 1f7e9252ed am: 6b29eed1a1
Original change: https://android-review.googlesource.com/c/platform/build/+/2611170

Change-Id: I72c9c984f1e5f7380e027c6e6ada23c333a296a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 18:58:44 +00:00