Merge "Revert^2 "Reland linking shared_libs to their modules"" into main
diff --git a/ci/build_device_and_tests b/ci/build_device_and_tests
new file mode 100755
index 0000000..9d11268
--- /dev/null
+++ b/ci/build_device_and_tests
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+#
+# Copyright 2024, The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+build/soong/soong_ui.bash --make-mode build_test_suites || exit $?
+$(build/soong/soong_ui.bash --dumpvar-mode HOST_OUT)/bin/build_test_suites $@ || exit $?
diff --git a/ci/build_test_suites.py b/ci/build_test_suites.py
index cd9d76d..4d3b546 100644
--- a/ci/build_test_suites.py
+++ b/ci/build_test_suites.py
@@ -89,6 +89,8 @@
else:
regex = r'\b(%s)\b' % re.escape(target)
if any(re.search(regex, opt) for opt in test_discovery_zip_regexes):
+ get_metrics_agent().report_unoptimized_target(target, 'Test artifact used.')
+ else:
get_metrics_agent().report_optimized_target(target)
if self._unused_target_exclusion_enabled(
diff --git a/core/Makefile b/core/Makefile
index 5e0d4df..f15edb2 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1596,6 +1596,7 @@
$(AVBTOOL) add_hash_footer \
--image $@ \
$(call get-partition-size-argument,$(BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE)) \
+ --salt $$(sha256sum $(BUILD_NUMBER_FILE) $(BUILD_DATETIME_FILE) | cut -d " " -f 1 | tr -d '\n') \
--partition_name init_boot $(INTERNAL_AVB_INIT_BOOT_SIGNING_ARGS) \
$(BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS)
@@ -1654,6 +1655,8 @@
$(ALL_DEFAULT_INSTALLED_MODULES))
INTERNAL_VENDOR_RAMDISK_TARGET := $(call intermediates-dir-for,PACKAGING,vendor_boot)/vendor_ramdisk.cpio$(RAMDISK_EXT)
+vendor_ramdisk_intermediates :=$= $(call intermediates-dir-for,PACKAGING,vendor_ramdisk)
+$(eval $(call write-partition-file-list,$(vendor_ramdisk_intermediates)/file_list.txt,$(TARGET_VENDOR_RAMDISK_OUT),$(INTERNAL_VENDOR_RAMDISK_FILES)))
# Exclude recovery files in the default vendor ramdisk if including a standalone
# recovery ramdisk in vendor_boot.
@@ -1769,6 +1772,7 @@
$(AVBTOOL) add_hash_footer \
--image $@ \
$(call get-partition-size-argument,$(BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE)) \
+ --salt $$(sha256sum $(BUILD_NUMBER_FILE) $(BUILD_DATETIME_FILE) | cut -d " " -f 1 | tr -d '\n') \
--partition_name vendor_boot $(INTERNAL_AVB_VENDOR_BOOT_SIGNING_ARGS) \
$(BOARD_AVB_VENDOR_BOOT_ADD_HASH_FOOTER_ARGS)
else
@@ -2932,6 +2936,9 @@
$(error MTD device is no longer supported and thus BOARD_NAND_SPARE_SIZE is deprecated.)
endif
+recovery_intermediates := $(call intermediates-dir-for,PACKAGING,recovery)
+$(eval $(call write-partition-file-list,$(recovery_intermediates)/file_list.txt,$(TARGET_RECOVERY_OUT),$(INTERNAL_RECOVERYIMAGE_FILES)))
+
# -----------------------------------------------------------------
# Build debug ramdisk and debug boot image.
diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk
index 769a6f7..092ddb0 100644
--- a/core/android_soong_config_vars.mk
+++ b/core/android_soong_config_vars.mk
@@ -48,6 +48,11 @@
RECOVERY_FSTAB_VERSION := 2
$(call soong_config_set, recovery, recovery_api_version, $(RECOVERY_API_VERSION))
$(call soong_config_set, recovery, recovery_fstab_version, $(RECOVERY_FSTAB_VERSION))
+$(call soong_config_set_bool, recovery ,target_userimages_use_f2fs ,$(if $(TARGET_USERIMAGES_USE_F2FS),true,false))
+$(call soong_config_set_bool, recovery ,has_board_cacheimage_partition_size ,$(if $(BOARD_CACHEIMAGE_PARTITION_SIZE),true,false))
+ifdef TARGET_RECOVERY_UI_LIB
+ $(call soong_config_set_string_list, recovery, target_recovery_ui_lib, $(TARGET_RECOVERY_UI_LIB))
+endif
# For Sanitizers
$(call soong_config_set_bool,ANDROID,ASAN_ENABLED,$(if $(filter address,$(SANITIZE_TARGET)),true,false))
@@ -262,3 +267,8 @@
$(call soong_config_set_bool,fs_config,vendor_dlkm,$(if $(BOARD_USES_VENDOR_DLKMIMAGE)$(BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE),true,false))
$(call soong_config_set_bool,fs_config,odm_dlkm,$(if $(BOARD_USES_ODM_DLKMIMAGE)$(BOARD_ODM_DLKMIMAGE_FILE_SYSTEM_TYPE),true,false))
$(call soong_config_set_bool,fs_config,system_dlkm,$(if $(BOARD_USES_SYSTEM_DLKMIMAGE)$(BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE),true,false))
+
+# Variables for telephony
+$(call soong_config_set_bool,telephony,sec_cp_secure_boot,$(if $(filter true,$(SEC_CP_SECURE_BOOT)),true,false))
+$(call soong_config_set_bool,telephony,cbd_protocol_sit,$(if $(filter true,$(CBD_PROTOCOL_SIT)),true,false))
+$(call soong_config_set_bool,telephony,use_radioexternal_hal_aidl,$(if $(filter true,$(USE_RADIOEXTERNAL_HAL_AIDL)),true,false))
diff --git a/core/config.mk b/core/config.mk
index b546ea1..d62b86d 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -330,6 +330,18 @@
$(eval SOONG_CONFIG_TYPE_$(strip $1)_$(strip $2):=bool)
endef
+# soong_config_set_string_list is the same as soong_config_set, but it will
+# also type the variable as a list of strings, so that when using select() expressions
+# in blueprint files they can use list values instead of strings.
+# The values of the list must be space-separated.
+# $1 is the namespace. $2 is the variable name. $3 is the variable value.
+# Ex: $(call soong_config_set_string_list,acme,COOL_LIBS,a b)
+define soong_config_set_string_list
+$(call soong_config_define_internal,$1,$2) \
+$(eval SOONG_CONFIG_$(strip $1)_$(strip $2):=$(strip $3))
+$(eval SOONG_CONFIG_TYPE_$(strip $1)_$(strip $2):=string_list)
+endef
+
# soong_config_append appends to the value of the variable in the given Soong
# config namespace. If the variable does not exist, it will be defined. If the
# namespace does not exist, it will be defined.
diff --git a/core/definitions.mk b/core/definitions.mk
index cd1b36e..adb35e0 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2605,7 +2605,87 @@
@$(call emit-line,$(wordlist 108501,109000,$(1)),$(2))
@$(call emit-line,$(wordlist 109001,109500,$(1)),$(2))
@$(call emit-line,$(wordlist 109501,110000,$(1)),$(2))
- @$(if $(wordlist 110001,110002,$(1)),$(error dump-words-to-file: Too many words ($(words $(1)))))
+ @$(call emit-line,$(wordlist 110001,110500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 110501,111000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 111001,111500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 111501,112000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 112001,112500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 112501,113000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 113001,113500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 113501,114000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 114001,114500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 114501,115000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 115001,115500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 115501,116000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 116001,116500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 116501,117000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 117001,117500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 117501,118000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 118001,118500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 118501,119000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 119001,119500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 119501,120000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 120001,120500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 120501,121000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 121001,121500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 121501,122000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 122001,122500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 122501,123000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 123001,123500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 123501,124000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 124001,124500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 124501,125000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 125001,125500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 125501,126000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 126001,126500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 126501,127000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 127001,127500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 127501,128000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 128001,128500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 128501,129000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 129001,129500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 129501,130000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 130001,130500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 130501,131000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 131001,131500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 131501,132000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 132001,132500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 132501,133000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 133001,133500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 133501,134000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 134001,134500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 134501,135000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 135001,135500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 135501,136000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 136001,136500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 136501,137000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 137001,137500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 137501,138000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 138001,138500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 138501,139000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 139001,139500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 139501,140000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 140001,140500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 140501,141000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 141001,141500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 141501,142000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 142001,142500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 142501,143000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 143001,143500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 143501,144000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 144001,144500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 144501,145000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 145001,145500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 145501,146000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 146001,146500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 146501,147000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 147001,147500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 147501,148000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 148001,148500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 148501,149000,$(1)),$(2))
+ @$(call emit-line,$(wordlist 149001,149500,$(1)),$(2))
+ @$(call emit-line,$(wordlist 149501,150000,$(1)),$(2))
+ @$(if $(wordlist 150001,150002,$(1)),$(error dump-words-to-file: Too many words ($(words $(1)))))
endef
# Return jar arguments to compress files in a given directory
# $(1): directory
diff --git a/core/java_common.mk b/core/java_common.mk
index a21f062..f574b76 100644
--- a/core/java_common.mk
+++ b/core/java_common.mk
@@ -32,7 +32,7 @@
else ifneq (,$(LOCAL_SDK_VERSION)$(TARGET_BUILD_USE_PREBUILT_SDKS))
# TODO(ccross): allow 1.9 for current and unbundled once we have SDK system modules
LOCAL_JAVA_LANGUAGE_VERSION := 1.8
- else ifeq ($(EXPERIMENTAL_TARGET_JAVA_VERSION_21),true)
+ else ifeq ($(RELEASE_TARGET_JAVA_21),true)
LOCAL_JAVA_LANGUAGE_VERSION := 21
else
LOCAL_JAVA_LANGUAGE_VERSION := 17
diff --git a/core/packaging/flags.mk b/core/packaging/flags.mk
index ccb502c..06e5001 100644
--- a/core/packaging/flags.mk
+++ b/core/packaging/flags.mk
@@ -24,10 +24,11 @@
# -----------------------------------------------------------------
# Aconfig Flags
-# Create a summary file of build flags for each partition
+# Create a summary file of build flags for a single partition
# $(1): built aconfig flags file (out)
# $(2): installed aconfig flags file (out)
# $(3): the partition (in)
+# $(4): input aconfig files for the partition (in)
define generate-partition-aconfig-flag-file
$(eval $(strip $(1)): PRIVATE_OUT := $(strip $(1)))
$(eval $(strip $(1)): PRIVATE_IN := $(strip $(4)))
diff --git a/core/product.mk b/core/product.mk
index 9c567c3..1b336b0 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -284,6 +284,9 @@
# Whether APEX should be compressed or not
_product_single_value_vars += PRODUCT_COMPRESSED_APEX
+# Default fs type for APEX payload image (apex_payload.img)
+_product_single_value_vars += PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE
+
# VNDK version of product partition. It can be 'current' if the product
# partitions uses PLATFORM_VNDK_VERSION.
_product_single_value_vars += PRODUCT_PRODUCT_VNDK_VERSION
diff --git a/core/product_config.mk b/core/product_config.mk
index abe6e38..68614ae 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -478,7 +478,9 @@
# Show a warning wall of text if non-compliance-GSI products set this option.
ifdef PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT
- ifeq (,$(filter gsi_arm gsi_arm64 gsi_x86 gsi_x86_64 gsi_car_arm64 gsi_car_x86_64 gsi_tv_arm gsi_tv_arm64,$(PRODUCT_NAME)))
+ ifeq (,$(filter gsi_arm gsi_arm64 gsi_arm64_soong_system gsi_x86 gsi_x86_64 \
+ gsi_x86_64_soong_system gsi_car_arm64 gsi_car_x86_64 \
+ gsi_tv_arm gsi_tv_arm64,$(PRODUCT_NAME)))
$(warning PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT is set but \
PRODUCT_NAME ($(PRODUCT_NAME)) doesn't look like a GSI for compliance \
testing. This is a special configuration for compliance GSI, so do make \
@@ -534,6 +536,17 @@
PRODUCT_COMPRESSED_APEX := $(OVERRIDE_PRODUCT_COMPRESSED_APEX)
endif
+ifdef OVERRIDE_PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE
+ PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE := $(OVERRIDE_PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE)
+else ifeq ($(PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE),)
+ # Use ext4 as a default payload fs type
+ PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE := ext4
+endif
+ifeq ($(filter ext4 erofs,$(PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE)),)
+ $(error PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE should be either erofs or ext4,\
+ not $(PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE).)
+endif
+
$(KATI_obsolete_var OVERRIDE_PRODUCT_EXTRA_VNDK_VERSIONS \
,Use PRODUCT_EXTRA_VNDK_VERSIONS instead)
diff --git a/core/soong_app_prebuilt.mk b/core/soong_app_prebuilt.mk
index df1cf2d..ab9227f 100644
--- a/core/soong_app_prebuilt.mk
+++ b/core/soong_app_prebuilt.mk
@@ -224,30 +224,6 @@
include $(BUILD_SYSTEM)/link_type.mk
endif # !LOCAL_IS_HOST_MODULE
-ifeq (,$(filter tests,$(LOCAL_MODULE_TAGS)))
- ifdef LOCAL_SOONG_DEVICE_RRO_DIRS
- $(call append_enforce_rro_sources, \
- $(my_register_name), \
- false, \
- $(LOCAL_FULL_MANIFEST_FILE), \
- $(if $(LOCAL_EXPORT_PACKAGE_RESOURCES),true,false), \
- $(LOCAL_SOONG_DEVICE_RRO_DIRS), \
- vendor \
- )
- endif
-
- ifdef LOCAL_SOONG_PRODUCT_RRO_DIRS
- $(call append_enforce_rro_sources, \
- $(my_register_name), \
- false, \
- $(LOCAL_FULL_MANIFEST_FILE), \
- $(if $(LOCAL_EXPORT_PACKAGE_RESOURCES),true,false), \
- $(LOCAL_SOONG_PRODUCT_RRO_DIRS), \
- product \
- )
- endif
-endif
-
ifdef LOCAL_PREBUILT_COVERAGE_ARCHIVE
my_coverage_dir := $(TARGET_OUT_COVERAGE)/$(patsubst $(PRODUCT_OUT)/%,%,$(my_module_path))
my_coverage_copy_pairs := $(foreach f,$(LOCAL_PREBUILT_COVERAGE_ARCHIVE),$(f):$(my_coverage_dir)/$(notdir $(f)))
diff --git a/core/soong_config.mk b/core/soong_config.mk
index c5dd320..06a88a3 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -194,6 +194,8 @@
$(call add_json_str, SystemDlkmPath, $(TARGET_COPY_OUT_SYSTEM_DLKM))
$(call add_json_str, OemPath, $(TARGET_COPY_OUT_OEM))
$(call add_json_bool, MinimizeJavaDebugInfo, $(filter true,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO)))
+$(call add_json_str, RecoveryPath, $(TARGET_COPY_OUT_RECOVERY))
+$(call add_json_bool, BuildingRecoveryImage, $(BUILDING_RECOVERY_IMAGE))
$(call add_json_bool, UseGoma, $(filter-out false,$(USE_GOMA)))
$(call add_json_bool, UseRBE, $(filter-out false,$(USE_RBE)))
@@ -274,6 +276,7 @@
$(call add_json_str, DeviceCurrentApiLevelForVendorModules, $(BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES))
$(call add_json_bool, CompressedApex, $(filter true,$(PRODUCT_COMPRESSED_APEX)))
+$(call add_json_str, DefaultApexPayloadType, $(PRODUCT_DEFAULT_APEX_PAYLOAD_TYPE))
$(call add_json_bool, BoardUsesRecoveryAsBoot, $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)))
@@ -379,7 +382,7 @@
$(call add_json_str, ProductDirectory, $(dir $(INTERNAL_PRODUCT)))
$(call add_json_map,PartitionQualifiedVariables)
- $(foreach image_type,SYSTEM VENDOR CACHE USERDATA PRODUCT SYSTEM_EXT OEM ODM VENDOR_DLKM ODM_DLKM SYSTEM_DLKM, \
+ $(foreach image_type,INIT_BOOT BOOT VENDOR_BOOT SYSTEM VENDOR CACHE USERDATA PRODUCT SYSTEM_EXT OEM ODM VENDOR_DLKM ODM_DLKM SYSTEM_DLKM, \
$(call add_json_map,$(call to-lower,$(image_type))) \
$(call add_json_bool, BuildingImage, $(filter true,$(BUILDING_$(image_type)_IMAGE))) \
$(call add_json_str, BoardErofsCompressor, $(BOARD_$(image_type)IMAGE_EROFS_COMPRESSOR)) \
@@ -430,14 +433,23 @@
# boot image stuff
$(call add_json_bool, BuildingRamdiskImage, $(filter true,$(BUILDING_RAMDISK_IMAGE)))
$(call add_json_bool, ProductBuildBootImage, $(filter true,$(PRODUCT_BUILD_BOOT_IMAGE)))
+ $(call add_json_str, ProductBuildVendorBootImage, $(PRODUCT_BUILD_VENDOR_BOOT_IMAGE))
$(call add_json_bool, ProductBuildInitBootImage, $(filter true,$(PRODUCT_BUILD_INIT_BOOT_IMAGE)))
$(call add_json_bool, BoardUsesRecoveryAsBoot, $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)))
$(call add_json_str, BoardPrebuiltBootimage, $(BOARD_PREBUILT_BOOT_IMAGE))
$(call add_json_str, BoardPrebuiltInitBootimage, $(BOARD_PREBUILT_INIT_BOOT_IMAGE))
$(call add_json_str, BoardBootimagePartitionSize, $(BOARD_BOOTIMAGE_PARTITION_SIZE))
- $(call add_json_str, BoardInitBootimagePartitionSize, $(BOARD_INIT_BOOTIMAGE_PARTITION_SIZE))
+ $(call add_json_str, BoardInitBootimagePartitionSize, $(BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE))
$(call add_json_str, BoardBootHeaderVersion, $(BOARD_BOOT_HEADER_VERSION))
$(call add_json_str, TargetKernelPath, $(TARGET_KERNEL_PATH))
+ $(call add_json_bool, BoardUsesGenericKernelImage, $(BOARD_USES_GENERIC_KERNEL_IMAGE))
+ $(call add_json_str, BootSecurityPatch, $(BOOT_SECURITY_PATCH))
+ $(call add_json_str, InitBootSecurityPatch, $(INIT_BOOT_SECURITY_PATCH))
+ $(call add_json_str, VendorSecurityPatch, $(VENDOR_SECURITY_PATCH))
+ $(call add_json_bool, BoardIncludeDtbInBootimg, $(BOARD_INCLUDE_DTB_IN_BOOTIMG))
+ $(call add_json_list, InternalKernelCmdline, $(INTERNAL_KERNEL_CMDLINE))
+ $(call add_json_list, InternalBootconfig, $(INTERNAL_BOOTCONFIG))
+ $(call add_json_str, InternalBootconfigFile, $(INTERNAL_BOOTCONFIG_FILE))
# Avb (android verified boot) stuff
$(call add_json_bool, BoardAvbEnable, $(filter true,$(BOARD_AVB_ENABLE)))
@@ -476,6 +488,10 @@
$(call add_json_bool, BuildingOdmDlkmImage, $(BUILDING_ODM_DLKM_IMAGE))
$(call add_json_list, OdmKernelModules, $(BOARD_ODM_KERNEL_MODULES))
$(call add_json_str, OdmKernelBlocklistFile, $(BOARD_ODM_KERNEL_MODULES_BLOCKLIST_FILE))
+ $(call add_json_list, VendorRamdiskKernelModules, $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES))
+ $(call add_json_str, VendorRamdiskKernelBlocklistFile, $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_BLOCKLIST_FILE))
+ $(call add_json_list, VendorRamdiskKernelLoadModules, $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD))
+ $(call add_json_str, VendorRamdiskKernelOptionsFile, $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_OPTIONS_FILE))
# Used to generate /vendor/build.prop
$(call add_json_list, BoardInfoFiles, $(if $(TARGET_BOARD_INFO_FILES),$(TARGET_BOARD_INFO_FILES),$(firstword $(TARGET_BOARD_INFO_FILE) $(wildcard $(TARGET_DEVICE_DIR)/board-info.txt))))
@@ -483,6 +499,9 @@
$(call add_json_list, ProductCopyFiles, $(PRODUCT_COPY_FILES))
+ # Used to generate fsv meta
+ $(call add_json_bool, ProductFsverityGenerateMetadata, $(PRODUCT_FSVERITY_GENERATE_METADATA))
+
$(call end_json_map)
# For converting vintf_data
diff --git a/core/version_util.mk b/core/version_util.mk
index 0e34634..2bf41ec 100644
--- a/core/version_util.mk
+++ b/core/version_util.mk
@@ -23,6 +23,7 @@
# PLATFORM_DISPLAY_VERSION
# PLATFORM_SDK_VERSION
# PLATFORM_SDK_EXTENSION_VERSION
+# PLATFORM_BASE_SDK_EXTENSION_VERSION
# PLATFORM_VERSION_CODENAME
# DEFAULT_APP_TARGET_SDK
# BUILD_ID
@@ -67,8 +68,16 @@
PLATFORM_SDK_EXTENSION_VERSION := $(RELEASE_PLATFORM_SDK_EXTENSION_VERSION)
.KATI_READONLY := PLATFORM_SDK_EXTENSION_VERSION
-# This is the sdk extension version that PLATFORM_SDK_VERSION ships with.
-PLATFORM_BASE_SDK_EXTENSION_VERSION := $(PLATFORM_SDK_EXTENSION_VERSION)
+ifdef PLATFORM_BASE_SDK_EXTENSION_VERSION
+ $(error Do not set PLATFORM_BASE_SDK_EXTENSION_VERSION directly. Use RELEASE_PLATFORM_BASE_SDK_EXTENSION_VERSION. value: $(PLATFORM_BASE_SDK_EXTENSION_VERSION))
+endif
+ifdef RELEASE_PLATFORM_BASE_SDK_EXTENSION_VERSION
+ # This is the sdk extension version that PLATFORM_SDK_VERSION ships with.
+ PLATFORM_BASE_SDK_EXTENSION_VERSION := $(RELEASE_PLATFORM_BASE_SDK_EXTENSION_VERSION)
+else
+ # Fallback to PLATFORM_SDK_EXTENSION_VERSION if RELEASE_PLATFORM_BASE_SDK_EXTENSION_VERSION is undefined.
+ PLATFORM_BASE_SDK_EXTENSION_VERSION := $(PLATFORM_SDK_EXTENSION_VERSION)
+endif
.KATI_READONLY := PLATFORM_BASE_SDK_EXTENSION_VERSION
ifdef PLATFORM_VERSION_CODENAME
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index 3a7256e..b9b226b 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -17,7 +17,6 @@
# Base modules and settings for the system partition.
PRODUCT_PACKAGES += \
abx \
- aconfigd \
aconfigd-system \
adbd_system_api \
aflags \
@@ -249,6 +248,7 @@
pintool \
platform.xml \
pm \
+ prefetch \
preinstalled-packages-asl-files.xml \
preinstalled-packages-platform.xml \
preinstalled-packages-strict-signature.xml \
diff --git a/target/product/build_variables.mk b/target/product/build_variables.mk
index 7661e06..3326b87 100644
--- a/target/product/build_variables.mk
+++ b/target/product/build_variables.mk
@@ -20,6 +20,9 @@
# Control libbinder client caching
$(call soong_config_set, libbinder, release_libbinder_client_cache, $(RELEASE_LIBBINDER_CLIENT_CACHE))
+# Control caching while adding service in libbinder cache
+$(call soong_config_set, libbinder, release_libbinder_addservice_cache, $(RELEASE_LIBBINDER_ADDSERVICE_CACHE))
+
# Use the configured release of sqlite
$(call soong_config_set, libsqlite3, release_package_libsqlite3, $(RELEASE_PACKAGE_LIBSQLITE3))
diff --git a/target/product/generic/Android.bp b/target/product/generic/Android.bp
index ea49af4..bca4fcd 100644
--- a/target/product/generic/Android.bp
+++ b/target/product/generic/Android.bp
@@ -56,10 +56,6 @@
name: "bugreports",
},
{
- target: "/data/cache",
- name: "cache",
- },
- {
target: "/sys/kernel/debug",
name: "d",
},
@@ -125,6 +121,10 @@
target: "/system_ext",
name: "system/system_ext",
},
+ {
+ target: "/data/cache",
+ name: "cache",
+ },
]
filegroup {
@@ -346,11 +346,6 @@
],
}
-filegroup {
- name: "system_image_erofs_compress_hints.txt",
- srcs: ["erofs_compress_hints.txt"],
-}
-
android_filesystem_defaults {
name: "system_image_defaults",
partition_name: "system",
@@ -374,11 +369,6 @@
],
libs: [":framework-res{.export-package.apk}"],
},
- type: "erofs",
- erofs: {
- compressor: "lz4hc,9",
- compress_hints: ":system_image_erofs_compress_hints.txt",
- },
build_logtags: true,
gen_aconfig_flags_pb: true,
@@ -391,7 +381,6 @@
deps: [
"abx",
- "aconfigd",
"aconfigd-system",
"aflags",
"am",
@@ -510,6 +499,7 @@
"pintool", // base_system
"platform.xml", // base_system
"pm", // base_system
+ "prefetch", //base_system
"preinstalled-packages-asl-files.xml", // base_system
"preinstalled-packages-platform-generic-system.xml", // generic_system
"preinstalled-packages-platform-handheld-system.xml", // handheld_system
@@ -885,8 +875,13 @@
}
android_system_image {
- name: "generic_system_image",
+ name: "aosp_shared_system_image",
defaults: ["system_image_defaults"],
dirs: android_rootdirs,
symlinks: android_symlinks,
+ type: "erofs",
+ erofs: {
+ compressor: "lz4hc,9",
+ compress_hints: "erofs_compress_hints.txt",
+ },
}
diff --git a/target/product/gsi/Android.bp b/target/product/gsi/Android.bp
index 1b8f2d7..9e8946d 100644
--- a/target/product/gsi/Android.bp
+++ b/target/product/gsi/Android.bp
@@ -71,12 +71,21 @@
target: "/system/product",
name: "product",
},
+ {
+ target: "/odm/odm_dlkm/etc",
+ name: "odm_dlkm/etc",
+ },
+ {
+ target: "/vendor/vendor_dlkm/etc",
+ name: "vendor_dlkm/etc",
+ },
]
android_system_image {
name: "android_gsi",
defaults: ["system_image_defaults"],
symlinks: gsi_symlinks,
+ dirs: ["cache"],
deps: [
///////////////////////////////////////////
// gsi_system_ext
@@ -196,4 +205,5 @@
"true": true,
default: false,
}),
+ type: "ext4",
}
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
index 39428d2..f00c38c 100644
--- a/target/product/gsi_release.mk
+++ b/target/product/gsi_release.mk
@@ -82,6 +82,7 @@
# Additional settings used in all GSI builds
PRODUCT_PRODUCT_PROPERTIES += \
ro.crypto.metadata_init_delete_all_keys.enabled=false \
+ debug.codec2.bqpool_dealloc_after_stop=1 \
# Window Extensions
ifneq ($(PRODUCT_IS_ATV),true)
diff --git a/tools/aconfig/aconfig/src/codegen/java.rs b/tools/aconfig/aconfig/src/codegen/java.rs
index e2bb1ad..2f2889c 100644
--- a/tools/aconfig/aconfig/src/codegen/java.rs
+++ b/tools/aconfig/aconfig/src/codegen/java.rs
@@ -32,6 +32,7 @@
codegen_mode: CodegenMode,
flag_ids: HashMap<String, u16>,
allow_instrumentation: bool,
+ package_fingerprint: u64,
) -> Result<Vec<OutputFile>>
where
I: Iterator<Item = ProtoParsedFlag>,
@@ -46,6 +47,7 @@
let runtime_lookup_required =
flag_elements.iter().any(|elem| elem.is_read_write) || library_exported;
let container = (flag_elements.first().expect("zero template flags").container).to_string();
+ let is_platform_container = matches!(container.as_str(), "system" | "product" | "vendor");
let context = Context {
flag_elements,
namespace_flags,
@@ -56,6 +58,8 @@
library_exported,
allow_instrumentation,
container,
+ is_platform_container,
+ package_fingerprint: format!("0x{:X}L", package_fingerprint),
};
let mut template = TinyTemplate::new();
template.add_template("Flags.java", include_str!("../../templates/Flags.java.template"))?;
@@ -123,6 +127,8 @@
pub library_exported: bool,
pub allow_instrumentation: bool,
pub container: String,
+ pub is_platform_container: bool,
+ pub package_fingerprint: String,
}
#[derive(Serialize, Debug)]
@@ -502,6 +508,7 @@
mode,
flag_ids,
true,
+ 5801144784618221668,
)
.unwrap();
let expect_flags_content = EXPECTED_FLAG_COMMON_CONTENT.to_string()
@@ -513,27 +520,54 @@
package com.android.aconfig.test;
// TODO(b/303773055): Remove the annotation after access issue is resolved.
import android.compat.annotation.UnsupportedAppUsage;
- import android.aconfig.storage.StorageInternalReader;
-
+ import android.os.Build;
+ import android.os.flagging.PlatformAconfigPackageInternal;
+ import android.os.flagging.AconfigStorageReadException;
+ import android.util.Log;
/** @hide */
public final class FeatureFlagsImpl implements FeatureFlags {
+ private static final String TAG = "com.android.aconfig.test.FeatureFlagsImpl";
private static volatile boolean isCached = false;
private static boolean disabledRw = false;
private static boolean disabledRwExported = false;
private static boolean disabledRwInOtherNamespace = false;
private static boolean enabledRw = true;
private void init() {
- StorageInternalReader reader = null;
- boolean foundPackage = true;
try {
- reader = new StorageInternalReader("system", "com.android.aconfig.test");
+ PlatformAconfigPackageInternal reader = PlatformAconfigPackageInternal.load("system", "com.android.aconfig.test", 0x5081CE7221C77064L);
+ AconfigStorageReadException error = reader.getException();
+ if (error == null) {
+ disabledRw = reader.getBooleanFlagValue(1);
+ disabledRwExported = reader.getBooleanFlagValue(2);
+ enabledRw = reader.getBooleanFlagValue(8);
+ disabledRwInOtherNamespace = reader.getBooleanFlagValue(3);
+ } else if (Build.VERSION.SDK_INT > 35 && error.getErrorCode() == 5 /* fingerprint doesn't match*/) {
+ disabledRw = reader.getBooleanFlagValue("disabled_rw", false);
+ disabledRwExported = reader.getBooleanFlagValue("disabled_rw_exported", false);
+ enabledRw = reader.getBooleanFlagValue("enabled_rw", true);
+ disabledRwInOtherNamespace = reader.getBooleanFlagValue("disabled_rw_in_other_namespace", false);
+ } else {
+ if (error.getMessage() != null) {
+ Log.e(TAG, error.getMessage());
+ } else {
+ Log.e(TAG, "Encountered a null AconfigStorageReadException");
+ }
+ }
} catch (Exception e) {
- foundPackage = false;
+ if (e.getMessage() != null) {
+ Log.e(TAG, e.getMessage());
+ } else {
+ Log.e(TAG, "Encountered a null Exception");
+ }
+ } catch (NoClassDefFoundError e) {
+ // for mainline module running on older devices.
+ // This should be replaces to version check, after the version bump.
+ if (e.getMessage() != null) {
+ Log.e(TAG, e.getMessage());
+ } else {
+ Log.e(TAG, "Encountered a null NoClassDefFoundError");
+ }
}
- disabledRw = foundPackage ? reader.getBooleanFlagValue(1) : false;
- disabledRwExported = foundPackage ? reader.getBooleanFlagValue(2) : false;
- enabledRw = foundPackage ? reader.getBooleanFlagValue(8) : true;
- disabledRwInOtherNamespace = foundPackage ? reader.getBooleanFlagValue(3) : false;
isCached = true;
}
@@ -652,6 +686,7 @@
mode,
flag_ids,
true,
+ 5801144784618221668,
)
.unwrap();
@@ -850,6 +885,7 @@
mode,
flag_ids,
true,
+ 5801144784618221668,
)
.unwrap();
@@ -971,6 +1007,7 @@
mode,
flag_ids,
true,
+ 5801144784618221668,
)
.unwrap();
let expect_featureflags_content = r#"
diff --git a/tools/aconfig/aconfig/src/commands.rs b/tools/aconfig/aconfig/src/commands.rs
index 81119f3..c1989a2 100644
--- a/tools/aconfig/aconfig/src/commands.rs
+++ b/tools/aconfig/aconfig/src/commands.rs
@@ -225,6 +225,9 @@
bail!("no parsed flags, or the parsed flags use different packages");
};
let package = package.to_string();
+ let mut flag_names =
+ modified_parsed_flags.iter().map(|pf| pf.name().to_string()).collect::<Vec<_>>();
+ let package_fingerprint = compute_flags_fingerprint(&mut flag_names);
let flag_ids = assign_flag_ids(&package, modified_parsed_flags.iter())?;
generate_java_code(
&package,
@@ -232,6 +235,7 @@
codegen_mode,
flag_ids,
allow_instrumentation,
+ package_fingerprint,
)
}
diff --git a/tools/aconfig/aconfig/src/storage/mod.rs b/tools/aconfig/aconfig/src/storage/mod.rs
index ef1b4f6..4bc72f7 100644
--- a/tools/aconfig/aconfig/src/storage/mod.rs
+++ b/tools/aconfig/aconfig/src/storage/mod.rs
@@ -83,7 +83,7 @@
p.boolean_start_index = boolean_start_index;
boolean_start_index += p.boolean_flags.len() as u32;
- if version > 2 {
+ if version >= 2 {
let mut flag_names_vec =
p.flag_names.clone().into_iter().map(String::from).collect::<Vec<_>>();
let fingerprint = compute_flags_fingerprint(&mut flag_names_vec);
@@ -202,6 +202,7 @@
assert!(packages[0].flag_names.contains("disabled_rw"));
assert!(packages[0].flag_names.contains("enabled_ro"));
assert_eq!(packages[0].boolean_start_index, 0);
+ assert_eq!(packages[0].fingerprint, 0);
assert_eq!(packages[1].package_name, "com.android.aconfig.storage.test_2");
assert_eq!(packages[1].package_id, 1);
@@ -210,6 +211,7 @@
assert!(packages[1].flag_names.contains("disabled_rw"));
assert!(packages[1].flag_names.contains("enabled_fixed_ro"));
assert_eq!(packages[1].boolean_start_index, 3);
+ assert_eq!(packages[0].fingerprint, 0);
assert_eq!(packages[2].package_name, "com.android.aconfig.storage.test_4");
assert_eq!(packages[2].package_id, 2);
@@ -217,5 +219,49 @@
assert!(packages[2].flag_names.contains("enabled_rw"));
assert!(packages[2].flag_names.contains("enabled_fixed_ro"));
assert_eq!(packages[2].boolean_start_index, 6);
+ assert_eq!(packages[2].fingerprint, 0);
+ }
+
+ #[test]
+ fn test_flag_package_with_fingerprint() {
+ let caches = parse_all_test_flags();
+ let packages = group_flags_by_package(caches.iter(), 2);
+
+ for pkg in packages.iter() {
+ let pkg_name = pkg.package_name;
+ assert_eq!(pkg.flag_names.len(), pkg.boolean_flags.len());
+ for pf in pkg.boolean_flags.iter() {
+ assert!(pkg.flag_names.contains(pf.name()));
+ assert_eq!(pf.package(), pkg_name);
+ }
+ }
+
+ assert_eq!(packages.len(), 3);
+
+ assert_eq!(packages[0].package_name, "com.android.aconfig.storage.test_1");
+ assert_eq!(packages[0].package_id, 0);
+ assert_eq!(packages[0].flag_names.len(), 3);
+ assert!(packages[0].flag_names.contains("enabled_rw"));
+ assert!(packages[0].flag_names.contains("disabled_rw"));
+ assert!(packages[0].flag_names.contains("enabled_ro"));
+ assert_eq!(packages[0].boolean_start_index, 0);
+ assert_eq!(packages[0].fingerprint, 15248948510590158086u64);
+
+ assert_eq!(packages[1].package_name, "com.android.aconfig.storage.test_2");
+ assert_eq!(packages[1].package_id, 1);
+ assert_eq!(packages[1].flag_names.len(), 3);
+ assert!(packages[1].flag_names.contains("enabled_ro"));
+ assert!(packages[1].flag_names.contains("disabled_rw"));
+ assert!(packages[1].flag_names.contains("enabled_fixed_ro"));
+ assert_eq!(packages[1].boolean_start_index, 3);
+ assert_eq!(packages[1].fingerprint, 4431940502274857964u64);
+
+ assert_eq!(packages[2].package_name, "com.android.aconfig.storage.test_4");
+ assert_eq!(packages[2].package_id, 2);
+ assert_eq!(packages[2].flag_names.len(), 2);
+ assert!(packages[2].flag_names.contains("enabled_rw"));
+ assert!(packages[2].flag_names.contains("enabled_fixed_ro"));
+ assert_eq!(packages[2].boolean_start_index, 6);
+ assert_eq!(packages[2].fingerprint, 16233229917711622375u64);
}
}
diff --git a/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template b/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template
index d782f81..3fc444a 100644
--- a/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template
+++ b/tools/aconfig/aconfig/templates/FeatureFlagsImpl.java.template
@@ -5,11 +5,19 @@
// TODO(b/303773055): Remove the annotation after access issue is resolved.
import android.compat.annotation.UnsupportedAppUsage;
{{ -if runtime_lookup_required }}
-import android.aconfig.storage.StorageInternalReader;
+import android.os.Build;
+{{ if is_platform_container }}
+import android.os.flagging.PlatformAconfigPackageInternal;
+{{ -else }}
+import android.os.flagging.AconfigPackageInternal;
+{{ -endif }}
+import android.os.flagging.AconfigStorageReadException;
+import android.util.Log;
{{ -endif }}
/** @hide */
public final class FeatureFlagsImpl implements FeatureFlags \{
{{ -if runtime_lookup_required }}
+ private static final String TAG = "{package_name}.FeatureFlagsImpl";
private static volatile boolean isCached = false;
{{ for flag in flag_elements }}
{{ -if flag.is_read_write }}
@@ -18,20 +26,51 @@
{{ -endfor }}
private void init() \{
- StorageInternalReader reader = null;
- boolean foundPackage = true;
try \{
- reader = new StorageInternalReader("{container}", "{package_name}");
+{{ if is_platform_container }}
+ PlatformAconfigPackageInternal reader = PlatformAconfigPackageInternal.load("{container}", "{package_name}", {package_fingerprint});
+{{ -else }}
+ AconfigPackageInternal reader = AconfigPackageInternal.load("{container}", "{package_name}", {package_fingerprint});
+{{ -endif }}
+ AconfigStorageReadException error = reader.getException();
+ if (error == null) \{
+ {{ for namespace_with_flags in namespace_flags }}
+ {{ -for flag in namespace_with_flags.flags }}
+ {{ -if flag.is_read_write }}
+ {flag.method_name} = reader.getBooleanFlagValue({flag.flag_offset});
+ {{ endif }}
+ {{ -endfor }}
+ {{ -endfor }}
+ } else if (Build.VERSION.SDK_INT > 35 && error.getErrorCode() == 5 /* fingerprint doesn't match*/) \{
+ {{ for namespace_with_flags in namespace_flags }}
+ {{ -for flag in namespace_with_flags.flags }}
+ {{ -if flag.is_read_write }}
+ {flag.method_name} = reader.getBooleanFlagValue("{flag.flag_name}", {flag.default_value});
+ {{ -endif }}
+ {{ -endfor }}
+ {{ -endfor }}
+ } else \{
+ if (error.getMessage() != null) \{
+ Log.e(TAG, error.getMessage());
+ } else \{
+ Log.e(TAG, "Encountered a null AconfigStorageReadException");
+ }
+ }
} catch (Exception e) \{
- foundPackage = false;
+ if (e.getMessage() != null) \{
+ Log.e(TAG, e.getMessage());
+ } else \{
+ Log.e(TAG, "Encountered a null Exception");
+ }
+ } catch (NoClassDefFoundError e) \{
+ // for mainline module running on older devices.
+ // This should be replaces to version check, after the version bump.
+ if (e.getMessage() != null) \{
+ Log.e(TAG, e.getMessage());
+ } else \{
+ Log.e(TAG, "Encountered a null NoClassDefFoundError");
+ }
}
- {{ for namespace_with_flags in namespace_flags }}
- {{ -for flag in namespace_with_flags.flags }}
- {{ if flag.is_read_write }}
- {flag.method_name} = foundPackage ? reader.getBooleanFlagValue({flag.flag_offset}) : {flag.default_value};
- {{ endif }}
- {{ -endfor }}
- {{ -endfor }}
isCached = true;
}
{{ -endif }}{#- end of runtime_lookup_required #}
diff --git a/tools/aconfig/aconfig_flags/flags.aconfig b/tools/aconfig/aconfig_flags/flags.aconfig
index b66d282..0a004ca 100644
--- a/tools/aconfig/aconfig_flags/flags.aconfig
+++ b/tools/aconfig/aconfig_flags/flags.aconfig
@@ -14,11 +14,3 @@
bug: "369808805"
description: "When enabled, launch aconfigd from config infra module."
}
-
-flag {
- name: "enable_system_aconfigd_rust"
- namespace: "core_experiments_team_internal"
- bug: "378079539"
- description: "When enabled, the aconfigd cc_binary target becomes a no-op, and the rust_binary aconfigd-system target starts up."
- is_fixed_read_only: true
-}
diff --git a/tools/aconfig/aconfig_flags/src/lib.rs b/tools/aconfig/aconfig_flags/src/lib.rs
index b413c62..2e89127 100644
--- a/tools/aconfig/aconfig_flags/src/lib.rs
+++ b/tools/aconfig/aconfig_flags/src/lib.rs
@@ -39,11 +39,6 @@
pub fn enable_aconfigd_from_mainline() -> bool {
aconfig_flags_rust::enable_only_new_storage()
}
-
- /// Returns the value for the enable_system_aconfigd_rust flag.
- pub fn enable_system_aconfigd_rust() -> bool {
- aconfig_flags_rust::enable_system_aconfigd_rust()
- }
}
/// Module used when building with cargo
@@ -60,10 +55,4 @@
// Used only to enable typechecking and testing with cargo
true
}
-
- /// Returns a placeholder value for the enable_system_aconfigd_rust flag.
- pub fn enable_system_aconfigd_rust() -> bool {
- // Used only to enable typechecking and testing with cargo
- true
- }
}
diff --git a/tools/aconfig/aconfig_storage_read_api/Android.bp b/tools/aconfig/aconfig_storage_read_api/Android.bp
index 09daeea..6214e2c 100644
--- a/tools/aconfig/aconfig_storage_read_api/Android.bp
+++ b/tools/aconfig/aconfig_storage_read_api/Android.bp
@@ -167,27 +167,8 @@
],
sdk_version: "core_current",
host_supported: true,
- min_sdk_version: "29",
- apex_available: [
- "//apex_available:platform",
- "//apex_available:anyapex",
+ visibility: [
+ "//frameworks/base",
+ "//build/make/tools/aconfig/aconfig_storage_read_api/tests",
],
}
-
-java_library {
- name: "aconfig_storage_reader_java_none",
- srcs: [
- "srcs/android/aconfig/storage/StorageInternalReader.java",
- "srcs/android/os/flagging/PlatformAconfigPackageInternal.java",
- ],
- libs: [
- "unsupportedappusage-sdk-none",
- "fake_device_config",
- ],
- static_libs: [
- "aconfig_storage_file_java_none",
- ],
- sdk_version: "none",
- system_modules: "core-all-system-modules",
- host_supported: true,
-}
diff --git a/tools/aconfig/aconfig_storage_read_api/src/lib.rs b/tools/aconfig/aconfig_storage_read_api/src/lib.rs
index 6e98fe9..d3cc9d4 100644
--- a/tools/aconfig/aconfig_storage_read_api/src/lib.rs
+++ b/tools/aconfig/aconfig_storage_read_api/src/lib.rs
@@ -433,21 +433,24 @@
get_package_read_context(&package_mapped_file, "com.android.aconfig.storage.test_1")
.unwrap()
.unwrap();
- let expected_package_context = PackageReadContext { package_id: 0, boolean_start_index: 0 };
+ let expected_package_context =
+ PackageReadContext { package_id: 0, boolean_start_index: 0, fingerprint: 0 };
assert_eq!(package_context, expected_package_context);
let package_context =
get_package_read_context(&package_mapped_file, "com.android.aconfig.storage.test_2")
.unwrap()
.unwrap();
- let expected_package_context = PackageReadContext { package_id: 1, boolean_start_index: 3 };
+ let expected_package_context =
+ PackageReadContext { package_id: 1, boolean_start_index: 3, fingerprint: 0 };
assert_eq!(package_context, expected_package_context);
let package_context =
get_package_read_context(&package_mapped_file, "com.android.aconfig.storage.test_4")
.unwrap()
.unwrap();
- let expected_package_context = PackageReadContext { package_id: 2, boolean_start_index: 6 };
+ let expected_package_context =
+ PackageReadContext { package_id: 2, boolean_start_index: 6, fingerprint: 0 };
assert_eq!(package_context, expected_package_context);
}
diff --git a/tools/aconfig/aconfig_storage_read_api/src/package_table_query.rs b/tools/aconfig/aconfig_storage_read_api/src/package_table_query.rs
index a4b63ab..b20668f 100644
--- a/tools/aconfig/aconfig_storage_read_api/src/package_table_query.rs
+++ b/tools/aconfig/aconfig_storage_read_api/src/package_table_query.rs
@@ -28,6 +28,7 @@
pub struct PackageReadContext {
pub package_id: u32,
pub boolean_start_index: u32,
+ pub fingerprint: u64,
}
/// Query package read context: package id and start index
@@ -62,6 +63,7 @@
return Ok(Some(PackageReadContext {
package_id: interpreted_node.package_id,
boolean_start_index: interpreted_node.boolean_start_index,
+ fingerprint: interpreted_node.fingerprint,
}));
}
match interpreted_node.next_offset {
@@ -84,19 +86,58 @@
find_package_read_context(&package_table[..], "com.android.aconfig.storage.test_1")
.unwrap()
.unwrap();
- let expected_package_context = PackageReadContext { package_id: 0, boolean_start_index: 0 };
+ let expected_package_context =
+ PackageReadContext { package_id: 0, boolean_start_index: 0, fingerprint: 0 };
assert_eq!(package_context, expected_package_context);
let package_context =
find_package_read_context(&package_table[..], "com.android.aconfig.storage.test_2")
.unwrap()
.unwrap();
- let expected_package_context = PackageReadContext { package_id: 1, boolean_start_index: 3 };
+ let expected_package_context =
+ PackageReadContext { package_id: 1, boolean_start_index: 3, fingerprint: 0 };
assert_eq!(package_context, expected_package_context);
let package_context =
find_package_read_context(&package_table[..], "com.android.aconfig.storage.test_4")
.unwrap()
.unwrap();
- let expected_package_context = PackageReadContext { package_id: 2, boolean_start_index: 6 };
+ let expected_package_context =
+ PackageReadContext { package_id: 2, boolean_start_index: 6, fingerprint: 0 };
+ assert_eq!(package_context, expected_package_context);
+ }
+
+ #[test]
+ // this test point locks down table query
+ fn test_package_query_v2() {
+ let package_table = create_test_package_table(2).into_bytes();
+ let package_context =
+ find_package_read_context(&package_table[..], "com.android.aconfig.storage.test_1")
+ .unwrap()
+ .unwrap();
+ let expected_package_context = PackageReadContext {
+ package_id: 0,
+ boolean_start_index: 0,
+ fingerprint: 15248948510590158086u64,
+ };
+ assert_eq!(package_context, expected_package_context);
+ let package_context =
+ find_package_read_context(&package_table[..], "com.android.aconfig.storage.test_2")
+ .unwrap()
+ .unwrap();
+ let expected_package_context = PackageReadContext {
+ package_id: 1,
+ boolean_start_index: 3,
+ fingerprint: 4431940502274857964u64,
+ };
+ assert_eq!(package_context, expected_package_context);
+ let package_context =
+ find_package_read_context(&package_table[..], "com.android.aconfig.storage.test_4")
+ .unwrap()
+ .unwrap();
+ let expected_package_context = PackageReadContext {
+ package_id: 2,
+ boolean_start_index: 6,
+ fingerprint: 16233229917711622375u64,
+ };
assert_eq!(package_context, expected_package_context);
}
diff --git a/tools/aconfig/aconfig_storage_read_api/srcs/android/os/flagging/PlatformAconfigPackageInternal.java b/tools/aconfig/aconfig_storage_read_api/srcs/android/os/flagging/PlatformAconfigPackageInternal.java
index 83310be..e6b6db4 100644
--- a/tools/aconfig/aconfig_storage_read_api/srcs/android/os/flagging/PlatformAconfigPackageInternal.java
+++ b/tools/aconfig/aconfig_storage_read_api/srcs/android/os/flagging/PlatformAconfigPackageInternal.java
@@ -45,14 +45,14 @@
private final FlagValueList mFlagValueList;
private final int mPackageId;
private final int mPackageBooleanStartOffset;
- private final AconfigStorageException mException;
+ private final AconfigStorageReadException mException;
private PlatformAconfigPackageInternal(
FlagValueList flagValueList,
FlagTable flagTable,
int packageBooleanStartOffset,
int packageId,
- AconfigStorageException exception) {
+ AconfigStorageReadException exception) {
this.mFlagValueList = flagValueList;
this.mFlagTable = flagTable;
this.mPackageBooleanStartOffset = packageBooleanStartOffset;
@@ -150,7 +150,7 @@
if (pNode == null) {
return createExceptionInstance(
- AconfigStorageException.ERROR_PACKAGE_NOT_FOUND,
+ AconfigStorageReadException.ERROR_PACKAGE_NOT_FOUND,
"package "
+ packageName
+ " in container "
@@ -165,7 +165,7 @@
fileProvider.getFlagTable(container),
pNode.getBooleanStartIndex(),
pNode.getPackageId(),
- new AconfigStorageException(
+ new AconfigStorageReadException(
AconfigStorageException.ERROR_FILE_FINGERPRINT_MISMATCH,
"The fingerprint provided for the Aconfig package "
+ packageName
@@ -244,7 +244,7 @@
* @hide
*/
@UnsupportedAppUsage
- public Exception getException() {
+ public AconfigStorageReadException getException() {
return mException;
}
@@ -259,6 +259,6 @@
private static PlatformAconfigPackageInternal createExceptionInstance(
int errorCode, String message) {
return new PlatformAconfigPackageInternal(
- null, null, 0, 0, new AconfigStorageException(errorCode, message));
+ null, null, 0, 0, new AconfigStorageReadException(errorCode, message));
}
}
diff --git a/tools/aconfig/aconfig_storage_read_api/tests/Android.bp b/tools/aconfig/aconfig_storage_read_api/tests/Android.bp
index fb2fc77..702325d 100644
--- a/tools/aconfig/aconfig_storage_read_api/tests/Android.bp
+++ b/tools/aconfig/aconfig_storage_read_api/tests/Android.bp
@@ -57,7 +57,6 @@
static_libs: [
"aconfig_device_paths_java",
"aconfig_storage_file_java",
- "aconfig_storage_reader_java",
"androidx.test.rules",
"libaconfig_storage_read_api_java",
"junit",
diff --git a/tools/aconfig/aconfig_storage_read_api/tests/functional/srcs/PlatformAconfigPackageInternalTest.java b/tools/aconfig/aconfig_storage_read_api/tests/functional/srcs/PlatformAconfigPackageInternalTest.java
index 15cfc3b..c4a5560 100644
--- a/tools/aconfig/aconfig_storage_read_api/tests/functional/srcs/PlatformAconfigPackageInternalTest.java
+++ b/tools/aconfig/aconfig_storage_read_api/tests/functional/srcs/PlatformAconfigPackageInternalTest.java
@@ -122,13 +122,13 @@
PlatformAconfigPackageInternal.load("fake_container", "fake_package", 0);
assertEquals(
AconfigStorageException.ERROR_CANNOT_READ_STORAGE_FILE,
- ((AconfigStorageException) aPackage.getException()).getErrorCode());
+ aPackage.getException().getErrorCode());
// package not found
aPackage = PlatformAconfigPackageInternal.load("system", "fake_container", 0);
assertEquals(
AconfigStorageException.ERROR_PACKAGE_NOT_FOUND,
- ((AconfigStorageException) aPackage.getException()).getErrorCode());
+ aPackage.getException().getErrorCode());
// fingerprint doesn't match
List<parsed_flag> flags = DeviceProtos.loadAndParseFlagProtos();
@@ -148,7 +148,7 @@
aPackage = PlatformAconfigPackageInternal.load(container, packageName, fingerprint + 1);
assertEquals(
// AconfigStorageException.ERROR_FILE_FINGERPRINT_MISMATCH,
- 5, ((AconfigStorageException) aPackage.getException()).getErrorCode());
+ 5, aPackage.getException().getErrorCode());
assertEquals(aPackage.getBooleanFlagValue(flag.name, !value), value);
}
}
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 5605a41..2a8edf3 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
@@ -64,21 +64,67 @@
get_package_read_context(&package_mapped_file, "com.android.aconfig.storage.test_1")
.unwrap()
.unwrap();
- let expected_package_context = PackageReadContext { package_id: 0, boolean_start_index: 0 };
+ let expected_package_context =
+ PackageReadContext { package_id: 0, boolean_start_index: 0, fingerprint: 0 };
assert_eq!(package_context, expected_package_context);
let package_context =
get_package_read_context(&package_mapped_file, "com.android.aconfig.storage.test_2")
.unwrap()
.unwrap();
- let expected_package_context = PackageReadContext { package_id: 1, boolean_start_index: 3 };
+ let expected_package_context =
+ PackageReadContext { package_id: 1, boolean_start_index: 3, fingerprint: 0 };
assert_eq!(package_context, expected_package_context);
let package_context =
get_package_read_context(&package_mapped_file, "com.android.aconfig.storage.test_4")
.unwrap()
.unwrap();
- let expected_package_context = PackageReadContext { package_id: 2, boolean_start_index: 6 };
+ let expected_package_context =
+ PackageReadContext { package_id: 2, boolean_start_index: 6, fingerprint: 0 };
+ assert_eq!(package_context, expected_package_context);
+ }
+
+ #[test]
+ fn test_package_context_query_with_fingerprint() {
+ let storage_dir = create_test_storage_files(2);
+ // SAFETY:
+ // The safety here is ensured as the test process will not write to temp storage file
+ let package_mapped_file = unsafe {
+ get_mapped_file(&storage_dir, "mockup", StorageFileType::PackageMap).unwrap()
+ };
+
+ let package_context =
+ get_package_read_context(&package_mapped_file, "com.android.aconfig.storage.test_1")
+ .unwrap()
+ .unwrap();
+ let expected_package_context = PackageReadContext {
+ package_id: 0,
+ boolean_start_index: 0,
+ fingerprint: 15248948510590158086u64,
+ };
+ assert_eq!(package_context, expected_package_context);
+
+ let package_context =
+ get_package_read_context(&package_mapped_file, "com.android.aconfig.storage.test_2")
+ .unwrap()
+ .unwrap();
+ let expected_package_context = PackageReadContext {
+ package_id: 1,
+ boolean_start_index: 3,
+ fingerprint: 4431940502274857964u64,
+ };
+ assert_eq!(package_context, expected_package_context);
+
+ let package_context =
+ get_package_read_context(&package_mapped_file, "com.android.aconfig.storage.test_4")
+ .unwrap()
+ .unwrap();
+ let expected_package_context = PackageReadContext {
+ package_id: 2,
+ boolean_start_index: 6,
+ fingerprint: 16233229917711622375u64,
+ };
assert_eq!(package_context, expected_package_context);
}
diff --git a/tools/aconfig/aconfig_storage_read_api/tests/unit/srcs/PlatformAconfigPackageInternalTest.java b/tools/aconfig/aconfig_storage_read_api/tests/unit/srcs/PlatformAconfigPackageInternalTest.java
index 392f644..ce3786a 100644
--- a/tools/aconfig/aconfig_storage_read_api/tests/unit/srcs/PlatformAconfigPackageInternalTest.java
+++ b/tools/aconfig/aconfig_storage_read_api/tests/unit/srcs/PlatformAconfigPackageInternalTest.java
@@ -61,31 +61,31 @@
assertEquals(
AconfigStorageException.ERROR_PACKAGE_NOT_FOUND,
- ((AconfigStorageException) p.getException()).getErrorCode());
+ p.getException().getErrorCode());
// cannot find container
p = PlatformAconfigPackageInternal.load(null, "com.android.aconfig.storage.test_1", pr);
assertEquals(
AconfigStorageException.ERROR_CANNOT_READ_STORAGE_FILE,
- ((AconfigStorageException) p.getException()).getErrorCode());
+ p.getException().getErrorCode());
p = PlatformAconfigPackageInternal.load("test", "com.android.aconfig.storage.test_1", pr);
assertEquals(
AconfigStorageException.ERROR_CANNOT_READ_STORAGE_FILE,
- ((AconfigStorageException) p.getException()).getErrorCode());
+ p.getException().getErrorCode());
// new storage doesn't exist
pr = new StorageFileProvider("fake/path/", "fake/path/");
p = PlatformAconfigPackageInternal.load("mockup", "com.android.aconfig.storage.test_1", pr);
assertEquals(
AconfigStorageException.ERROR_CANNOT_READ_STORAGE_FILE,
- ((AconfigStorageException) p.getException()).getErrorCode());
+ p.getException().getErrorCode());
// file read issue
pr = new StorageFileProvider(TESTDATA_PATH, "fake/path/");
p = PlatformAconfigPackageInternal.load("mockup", "com.android.aconfig.storage.test_1", pr);
assertEquals(
AconfigStorageException.ERROR_CANNOT_READ_STORAGE_FILE,
- ((AconfigStorageException) p.getException()).getErrorCode());
+ p.getException().getErrorCode());
}
@Test
@@ -117,7 +117,7 @@
assertEquals(
AconfigStorageException.ERROR_PACKAGE_NOT_FOUND,
- ((AconfigStorageException) p.getException()).getErrorCode());
+ p.getException().getErrorCode());
// cannot find container
p =
@@ -125,20 +125,20 @@
null, "com.android.aconfig.storage.test_1", fingerprint, pr);
assertEquals(
AconfigStorageException.ERROR_CANNOT_READ_STORAGE_FILE,
- ((AconfigStorageException) p.getException()).getErrorCode());
+ p.getException().getErrorCode());
p =
PlatformAconfigPackageInternal.load(
"test", "com.android.aconfig.storage.test_1", fingerprint, pr);
assertEquals(
AconfigStorageException.ERROR_CANNOT_READ_STORAGE_FILE,
- ((AconfigStorageException) p.getException()).getErrorCode());
+ p.getException().getErrorCode());
// fingerprint doesn't match
p =
PlatformAconfigPackageInternal.load(
"mockup", "com.android.aconfig.storage.test_1", fingerprint + 1, pr);
assertEquals(
// AconfigStorageException.ERROR_FILE_FINGERPRINT_MISMATCH,
- 5, ((AconfigStorageException) p.getException()).getErrorCode());
+ 5, p.getException().getErrorCode());
// new storage doesn't exist
pr = new StorageFileProvider("fake/path/", "fake/path/");
@@ -147,7 +147,7 @@
"mockup", "com.android.aconfig.storage.test_1", fingerprint, pr);
assertEquals(
AconfigStorageException.ERROR_CANNOT_READ_STORAGE_FILE,
- ((AconfigStorageException) p.getException()).getErrorCode());
+ p.getException().getErrorCode());
// file read issue
pr = new StorageFileProvider(TESTDATA_PATH, "fake/path/");
@@ -156,7 +156,7 @@
"mockup", "com.android.aconfig.storage.test_1", fingerprint, pr);
assertEquals(
AconfigStorageException.ERROR_CANNOT_READ_STORAGE_FILE,
- ((AconfigStorageException) p.getException()).getErrorCode());
+ p.getException().getErrorCode());
}
@Test
diff --git a/tools/aconfig/aflags/src/aconfig_storage_source.rs b/tools/aconfig/aflags/src/aconfig_storage_source.rs
index 3f593fe..aef7d7e 100644
--- a/tools/aconfig/aflags/src/aconfig_storage_source.rs
+++ b/tools/aconfig/aflags/src/aconfig_storage_source.rs
@@ -93,11 +93,7 @@
special_fields: SpecialFields::new(),
};
- let socket_name = if aconfig_flags::auto_generated::enable_system_aconfigd_rust() {
- "/dev/socket/aconfigd_system"
- } else {
- "/dev/socket/aconfigd"
- };
+ let socket_name = "/dev/socket/aconfigd_system";
let mut socket = UnixStream::connect(socket_name)?;
let message_buffer = messages.write_to_bytes()?;
diff --git a/tools/aconfig/fake_device_config/Android.bp b/tools/aconfig/fake_device_config/Android.bp
index 4cd5070..1c5b7c5 100644
--- a/tools/aconfig/fake_device_config/Android.bp
+++ b/tools/aconfig/fake_device_config/Android.bp
@@ -42,3 +42,14 @@
host_supported: true,
is_stubs_module: true,
}
+
+java_library {
+ name: "aconfig_storage_stub_none",
+ srcs: [
+ "src/android/os/flagging/**/*.java",
+ ],
+ sdk_version: "none",
+ system_modules: "core-all-system-modules",
+ host_supported: true,
+ is_stubs_module: true,
+}
diff --git a/tools/aconfig/fake_device_config/src/android/os/Build.java b/tools/aconfig/fake_device_config/src/android/os/Build.java
new file mode 100644
index 0000000..8ec72fb
--- /dev/null
+++ b/tools/aconfig/fake_device_config/src/android/os/Build.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os;
+
+public class Build {
+ public static class VERSION {
+ public static final int SDK_INT = 0;
+ }
+}
diff --git a/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackage.java b/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackage.java
new file mode 100644
index 0000000..3cac516
--- /dev/null
+++ b/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackage.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os.flagging;
+
+/*
+ * This class allows generated aconfig code to compile independently of the framework.
+ */
+public class AconfigPackage {
+ public static AconfigPackage load(String packageName) {
+ throw new UnsupportedOperationException("Stub!");
+ }
+
+ public boolean getBooleanFlagValue(String flagName, boolean defaultValue) {
+ throw new UnsupportedOperationException("Stub!");
+ }
+}
diff --git a/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackageInternal.java b/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackageInternal.java
new file mode 100644
index 0000000..5f066a8
--- /dev/null
+++ b/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackageInternal.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os.flagging;
+
+/*
+ * This class allows generated aconfig code to compile independently of the framework.
+ */
+public class AconfigPackageInternal {
+
+ public static AconfigPackageInternal load(String container, String packageName) {
+ throw new UnsupportedOperationException("Stub!");
+ }
+
+ public static AconfigPackageInternal load(
+ String container, String packageName, long packageFingerprint) {
+ throw new UnsupportedOperationException("Stub!");
+ }
+
+ public boolean getBooleanFlagValue(int index) {
+ throw new UnsupportedOperationException("Stub!");
+ }
+
+ public boolean getBooleanFlagValue(String flagName, boolean defaultValue) {
+ throw new UnsupportedOperationException("Stub!");
+ }
+
+ public AconfigStorageReadException getException() {
+ throw new UnsupportedOperationException("Stub!");
+ }
+}
diff --git a/tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackageInternal.java b/tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackageInternal.java
new file mode 100644
index 0000000..c1bc19b
--- /dev/null
+++ b/tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackageInternal.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os.flagging;
+
+/*
+ * This class allows generated aconfig code to compile independently of the framework.
+ */
+public class PlatformAconfigPackageInternal {
+
+ public static PlatformAconfigPackageInternal load(String container, String packageName) {
+ throw new UnsupportedOperationException("Stub!");
+ }
+
+ public static PlatformAconfigPackageInternal load(
+ String container, String packageName, long packageFingerprint) {
+ throw new UnsupportedOperationException("Stub!");
+ }
+
+ public boolean getBooleanFlagValue(int index) {
+ throw new UnsupportedOperationException("Stub!");
+ }
+
+ public boolean getBooleanFlagValue(String flagName, boolean defaultValue) {
+ throw new UnsupportedOperationException("Stub!");
+ }
+
+ public AconfigStorageReadException getException() {
+ throw new UnsupportedOperationException("Stub!");
+ }
+}
diff --git a/tools/aconfig/fake_device_config/src/android/provider/AconfigPackage.java b/tools/aconfig/fake_device_config/src/android/provider/AconfigPackage.java
deleted file mode 100644
index 2f01b8c..0000000
--- a/tools/aconfig/fake_device_config/src/android/provider/AconfigPackage.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.provider;
-
-/*
- * This class allows generated aconfig code to compile independently of the framework.
- */
-public class AconfigPackage {
-
- /** Flag value is true */
- public static final int FLAG_BOOLEAN_VALUE_TRUE = 1;
-
- /** Flag value is false */
- public static final int FLAG_BOOLEAN_VALUE_FALSE = 0;
-
- /** Flag value doesn't exist */
- public static final int FLAG_BOOLEAN_VALUE_NOT_EXIST = 2;
-
- public static int getBooleanFlagValue(String packageName, String flagName) {
- return 0;
- }
-
- public AconfigPackage(String packageName) {}
-
- public int getBooleanFlagValue(String flagName) {
- return 0;
- }
-}
\ No newline at end of file
diff --git a/tools/edit_monitor/daemon_manager.py b/tools/edit_monitor/daemon_manager.py
index 22782f7..0c31ab8 100644
--- a/tools/edit_monitor/daemon_manager.py
+++ b/tools/edit_monitor/daemon_manager.py
@@ -87,7 +87,7 @@
"edit_monitor",
self.user_name,
"ENABLE_ANDROID_EDIT_MONITOR",
- 50,
+ 100,
):
logging.warning("Edit monitor is disabled, exiting...")
return