Merge changes Ibf4f6584,Icd55ed1b,Idecd2f00,I00a62769,I80c56064 into main
* changes:
Replace test suites symbols.zip name patterns
Remove redundant entries from symbols.zip
Create symbols.zip per test suite
Generate symbols mapping files for jni libs
Modify the params of copy-unstripped-elf-file-with-mapping
diff --git a/core/Makefile b/core/Makefile
index 7fe1ad6..f4eb07a 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -775,7 +775,13 @@
intermediates := \
$(call intermediates-dir-for,PACKAGING,apkcerts)
APKCERTS_FILE := $(intermediates)/$(name).txt
-all_apkcerts_files := $(sort $(foreach p,$(PACKAGES),$(PACKAGES.$(p).APKCERTS_FILE)))
+ifeq ($(RELEASE_APKCERTS_INSTALL_ONLY), true)
+ all_apkcerts_packages := $(filter $(call product-installed-modules,$(INTERNAL_PRODUCT)),$(PACKAGES))
+else
+ all_apkcerts_packages := $(PACKAGES)
+endif
+all_apkcerts_files := $(sort $(foreach p,$(all_apkcerts_packages),$(PACKAGES.$(p).APKCERTS_FILE)))
+
$(APKCERTS_FILE): $(all_apkcerts_files)
# We don't need to really build all the modules.
# TODO: rebuild APKCERTS_FILE if any app change its cert.
@@ -783,7 +789,7 @@
@echo APK certs list: $@
@mkdir -p $(dir $@)
@rm -f $@
- $(foreach p,$(sort $(PACKAGES)),\
+ $(foreach p,$(sort $(all_apkcerts_packages)),\
$(if $(PACKAGES.$(p).APKCERTS_FILE),\
$(call _apkcerts_merge,$(PACKAGES.$(p).APKCERTS_FILE), $@),\
$(if $(PACKAGES.$(p).EXTERNAL_KEY),\
@@ -6273,13 +6279,13 @@
$(foreach device,$(BOARD_SUPER_PARTITION_BLOCK_DEVICES), \
echo "super_$(device)_device_size=$(BOARD_SUPER_PARTITION_$(call to-upper,$(device))_DEVICE_SIZE)" >> $(1);)
$(if $(BOARD_SUPER_PARTITION_PARTITION_LIST), \
- echo "dynamic_partition_list=$(call filter-out-missing-partitions,$(BOARD_SUPER_PARTITION_PARTITION_LIST))" >> $(1))
+ echo "dynamic_partition_list=$(sort $(call filter-out-missing-partitions,$(BOARD_SUPER_PARTITION_PARTITION_LIST)))" >> $(1))
$(if $(BOARD_SUPER_PARTITION_GROUPS),
echo "super_partition_groups=$(BOARD_SUPER_PARTITION_GROUPS)" >> $(1))
$(foreach group,$(BOARD_SUPER_PARTITION_GROUPS), \
echo "super_$(group)_group_size=$(BOARD_$(call to-upper,$(group))_SIZE)" >> $(1); \
$(if $(BOARD_$(call to-upper,$(group))_PARTITION_LIST), \
- echo "super_$(group)_partition_list=$(call filter-out-missing-partitions,$(BOARD_$(call to-upper,$(group))_PARTITION_LIST))" >> $(1);))
+ echo "super_$(group)_partition_list=$(strip $(call filter-out-missing-partitions,$(BOARD_$(call to-upper,$(group))_PARTITION_LIST)))" >> $(1);))
$(if $(filter true,$(TARGET_USERIMAGES_SPARSE_EXT_DISABLED)), \
echo "build_non_sparse_super_partition=true" >> $(1))
$(if $(filter true,$(TARGET_USERIMAGES_SPARSE_F2FS_DISABLED)), \
@@ -7328,6 +7334,72 @@
_proguard_dict_zip_modules := $(unbundled_build_modules)
endif
+# Filter out list to avoid uncessary proguard related file generation
+ifeq (,$(TARGET_BUILD_UNBUNDLED))
+filter_out_proguard_dict_zip_modules :=
+# product.img
+ifndef BUILDING_PRODUCT_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/product/%
+endif
+# system.img
+ifndef BUILDING_SYSTEM_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/system/%
+endif
+# system_dlkm.img
+ifndef BUILDING_SYSTEM_DLKM_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/system_dlkm/%
+endif
+# system_ext.img
+ifndef BUILDING_SYSTEM_EXT_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/system_ext/%
+endif
+# system_other.img
+ifndef BUILDING_SYSTEM_OTHER_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/system_other/%
+endif
+# odm.img
+ifndef BUILDING_ODM_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/odm/%
+endif
+# odm_dlkm.img
+ifndef BUILDING_ODM_DLKM_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/odm_dlkm/%
+endif
+# vendor.img
+ifndef BUILDING_VENDOR_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/vendor/%
+endif
+# vendor_dlkm.img
+ifndef BUILDING_VENDOR_DLKM_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/vendor_dlkm/%
+endif
+# cache.img
+ifndef BUILDING_CACHE_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/cache/%
+endif
+# ramdisk.img
+ifndef BUILDING_RAMDISK_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/ramdisk/%
+endif
+# recovery.img
+ifndef INSTALLED_RECOVERYIMAGE_TARGET
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/recovery/%
+endif
+# userdata.img
+ifndef BUILDING_USERDATA_IMAGE
+filter_out_proguard_dict_zip_modules += $(PRODUCT_OUT)/data/%
+endif
+
+# Check the installed files of each module and return the module name
+# or return empty if none of the files remain to be installed
+define filter-out-proguard-modules
+$(if $(filter-out $(filter_out_proguard_dict_zip_modules),$(call module-installed-files,$(1))),$(1))
+endef
+
+# Filter out proguard dict zip modules those are not installed at the built image
+_proguard_dict_zip_modules := $(foreach m,$(_proguard_dict_zip_modules),$(strip $(call filter-out-proguard-modules,$(m))))
+endif
+
# The path to the zip file containing proguard dictionaries.
PROGUARD_DICT_ZIP :=$= $(PRODUCT_OUT)/$(TARGET_PRODUCT)-proguard-dict.zip
$(PROGUARD_DICT_ZIP): PRIVATE_SOONG_ZIP_ARGUMENTS := $(foreach m,$(_proguard_dict_zip_modules),$(ALL_MODULES.$(m).PROGUARD_DICTIONARY_SOONG_ZIP_ARGUMENTS))
diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk
index 6aea680..f57ec81 100644
--- a/core/android_soong_config_vars.mk
+++ b/core/android_soong_config_vars.mk
@@ -108,6 +108,9 @@
SYSTEMUI_OPTIMIZE_JAVA ?= true
$(call add_soong_config_var,ANDROID,SYSTEMUI_OPTIMIZE_JAVA)
+# Flag to use baseline profile for SystemUI.
+$(call soong_config_set,ANDROID,release_systemui_use_speed_profile,$(RELEASE_SYSTEMUI_USE_SPEED_PROFILE))
+
# Flag for enabling compose for Launcher.
$(call soong_config_set,ANDROID,release_enable_compose_in_launcher,$(RELEASE_ENABLE_COMPOSE_IN_LAUNCHER))
@@ -216,6 +219,19 @@
# Required as platform_bootclasspath is using this namespace
$(call soong_config_set,bootclasspath,release_crashrecovery_module,$(RELEASE_CRASHRECOVERY_MODULE))
+
+# Add ondeviceintelligence module build flag to soong
+ifeq (true,$(RELEASE_ONDEVICE_INTELLIGENCE_MODULE))
+ $(call soong_config_set,ANDROID,release_ondevice_intelligence_module,true)
+ # Required as platform_bootclasspath is using this namespace
+ $(call soong_config_set,bootclasspath,release_ondevice_intelligence_module,true)
+
+else
+ $(call soong_config_set,ANDROID,release_ondevice_intelligence_platform,true)
+ $(call soong_config_set,bootclasspath,release_ondevice_intelligence_platform,true)
+
+endif
+
# Add uprobestats build flag to soong
$(call soong_config_set,ANDROID,release_uprobestats_module,$(RELEASE_UPROBESTATS_MODULE))
# Add uprobestats file move flags to soong, for both platform and module
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 9ffe518..604fe06 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -214,6 +214,22 @@
actual_partition_tag := $(if $(partition_tag),data,system)
endif
endif
+
+# if this is a soong module, verify that LOCAL_COMPATIBILITY_SUITE (legacy) matches
+# LOCAL_SOONG_PROVIDER_TEST_SUITES (new, via TestSuiteInfoProvider instead of AndroidMk stuff),
+# modulo "null-sute", "mts", and "mcts". mts/mcts are automatically added if there's a different
+# suite starting with "m(c)ts-". null-suite seems useless and is sometimes automatically added
+# if no other suites are added.
+ifneq (,$(filter $(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK)))
+ a := $(filter-out null-suite mts mcts,$(sort $(LOCAL_COMPATIBILITY_SUITE)))
+ b := $(filter-out null-suite mts mcts,$(sort $(LOCAL_SOONG_PROVIDER_TEST_SUITES)))
+ ifneq ($(a),$(b))
+ $(error $(LOCAL_MODULE): LOCAL_COMPATIBILITY_SUITE did not match LOCAL_SOONG_PROVIDER_TEST_SUITES$(newline) LOCAL_COMPATIBILITY_SUITE: $(a)$(newline) LOCAL_SOONG_PROVIDER_TEST_SUITES: $(b)$(newline))
+ endif
+ a :=
+ b :=
+endif
+
# For test modules that lack a suite tag, set null-suite as the default.
# We only support adding a default suite to native tests, native benchmarks, and instrumentation tests.
# This is because they are the only tests we currently auto-generate test configs for.
diff --git a/core/board_config.mk b/core/board_config.mk
index ad89c03..16cf863 100644
--- a/core/board_config.mk
+++ b/core/board_config.mk
@@ -225,6 +225,7 @@
$(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \
device/generic/goldfish/board/$(TARGET_DEVICE)/BoardConfig.mk \
device/google/cuttlefish/board/$(TARGET_DEVICE)/BoardConfig.mk \
+ vendor/google/products/cuttlefish/pixel_watch/board/$(TARGET_DEVICE)/BoardConfig.mk \
$(shell test -d device && find -L device -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \
$(shell test -d vendor && find -L vendor -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \
)))
@@ -289,6 +290,7 @@
$(error Valid values of $(var) are "true", "false", and "". Not "$($(var))")))
include $(BUILD_SYSTEM)/board_config_wifi.mk
+include $(BUILD_SYSTEM)/board_config_wpa_supplicant.mk
# Set up soong config for "soong_config_value_variable".
-include hardware/interfaces/configstore/1.1/default/surfaceflinger.mk
diff --git a/core/board_config_wpa_supplicant.mk b/core/board_config_wpa_supplicant.mk
new file mode 100644
index 0000000..9ef438e
--- /dev/null
+++ b/core/board_config_wpa_supplicant.mk
@@ -0,0 +1,88 @@
+#
+# 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.
+#
+
+# ###############################################################
+# This file adds wpa_supplicant_8 variables into soong config namespace (`wpa_supplicant_8`)
+# ###############################################################
+
+ifdef BOARD_HOSTAPD_DRIVER
+$(call soong_config_set_bool,wpa_supplicant_8,wpa_build_hostapd,true)
+ifneq ($(BOARD_HOSTAPD_DRIVER),NL80211)
+ $(error BOARD_HOSTAPD_DRIVER set to $(BOARD_HOSTAPD_DRIVER) but current soong expected it should be NL80211 only!)
+endif
+endif
+
+ifdef BOARD_WPA_SUPPLICANT_DRIVER
+ifneq ($(BOARD_WPA_SUPPLICANT_DRIVER),NL80211)
+ $(error BOARD_WPA_SUPPLICANT_DRIVER set to $(BOARD_WPA_SUPPLICANT_DRIVER) but current soong expected it should be NL80211 only!)
+endif
+endif
+
+# This is for CONFIG_DRIVER_NL80211_BRCM, CONFIG_DRIVER_NL80211_SYNA, CONFIG_DRIVER_NL80211_QCA
+# And it is only used for a cflags setting in driver.
+$(call soong_config_set,wpa_supplicant_8,board_wlan_device,$(BOARD_WLAN_DEVICE))
+
+# Belong to CONFIG_IEEE80211AX definition
+ifeq ($(WIFI_FEATURE_HOSTAPD_11AX),true)
+$(call soong_config_set_bool,wpa_supplicant_8,hostapd_11ax,true)
+endif
+
+# Belong to CONFIG_IEEE80211BE definition
+ifeq ($(WIFI_FEATURE_HOSTAPD_11BE),true)
+$(call soong_config_set_bool,wpa_supplicant_8,hostapd_11be,true)
+endif
+
+# PLATFORM_VERSION
+$(call soong_config_set,wpa_supplicant_8,platform_version,$(PLATFORM_VERSION))
+
+# BOARD_HOSTAPD_PRIVATE_LIB
+ifeq ($(BOARD_HOSTAPD_PRIVATE_LIB),)
+$(call soong_config_set_bool,wpa_supplicant_8,hostapd_use_stub_lib,true)
+else
+$(call soong_config_set,wpa_supplicant_8,board_hostapd_private_lib,$(BOARD_HOSTAPD_PRIVATE_LIB))
+endif
+
+ifeq ($(BOARD_HOSTAPD_CONFIG_80211W_MFP_OPTIONAL),true)
+$(call soong_config_set_bool,wpa_supplicant_8,board_hostapd_config_80211w_mfp_optional,true)
+endif
+
+ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB_EVENT),)
+$(call soong_config_set_bool,wpa_supplicant_8,board_hostapd_private_lib_event,true)
+endif
+
+# BOARD_WPA_SUPPLICANT_PRIVATE_LIB
+ifeq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),)
+$(call soong_config_set_bool,wpa_supplicant_8,wpa_supplicant_use_stub_lib,true)
+else
+$(call soong_config_set,wpa_supplicant_8,board_wpa_supplicant_private_lib,$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB))
+endif
+
+ifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT),)
+$(call soong_config_set_bool,wpa_supplicant_8,board_wpa_supplicant_private_lib_event,true)
+endif
+
+ifeq ($(WIFI_PRIV_CMD_UPDATE_MBO_CELL_STATUS), enabled)
+$(call soong_config_set_bool,wpa_supplicant_8,wifi_priv_cmd_update_mbo_cell_status,true)
+endif
+
+ifeq ($(WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY), true)
+$(call soong_config_set_bool,wpa_supplicant_8,wifi_hidl_unified_supplicant_service_rc_entry,true)
+endif
+
+# New added in internal main
+ifeq ($(WIFI_BRCM_OPEN_SOURCE_MULTI_AKM), enabled)
+$(call soong_config_set_bool,wpa_supplicant_8,wifi_brcm_open_source_multi_akm,true)
+endif
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 2e67aff..8a98c13 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -271,6 +271,7 @@
LOCAL_SOONG_MODULE_TYPE :=
LOCAL_SOONG_PROGUARD_DICT :=
LOCAL_SOONG_PROGUARD_USAGE_ZIP :=
+LOCAL_SOONG_PROVIDER_TEST_SUITES :=
LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE :=
LOCAL_SOONG_TRANSITIVE_RES_PACKAGES :=
LOCAL_SOONG_DEVICE_RRO_DIRS :=
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk
index ab2d5c1..c0f2c68 100644
--- a/core/config_sanitizers.mk
+++ b/core/config_sanitizers.mk
@@ -284,9 +284,9 @@
ifneq ($(filter memtag_stack,$(my_sanitize)),)
my_cflags += -fsanitize=memtag-stack
my_ldflags += -fsanitize=memtag-stack
- my_cflags += -march=armv8a+memtag
- my_ldflags += -march=armv8a+memtag
- my_asflags += -march=armv8a+memtag
+ my_cflags += -Xclang -target-feature -Xclang +mte
+ my_ldflags += -Xclang -target-feature -Xclang +mte
+ my_asflags += -Xclang -target-feature -Xclang +mte
my_sanitize := $(filter-out memtag_stack,$(my_sanitize))
endif
diff --git a/core/layoutlib_data.mk b/core/layoutlib_data.mk
index dabcfb2..f228ef6 100644
--- a/core/layoutlib_data.mk
+++ b/core/layoutlib_data.mk
@@ -3,11 +3,10 @@
FONT_TEMP := $(call intermediates-dir-for,PACKAGING,fonts,HOST,COMMON)
# The font configuration files - system_fonts.xml, fallback_fonts.xml etc.
-font_config := $(sort $(wildcard frameworks/base/data/fonts/*.xml))
+font_config := $(filter $(TARGET_OUT)/etc/font%.xml, $(INTERNAL_SYSTEMIMAGE_FILES))
font_config := $(addprefix $(FONT_TEMP)/, $(notdir $(font_config)))
-$(font_config): $(FONT_TEMP)/%.xml: \
- frameworks/base/data/fonts/%.xml
+$(font_config): $(FONT_TEMP)/%: $(TARGET_OUT)/etc/%
$(hide) mkdir -p $(dir $@)
$(hide) cp -vf $< $@
diff --git a/core/main.mk b/core/main.mk
index b9edfc1..aed3fa2 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -299,6 +299,8 @@
$(foreach mk,$(subdir_makefiles),$(info [$(call inc_and_print,subdir_makefiles_inc)/$(subdir_makefiles_total)] including $(mk) ...)$(eval include $(mk)))
+-include device/generic/goldfish/tasks/emu_img_zip.mk
+
# Build bootloader.img/radio.img, and unpack the partitions.
-include vendor/google_devices/$(TARGET_SOC)/prebuilts/misc_bins/update_bootloader_radio_image.mk
@@ -993,6 +995,7 @@
define auto-included-modules
$(foreach vndk_ver,$(PRODUCT_EXTRA_VNDK_VERSIONS),com.android.vndk.v$(vndk_ver)) \
llndk.libraries.txt \
+ $(if $(DEVICE_MANIFEST_FILE),vendor_manifest.xml) \
$(if $(DEVICE_MANIFEST_SKUS),$(foreach sku, $(DEVICE_MANIFEST_SKUS),vendor_manifest_$(sku).xml)) \
$(if $(ODM_MANIFEST_FILES),odm_manifest.xml) \
$(if $(ODM_MANIFEST_SKUS),$(foreach sku, $(ODM_MANIFEST_SKUS),odm_manifest_$(sku).xml)) \
diff --git a/core/soong_config.mk b/core/soong_config.mk
index c3cbaf3..f5c5238 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -467,6 +467,7 @@
$(call add_json_bool, ProductUseDynamicPartitions, $(filter true,$(PRODUCT_USE_DYNAMIC_PARTITIONS)))
$(call add_json_bool, ProductRetrofitDynamicPartitions, $(filter true,$(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS)))
$(call add_json_bool, ProductBuildSuperPartition, $(filter true,$(PRODUCT_BUILD_SUPER_PARTITION)))
+ $(call add_json_bool, BuildingSuperEmptyImage, $(filter true,$(BUILDING_SUPER_EMPTY_IMAGE)))
$(call add_json_str, BoardSuperPartitionSize, $(BOARD_SUPER_PARTITION_SIZE))
$(call add_json_str, BoardSuperPartitionMetadataDevice, $(BOARD_SUPER_PARTITION_METADATA_DEVICE))
$(call add_json_list, BoardSuperPartitionBlockDevices, $(BOARD_SUPER_PARTITION_BLOCK_DEVICES))
diff --git a/core/sysprop.mk b/core/sysprop.mk
index 9a9f509..5485a3a 100644
--- a/core/sysprop.mk
+++ b/core/sysprop.mk
@@ -79,6 +79,7 @@
echo "ro.$(1).build.version.release=$(PLATFORM_VERSION_LAST_STABLE)" >> $(2);\
echo "ro.$(1).build.version.release_or_codename=$(PLATFORM_VERSION)" >> $(2);\
echo "ro.$(1).build.version.sdk=$(PLATFORM_SDK_VERSION)" >> $(2);\
+ echo "ro.$(1).build.version.sdk_minor=$(PLATFORM_SDK_MINOR_VERSION)" >> $(2);\
endef
diff --git a/core/version_util.mk b/core/version_util.mk
index 2bf41ec..ddcbda2 100644
--- a/core/version_util.mk
+++ b/core/version_util.mk
@@ -62,6 +62,12 @@
PLATFORM_SDK_VERSION := $(RELEASE_PLATFORM_SDK_VERSION)
.KATI_READONLY := PLATFORM_SDK_VERSION
+ifdef PLATFORM_SDK_MINOR_VERSION
+ $(error Do not set PLATFORM_SDK_MINOR_VERSION directly. Use RELEASE_PLATFORM_SDK_MINOR_VERSION. value: $(PLATFORM_SDK_MINOR_VERSION))
+endif
+PLATFORM_SDK_MINOR_VERSION := $(RELEASE_PLATFORM_SDK_MINOR_VERSION)
+.KATI_READONLY := PLATFORM_SDK_MINOR_VERSION
+
ifdef PLATFORM_SDK_EXTENSION_VERSION
$(error Do not set PLATFORM_SDK_EXTENSION_VERSION directly. Use RELEASE_PLATFORM_SDK_EXTENSION_VERSION. value: $(PLATFORM_SDK_EXTENSION_VERSION))
endif
diff --git a/shell_utils.sh b/shell_utils.sh
index 3124db5..61b0ebc 100644
--- a/shell_utils.sh
+++ b/shell_utils.sh
@@ -97,8 +97,11 @@
local out_dir=$(getoutdir)
local top=$(gettop)
- # return early if out dir is already a symlink
+ # return early if out dir is already a symlink.
if [[ -L "$out_dir" ]]; then
+ destination=$(readlink "$out_dir")
+ # ensure the destination exists.
+ mkdir -p "$destination"
return 0
fi
diff --git a/target/product/app_function_extensions.mk b/target/product/app_function_extensions.mk
index a61afdc..e601fd7 100644
--- a/target/product/app_function_extensions.mk
+++ b/target/product/app_function_extensions.mk
@@ -18,5 +18,5 @@
# /system_ext packages
PRODUCT_PACKAGES += \
- com.google.android.appfunctions.sidecar \
- appfunctions.sidecar.xml
+ com.android.extensions.appfunctions \
+ appfunctions.extension.xml
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index ef70fce..3fe97ba 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -205,7 +205,6 @@
libstdc++ \
libsysutils \
libui \
- libuprobestats_client \
libusbhost \
libutils \
libvintf_jni \
@@ -310,8 +309,20 @@
PRODUCT_PACKAGES += \
com.android.crashrecovery \
+else
+ PRODUCT_PACKAGES += \
+ framework-platformcrashrecovery \
+
endif
+# When we release ondeviceintelligence in neuralnetworks module
+ifneq ($(RELEASE_ONDEVICE_INTELLIGENCE_MODULE),true)
+ PRODUCT_PACKAGES += \
+ framework-ondeviceintelligence-platform
+
+endif
+
+
# When we release uprobestats module
ifeq ($(RELEASE_UPROBESTATS_MODULE),true)
PRODUCT_PACKAGES += \
@@ -320,6 +331,7 @@
else
PRODUCT_PACKAGES += \
uprobestats \
+ libuprobestats_client \
endif
@@ -350,8 +362,7 @@
# Check if the build supports Profiling module
ifeq ($(RELEASE_PACKAGE_PROFILING_MODULE),true)
PRODUCT_PACKAGES += \
- com.android.profiling \
- trace_redactor
+ com.android.profiling
endif
ifeq ($(RELEASE_USE_WEBVIEW_BOOTSTRAP_MODULE),true)
@@ -374,6 +385,9 @@
ifeq ($(RELEASE_MEMORY_MANAGEMENT_DAEMON),true)
PRODUCT_PACKAGES += \
mm_daemon
+else
+ PRODUCT_PACKAGES += \
+ init-mmd-prop.rc
endif
# VINTF data for system image
diff --git a/target/product/base_system_ext.mk b/target/product/base_system_ext.mk
index febe537..6767b9a 100644
--- a/target/product/base_system_ext.mk
+++ b/target/product/base_system_ext.mk
@@ -30,3 +30,8 @@
PRODUCT_PACKAGES_SHIPPING_API_LEVEL_34 += \
hwservicemanager \
android.hidl.allocator@1.0-service \
+
+# AppFunction Extensions
+ifneq (,$(RELEASE_APPFUNCTION_SIDECAR))
+ $(call inherit-product, $(SRC_TARGET_DIR)/product/app_function_extensions.mk)
+endif
\ No newline at end of file
diff --git a/target/product/base_vendor.mk b/target/product/base_vendor.mk
index 16fc7fd..b4e450e 100644
--- a/target/product/base_vendor.mk
+++ b/target/product/base_vendor.mk
@@ -106,7 +106,6 @@
# VINTF data for vendor image
PRODUCT_PACKAGES += \
vendor_compatibility_matrix.xml \
- vendor_manifest.xml \
# Base modules and settings for the debug ramdisk, which is then packed
# into a boot-debug.img and a vendor_boot-debug.img.
diff --git a/target/product/build_variables.mk b/target/product/build_variables.mk
index 8e1de8f..562e5b7 100644
--- a/target/product/build_variables.mk
+++ b/target/product/build_variables.mk
@@ -32,5 +32,8 @@
# Use the configured MessageQueue implementation
$(call soong_config_set, messagequeue, release_package_messagequeue_implementation, $(RELEASE_PACKAGE_MESSAGEQUEUE_IMPLEMENTATION))
+# Use the configured version of WebView
+$(call soong_config_set, webview, release_package_webview_version, $(RELEASE_PACKAGE_WEBVIEW_VERSION))
+
# Use the configured version of Cronet
$(call soong_config_set,cronet,enable_cronet_tot,$(RELEASE_ENABLE_TOT_CRONET))
diff --git a/target/product/default_art_config.mk b/target/product/default_art_config.mk
index e543ccf..f91cb07 100644
--- a/target/product/default_art_config.mk
+++ b/target/product/default_art_config.mk
@@ -90,11 +90,27 @@
com.android.virt:framework-virtualization \
com.android.wifi:framework-wifi \
-# When we release crashrecovery module
+# When crashrecovery module is ready use apex jar
+# else put the platform jar in system
ifeq ($(RELEASE_CRASHRECOVERY_MODULE),true)
- PRODUCT_APEX_BOOT_JARS += \
+ PRODUCT_APEX_BOOT_JARS += \
com.android.crashrecovery:framework-crashrecovery \
+else
+ PRODUCT_BOOT_JARS += \
+ framework-platformcrashrecovery \
+
+endif
+
+# When we release ondeviceintelligence in NeuralNetworks module
+ifeq ($(RELEASE_ONDEVICE_INTELLIGENCE_MODULE),true)
+ PRODUCT_APEX_BOOT_JARS += \
+ com.android.neuralnetworks:framework-ondeviceintelligence \
+
+else
+ PRODUCT_BOOT_JARS += \
+ framework-ondeviceintelligence-platform \
+
endif
# Check if the build supports NFC apex or not
@@ -153,6 +169,13 @@
endif
+# When we release ondeviceintelligence in NeuralNetworks module
+ifeq ($(RELEASE_ONDEVICE_INTELLIGENCE_MODULE),true)
+ PRODUCT_APEX_SYSTEM_SERVER_JARS += \
+ com.android.neuralnetworks:service-ondeviceintelligence
+
+endif
+
ifeq ($(RELEASE_AVF_ENABLE_LLPVM_CHANGES),true)
PRODUCT_APEX_SYSTEM_SERVER_JARS += com.android.virt:service-virtualization
endif
diff --git a/target/product/generic/Android.bp b/target/product/generic/Android.bp
index 38fa688..c90c61c 100644
--- a/target/product/generic/Android.bp
+++ b/target/product/generic/Android.bp
@@ -393,8 +393,8 @@
"charger",
] + select(release_flag("RELEASE_APPFUNCTION_SIDECAR"), {
true: [
- "com.google.android.appfunctions.sidecar",
- "appfunctions.sidecar.xml",
+ "com.android.extensions.appfunctions",
+ "appfunctions.extension.xml",
],
default: [],
}),
@@ -694,16 +694,13 @@
default: [
"android.software.preview_sdk.prebuilt.xml", // media_system
],
- }) + select(soong_config_variable("ANDROID", "release_package_profiling_module"), {
- "true": [
- "trace_redactor", // base_system (RELEASE_PACKAGE_PROFILING_MODULE)
- ],
- default: [],
}) + select(release_flag("RELEASE_MEMORY_MANAGEMENT_DAEMON"), {
true: [
"mm_daemon", // base_system (RELEASE_MEMORY_MANAGEMENT_DAEMON)
],
- default: [],
+ default: [
+ "init-mmd-prop.rc", // base_system
+ ],
}) + select(product_variable("debuggable"), {
true: [
"alloctop",
@@ -868,7 +865,16 @@
"true": [
"com.android.crashrecovery", // base_system (RELEASE_CRASHRECOVERY_MODULE)
],
- default: [],
+ default: [
+ "framework-platformcrashrecovery", // base_system
+ ],
+ }) + select(release_flag("RELEASE_ONDEVICE_INTELLIGENCE_MODULE"), {
+ true: [
+ "com.android.neuralnetworks", // base_system (RELEASE_ONDEVICE_INTELLIGENCE_MODULE)
+ ],
+ default: [
+ "framework-ondeviceintelligence-platform", // base_system
+ ],
}) + select(soong_config_variable("ANDROID", "release_package_profiling_module"), {
"true": [
"com.android.profiling", // base_system (RELEASE_PACKAGE_PROFILING_MODULE)
diff --git a/target/product/media_system_ext.mk b/target/product/media_system_ext.mk
index 1179966..e79a7eb 100644
--- a/target/product/media_system_ext.mk
+++ b/target/product/media_system_ext.mk
@@ -22,8 +22,3 @@
# Window Extensions
$(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions_base.mk)
-
-# AppFunction Extensions
-ifneq (,$(RELEASE_APPFUNCTION_SIDECAR))
- $(call inherit-product, $(SRC_TARGET_DIR)/product/app_function_extensions.mk)
-endif
diff --git a/tools/aconfig/Cargo.toml b/tools/aconfig/Cargo.toml
index a031b7f..cb8377e 100644
--- a/tools/aconfig/Cargo.toml
+++ b/tools/aconfig/Cargo.toml
@@ -8,8 +8,8 @@
"aconfig_storage_read_api",
"aconfig_storage_write_api",
"aflags",
- "printflags",
- "convert_finalized_flags"
+ "convert_finalized_flags",
+ "exported_flag_check",
]
resolver = "2"
diff --git a/tools/aconfig/OWNERS b/tools/aconfig/OWNERS
index c92fc7c..0c31938 100644
--- a/tools/aconfig/OWNERS
+++ b/tools/aconfig/OWNERS
@@ -1,6 +1,5 @@
dzshen@google.com
opg@google.com
-tedbauer@google.com
zhidou@google.com
amhk@google.com #{LAST_RESORT_SUGGESTION}
diff --git a/tools/aconfig/aconfig/src/codegen/java.rs b/tools/aconfig/aconfig/src/codegen/java.rs
index 61802f2..d74e87a 100644
--- a/tools/aconfig/aconfig/src/codegen/java.rs
+++ b/tools/aconfig/aconfig/src/codegen/java.rs
@@ -59,7 +59,8 @@
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 is_platform_container =
+ matches!(container.as_str(), "system" | "system_ext" | "product" | "vendor");
let context = Context {
flag_elements,
namespace_flags,
diff --git a/tools/aconfig/aconfig_storage_read_api/srcs/android/os/flagging/PlatformAconfigPackage.java b/tools/aconfig/aconfig_storage_read_api/srcs/android/os/flagging/PlatformAconfigPackage.java
index ddad249..63baf9e 100644
--- a/tools/aconfig/aconfig_storage_read_api/srcs/android/os/flagging/PlatformAconfigPackage.java
+++ b/tools/aconfig/aconfig_storage_read_api/srcs/android/os/flagging/PlatformAconfigPackage.java
@@ -65,7 +65,11 @@
/** @hide */
@UnsupportedAppUsage
public static final Set<String> PLATFORM_PACKAGE_MAP_FILES =
- Set.of("system.package.map", "vendor.package.map", "product.package.map");
+ Set.of(
+ "system.package.map",
+ "system_ext.package.map",
+ "vendor.package.map",
+ "product.package.map");
static {
for (String pf : PLATFORM_PACKAGE_MAP_FILES) {
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 9896baf..0c5bc1c 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
@@ -42,7 +42,8 @@
@RunWith(JUnit4.class)
public class PlatformAconfigPackageInternalTest {
- private static final Set<String> PLATFORM_CONTAINERS = Set.of("system", "vendor", "product");
+ private static final Set<String> PLATFORM_CONTAINERS =
+ Set.of("system", "system_ext", "vendor", "product");
@Test
public void testPlatformAconfigPackageInternal_load() throws IOException {
diff --git a/tools/aconfig/aconfig_storage_read_api/tests/functional/srcs/PlatformAconfigPackageTest.java b/tools/aconfig/aconfig_storage_read_api/tests/functional/srcs/PlatformAconfigPackageTest.java
index 1c6c238..2b4ead8 100644
--- a/tools/aconfig/aconfig_storage_read_api/tests/functional/srcs/PlatformAconfigPackageTest.java
+++ b/tools/aconfig/aconfig_storage_read_api/tests/functional/srcs/PlatformAconfigPackageTest.java
@@ -42,7 +42,8 @@
@RunWith(JUnit4.class)
public class PlatformAconfigPackageTest {
- private static final Set<String> PLATFORM_CONTAINERS = Set.of("system", "vendor", "product");
+ private static final Set<String> PLATFORM_CONTAINERS =
+ Set.of("system", "system_ext", "vendor", "product");
@Test
public void testPlatformAconfigPackage_StorageFilesCache() throws IOException {
diff --git a/tools/aconfig/exported_flag_check/Android.bp b/tools/aconfig/exported_flag_check/Android.bp
new file mode 100644
index 0000000..184149a
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/Android.bp
@@ -0,0 +1,28 @@
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+rust_defaults {
+ name: "exported-flag-check-defaults",
+ edition: "2021",
+ clippy_lints: "android",
+ lints: "android",
+ srcs: ["src/main.rs"],
+ rustlibs: [
+ "libaconfig_protos",
+ "libanyhow",
+ "libclap",
+ "libregex",
+ ],
+}
+
+rust_binary_host {
+ name: "exported-flag-check",
+ defaults: ["record-finalized-flags-defaults"],
+}
+
+rust_test_host {
+ name: "exported-flag-check-test",
+ defaults: ["record-finalized-flags-defaults"],
+ test_suites: ["general-tests"],
+}
diff --git a/tools/aconfig/exported_flag_check/Cargo.toml b/tools/aconfig/exported_flag_check/Cargo.toml
new file mode 100644
index 0000000..6bc07c5
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/Cargo.toml
@@ -0,0 +1,14 @@
+[package]
+name = "exported-flag-check"
+version = "0.1.0"
+edition = "2021"
+
+[features]
+default = ["cargo"]
+cargo = []
+
+[dependencies]
+aconfig_protos = { path = "../aconfig_protos" }
+anyhow = "1.0.69"
+clap = { version = "4.1.8", features = ["derive"] }
+regex = "1.11.1"
diff --git a/tools/aconfig/exported_flag_check/allow_flag_list.txt b/tools/aconfig/exported_flag_check/allow_flag_list.txt
new file mode 100644
index 0000000..b9c81c4
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/allow_flag_list.txt
@@ -0,0 +1,260 @@
+android.adpf.adpf_viewrootimpl_action_down_boost
+android.app.admin.flags.coexistence_migration_for_supervision_enabled
+android.app.admin.flags.enable_supervision_service_sync
+android.app.admin.flags.lock_now_coexistence
+android.app.admin.flags.permission_migration_for_zero_trust_api_enabled
+android.app.admin.flags.reset_password_with_token_coexistence
+android.app.admin.flags.set_application_restrictions_coexistence
+android.app.admin.flags.set_backup_service_enabled_coexistence
+android.app.admin.flags.set_keyguard_disabled_features_coexistence
+android.app.admin.flags.set_permission_grant_state_coexistence
+android.app.app_restrictions_api
+android.app.enforce_pic_testmode_protocol
+android.app.job.backup_jobs_exemption
+android.app.pic_uses_shared_memory
+android.app.pinner_service_client_api
+android.app.supervision.flags.deprecate_dpm_supervision_apis
+android.app.supervision.flags.enable_sync_with_dpm
+android.app.supervision.flags.supervision_api
+android.app.supervision.flags.supervision_api_on_wear
+android.app.ui_rich_ongoing
+android.appwidget.flags.use_smaller_app_widget_system_radius
+android.car.feature.always_send_initial_value_event
+android.car.feature.android_b_vehicle_properties
+android.car.feature.android_vic_vehicle_properties
+android.car.feature.area_id_config_access
+android.car.feature.async_audio_service_init
+android.car.feature.audio_control_hal_configuration
+android.car.feature.audio_legacy_mode_navigation_volume
+android.car.feature.audio_vendor_freeze_improvements
+android.car.feature.batched_subscriptions
+android.car.feature.car_app_card
+android.car.feature.car_audio_dynamic_devices
+android.car.feature.car_audio_fade_manager_configuration
+android.car.feature.car_audio_min_max_activation_volume
+android.car.feature.car_audio_mute_ambiguity
+android.car.feature.car_evs_query_service_status
+android.car.feature.car_evs_stream_management
+android.car.feature.car_night_global_setting
+android.car.feature.car_power_cancel_shell_command
+android.car.feature.car_property_detailed_error_codes
+android.car.feature.car_property_supported_value
+android.car.feature.car_property_value_property_status
+android.car.feature.cluster_health_monitoring
+android.car.feature.display_compatibility
+android.car.feature.handle_property_events_in_binder_thread
+android.car.feature.persist_ap_settings
+android.car.feature.projection_query_bt_profile_inhibit
+android.car.feature.serverless_remote_access
+android.car.feature.subscription_with_resolution
+android.car.feature.supports_secure_passenger_users
+android.car.feature.switch_user_ignoring_uxr
+android.car.feature.variable_update_rate
+android.car.feature.visible_background_user_restrictions
+android.companion.new_association_builder
+android.companion.ongoing_perm_sync
+android.companion.virtualdevice.flags.camera_multiple_input_streams
+android.companion.virtualdevice.flags.notifications_for_device_streaming
+android.content.pm.get_package_storage_stats
+android.content.res.layout_readwrite_flags
+android.content.res.resources_minor_version_support
+android.content.res.rro_control_for_android_no_overlayable
+android.content.res.self_targeting_android_resource_frro
+android.content.res.system_context_handle_app_info_changed
+android.credentials.flags.settings_activity_enabled
+android.hardware.biometrics.screen_off_unlock_udfps
+android.hardware.devicestate.feature.flags.device_state_property_migration
+android.hardware.devicestate.feature.flags.device_state_rdm_v2
+android.hardware.devicestate.feature.flags.device_state_requester_cancel_state
+android.hardware.usb.flags.enable_interface_name_device_filter
+android.hardware.usb.flags.enable_is_mode_change_supported_api
+android.media.audio.focus_exclusive_with_recording
+android.media.audio.focus_freeze_test_api
+android.media.audio.foreground_audio_control
+android.media.audio.hardening_permission_api
+android.media.audio.hardening_permission_spa
+android.media.audio.ro_foreground_audio_control
+android.media.audiopolicy.audio_mix_test_api
+android.media.codec.aidl_hal_input_surface
+android.media.swcodec.flags.apv_software_codec
+android.media.swcodec.flags.mpeg2_keep_threads_active
+android.media.tv.flags.enable_le_audio_broadcast_ui
+android.media.tv.flags.enable_le_audio_unicast_ui
+android.media.tv.flags.hdmi_control_collect_physical_address
+android.media.tv.flags.hdmi_control_enhanced_behavior
+android.media.tv.flags.tif_unbind_inactive_tis
+android.multiuser.enable_biometrics_to_unlock_private_space
+android.net.platform.flags.mdns_improvement_for_25q2
+android.nfc.nfc_persist_log
+android.nfc.nfc_watchdog
+android.os.adpf_graphics_pipeline
+android.os.android_os_build_vanilla_ice_cream
+android.os.battery_saver_supported_check_api
+android.os.network_time_uses_shared_memory
+android.os.profiling.persist_queue
+android.os.profiling.redaction_enabled
+android.permission.flags.allow_host_permission_dialogs_on_virtual_devices
+android.permission.flags.device_aware_permissions_enabled
+android.permission.flags.device_policy_management_role_split_create_managed_profile_enabled
+android.permission.flags.enable_aiai_proxied_text_classifiers
+android.permission.flags.enable_otp_in_text_classifiers
+android.permission.flags.enable_sqlite_appops_accesses
+android.permission.flags.location_bypass_privacy_dashboard_enabled
+android.permission.flags.note_op_batching_enabled
+android.permission.flags.permission_request_short_circuit_enabled
+android.permission.flags.rate_limit_batched_note_op_async_callbacks_enabled
+android.permission.flags.sensitive_notification_app_protection
+android.permission.flags.supervision_role_permission_update_enabled
+android.permission.flags.unknown_call_package_install_blocking_enabled
+android.permission.flags.updatable_text_classifier_for_otp_detection_enabled
+android.permission.flags.use_profile_labels_for_default_app_section_titles
+android.permission.flags.wallet_role_cross_user_enabled
+android.provider.allow_config_maximum_call_log_entries_per_sim
+android.provider.backup_tasks_settings_screen
+android.provider.flags.new_storage_writer_system_api
+android.service.autofill.fill_dialog_improvements_impl
+android.service.chooser.fix_resolver_memory_leak
+android.service.notification.redact_sensitive_notifications_big_text_style
+android.service.notification.redact_sensitive_notifications_from_untrusted_listeners
+android.view.accessibility.motion_event_observing
+android.view.flags.expected_presentation_time_api
+android.view.flags.toolkit_frame_rate_touch_boost_25q1
+android.view.inputmethod.concurrent_input_methods
+android.view.inputmethod.ime_switcher_revamp
+android.view.inputmethod.imm_userhandle_hostsidetests
+android.webkit.mainline_apis
+android.widget.flags.use_wear_material3_ui
+com.android.aconfig.test.disabled_rw_exported
+com.android.aconfig.test.enabled_fixed_ro_exported
+com.android.aconfig.test.enabled_ro_exported
+com.android.aconfig.test.exported.exported_flag
+com.android.aconfig.test.forcereadonly.fro_exported
+com.android.adservices.ondevicepersonalization.flags.on_device_personalization_apis_enabled
+com.android.appsearch.flags.app_open_event_indexer_enabled
+com.android.appsearch.flags.apps_indexer_enabled
+com.android.appsearch.flags.enable_app_functions_schema_parser
+com.android.appsearch.flags.enable_apps_indexer_incremental_put
+com.android.appsearch.flags.enable_contacts_index_first_middle_and_last_names
+com.android.appsearch.flags.enable_document_limiter_replace_tracking
+com.android.appsearch.flags.enable_enterprise_empty_batch_result_fix
+com.android.bluetooth.flags.allow_switching_hid_and_hogp
+com.android.bluetooth.flags.bt_offload_socket_api
+com.android.bluetooth.flags.channel_sounding
+com.android.bluetooth.flags.fix_started_module_race
+com.android.bluetooth.flags.le_subrate_api
+com.android.bluetooth.flags.leaudio_broadcast_monitor_source_sync_status
+com.android.bluetooth.flags.leaudio_broadcast_volume_control_for_connected_devices
+com.android.bluetooth.flags.leaudio_multiple_vocs_instances_api
+com.android.bluetooth.flags.metadata_api_inactive_audio_device_upon_connection
+com.android.bluetooth.flags.settings_can_control_hap_preset
+com.android.bluetooth.flags.unix_file_socket_creation_failure
+com.android.graphics.flags.icon_load_drawable_return_null_when_uri_decode_fails
+com.android.graphics.hwui.flags.animated_image_drawable_filter_bitmap
+com.android.hardware.input.manage_key_gestures
+com.android.healthfitness.flags.activity_intensity_db
+com.android.healthfitness.flags.add_missing_access_logs
+com.android.healthfitness.flags.architecture_improvement
+com.android.healthfitness.flags.cloud_backup_and_restore
+com.android.healthfitness.flags.cycle_phases
+com.android.healthfitness.flags.d2d_file_deletion_bug_fix
+com.android.healthfitness.flags.dependency_injection
+com.android.healthfitness.flags.development_database
+com.android.healthfitness.flags.ecosystem_metrics
+com.android.healthfitness.flags.ecosystem_metrics_db_changes
+com.android.healthfitness.flags.export_import
+com.android.healthfitness.flags.export_import_fast_follow
+com.android.healthfitness.flags.export_import_nice_to_have
+com.android.healthfitness.flags.expressive_theming_enabled
+com.android.healthfitness.flags.health_connect_mappings
+com.android.healthfitness.flags.immediate_export
+com.android.healthfitness.flags.logcat_censor_iae
+com.android.healthfitness.flags.new_information_architecture
+com.android.healthfitness.flags.onboarding
+com.android.healthfitness.flags.permission_metrics
+com.android.healthfitness.flags.permission_tracker_fix_mapping_init
+com.android.healthfitness.flags.personal_health_record_database
+com.android.healthfitness.flags.personal_health_record_disable_d2d
+com.android.healthfitness.flags.personal_health_record_disable_export_import
+com.android.healthfitness.flags.personal_health_record_enable_d2d_and_export_import
+com.android.healthfitness.flags.personal_health_record_entries_screen
+com.android.healthfitness.flags.personal_health_record_lock_screen_banner
+com.android.healthfitness.flags.personal_health_record_telemetry
+com.android.healthfitness.flags.personal_health_record_telemetry_private_ww
+com.android.healthfitness.flags.personal_health_record_ui_telemetry
+com.android.healthfitness.flags.phr_fhir_basic_complex_type_validation
+com.android.healthfitness.flags.phr_fhir_complex_type_validation
+com.android.healthfitness.flags.phr_fhir_oneof_validation
+com.android.healthfitness.flags.phr_fhir_primitive_type_validation
+com.android.healthfitness.flags.phr_fhir_structural_validation
+com.android.healthfitness.flags.phr_read_medical_resources_fix_query_limit
+com.android.healthfitness.flags.phr_upsert_fix_parcel_size_calculation
+com.android.healthfitness.flags.phr_upsert_fix_use_shared_memory
+com.android.icu.icu_v_api
+com.android.internal.telephony.flags.async_init_carrier_privileges_tracker
+com.android.internal.telephony.flags.cleanup_carrier_app_update_enabled_state_logic
+com.android.internal.telephony.flags.oem_enabled_satellite_phase_2
+com.android.internal.telephony.flags.remap_disconnect_cause_sip_request_cancelled
+com.android.libcore.hpke_v_apis
+com.android.libcore.read_only_dynamic_code_load
+com.android.libcore.v_apis
+com.android.media.audio.hardening_impl
+com.android.media.audio.hardening_strict
+com.android.media.extractor.flags.extractor_mp4_enable_apv
+com.android.media.extractor.flags.extractor_sniff_midi_optimizations
+com.android.media.flags.enable_cross_user_routing_in_media_router2
+com.android.media.flags.enable_notifying_activity_manager_with_media_session_status_change
+com.android.media.metrics.flags.mediametrics_to_module
+com.android.media.projection.flags.media_projection_connected_display
+com.android.media.projection.flags.media_projection_connected_display_no_virtual_device
+com.android.net.ct.flags.certificate_transparency_job
+com.android.net.ct.flags.certificate_transparency_service
+com.android.net.flags.restrict_local_network
+com.android.net.flags.tethering_active_sessions_metrics
+com.android.net.thread.flags.thread_mobile_enabled
+com.android.nfc.module.flags.nfc_hce_latency_events
+com.android.org.conscrypt.flags.certificate_transparency_checkservertrusted_api
+com.android.permission.flags.add_banners_to_privacy_sensitive_apps_for_aaos
+com.android.permission.flags.app_permission_fragment_uses_preferences
+com.android.permission.flags.archiving_read_only
+com.android.permission.flags.decluttered_permission_manager_enabled
+com.android.permission.flags.enable_coarse_fine_location_prompt_for_aaos
+com.android.permission.flags.enhanced_confirmation_backport_enabled
+com.android.permission.flags.expressive_design_enabled
+com.android.permission.flags.livedata_refactor_permission_timeline_enabled
+com.android.permission.flags.odad_notifications_supported
+com.android.permission.flags.permission_timeline_attribution_label_fix
+com.android.permission.flags.private_profile_supported
+com.android.permission.flags.safety_center_enabled_no_device_config
+com.android.permission.flags.safety_center_issue_only_affects_group_status
+com.android.permission.flags.wear_compose_material3
+com.android.permission.flags.wear_privacy_dashboard_enabled_read_only
+com.android.providers.contactkeys.flags.contactkeys_strip_fix
+com.android.providers.media.flags.enable_backup_and_restore
+com.android.providers.media.flags.enable_malicious_app_detector
+com.android.providers.media.flags.enable_mark_media_as_favorite_api
+com.android.providers.media.flags.enable_modern_photopicker
+com.android.providers.media.flags.enable_photopicker_search
+com.android.providers.media.flags.enable_photopicker_transcoding
+com.android.providers.media.flags.enable_stable_uris_for_external_primary_volume
+com.android.providers.media.flags.enable_stable_uris_for_public_volume
+com.android.providers.media.flags.enable_unicode_check
+com.android.providers.media.flags.index_media_latitude_longitude
+com.android.providers.media.flags.version_lockdown
+com.android.ranging.flags.ranging_stack_updates_25q4
+com.android.server.backup.enable_read_all_external_storage_files
+com.android.server.telecom.flags.allow_system_apps_resolve_voip_calls
+com.android.server.telecom.flags.telecom_app_label_proxy_hsum_aware
+com.android.server.telecom.flags.telecom_main_user_in_block_check
+com.android.server.telecom.flags.telecom_main_user_in_get_respond_message_app
+com.android.server.updates.certificate_transparency_installer
+com.android.system.virtualmachine.flags.terminal_gui_support
+com.android.tradeinmode.flags.enable_trade_in_mode
+com.android.update_engine.minor_changes_2025q4
+com.android.uwb.flags.uwb_fira_3_0_25q4
+com.android.wifi.flags.network_provider_battery_charging_status
+com.android.wifi.flags.p2p_dialog2
+com.android.wifi.flags.shared_connectivity_broadcast_receiver_test_api
+com.android.wifi.flags.wep_disabled_in_apm
+com.android.window.flags.untrusted_embedding_state_sharing
+vendor.vibrator.hal.flags.enable_pwle_v2
+vendor.vibrator.hal.flags.remove_capo
\ No newline at end of file
diff --git a/tools/aconfig/exported_flag_check/allow_package_list.txt b/tools/aconfig/exported_flag_check/allow_package_list.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/allow_package_list.txt
diff --git a/tools/aconfig/exported_flag_check/src/main.rs b/tools/aconfig/exported_flag_check/src/main.rs
new file mode 100644
index 0000000..866a700
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/src/main.rs
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2025 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.
+ */
+
+//! `exported-flag-check` is a tool to ensures that exported flags are used as intended
+use anyhow::{ensure, Result};
+use clap::Parser;
+use std::{collections::HashSet, fs::File, path::PathBuf};
+
+mod utils;
+
+use utils::{
+ check_all_exported_flags, extract_flagged_api_flags, get_exported_flags_from_binary_proto,
+ read_finalized_flags,
+};
+
+const ABOUT: &str = "CCheck Exported Flags
+
+This tool ensures that exported flags are used as intended. Exported flags, marked with
+`is_exported: true` in their declaration, are designed to control access to specific API
+features. This tool identifies and reports any exported flags that are not currently
+associated with an API feature, preventing unnecessary flag proliferation and maintaining
+a clear API design.
+
+This tool works as follows:
+
+ - Read API signature files from source tree (*current.txt files) [--api-signature-file]
+ - Read the current aconfig flag values from source tree [--parsed-flags-file]
+ - Read the previous finalized-flags.txt files from prebuilts/sdk [--finalized-flags-file]
+ - Extract the flags slated for API by scanning through the API signature files
+ - Merge the found flags with the recorded flags from previous API finalizations
+ - Error if exported flags are not in the set
+";
+
+#[derive(Parser, Debug)]
+#[clap(about=ABOUT)]
+struct Cli {
+ #[arg(long)]
+ parsed_flags_file: PathBuf,
+
+ #[arg(long)]
+ api_signature_file: Vec<PathBuf>,
+
+ #[arg(long)]
+ finalized_flags_file: PathBuf,
+}
+
+fn main() -> Result<()> {
+ let args = Cli::parse();
+
+ let mut flags_used_with_flaggedapi_annotation = HashSet::new();
+ for path in &args.api_signature_file {
+ let file = File::open(path)?;
+ let flags = extract_flagged_api_flags(file)?;
+ flags_used_with_flaggedapi_annotation.extend(flags);
+ }
+
+ let file = File::open(args.parsed_flags_file)?;
+ let all_flags = get_exported_flags_from_binary_proto(file)?;
+
+ let file = File::open(args.finalized_flags_file)?;
+ let already_finalized_flags = read_finalized_flags(file)?;
+
+ let exported_flags = check_all_exported_flags(
+ &flags_used_with_flaggedapi_annotation,
+ &all_flags,
+ &already_finalized_flags,
+ )?;
+
+ println!("{}", exported_flags.join("\n"));
+
+ ensure!(
+ exported_flags.is_empty(),
+ "Flags {} are exported but not used to guard any API. \
+ Exported flag should be used to guard API",
+ exported_flags.join(",")
+ );
+ Ok(())
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test() {
+ let input = include_bytes!("../tests/api-signature-file.txt");
+ let flags_used_with_flaggedapi_annotation = extract_flagged_api_flags(&input[..]).unwrap();
+
+ let input = include_bytes!("../tests/flags.protobuf");
+ let all_flags_to_be_finalized = get_exported_flags_from_binary_proto(&input[..]).unwrap();
+
+ let input = include_bytes!("../tests/finalized-flags.txt");
+ let already_finalized_flags = read_finalized_flags(&input[..]).unwrap();
+
+ let exported_flags = check_all_exported_flags(
+ &flags_used_with_flaggedapi_annotation,
+ &all_flags_to_be_finalized,
+ &already_finalized_flags,
+ )
+ .unwrap();
+
+ assert_eq!(1, exported_flags.len());
+ }
+}
diff --git a/tools/aconfig/exported_flag_check/src/utils.rs b/tools/aconfig/exported_flag_check/src/utils.rs
new file mode 100644
index 0000000..3686fec
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/src/utils.rs
@@ -0,0 +1,149 @@
+/*
+ * Copyright (C) 2025 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.
+ */
+
+use aconfig_protos::ParsedFlagExt;
+use anyhow::{anyhow, Context, Result};
+use regex::Regex;
+use std::{
+ collections::HashSet,
+ io::{BufRead, BufReader, Read},
+};
+
+pub(crate) type FlagId = String;
+
+/// Grep for all flags used with @FlaggedApi annotations in an API signature file (*current.txt
+/// file).
+pub(crate) fn extract_flagged_api_flags<R: Read>(mut reader: R) -> Result<HashSet<FlagId>> {
+ let mut haystack = String::new();
+ reader.read_to_string(&mut haystack)?;
+ let regex = Regex::new(r#"(?ms)@FlaggedApi\("(.*?)"\)"#).unwrap();
+ let iter = regex.captures_iter(&haystack).map(|cap| cap[1].to_owned());
+ Ok(HashSet::from_iter(iter))
+}
+
+/// Read a list of flag names. The input is expected to be plain text, with each line containing
+/// the name of a single flag.
+pub(crate) fn read_finalized_flags<R: Read>(reader: R) -> Result<HashSet<FlagId>> {
+ BufReader::new(reader)
+ .lines()
+ .map(|line_result| line_result.context("Failed to read line from finalized flags file"))
+ .collect()
+}
+
+/// Parse a ProtoParsedFlags binary protobuf blob and return the fully qualified names of flags
+/// have is_exported as true.
+pub(crate) fn get_exported_flags_from_binary_proto<R: Read>(
+ mut reader: R,
+) -> Result<HashSet<FlagId>> {
+ let mut buffer = Vec::new();
+ reader.read_to_end(&mut buffer)?;
+ let parsed_flags = aconfig_protos::parsed_flags::try_from_binary_proto(&buffer)
+ .map_err(|_| anyhow!("failed to parse binary proto"))?;
+ let iter = parsed_flags
+ .parsed_flag
+ .into_iter()
+ .filter(|flag| flag.is_exported())
+ .map(|flag| flag.fully_qualified_name());
+ Ok(HashSet::from_iter(iter))
+}
+
+fn get_allow_flag_list() -> Result<HashSet<FlagId>> {
+ let allow_list: HashSet<FlagId> =
+ include_str!("../allow_flag_list.txt").lines().map(|x| x.into()).collect();
+ Ok(allow_list)
+}
+
+fn get_allow_package_list() -> Result<HashSet<FlagId>> {
+ let allow_list: HashSet<FlagId> =
+ include_str!("../allow_package_list.txt").lines().map(|x| x.into()).collect();
+ Ok(allow_list)
+}
+
+/// Filter out the flags have is_exported as true but not used with @FlaggedApi annotations
+/// in the source tree, or in the previously finalized flags set.
+pub(crate) fn check_all_exported_flags(
+ flags_used_with_flaggedapi_annotation: &HashSet<FlagId>,
+ all_flags: &HashSet<FlagId>,
+ already_finalized_flags: &HashSet<FlagId>,
+) -> Result<Vec<FlagId>> {
+ let allow_flag_list = get_allow_flag_list()?;
+ let allow_package_list = get_allow_package_list()?;
+
+ let new_flags: Vec<FlagId> = all_flags
+ .difference(flags_used_with_flaggedapi_annotation)
+ .cloned()
+ .collect::<HashSet<_>>()
+ .difference(already_finalized_flags)
+ .cloned()
+ .collect::<HashSet<_>>()
+ .difference(&allow_flag_list)
+ .filter(|flag| {
+ if let Some(last_dot_index) = flag.rfind('.') {
+ let package_name = &flag[..last_dot_index];
+ !allow_package_list.contains(package_name)
+ } else {
+ true
+ }
+ })
+ .cloned()
+ .collect();
+
+ Ok(new_flags)
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test_extract_flagged_api_flags() {
+ let api_signature_file = include_bytes!("../tests/api-signature-file.txt");
+ let flags = extract_flagged_api_flags(&api_signature_file[..]).unwrap();
+ assert_eq!(
+ flags,
+ HashSet::from_iter(vec![
+ "record_finalized_flags.test.foo".to_string(),
+ "this.flag.is.not.used".to_string(),
+ ])
+ );
+ }
+
+ #[test]
+ fn test_read_finalized_flags() {
+ let input = include_bytes!("../tests/finalized-flags.txt");
+ let flags = read_finalized_flags(&input[..]).unwrap();
+ assert_eq!(
+ flags,
+ HashSet::from_iter(vec![
+ "record_finalized_flags.test.bar".to_string(),
+ "record_finalized_flags.test.baz".to_string(),
+ ])
+ );
+ }
+
+ #[test]
+ fn test_disabled_or_read_write_flags_are_ignored() {
+ let bytes = include_bytes!("../tests/flags.protobuf");
+ let flags = get_exported_flags_from_binary_proto(&bytes[..]).unwrap();
+ assert_eq!(
+ flags,
+ HashSet::from_iter(vec![
+ "record_finalized_flags.test.foo".to_string(),
+ "record_finalized_flags.test.not_enabled".to_string()
+ ])
+ );
+ }
+}
diff --git a/tools/aconfig/exported_flag_check/tests/api-signature-file.txt b/tools/aconfig/exported_flag_check/tests/api-signature-file.txt
new file mode 100644
index 0000000..2ad559f
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/tests/api-signature-file.txt
@@ -0,0 +1,15 @@
+// Signature format: 2.0
+package android {
+
+ public final class C {
+ ctor public C();
+ }
+
+ public static final class C.inner {
+ ctor public C.inner();
+ field @FlaggedApi("record_finalized_flags.test.foo") public static final String FOO = "foo";
+ field @FlaggedApi("this.flag.is.not.used") public static final String BAR = "bar";
+ }
+
+}
+
diff --git a/tools/aconfig/exported_flag_check/tests/finalized-flags.txt b/tools/aconfig/exported_flag_check/tests/finalized-flags.txt
new file mode 100644
index 0000000..7fbcb3d
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/tests/finalized-flags.txt
@@ -0,0 +1,2 @@
+record_finalized_flags.test.bar
+record_finalized_flags.test.baz
diff --git a/tools/aconfig/exported_flag_check/tests/flags.declarations b/tools/aconfig/exported_flag_check/tests/flags.declarations
new file mode 100644
index 0000000..f86dbfa
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/tests/flags.declarations
@@ -0,0 +1,18 @@
+package: "record_finalized_flags.test"
+container: "system"
+
+flag {
+ name: "foo"
+ namespace: "test"
+ description: "FIXME"
+ bug: ""
+ is_exported:true
+}
+
+flag {
+ name: "not_enabled"
+ namespace: "test"
+ description: "FIXME"
+ bug: ""
+ is_exported:true
+}
diff --git a/tools/aconfig/exported_flag_check/tests/flags.protobuf b/tools/aconfig/exported_flag_check/tests/flags.protobuf
new file mode 100644
index 0000000..be64ef9
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/tests/flags.protobuf
Binary files differ
diff --git a/tools/aconfig/exported_flag_check/tests/flags.values b/tools/aconfig/exported_flag_check/tests/flags.values
new file mode 100644
index 0000000..ff6225d
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/tests/flags.values
@@ -0,0 +1,13 @@
+flag_value {
+ package: "record_finalized_flags.test"
+ name: "foo"
+ state: ENABLED
+ permission: READ_ONLY
+}
+
+flag_value {
+ package: "record_finalized_flags.test"
+ name: "not_enabled"
+ state: DISABLED
+ permission: READ_ONLY
+}
diff --git a/tools/aconfig/exported_flag_check/tests/generate-flags-protobuf.sh b/tools/aconfig/exported_flag_check/tests/generate-flags-protobuf.sh
new file mode 100755
index 0000000..701189c
--- /dev/null
+++ b/tools/aconfig/exported_flag_check/tests/generate-flags-protobuf.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+aconfig create-cache \
+ --package record_finalized_flags.test \
+ --container system \
+ --declarations flags.declarations \
+ --values flags.values \
+ --cache flags.protobuf
diff --git a/tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackage.java b/tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackage.java
index ec79f7d..c06a532 100644
--- a/tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackage.java
+++ b/tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackage.java
@@ -24,7 +24,11 @@
public class PlatformAconfigPackage {
public static final Set<String> PLATFORM_PACKAGE_MAP_FILES =
- Set.of("system.package.map", "vendor.package.map", "product.package.map");
+ Set.of(
+ "system.package.map",
+ "system_ext.package.map",
+ "vendor.package.map",
+ "product.package.map");
public static PlatformAconfigPackage load(String packageName) {
throw new UnsupportedOperationException("Stub!");
diff --git a/tools/finalization/environment.sh b/tools/finalization/environment.sh
index 0d3a9e1..c76980d 100755
--- a/tools/finalization/environment.sh
+++ b/tools/finalization/environment.sh
@@ -34,3 +34,4 @@
export FINAL_CORRESPONDING_PLATFORM_VERSION='16'
export FINAL_NEXT_BOARD_API_LEVEL='202604'
export FINAL_NEXT_CORRESPONDING_VERSION_LETTER='C'
+export FINAL_NEXT_CORRESPONDING_SDK_VERSION='37'
diff --git a/tools/finalization/finalize-vintf-resources.sh b/tools/finalization/finalize-vintf-resources.sh
index 6f1a6f6..45efc10 100755
--- a/tools/finalization/finalize-vintf-resources.sh
+++ b/tools/finalization/finalize-vintf-resources.sh
@@ -16,6 +16,13 @@
export TARGET_RELEASE=fina_0
export TARGET_PRODUCT=aosp_arm64
+ # build/soong
+ local vendor_api_level_map="case ${FINAL_NEXT_BOARD_API_LEVEL}:"
+ if ! grep -q "$vendor_api_level_map" "$top/build/soong/android/vendor_api_levels.go" ; then
+ sed -i -e "/case ${FINAL_BOARD_API_LEVEL}:/{N;a \\\t$vendor_api_level_map\n\t\tsdkVersion = ${FINAL_NEXT_CORRESPONDING_SDK_VERSION}
+ }" "$top/build/soong/android/vendor_api_levels.go"
+ fi
+
# system/sepolicy
"$top/system/sepolicy/tools/finalize-vintf-resources.sh" "$top" "$FINAL_BOARD_API_LEVEL"
diff --git a/tools/otatools_package/Android.bp b/tools/otatools_package/Android.bp
new file mode 100644
index 0000000..5c7bfc7
--- /dev/null
+++ b/tools/otatools_package/Android.bp
@@ -0,0 +1,65 @@
+// Copyright (C) 2025 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 {
+ // See: http://go/android-license-faq
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+java_genrule_host {
+ name: "otatools_package_dep_jars",
+ tools: ["soong_zip"],
+ compile_multilib: "first",
+ cmd: "mkdir -p $(genDir)/framework && " +
+ "cp $(in) $(genDir)/framework && " +
+ "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)/framework",
+ srcs: [
+ ":apksigner",
+ ":boot_signer",
+ ":signapk",
+ ":verity_signer",
+ ],
+ out: ["otatools_package_dep_jars.zip"],
+}
+
+genrule {
+ name: "otatools_package_cert_files",
+ tools: ["soong_zip"],
+ cmd: "mkdir -p $(genDir)/tmp/ && " +
+ "echo $(in) > $(genDir)/tmp/zip_files.list && " +
+ "$(location soong_zip) -o $(out) -l $(genDir)/tmp/zip_files.list ",
+ srcs: [
+ ":soong_generated_otatools_package_filegroup",
+ ],
+ out: ["otatools_package_cert_files.zip"],
+}
+
+java_genrule_host {
+ name: "otatools_package",
+ tools: ["merge_zips"],
+ compile_multilib: "first",
+ cmd: "$(location merge_zips) $(out) $(in)",
+ srcs: [
+ ":otatools_package_cert_files",
+ ":otatools_package_dep_jars",
+ ":otatools_package_releasetools",
+ ],
+ // TODO: Rename as "otatools.zip" when the rest files are ready.
+ out: ["otatools_temp.zip"],
+ dist: {
+ targets: [
+ "otatools-package-temp",
+ ],
+ },
+}
diff --git a/tools/releasetools/Android.bp b/tools/releasetools/Android.bp
index 3467152..2232385 100644
--- a/tools/releasetools/Android.bp
+++ b/tools/releasetools/Android.bp
@@ -650,3 +650,12 @@
unit_test: true,
},
}
+
+genrule {
+ name: "otatools_package_releasetools",
+ tools: ["soong_zip"],
+ srcs: ["**/*"],
+ cmd: "find build/make/tools/releasetools -name '*.pyc' -prune -o \\( -type f -o -type l \\) -print | sort > $(genDir)/files.txt && " +
+ "$(location soong_zip) -o $(out) -C build/make/tools -l $(genDir)/files.txt",
+ out: ["otatools_package_releasetools.zip"],
+}
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py
index b6c96c4..08b4d6a 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -49,8 +49,8 @@
# Use a fixed timestamp (01/01/2009 00:00:00 UTC) for files when packaging
# images. (b/24377993, b/80600931)
FIXED_FILE_TIMESTAMP = int((
- datetime.datetime(2009, 1, 1, 0, 0, 0, 0, None) -
- datetime.datetime.utcfromtimestamp(0)).total_seconds())
+ datetime.datetime(2009, 1, 1, 0, 0, 0, 0, datetime.UTC) -
+ datetime.datetime.fromtimestamp(0, datetime.UTC)).total_seconds())
class BuildImageError(Exception):
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index b6cbb15..e5f5f92 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -2993,7 +2993,7 @@
os.chmod(filename, perms)
# Use a fixed timestamp so the output is repeatable.
- # Note: Use of fromtimestamp rather than utcfromtimestamp here is
+ # Note: Use of fromtimestamp without specifying a timezone here is
# intentional. zip stores datetimes in local time without a time zone
# attached, so we need "epoch" but in the local time zone to get 2009/01/01
# in the zip archive.