From e3a2db866142ec00f8e07a2700dddcb5aa99d65d Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 21 Dec 2018 15:53:17 +0000 Subject: [PATCH] Remove conscrypt from boot image. But keep it as part of the boot class path and deliver the dex files uncompressed in /system/framework/conscrypt.jar. Test: Pixel 2 XL boots. Bug: 119868597 Change-Id: I41b96a586401d120998be5a111331935030922c6 --- core/dex_preopt_config.mk | 5 +++-- core/dex_preopt_libart_boot.mk | 1 - core/soong_config.mk | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/dex_preopt_config.mk b/core/dex_preopt_config.mk index 0793516b22..3eaf55bb30 100644 --- a/core/dex_preopt_config.mk +++ b/core/dex_preopt_config.mk @@ -1,8 +1,8 @@ DEX_PREOPT_CONFIG := $(PRODUCT_OUT)/dexpreopt.config # list of boot classpath jars for dexpreopt -DEXPREOPT_BOOT_JARS_MODULES := $(PRODUCT_BOOT_JARS) -PRODUCT_BOOTCLASSPATH_JARS := $(strip $(DEXPREOPT_BOOT_JARS_MODULES)) +DEXPREOPT_BOOT_JARS_MODULES := $(strip $(filter-out conscrypt,$(PRODUCT_BOOT_JARS))) +PRODUCT_BOOTCLASSPATH_JARS := $(strip $(DEXPREOPT_BOOT_JARS_MODULES) $(filter conscrypt,$(PRODUCT_BOOT_JARS))) PRODUCT_BOOTCLASSPATH := $(subst $(space),:,$(foreach m,$(PRODUCT_BOOTCLASSPATH_JARS),/system/framework/$(m).jar)) PRODUCT_SYSTEM_SERVER_CLASSPATH := $(subst $(space),:,$(foreach m,$(PRODUCT_SYSTEM_SERVER_JARS),/system/framework/$(m).jar)) @@ -118,6 +118,7 @@ ifeq ($(WRITE_SOONG_VARIABLES),true) $(call add_json_list, PreoptBootClassPathDexFiles, $(DEXPREOPT_BOOTCLASSPATH_DEX_FILES)) $(call add_json_list, PreoptBootClassPathDexLocations, $(DEXPREOPT_BOOTCLASSPATH_DEX_LOCATIONS)) $(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS)) + $(call add_json_list, PreoptBootJars, $(DEXPREOPT_BOOT_JARS_MODULES)) $(call add_json_list, SystemServerJars, $(PRODUCT_SYSTEM_SERVER_JARS)) $(call add_json_list, SystemServerApps, $(PRODUCT_SYSTEM_SERVER_APPS)) $(call add_json_list, SpeedApps, $(PRODUCT_DEXPREOPT_SPEED_APPS)) diff --git a/core/dex_preopt_libart_boot.mk b/core/dex_preopt_libart_boot.mk index b31f5a8473..47a8de871f 100644 --- a/core/dex_preopt_libart_boot.mk +++ b/core/dex_preopt_libart_boot.mk @@ -113,7 +113,6 @@ $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGE --android-root=$(PRODUCT_OUT)/system \ --no-inline-from=core-oj.jar \ --abort-on-hard-verifier-error \ - --abort-on-soft-verifier-error \ $(PRODUCT_DEX_PREOPT_BOOT_FLAGS) $(ART_BOOT_IMAGE_EXTRA_ARGS) \ || ( echo "$(DEX2OAT_FAILURE_MESSAGE)" ; false ) diff --git a/core/soong_config.mk b/core/soong_config.mk index 31c77d4b88..534a5eb99a 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -111,6 +111,9 @@ $(call add_json_str, Override_rs_driver, $(OVERRIDE_RS_DRIVER)) $(call add_json_bool, UncompressPrivAppDex, $(call invert_bool,$(filter true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS)))) $(call add_json_list, ModulesLoadedByPrivilegedModules, $(PRODUCT_LOADED_BY_PRIVILEGED_MODULES)) +$(call add_json_list, BootJars, $(PRODUCT_BOOT_JARS)) +$(call add_json_list, PreoptBootJars, $(DEXPREOPT_BOOT_JARS_MODULES)) + $(call add_json_bool, DisableDexPreopt, $(call invert_bool,$(filter true,$(WITH_DEXPREOPT)))) $(call add_json_list, DisableDexPreoptModules, $(DEXPREOPT_DISABLED_MODULES)) $(call add_json_str, DexPreoptProfileDir, $(PRODUCT_DEX_PREOPT_PROFILE_DIR))