Merge "Revert "Add libcgrouprc to multilib.both.deps"" into main
diff --git a/ci/build_metadata b/ci/build_metadata
index a8eb65d..cd011c8 100755
--- a/ci/build_metadata
+++ b/ci/build_metadata
@@ -20,6 +20,9 @@
export TARGET_RELEASE=trunk_staging
export TARGET_BUILD_VARIANT=eng
-build/soong/bin/m dist \
+TARGETS=(
all_teams
+ release_config_metadata
+)
+build/soong/bin/m dist ${TARGETS[@]}
diff --git a/core/Makefile b/core/Makefile
index 96d0357..81ae6f7 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -3567,14 +3567,24 @@
file_list_diff := $(HOST_OUT_EXECUTABLES)/file_list_diff$(HOST_EXECUTABLE_SUFFIX)
system_file_diff_timestamp := $(systemimage_intermediates)/file_diff.timestamp
+# The build configuration to build the REL version may have more files to allow.
+# Use allowlist_next in addition to the allowlist in this case.
+system_file_diff_allowlist_next :=
+ifeq (REL,$(PLATFORM_VERSION_CODENAME))
+system_file_diff_allowlist_next := $(ALL_MODULES.system_image_diff_allowlist_next.INSTALLED)
+$(system_file_diff_timestamp): PRIVATE_ALLOWLIST_NEXT := $(system_file_diff_allowlist_next)
+endif
$(system_file_diff_timestamp): \
$(systemimage_intermediates)/file_list.txt \
$(ALL_MODULES.$(PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE).FILESYSTEM_FILELIST) \
$(ALL_MODULES.system_image_diff_allowlist.INSTALLED) \
+ $(system_file_diff_allowlist_next) \
$(file_list_diff)
$(file_list_diff) $(systemimage_intermediates)/file_list.txt \
$(ALL_MODULES.$(PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE).FILESYSTEM_FILELIST) \
- $(ALL_MODULES.system_image_diff_allowlist.INSTALLED) $(PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE)
+ $(PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE) \
+ --allowlists $(ALL_MODULES.system_image_diff_allowlist.INSTALLED) \
+ $(PRIVATE_ALLOWLIST_NEXT)
touch $@
$(BUILT_SYSTEMIMAGE): $(system_file_diff_timestamp)
@@ -4000,6 +4010,21 @@
$(filter $(TARGET_OUT_PRODUCT)/%,\
$(ALL_DEFAULT_INSTALLED_MODULES))
+# Install product/etc/linker.config.pb with PRODUCT_PRODUCT_LINKER_CONFIG_FRAGMENTS
+product_linker_config_file := $(TARGET_OUT_PRODUCT)/etc/linker.config.pb
+$(product_linker_config_file): private_linker_config_fragments := $(PRODUCT_PRODUCT_LINKER_CONFIG_FRAGMENTS)
+$(product_linker_config_file): $(INTERNAL_PRODUCTIMAGE_FILES) | $(HOST_OUT_EXECUTABLES)/conv_linker_config
+ @echo Creating linker config: $@
+ @mkdir -p $(dir $@)
+ @rm -f $@
+ $(HOST_OUT_EXECUTABLES)/conv_linker_config proto \
+ --source $(call normalize-path-list,$(private_linker_config_fragments)) \
+ --output $@
+$(call define declare-1p-target,$(product_linker_config_file),)
+INTERNAL_PRODUCTIMAGE_FILES += $(product_linker_config_file)
+ALL_DEFAULT_INSTALLED_MODULES += $(product_linker_config_file)
+
+
INSTALLED_FILES_FILE_PRODUCT := $(PRODUCT_OUT)/installed-files-product.txt
INSTALLED_FILES_JSON_PRODUCT := $(INSTALLED_FILES_FILE_PRODUCT:.txt=.json)
$(INSTALLED_FILES_FILE_PRODUCT): .KATI_IMPLICIT_OUTPUTS := $(INSTALLED_FILES_JSON_PRODUCT)
@@ -7975,9 +8000,14 @@
# Desktop pack update image hook.
ifneq (,$(strip $(PACK_DESKTOP_UPDATE_IMAGE)))
PACK_UPDATE_IMAGE_TARGET := $(PRODUCT_OUT)/android-desktop_update_image.bin
+PACK_UPDATE_IMAGE_ARGS := --noarchive --update
+
+ifneq (,$(strip $(PACK_UPDATE_IMAGE_EXPERIMENTAL)))
+PACK_UPDATE_IMAGE_ARGS += --experimental
+endif # PACK_UPDATE_IMAGE_EXPERIMENTAL
$(PACK_UPDATE_IMAGE_TARGET): $(IMAGES) $(PACK_IMAGE_SCRIPT)
- $(PACK_IMAGE_SCRIPT) --out_dir $(PRODUCT_OUT) --noarchive --update
+ $(PACK_IMAGE_SCRIPT) --out_dir $(PRODUCT_OUT) $(PACK_UPDATE_IMAGE_ARGS)
PACKED_UPDATE_IMAGE_ARCHIVE_TARGET := $(PACK_UPDATE_IMAGE_TARGET).gz
diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk
index f66bdd9..06dc54c 100644
--- a/core/android_soong_config_vars.mk
+++ b/core/android_soong_config_vars.mk
@@ -204,3 +204,7 @@
# Export target_board_platform to soong for hardware/google/graphics/common/libmemtrack:memtrack.$(TARGET_BOARD_PLATFORM)
$(call soong_config_set,ANDROID,target_board_platform,$(TARGET_BOARD_PLATFORM))
+
+# Export board_uses_scaler_m2m1shot and board_uses_align_restriction to soong for hardware/google/graphics/common/libscaler:libexynosscaler
+$(call soong_config_set_bool,google_graphics,board_uses_scaler_m2m1shot,$(if $(filter true,$(BOARD_USES_SCALER_M2M1SHOT)),true,false))
+$(call soong_config_set_bool,google_graphics,board_uses_align_restriction,$(if $(filter true,$(BOARD_USES_ALIGN_RESTRICTION)),true,false))
diff --git a/core/product.mk b/core/product.mk
index 93a656d..8fc40f8 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -422,8 +422,9 @@
# If true, the cgroup v2 hierarchy will be split into apps/system subtrees
_product_single_value_vars += PRODUCT_CGROUP_V2_SYS_APP_ISOLATION_ENABLED
-# List of .json files to be merged/compiled into vendor/etc/linker.config.pb
+# List of .json files to be merged/compiled into vendor/etc/linker.config.pb and product/etc/linker.config.pb
_product_list_vars += PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS
+_product_list_vars += PRODUCT_PRODUCT_LINKER_CONFIG_FRAGMENTS
# Whether to use userfaultfd GC.
# Possible values are:
diff --git a/core/project_definitions.mk b/core/project_definitions.mk
index 5728b67..184b03e 100644
--- a/core/project_definitions.mk
+++ b/core/project_definitions.mk
@@ -22,3 +22,6 @@
# Include definitions for prebuilt SDK, if present.
#
-include prebuilts/sdk/current/definitions.mk
+
+# SDV-specific config.
+-include system/software_defined_vehicle/platform/config.mk
diff --git a/core/soong_config.mk b/core/soong_config.mk
index 0421e19..aaeb70f 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -348,6 +348,8 @@
$(call add_json_list, ProductPropFiles, $(TARGET_PRODUCT_PROP))
$(call add_json_list, OdmPropFiles, $(TARGET_ODM_PROP))
+$(call add_json_str, ExtraAllowedDepsTxt, $(EXTRA_ALLOWED_DEPS_TXT))
+
# Do not set ArtTargetIncludeDebugBuild into any value if PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD is not set,
# to have the same behavior from runtime_libart.mk.
ifneq ($(PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD),)
@@ -364,6 +366,8 @@
$(call add_json_list, BoardAvbSystemAddHashtreeFooterArgs, $(BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS))
$(call add_json_bool, BoardAvbEnable, $(filter true,$(BOARD_AVB_ENABLE)))
+$(call add_json_str, AdbKeys, $(PRODUCT_ADB_KEYS))
+
$(call add_json_map, PartitionVarsForSoongMigrationOnlyDoNotUse)
$(call add_json_str, ProductDirectory, $(dir $(INTERNAL_PRODUCT)))
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index 563511f..74ed82d 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -504,6 +504,10 @@
unwind_reg_info \
unwind_symbols \
+# For Remotely Provisioned Certificate Processor
+PRODUCT_SYSTEM_PROPERTIES += \
+ remote_provisioning.use_cert_processor=false
+
# The set of packages whose code can be loaded by the system server.
PRODUCT_SYSTEM_SERVER_APPS += \
SettingsProvider \
diff --git a/target/product/generic/Android.bp b/target/product/generic/Android.bp
index bf82ff1..c14fa17 100644
--- a/target/product/generic/Android.bp
+++ b/target/product/generic/Android.bp
@@ -72,6 +72,10 @@
target: "/storage/self/primary",
name: "sdcard",
},
+ {
+ target: "/product/etc/security/adb_keys",
+ name: "adb_keys",
+ },
]
filegroup {
diff --git a/target/product/generic_system.mk b/target/product/generic_system.mk
index 0a09eb1..b9a623d 100644
--- a/target/product/generic_system.mk
+++ b/target/product/generic_system.mk
@@ -152,4 +152,5 @@
$(call require-artifacts-in-path, $(_my_paths), $(_my_allowed_list))
# Product config map to toggle between sources and prebuilts of required mainline modules
+PRODUCT_RELEASE_CONFIG_MAPS += $(wildcard build/release/gms_mainline/required/release_config_map.textproto)
PRODUCT_RELEASE_CONFIG_MAPS += $(wildcard vendor/google_shared/build/release/gms_mainline/required/release_config_map.textproto)
diff --git a/target/product/go_defaults.mk b/target/product/go_defaults.mk
index c928530..ccc4f36 100644
--- a/target/product/go_defaults.mk
+++ b/target/product/go_defaults.mk
@@ -18,6 +18,7 @@
$(call inherit-product, build/make/target/product/go_defaults_common.mk)
# Product config map to toggle between sources and prebuilts of required mainline modules
+PRODUCT_RELEASE_CONFIG_MAPS += $(wildcard build/release/gms_mainline_go/required/release_config_map.textproto)
PRODUCT_RELEASE_CONFIG_MAPS += $(wildcard vendor/google_shared/build/release/gms_mainline_go/required/release_config_map.textproto)
# Add the system properties.
diff --git a/target/product/gsi/Android.bp b/target/product/gsi/Android.bp
index 45ba143..f18f35a 100644
--- a/target/product/gsi/Android.bp
+++ b/target/product/gsi/Android.bp
@@ -46,3 +46,18 @@
installed_location: "etc/init/config",
symlink_target: "/system/system_ext/etc/init/config",
}
+
+// init.gsi.rc, GSI-specific init script.
+prebuilt_etc {
+ name: "init.gsi.rc",
+ src: "init.gsi.rc",
+ system_ext_specific: true,
+ relative_install_path: "init",
+}
+
+prebuilt_etc {
+ name: "init.vndk-nodef.rc",
+ src: "init.vndk-nodef.rc",
+ system_ext_specific: true,
+ relative_install_path: "gsi",
+}
diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk
index 36897fe..7291059 100644
--- a/target/product/gsi/Android.mk
+++ b/target/product/gsi/Android.mk
@@ -138,31 +138,3 @@
include $(BUILD_PHONY_PACKAGE)
-
-#####################################################################
-# init.gsi.rc, GSI-specific init script.
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := init.gsi.rc
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
-LOCAL_MODULE_CLASS := ETC
-LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_MODULE_RELATIVE_PATH := init
-
-include $(BUILD_PREBUILT)
-
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := init.vndk-nodef.rc
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
-LOCAL_MODULE_CLASS := ETC
-LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_MODULE_RELATIVE_PATH := gsi
-
-include $(BUILD_PREBUILT)
diff --git a/target/product/security/Android.bp b/target/product/security/Android.bp
index 0d7b35e..69d19a3 100644
--- a/target/product/security/Android.bp
+++ b/target/product/security/Android.bp
@@ -37,3 +37,7 @@
relative_install_path: "security",
filename: "otacerts.zip",
}
+
+adb_keys {
+ name: "adb_keys",
+}
diff --git a/target/product/security/Android.mk b/target/product/security/Android.mk
deleted file mode 100644
index 138e5bb..0000000
--- a/target/product/security/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-#######################################
-# adb key, if configured via PRODUCT_ADB_KEYS
-ifdef PRODUCT_ADB_KEYS
- ifneq ($(filter eng userdebug,$(TARGET_BUILD_VARIANT)),)
- include $(CLEAR_VARS)
- LOCAL_MODULE := adb_keys
- LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
- LOCAL_LICENSE_CONDITIONS := notice
- LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
- LOCAL_MODULE_CLASS := ETC
- LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/security
- LOCAL_PREBUILT_MODULE_FILE := $(PRODUCT_ADB_KEYS)
- include $(BUILD_PREBUILT)
- endif
-endif
diff --git a/tools/aconfig/aconfig_device_paths/Android.bp b/tools/aconfig/aconfig_device_paths/Android.bp
index dda7a55..bdf96ed 100644
--- a/tools/aconfig/aconfig_device_paths/Android.bp
+++ b/tools/aconfig/aconfig_device_paths/Android.bp
@@ -61,8 +61,12 @@
name: "libaconfig_java_host_device_paths_src",
srcs: ["src/HostDeviceProtosTemplate.java"],
out: ["HostDeviceProtos.java"],
- tool_files: ["partition_aconfig_flags_paths.txt"],
- cmd: "sed -e '/TEMPLATE/{r$(location partition_aconfig_flags_paths.txt)' -e 'd}' $(in) > $(out)",
+ tool_files: [
+ "partition_aconfig_flags_paths.txt",
+ "mainline_aconfig_flags_paths.txt",
+ ],
+ cmd: "sed -e '/TEMPLATE/{r$(location partition_aconfig_flags_paths.txt)' -e 'd}' $(in) > $(out).tmp && " +
+ "sed -e '/MAINLINE_T/{r$(location mainline_aconfig_flags_paths.txt)' -e 'd}' $(out).tmp > $(out)",
}
java_library_host {
diff --git a/tools/aconfig/aconfig_device_paths/mainline_aconfig_flags_paths.txt b/tools/aconfig/aconfig_device_paths/mainline_aconfig_flags_paths.txt
new file mode 100644
index 0000000..af73a84
--- /dev/null
+++ b/tools/aconfig/aconfig_device_paths/mainline_aconfig_flags_paths.txt
@@ -0,0 +1,20 @@
+"/apex/com.android.adservices/etc/aconfig_flags.pb",
+"/apex/com.android.appsearch/etc/aconfig_flags.pb",
+"/apex/com.android.art/etc/aconfig_flags.pb",
+"/apex/com.android.btservices/etc/aconfig_flags.pb",
+"/apex/com.android.cellbroadcast/etc/aconfig_flags.pb",
+"/apex/com.android.configinfrastructure/etc/aconfig_flags.pb",
+"/apex/com.android.conscrypt/etc/aconfig_flags.pb",
+"/apex/com.android.devicelock/etc/aconfig_flags.pb",
+"/apex/com.android.healthfitness/etc/aconfig_flags.pb",
+"/apex/com.android.ipsec/etc/aconfig_flags.pb",
+"/apex/com.android.media/etc/aconfig_flags.pb",
+"/apex/com.android.mediaprovider/etc/aconfig_flags.pb",
+"/apex/com.android.ondevicepersonalization/etc/aconfig_flags.pb",
+"/apex/com.android.os.statsd/etc/aconfig_flags.pb",
+"/apex/com.android.permission/etc/aconfig_flags.pb",
+"/apex/com.android.profiling/etc/aconfig_flags.pb",
+"/apex/com.android.tethering/etc/aconfig_flags.pb",
+"/apex/com.android.uwb/etc/aconfig_flags.pb",
+"/apex/com.android.virt/etc/aconfig_flags.pb",
+"/apex/com.android.wifi/etc/aconfig_flags.pb",
diff --git a/tools/aconfig/aconfig_device_paths/src/HostDeviceProtosTemplate.java b/tools/aconfig/aconfig_device_paths/src/HostDeviceProtosTemplate.java
index e2ad40a..e7d0a76 100644
--- a/tools/aconfig/aconfig_device_paths/src/HostDeviceProtosTemplate.java
+++ b/tools/aconfig/aconfig_device_paths/src/HostDeviceProtosTemplate.java
@@ -40,6 +40,10 @@
TEMPLATE
};
+ static final String[] MAINLINE_PATHS = {
+ MAINLINE_T
+ };
+
private static final String APEX_DIR = "/apex";
private static final String RECURSIVELY_LIST_APEX_DIR_COMMAND =
"shell su 0 find /apex | grep aconfig_flags";
@@ -55,7 +59,8 @@
String adbCommandOutput = adbCommandExecutor.executeAdbCommand(
RECURSIVELY_LIST_APEX_DIR_COMMAND);
- if (adbCommandOutput == null) {
+ if (adbCommandOutput == null || adbCommandOutput.isEmpty()) {
+ paths.addAll(Arrays.asList(MAINLINE_PATHS));
return paths;
}
diff --git a/tools/aconfig/aconfig_storage_file/tests/Android.bp b/tools/aconfig/aconfig_storage_file/tests/Android.bp
index 12e4aca..13d3214 100644
--- a/tools/aconfig/aconfig_storage_file/tests/Android.bp
+++ b/tools/aconfig/aconfig_storage_file/tests/Android.bp
@@ -10,10 +10,10 @@
"libbase",
],
data: [
- "package.map",
- "flag.map",
- "flag.val",
- "flag.info",
+ "data/v1/package.map",
+ "data/v1/flag.map",
+ "data/v1/flag.val",
+ "data/v1/flag.info",
],
test_suites: [
"device-tests",
@@ -35,10 +35,10 @@
test_config: "AndroidStorageJaveTest.xml",
sdk_version: "test_current",
data: [
- "package.map",
- "flag.map",
- "flag.val",
- "flag.info",
+ "data/v1/package.map",
+ "data/v1/flag.map",
+ "data/v1/flag.val",
+ "data/v1/flag.info",
],
test_suites: [
"general-tests",
diff --git a/tools/aconfig/aconfig_storage_file/tests/flag.info b/tools/aconfig/aconfig_storage_file/tests/data/v1/flag.info
similarity index 100%
rename from tools/aconfig/aconfig_storage_file/tests/flag.info
rename to tools/aconfig/aconfig_storage_file/tests/data/v1/flag.info
Binary files differ
diff --git a/tools/aconfig/aconfig_storage_file/tests/flag.map b/tools/aconfig/aconfig_storage_file/tests/data/v1/flag.map
similarity index 100%
rename from tools/aconfig/aconfig_storage_file/tests/flag.map
rename to tools/aconfig/aconfig_storage_file/tests/data/v1/flag.map
Binary files differ
diff --git a/tools/aconfig/aconfig_storage_file/tests/flag.val b/tools/aconfig/aconfig_storage_file/tests/data/v1/flag.val
similarity index 100%
rename from tools/aconfig/aconfig_storage_file/tests/flag.val
rename to tools/aconfig/aconfig_storage_file/tests/data/v1/flag.val
Binary files differ
diff --git a/tools/aconfig/aconfig_storage_file/tests/package.map b/tools/aconfig/aconfig_storage_file/tests/data/v1/package.map
similarity index 100%
rename from tools/aconfig/aconfig_storage_file/tests/package.map
rename to tools/aconfig/aconfig_storage_file/tests/data/v1/package.map
Binary files differ
diff --git a/tools/aconfig/aconfig_storage_file/tests/storage_file_test.cpp b/tools/aconfig/aconfig_storage_file/tests/storage_file_test.cpp
index ebd1dd8..3626f72 100644
--- a/tools/aconfig/aconfig_storage_file/tests/storage_file_test.cpp
+++ b/tools/aconfig/aconfig_storage_file/tests/storage_file_test.cpp
@@ -53,7 +53,8 @@
}
TEST(AconfigStorageFileTest, test_list_flag) {
- auto const test_dir = GetExecutableDirectory();
+ auto const test_base_dir = GetExecutableDirectory();
+ auto const test_dir = test_base_dir + "/data/v1";
auto const package_map = test_dir + "/package.map";
auto const flag_map = test_dir + "/flag.map";
auto const flag_val = test_dir + "/flag.val";
@@ -82,7 +83,8 @@
}
TEST(AconfigStorageFileTest, test_list_flag_with_info) {
- auto const test_dir = GetExecutableDirectory();
+ auto const base_test_dir = GetExecutableDirectory();
+ auto const test_dir = base_test_dir + "/data/v1";
auto const package_map = test_dir + "/package.map";
auto const flag_map = test_dir + "/flag.map";
auto const flag_val = test_dir + "/flag.val";
diff --git a/tools/aconfig/aconfig_storage_read_api/Android.bp b/tools/aconfig/aconfig_storage_read_api/Android.bp
index 6ae34f3..80b8ece 100644
--- a/tools/aconfig/aconfig_storage_read_api/Android.bp
+++ b/tools/aconfig/aconfig_storage_read_api/Android.bp
@@ -36,10 +36,10 @@
"librand",
],
data: [
- "tests/package.map",
- "tests/flag.map",
- "tests/flag.val",
- "tests/flag.info",
+ "tests/data/v1/package.map",
+ "tests/data/v1/flag.map",
+ "tests/data/v1/flag.val",
+ "tests/data/v1/flag.info",
],
}
diff --git a/tools/aconfig/aconfig_storage_read_api/src/lib.rs b/tools/aconfig/aconfig_storage_read_api/src/lib.rs
index 988ce63..884f148 100644
--- a/tools/aconfig/aconfig_storage_read_api/src/lib.rs
+++ b/tools/aconfig/aconfig_storage_read_api/src/lib.rs
@@ -412,10 +412,10 @@
let flag_map = storage_dir.clone() + "/maps/mockup.flag.map";
let flag_val = storage_dir.clone() + "/boot/mockup.val";
let flag_info = storage_dir.clone() + "/boot/mockup.info";
- fs::copy("./tests/package.map", &package_map).unwrap();
- fs::copy("./tests/flag.map", &flag_map).unwrap();
- fs::copy("./tests/flag.val", &flag_val).unwrap();
- fs::copy("./tests/flag.info", &flag_info).unwrap();
+ fs::copy("./tests/data/v1/package.map", &package_map).unwrap();
+ fs::copy("./tests/data/v1/flag.map", &flag_map).unwrap();
+ fs::copy("./tests/data/v1/flag.val", &flag_val).unwrap();
+ fs::copy("./tests/data/v1/flag.info", &flag_info).unwrap();
return storage_dir;
}
@@ -507,9 +507,9 @@
#[test]
// this test point locks down flag storage file version number query api
fn test_storage_version_query() {
- assert_eq!(get_storage_file_version("./tests/package.map").unwrap(), 1);
- assert_eq!(get_storage_file_version("./tests/flag.map").unwrap(), 1);
- assert_eq!(get_storage_file_version("./tests/flag.val").unwrap(), 1);
- assert_eq!(get_storage_file_version("./tests/flag.info").unwrap(), 1);
+ assert_eq!(get_storage_file_version("./tests/data/v1/package.map").unwrap(), 1);
+ assert_eq!(get_storage_file_version("./tests/data/v1/flag.map").unwrap(), 1);
+ assert_eq!(get_storage_file_version("./tests/data/v1/flag.val").unwrap(), 1);
+ assert_eq!(get_storage_file_version("./tests/data/v1/flag.info").unwrap(), 1);
}
}
diff --git a/tools/aconfig/aconfig_storage_read_api/src/mapped_file.rs b/tools/aconfig/aconfig_storage_read_api/src/mapped_file.rs
index 5a16645..32dbed8 100644
--- a/tools/aconfig/aconfig_storage_read_api/src/mapped_file.rs
+++ b/tools/aconfig/aconfig_storage_read_api/src/mapped_file.rs
@@ -97,10 +97,10 @@
let flag_map = storage_dir.clone() + "/maps/mockup.flag.map";
let flag_val = storage_dir.clone() + "/boot/mockup.val";
let flag_info = storage_dir.clone() + "/boot/mockup.info";
- fs::copy("./tests/package.map", &package_map).unwrap();
- fs::copy("./tests/flag.map", &flag_map).unwrap();
- fs::copy("./tests/flag.val", &flag_val).unwrap();
- fs::copy("./tests/flag.info", &flag_info).unwrap();
+ fs::copy("./tests/data/v1/package.map", &package_map).unwrap();
+ fs::copy("./tests/data/v1/flag.map", &flag_map).unwrap();
+ fs::copy("./tests/data/v1/flag.val", &flag_val).unwrap();
+ fs::copy("./tests/data/v1/flag.info", &flag_info).unwrap();
return storage_dir;
}
@@ -108,9 +108,9 @@
#[test]
fn test_mapped_file_contents() {
let storage_dir = create_test_storage_files();
- map_and_verify(&storage_dir, StorageFileType::PackageMap, "./tests/package.map");
- map_and_verify(&storage_dir, StorageFileType::FlagMap, "./tests/flag.map");
- map_and_verify(&storage_dir, StorageFileType::FlagVal, "./tests/flag.val");
- map_and_verify(&storage_dir, StorageFileType::FlagInfo, "./tests/flag.info");
+ map_and_verify(&storage_dir, StorageFileType::PackageMap, "./tests/data/v1/package.map");
+ map_and_verify(&storage_dir, StorageFileType::FlagMap, "./tests/data/v1/flag.map");
+ map_and_verify(&storage_dir, StorageFileType::FlagVal, "./tests/data/v1/flag.val");
+ map_and_verify(&storage_dir, StorageFileType::FlagInfo, "./tests/data/v1/flag.info");
}
}
diff --git a/tools/aconfig/aconfig_storage_read_api/tests/Android.bp b/tools/aconfig/aconfig_storage_read_api/tests/Android.bp
index ed0c728..b8e510d 100644
--- a/tools/aconfig/aconfig_storage_read_api/tests/Android.bp
+++ b/tools/aconfig/aconfig_storage_read_api/tests/Android.bp
@@ -1,9 +1,10 @@
filegroup {
name: "read_api_test_storage_files",
- srcs: ["package.map",
- "flag.map",
- "flag.val",
- "flag.info"
+ srcs: [
+ "data/v1/package.map",
+ "data/v1/flag.map",
+ "data/v1/flag.val",
+ "data/v1/flag.info",
],
}
diff --git a/tools/aconfig/aconfig_storage_read_api/tests/flag.info b/tools/aconfig/aconfig_storage_read_api/tests/data/v1/flag.info
similarity index 100%
rename from tools/aconfig/aconfig_storage_read_api/tests/flag.info
rename to tools/aconfig/aconfig_storage_read_api/tests/data/v1/flag.info
Binary files differ
diff --git a/tools/aconfig/aconfig_storage_read_api/tests/flag.map b/tools/aconfig/aconfig_storage_read_api/tests/data/v1/flag.map
similarity index 100%
rename from tools/aconfig/aconfig_storage_read_api/tests/flag.map
rename to tools/aconfig/aconfig_storage_read_api/tests/data/v1/flag.map
Binary files differ
diff --git a/tools/aconfig/aconfig_storage_read_api/tests/flag.val b/tools/aconfig/aconfig_storage_read_api/tests/data/v1/flag.val
similarity index 100%
rename from tools/aconfig/aconfig_storage_read_api/tests/flag.val
rename to tools/aconfig/aconfig_storage_read_api/tests/data/v1/flag.val
Binary files differ
diff --git a/tools/aconfig/aconfig_storage_read_api/tests/package.map b/tools/aconfig/aconfig_storage_read_api/tests/data/v1/package.map
similarity index 100%
rename from tools/aconfig/aconfig_storage_read_api/tests/package.map
rename to tools/aconfig/aconfig_storage_read_api/tests/data/v1/package.map
Binary files differ
diff --git a/tools/aconfig/aconfig_storage_read_api/tests/storage_read_api_test.cpp b/tools/aconfig/aconfig_storage_read_api/tests/storage_read_api_test.cpp
index 6d29045..7537643 100644
--- a/tools/aconfig/aconfig_storage_read_api/tests/storage_read_api_test.cpp
+++ b/tools/aconfig/aconfig_storage_read_api/tests/storage_read_api_test.cpp
@@ -45,7 +45,8 @@
}
void SetUp() override {
- auto const test_dir = android::base::GetExecutableDirectory();
+ auto const test_base_dir = android::base::GetExecutableDirectory();
+ auto const test_dir = test_base_dir + "/data/v1";
storage_dir = std::string(root_dir.path);
auto maps_dir = storage_dir + "/maps";
auto boot_dir = storage_dir + "/boot";
diff --git a/tools/aconfig/aconfig_storage_read_api/tests/storage_read_api_test.rs b/tools/aconfig/aconfig_storage_read_api/tests/storage_read_api_test.rs
index afc44d4..0d943f8 100644
--- a/tools/aconfig/aconfig_storage_read_api/tests/storage_read_api_test.rs
+++ b/tools/aconfig/aconfig_storage_read_api/tests/storage_read_api_test.rs
@@ -26,10 +26,10 @@
let flag_map = storage_dir.clone() + "/maps/mockup.flag.map";
let flag_val = storage_dir.clone() + "/boot/mockup.val";
let flag_info = storage_dir.clone() + "/boot/mockup.info";
- fs::copy("./package.map", package_map).unwrap();
- fs::copy("./flag.map", flag_map).unwrap();
- fs::copy("./flag.val", flag_val).unwrap();
- fs::copy("./flag.info", flag_info).unwrap();
+ fs::copy("./data/v1/package.map", package_map).unwrap();
+ fs::copy("./data/v1/flag.map", flag_map).unwrap();
+ fs::copy("./data/v1/flag.val", flag_val).unwrap();
+ fs::copy("./data/v1/flag.info", flag_info).unwrap();
storage_dir
}
@@ -200,9 +200,9 @@
#[test]
fn test_storage_version_query() {
- assert_eq!(get_storage_file_version("./package.map").unwrap(), 1);
- assert_eq!(get_storage_file_version("./flag.map").unwrap(), 1);
- assert_eq!(get_storage_file_version("./flag.val").unwrap(), 1);
- assert_eq!(get_storage_file_version("./flag.info").unwrap(), 1);
+ assert_eq!(get_storage_file_version("./data/v1/package.map").unwrap(), 1);
+ assert_eq!(get_storage_file_version("./data/v1/flag.map").unwrap(), 1);
+ assert_eq!(get_storage_file_version("./data/v1/flag.val").unwrap(), 1);
+ assert_eq!(get_storage_file_version("./data/v1/flag.info").unwrap(), 1);
}
}
diff --git a/tools/aconfig/aflags/Android.bp b/tools/aconfig/aflags/Android.bp
index 56c4ec0..a7aceee 100644
--- a/tools/aconfig/aflags/Android.bp
+++ b/tools/aconfig/aflags/Android.bp
@@ -12,7 +12,7 @@
"libaconfig_device_paths",
"libaconfig_flags",
"libaconfig_protos",
- "libaconfigd_protos",
+ "libaconfigd_protos_rust",
"libaconfig_storage_read_api",
"libaconfig_storage_file",
"libanyhow",
diff --git a/tools/edit_monitor/Android.bp b/tools/edit_monitor/Android.bp
index 08ca155..3497821 100644
--- a/tools/edit_monitor/Android.bp
+++ b/tools/edit_monitor/Android.bp
@@ -52,3 +52,15 @@
unit_test: true,
},
}
+
+python_binary_host {
+ name: "edit_monitor",
+ pkg_path: "edit_monitor",
+ srcs: [
+ "main.py",
+ ],
+ libs: [
+ "edit_monitor_lib",
+ ],
+ main: "main.py",
+}
diff --git a/tools/edit_monitor/main.py b/tools/edit_monitor/main.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/edit_monitor/main.py
diff --git a/tools/filelistdiff/Android.bp b/tools/filelistdiff/Android.bp
index ab766d6..3826e50 100644
--- a/tools/filelistdiff/Android.bp
+++ b/tools/filelistdiff/Android.bp
@@ -24,4 +24,9 @@
prebuilt_etc_host {
name: "system_image_diff_allowlist",
src: "allowlist",
-}
\ No newline at end of file
+}
+
+prebuilt_etc_host {
+ name: "system_image_diff_allowlist_next",
+ src: "allowlist_next",
+}
diff --git a/tools/filelistdiff/allowlist b/tools/filelistdiff/allowlist
index ae8a662..eb78587 100644
--- a/tools/filelistdiff/allowlist
+++ b/tools/filelistdiff/allowlist
@@ -1,9 +1,3 @@
-# Known diffs only in the KATI system image
-framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.odex
-framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.odex.fsv_meta
-framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.vdex
-framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.vdex.fsv_meta
-
# Known diffs that are installed in either system image with the configuration
# b/353429422
init.environ.rc
diff --git a/tools/filelistdiff/allowlist_next b/tools/filelistdiff/allowlist_next
new file mode 100644
index 0000000..8f91c9f
--- /dev/null
+++ b/tools/filelistdiff/allowlist_next
@@ -0,0 +1,9 @@
+# Allowlist only for the next release configuration.
+# TODO(b/369678122): The list will be cleared when the trunk configurations are
+# available to the next.
+
+# KATI only installed files
+framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.odex
+framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.odex.fsv_meta
+framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.vdex
+framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.vdex.fsv_meta
diff --git a/tools/filelistdiff/file_list_diff.py b/tools/filelistdiff/file_list_diff.py
index 30ed107..951325f 100644
--- a/tools/filelistdiff/file_list_diff.py
+++ b/tools/filelistdiff/file_list_diff.py
@@ -19,13 +19,16 @@
COLOR_ERROR = '\033[91m'
COLOR_NORMAL = '\033[0m'
-def find_unique_items(kati_installed_files, soong_installed_files, allowlist, system_module_name):
+def find_unique_items(kati_installed_files, soong_installed_files, system_module_name, allowlists):
with open(kati_installed_files, 'r') as kati_list_file, \
- open(soong_installed_files, 'r') as soong_list_file, \
- open(allowlist, 'r') as allowlist_file:
+ open(soong_installed_files, 'r') as soong_list_file:
kati_files = set(kati_list_file.read().split())
soong_files = set(soong_list_file.read().split())
- allowed_files = set(filter(lambda x: len(x), map(lambda x: x.lstrip().split('#',1)[0].rstrip() , allowlist_file.read().split('\n'))))
+
+ allowed_files = set()
+ for allowlist in allowlists:
+ with open(allowlist, 'r') as allowlist_file:
+ allowed_files.update(set(filter(lambda x: len(x), map(lambda x: x.lstrip().split('#',1)[0].rstrip() , allowlist_file.read().split('\n')))))
def is_unknown_diff(filepath):
return not filepath in allowed_files
@@ -60,8 +63,8 @@
parser.add_argument('kati_installed_file_list')
parser.add_argument('soong_installed_file_list')
- parser.add_argument('allowlist')
parser.add_argument('system_module_name')
+ parser.add_argument('--allowlists', nargs='+')
args = parser.parse_args()
- find_unique_items(args.kati_installed_file_list, args.soong_installed_file_list, args.allowlist, args.system_module_name)
\ No newline at end of file
+ find_unique_items(args.kati_installed_file_list, args.soong_installed_file_list, args.system_module_name, args.allowlists)
\ No newline at end of file