From 26e6c5d5f730c7537a20e3bad8e48ad215ab584b Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Tue, 25 Jun 2024 00:08:42 +0000 Subject: [PATCH] Install dexpreopt artifacts of non system apps in system_other `SYSTEM_OTHER_ODEX_FILTER` is used to determine which odex files go in system_other partition. Soong and Make adds another filter on top of that. This additional filter limits the odex files to only system apps, which means that dexpreopt artifacts of product and system_ext apps are **not** installed in system_other. This CL removes this additional filter. After this CL, dexpreopt artifacts of product and system_ext apps will be installed in system_other. Bug: 349083274 Test: Verified that .odex files of product apps appear in intalled-files-system_other.txt and not installed-files-product.txt Test: Ran this CL on a bunch of targets in git_main and throttled branchesa (there are some unrelated errors on some targets) https://android-build.corp.google.com/builds/abtd/run/L93000030004826539 https://android-build.corp.google.com/builds/abtd/run/L53400030004824781 https://android-build.corp.google.com/builds/abtd/run/L41900030004824724 https://android-build.corp.google.com/builds/abtd/run/L87200030004822630 https://android-build.corp.google.com/builds/abtd/run/L67500030004727048 https://android-build.corp.google.com/builds/abtd/run/L41700030004726610 https://android-build.corp.google.com/builds/abtd/run/L61600030004726607 Change-Id: I522b8f00a268058b13bb88ac1b34824bd5c1190e --- core/dex_preopt_odex_install.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index 08e2da3655..e7086b7e4e 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk @@ -504,8 +504,8 @@ ifdef LOCAL_DEX_PREOPT _system_other := $(strip $(if $(strip $(BOARD_USES_SYSTEM_OTHER_ODEX)), \ $(if $(strip $(SANITIZE_LITE)),, \ $(if $(filter $(_dexname),$(PRODUCT_DEXPREOPT_SPEED_APPS))$(filter $(_dexname),$(PRODUCT_SYSTEM_SERVER_APPS)),, \ - $(if $(strip $(foreach myfilter,$(SYSTEM_OTHER_ODEX_FILTER),$(filter system/$(myfilter),$(_dexlocation)))), \ - system_other/))))) + $(if $(strip $(foreach myfilter,$(SYSTEM_OTHER_ODEX_FILTER),$(filter system/$(myfilter),$(_dexlocation))$(filter $(myfilter),$(_dexlocation)))), \ + system_other/))))) # _dexdir has a trailing / _dexdir := $(_system_other)$(dir $(_dexlocation)) my_dexpreopt_zip_contents := $(sort \