From 9c54f38250194f47a2a09a0fa34cd54e214492b9 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Fri, 2 Aug 2024 21:22:54 +0000 Subject: [PATCH] Prevent misconfigured cp_system_other_odex=1 device boots https://r.android.com/3177659 set ro.cp_system_other_odex=1 to request copy of the dexpreopt app images to system_other partition on first boot. This created a misconfiguration for devices that 1. Do not have a system_other partition 2. Do not have cppreopts.sh listed in PRODUCT_PACKAGES This CL adds a conditional to request this copy operation in devices with a system_other partition, and adds cppreopts.sh to PRODUCT_PACKAGES Test: presubmits Bug: 356075780 Change-Id: I703c15a5fd96d1efad7f93e6bcb1b968ae4f38a1 --- target/product/runtime_libart.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk index 58234a8a8c..68a4a72647 100644 --- a/target/product/runtime_libart.mk +++ b/target/product/runtime_libart.mk @@ -180,4 +180,9 @@ PRODUCT_SYSTEM_PROPERTIES += \ dalvik.vm.enable_pr_dexopt=true # Copy preopted files from system_b on first boot. +ifeq ($(BOARD_USES_SYSTEM_OTHER_ODEX),true) PRODUCT_SYSTEM_PROPERTIES += ro.cp_system_other_odex=1 + +PRODUCT_PACKAGES += \ + cppreopts.sh +endif