Commit graph

96318 commits

Author SHA1 Message Date
Dennis Shen
760d21d991 Merge "aconfig: update aconfig_storage_file crate" into main 2024-03-08 13:33:37 +00:00
Treehugger Robot
318d87ef8d Merge "aflags: list flags as "enabled|disabled" instead of raw bool value" into main 2024-03-08 12:52:11 +00:00
Mårten Kongstad
f0c594d66d aflags: list flags as "enabled|disabled" instead of raw bool value
To keep things consistent and to reduce the risk of confusion, aconfig
flags are "enabled" or "disabled", not "true" or "false".

Do not represent flag states via a String. Instead, introduce a new
FlagValue enum and use this enum instead. FlagValue implements ToString
which returns "enabled" or "disabled".

Bug: N/A
Test: adb shell aflags list # verify that flags are "enabled" or "disabled"
Test: atest aflags.test
Change-Id: I9be998d7891656d118b7cc971449da58e17d5031
2024-03-08 10:27:14 +01:00
Jooyung Han
b8fef6528e Merge "checkvintf with all apexes" into main 2024-03-08 00:50:22 +00:00
Zhi Dou
5f1a854b11 Merge "aconfig_proto: add document for container filed" into main 2024-03-07 19:42:56 +00:00
Treehugger Robot
a0a131aa3d Merge "aflags: remove unnecessary String conversions" into main 2024-03-07 16:17:05 +00:00
Treehugger Robot
53a37549e7 Merge "aflags: list: merge package and name into fully qualified name" into main 2024-03-07 15:45:46 +00:00
Dennis Shen
12705d46be aconfig: update aconfig_storage_file crate
Add android.bp target for the binary. Change the binary name to
aconfig-storage. And a number of small updates.

Bug: b/321077378
Test: m aconfig-stoarge; atest aconfig_storage_file.test
Change-Id: I9f560a031433407800ded1c2f4f2bdab459f5df7
2024-03-07 15:03:27 +00:00
Mårten Kongstad
b47f7bae6d aflags: remove unnecessary String conversions
Reduce the number of allocations by removing superfluous calls to
to_string: use a &str where possible, and avoid converting a String to a
String.

Bug: N/A
Test: adb shell aflags list
Change-Id: I373018e9ecb393137d11e039ca2c73c0ca5308d7
2024-03-07 15:29:00 +01:00
Mårten Kongstad
d408e96505 aflags: list: merge package and name into fully qualified name
Print the fully qualified name instead of splitting flag package and
flag name into separate columns. This aligns the output with the
expected input to `aflags enable <fully-qualified-name>` and makes it
easier to copy-and-paste the flag names.

Before this change:

  $ adb shell aflags list | head -n4
  android.app.admin.flags                   cross_user_suspension_enabled                                              false default read-write system
  android.app.admin.flags                   dedicated_device_control_enabled                                           false default read-write system
  android.app.admin.flags                   device_policy_size_tracking_enabled                                        false default read-write system
  android.app.admin.flags                   dumpsys_policy_engine_migration_enabled                                    false default read-write system

After this change:

  $ adb shell aflags list | head -n4
  android.app.admin.flags.cross_user_suspension_enabled                                                           false default read-write system
  android.app.admin.flags.dedicated_device_control_enabled                                                        false default read-write system
  android.app.admin.flags.device_policy_size_tracking_enabled                                                     false default read-write system
  android.app.admin.flags.dumpsys_policy_engine_migration_enabled                                                 false default read-write system

Bug: N/A
Test: adb shell aflags list
Change-Id: I3227c9c9c7355b5b0c1b75ada73b1a8f87d1be55
2024-03-07 14:58:14 +01:00
Treehugger Robot
7254e18aba Merge "aconfig: remove reference to non-existent workspace member "aconfig_storage_write_api"" into main 2024-03-07 12:27:37 +00:00
Jooyung Han
9738259f3e checkvintf with all apexes
Previously, checkvintf read only vendor apexes. Now, we support vintf
from other apexes.

Bug: 327365139
Test: m check-vintf-all
Change-Id: I46dc04ccdbe7d3f035ea9f63b1e45358ab31021b
2024-03-07 17:32:09 +09:00
Mårten Kongstad
2243581535 aconfig: remove reference to non-existent workspace member "aconfig_storage_write_api"
Commit bca2f3c28c incorrectly added "aconfig_storage_write_api" as a
workspace member even though that project has not yet been created. This
broke cargo.

Unbreak cargo by removing "aconfig_storage_write_api".

Bug: N/A
Test: croot build/make/tools/aconfig && cargo c
Change-Id: Ic0f71a53d49736228a376f64808aea24c2ec8ce5
2024-03-07 09:18:33 +01:00
Xin Li
85acebd157 Merge "Merge Android 14 QPR2 to AOSP main" into main 2024-03-07 06:41:05 +00:00
Treehugger Robot
c045176ceb Merge "aconfig: move aconfig_storage_metadata proto and its apis to aconfig_storage_file crate" into main 2024-03-07 02:00:15 +00:00
Dennis Shen
bca2f3c28c aconfig: move aconfig_storage_metadata proto and its apis to
aconfig_storage_file crate

Bug: b/321077378
Test: m aconfig_storage_file.test; m aconfig_storage_read_api.test
Change-Id: Ifeeeff62dc09e172b7e88c45860d2febccc29570
2024-03-06 22:05:02 +00:00
Dennis Shen
0329cda73e Merge "aconfig: create aconfig_storage_file binary to print the storage files" into main 2024-03-06 20:51:04 +00:00
Dennis Shen
190304985c aconfig: create aconfig_storage_file binary to print the storage files
To help debug storage files. We need a binary to parse the storage
binary files and print out the flag values like device_config list
command. In addition, aconfig_storage_file needs to provide a public api
to allow flag cli to call to get the flag values. Therefore creating
this change.

This change includes the following changes:

1, Implement debug print trait for package table, flag table, and flag
value struct. So the debug dump is more readable.

2, Add a list flag api to create a vector of flag name and value tuples
given the storage file names. This api will be used by
aconfig_storage_file binary as well as aconfig flag cli.

3, Add a main.rs to create aconfig_storage_file binary to debug print
storage files or list all the flags in storage files. It has two
subcommands.

3.1 print command:
aconfig_storage_file print --file <storage file> --type
<package_map|flag_map|flag_val>

This command produce a debug print of a single the storage file content

3.2 list command:
aconfig_storage_file list --package_map <package map file> --flag_map
<flag map file> --flag_val <flag value file>

This command parses all storage files to print out list of flag values
in the following form:

<package>/<flag>, <value>
...
<package>/<flag>, <value>

Bug: b/321077378
Test: manual test of the binary command
Change-Id: I000e216d13854f853cbd9b63cabb6db3a47dbece
2024-03-06 17:46:18 +00:00
Xin Li
c15eb7d5c3 Merge Android 14 QPR2 to AOSP main
Bug: 319669529
Merged-In: Icb3c8a629adb2b19e700af8c1a92cb1892ba2ca4
Change-Id: If96d30d00973a86cf05ee2f063607ca486005b01
2024-03-06 09:29:45 -08:00
Zhi Dou
2d2610c787 aconfig_proto: add document for container filed
Test: n/a
Bug: 328027300
Change-Id: Ieec2c24cb9024f429fcd7888ef6c7c89d212ff63
2024-03-06 15:36:34 +00:00
Dennis Shen
cdde8f39f8 Merge "aconfig: add a storage file read api to get file version number" into main 2024-03-06 13:39:23 +00:00
Clinton Ke
8a65d66269 Merge "Revert "Move frameworks/base/Android.mk to build/tasks"" into main am: 3ac6614666
Original change: https://android-review.googlesource.com/c/platform/build/+/2990390

Change-Id: Icb3c8a629adb2b19e700af8c1a92cb1892ba2ca4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-06 04:21:11 +00:00
Clinton Ke
3ac6614666 Merge "Revert "Move frameworks/base/Android.mk to build/tasks"" into main 2024-03-06 03:47:30 +00:00
Nelson Li
3c3a6ab8d7 Revert "Move frameworks/base/Android.mk to build/tasks"
Revert submission 2988149-framework_library

Reason for revert: Broken build 11534795 on git_aosp-main-future on sdk-next-userdebug

Reverted changes: /q/submissionid:2988149-framework_library

Change-Id: I065ac8d664cc0e508c849c49e95a52b49d423083
Bug: 328325889
Bug: 328326210
2024-03-06 03:35:37 +00:00
Treehugger Robot
2aba12de46 Merge "set exportable to true for aconfig.test.exported.flags" into main am: 07c3faa081
Original change: https://android-review.googlesource.com/c/platform/build/+/2989250

Change-Id: Ie190e7663df84fd652b24cd94f67f81ceebef3fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-06 01:48:48 +00:00
Treehugger Robot
9b3e3df245 Merge "Move frameworks/base/Android.mk to build/tasks" into main am: fa31735f7f
Original change: https://android-review.googlesource.com/c/platform/build/+/2988149

Change-Id: Ie4671e24d218d748ec4dd3fbb6842cebcf214d2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-06 01:28:06 +00:00
Treehugger Robot
07c3faa081 Merge "set exportable to true for aconfig.test.exported.flags" into main 2024-03-06 01:10:49 +00:00
Treehugger Robot
fa31735f7f Merge "Move frameworks/base/Android.mk to build/tasks" into main 2024-03-06 01:10:10 +00:00
Daniel Zheng
694d3438f9 Merge "Turn on V3 cow" into main am: c09a15f81f
Original change: https://android-review.googlesource.com/c/platform/build/+/2973761

Change-Id: I75c1d1ed70edcc249de967553de52522342b195a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-06 00:36:59 +00:00
Ted Bauer
68d7013eb0 Merge "aflags: add initial enable and disable commands" into main am: ee09882e54
Original change: https://android-review.googlesource.com/c/platform/build/+/2986374

Change-Id: I0607dfaa51a7b072eee85028afc1e46c145a1f3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 23:15:51 +00:00
Daniel Zheng
c09a15f81f Merge "Turn on V3 cow" into main 2024-03-05 23:04:46 +00:00
Zhi Dou
8320380d55 set exportable to true for aconfig.test.exported.flags
Test: m aconfig_test_java_library_exported
Bug: 310504781
Change-Id: Ib405febc739c49dff7340d43c65a7ec2b314d7de
2024-03-05 22:27:09 +00:00
Ted Bauer
ee09882e54 Merge "aflags: add initial enable and disable commands" into main 2024-03-05 22:23:57 +00:00
Elliott Hughes
b63961ff53 Merge "fs_config: remove -S option." into main am: a5c7819b34
Original change: https://android-review.googlesource.com/c/platform/build/+/2987371

Change-Id: I80d0ba528dedf8ce461e6d2f04c8a62484057583
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 21:06:17 +00:00
Elliott Hughes
a5c7819b34 Merge "fs_config: remove -S option." into main 2024-03-05 20:05:16 +00:00
Daniel Zheng
7102baaf65 Turn on V3 cow
On all api levels shipping higher than 34 (pixel 8), we want to enable
v3 cow version of the cow format

We need to make this change in product_config.mk since PRODUCT variables
have special interactions with inherit-product. PRODUCT_SHIPPING_API_LEVEL
is defined in device.mk and is unavailable to the parent makefile
(PRODUCT vars are cleared at the beginning of makefiles?).
Having the fallback vabc_cow_version in this file allows us to avoid the
hack below (we would have to modify each device.mk to add a temporary variable)

alternate solution:

We have to create a new variable SHIPPING_API_LEVEL that is a duplicate
of PRODUCT_SHIPPING_API_LEVEL. This is a hack to workaround the
inheritance flow (since vabc_features.mk -> android_t_baseline.mk ->
device.mk).This hack allows this variable to be seen by the parent
.mk file

Bug: 313962438
Test: u->v upgrade path for pixel 8.  v->u dowgrade path for pixel 8
Change-Id: I6e1480e461c20a2fb07c5339828df0e6f6c0f9ec
2024-03-05 12:01:05 -08:00
Ted Bauer
84883bd7a4 aflags: add initial enable and disable commands
Bug: 324436145
Test: adb shell aflags enable --help
Change-Id: I6b4af4bccbbc6000a9dcb78c3130f836b0f85bd0
2024-03-05 19:33:39 +00:00
Aditya Kumar
0553f97a63 Merge "Add CLANG_EXTERNAL_CFLAGS to both vendor and hardware directories" into main am: 9aa1265fbe
Original change: https://android-review.googlesource.com/c/platform/build/+/2947150

Change-Id: I2e7fafb70581996d3446ac8c99c2bf79df30dd70
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 18:34:08 +00:00
Aditya Kumar
9aa1265fbe Merge "Add CLANG_EXTERNAL_CFLAGS to both vendor and hardware directories" into main 2024-03-05 17:50:10 +00:00
Dennis Shen
f7330f24da Merge "aconfig: split aconfig_storage_file crate" into main am: c54c841ebe
Original change: https://android-review.googlesource.com/c/platform/build/+/2987509

Change-Id: Icd73e095202474cc0eb6001bb0d8cacee720a1f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 16:47:40 +00:00
Dennis Shen
05cf662dbe aconfig: add a storage file read api to get file version number
1, Add unit tests in aconfig_storage_file crate to lock down that the
first four bytes of serialized storage files must be the version number.

2, Add a storage file read api to read version number directly from a
file without mmapping the file. This api is need by aconfig storage
daemon.

3, Update integration tests (rust and c++) to include this api.

Bug: b/321077378
Test: atest aconfig_storage_file; atest aconfig_storage_read_api; atest
aconfig_storage_read_api.test.rust; atest
aconfig_storage_read_api.test.cpp

Change-Id: I432893d43895ad5022fcb614aa14de89acd9d220
2024-03-05 16:18:12 +00:00
Dennis Shen
c54c841ebe Merge "aconfig: split aconfig_storage_file crate" into main 2024-03-05 15:57:00 +00:00
Zhi Dou
ad18d1f1a6 Merge "printflags: print flags declared in mainline module" into main am: 040dc611f3
Original change: https://android-review.googlesource.com/c/platform/build/+/2986754

Change-Id: I233f6a70616d76febca470c79c097d856ceebbc6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 15:22:01 +00:00
Zhi Dou
040dc611f3 Merge "printflags: print flags declared in mainline module" into main 2024-03-05 14:49:34 +00:00
Treehugger Robot
099634c3a9 Merge "Resign microdroid_vendor.img with avb_vendor_key" into main am: ee7dbd22dd
Original change: https://android-review.googlesource.com/c/platform/build/+/2972993

Change-Id: I1ec8cfaf769262592eada695b788c1f668edc55d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 11:44:08 +00:00
Treehugger Robot
ee7dbd22dd Merge "Resign microdroid_vendor.img with avb_vendor_key" into main 2024-03-05 10:55:45 +00:00
Nelson Li
589e3bc83c Move frameworks/base/Android.mk to build/tasks
1. Move the work of `declare-1p-copy-files` to `meta-lic.mk`.
2. Remove `$(LOCAL_PATH)/pathmap.mk` because the variables defined in
   it are no longer used.
3. The variable `ONE_SHOT_MAKEFILE` is deprecated and can be removed
   directly.
4. Move the main work of generating the targets `docs`,
   `offline-sdk-docs`, and `framework-doc-stubs` to
   `framework_library.mk`. Because Soong cannot specify the output
   to paths such as `$(OUT_DOCS)/` and
   `framework-doc-stubs-metadata_intermediates/`.
5. `ANDROID_BUILD_EMBEDDED` can theoretically be removed because the
   `.mk` files that use this variable are not currently in use, but
   since it involves many other files that are unrelated to this task,
   the work of removing this variable will be moved to other changes.

Bug: 322732227
Test: m docs offline-sdk-docs framework-doc-stubs
Change-Id: Ie51dbf88c78861fc60c6ba9c40542455e4cd4f55
2024-03-05 03:51:49 +00:00
Treehugger Robot
6215f7a4ed Merge "Enable the soong config namespace "camera" for all products" into main am: 8a93c78572
Original change: https://android-review.googlesource.com/c/platform/build/+/2984156

Change-Id: I96a21340ba4495a848820d24dea12cbecdc2a59e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 03:18:18 +00:00
Treehugger Robot
8a93c78572 Merge "Enable the soong config namespace "camera" for all products" into main 2024-03-05 02:48:25 +00:00
Herbert Xue
88bf02e7ee Enable the soong config namespace "camera" for all products
Bug: 327089038
Test: m google-camera-app-helper-prebuilt
Change-Id: If95c4c8be28295359c09aeb5d9ead1067e2da5ff
2024-03-05 10:45:05 +08:00