From 0d500c58aaee61bd8827ed74088d89ec966c0d16 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Fri, 25 Aug 2023 15:02:50 +0900 Subject: [PATCH] Remove TARGET_FLATTEN_APEX And inherit updatable_apex.mk by default. Bug: 278826656 Test: presubmit Change-Id: I3f93608a8750dcd72edc3f9517c70f3490f1a7cd --- core/Makefile | 3 --- core/board_config.mk | 18 ------------------ target/product/base_system.mk | 3 +++ target/product/updatable_apex.mk | 22 +++++++++------------- 4 files changed, 12 insertions(+), 34 deletions(-) diff --git a/core/Makefile b/core/Makefile index 863e560c4d..61ea2b6fb3 100644 --- a/core/Makefile +++ b/core/Makefile @@ -5774,9 +5774,6 @@ endif ifeq ($(BUILDING_WITH_VSDK),true) $(hide) echo "building_with_vsdk=true" >> $@ endif -ifeq ($(TARGET_FLATTEN_APEX),false) - $(hide) echo "target_flatten_apex=false" >> $@ -endif $(call declare-0p-target,$(INSTALLED_FASTBOOT_INFO_TARGET)) diff --git a/core/board_config.mk b/core/board_config.mk index c3a6864afa..269951222e 100644 --- a/core/board_config.mk +++ b/core/board_config.mk @@ -971,24 +971,6 @@ ifneq ($(BOARD_VNDK_VERSION),current) endif TARGET_VENDOR_TEST_SUFFIX := /vendor -########################################### -# APEXes are by default not flattened, i.e. updatable. -# -# APEX flattening can also be forcibly enabled (resp. disabled) by -# setting OVERRIDE_TARGET_FLATTEN_APEX to true (resp. false), e.g. by -# setting the OVERRIDE_TARGET_FLATTEN_APEX environment variable. -ifdef OVERRIDE_TARGET_FLATTEN_APEX - TARGET_FLATTEN_APEX := $(OVERRIDE_TARGET_FLATTEN_APEX) -endif - -# TODO(b/278826656) Remove the following message -ifeq (true,$(TARGET_FLATTEN_APEX)) - $(warning ********************************************************************************) - $(warning Flattened APEX will be deprecated soon. Please stop using flattened APEX and use) - $(warning "image" APEX instead.) - $(warning ********************************************************************************) -endif - ifeq (,$(TARGET_BUILD_UNBUNDLED)) ifdef PRODUCT_EXTRA_VNDK_VERSIONS $(foreach v,$(PRODUCT_EXTRA_VNDK_VERSIONS),$(call check_vndk_version,$(v))) diff --git a/target/product/base_system.mk b/target/product/base_system.mk index 001ed457e6..03de6a82d8 100644 --- a/target/product/base_system.mk +++ b/target/product/base_system.mk @@ -432,3 +432,6 @@ PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\ frameworks/base/config/dirty-image-objects:system/etc/dirty-image-objects) $(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk) + +# Use "image" APEXes always. +$(call inherit-product,$(SRC_TARGET_DIR)/product/updatable_apex.mk) diff --git a/target/product/updatable_apex.mk b/target/product/updatable_apex.mk index c19982b274..8357fdf7fd 100644 --- a/target/product/updatable_apex.mk +++ b/target/product/updatable_apex.mk @@ -14,17 +14,13 @@ # limitations under the License. # -# Inherit this when the target needs to support updating APEXes +# com.android.apex.cts.shim.v1_prebuilt overrides CtsShimPrebuilt +# and CtsShimPrivPrebuilt since they are packaged inside the APEX. +PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_prebuilt +PRODUCT_SYSTEM_PROPERTIES := ro.apex.updatable=true -ifneq ($(OVERRIDE_TARGET_FLATTEN_APEX),true) - # com.android.apex.cts.shim.v1_prebuilt overrides CtsShimPrebuilt - # and CtsShimPrivPrebuilt since they are packaged inside the APEX. - PRODUCT_PACKAGES += com.android.apex.cts.shim.v1_prebuilt - PRODUCT_SYSTEM_PROPERTIES := ro.apex.updatable=true - TARGET_FLATTEN_APEX := false - # Use compressed apexes in pre-installed partitions. - # Note: this doesn't mean that all pre-installed apexes will be compressed. - # Whether an apex is compressed or not is controlled at apex Soong module - # via compresible property. - PRODUCT_COMPRESSED_APEX := true -endif +# Use compressed apexes in pre-installed partitions. +# Note: this doesn't mean that all pre-installed apexes will be compressed. +# Whether an apex is compressed or not is controlled at apex Soong module +# via compresible property. +PRODUCT_COMPRESSED_APEX := true