From 678ace7e77b1d3a3e37dfd1694e09a8375ba7e09 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Wed, 3 Apr 2019 22:22:37 +0900 Subject: [PATCH 1/5] Don't feed framework.jar to proguard for vendor apks We used to add framework.jar to proguard via -systemjars option even for the apks building againsd SDK. This was because the app might have references to hidden APIs via static libraries, etc. However, for vendor apks, the use of hidden API is strictly prohibited. So it is fine to not include framework.jar. Furthermore, including framework.jar even causes problems in some cases; if a java library (e.g., android.hidl.base-V1.0-java) is statically linked to both the app and the framework.jar, -systemjars frameworks.jar forcibly removes classes in the library from the app to have references to the non-public classes in framework.jar. This could fail some compliance tests. Fixing the problem by not raising SDK for apks located in vendor or odm partitions. Bug: 128574081 Test: m Merged-In: If2b658fead5b4bb4d8c023a37eb57a37ad9b741d Change-Id: If2b658fead5b4bb4d8c023a37eb57a37ad9b741d (cherry picked from commit eadd1bdb8e6d343be7cc67d4d2cd3bcb50ebd3dd) --- core/java.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/java.mk b/core/java.mk index fc5a8bc333..c3787ae3c4 100644 --- a/core/java.mk +++ b/core/java.mk @@ -395,6 +395,13 @@ else # that would break apps that use APIs removed from the current SDK. my_proguard_sdk_raise := $(call java-lib-header-files,$(TARGET_DEFAULT_BOOTCLASSPATH_LIBRARIES) $(TARGET_DEFAULT_JAVA_LIBRARIES)) endif +ifdef BOARD_SYSTEMSDK_VERSIONS +ifneq (,$(filter true,$(LOCAL_VENDOR_MODULE) $(LOCAL_ODM_MODULE) $(LOCAL_PROPRIETARY_MODULE))) + # But for vendor or odm apks, don't raise SDK as the apks are required to + # use SDK APIs only + my_proguard_sdk_raise := +endif +endif endif legacy_proguard_flags := $(addprefix -libraryjars ,$(my_proguard_sdk_raise) \ From 39adb5535ddff55fd8bda413d1926f0e3429c377 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Fri, 5 Apr 2019 17:28:23 +0000 Subject: [PATCH 2/5] Revert "Turn off app image startup cache temporarily" This reverts commit 8ef74918a9ee60033db0f32fc4ea23135e591652. Bug: 128941180 Test: TH Reason for revert: Regressions are mostly fixed Change-Id: I4bef949b4ac9b11523482c6714345a250c11573a --- target/product/runtime_libart.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk index b84584b253..babe32ff02 100644 --- a/target/product/runtime_libart.mk +++ b/target/product/runtime_libart.mk @@ -85,8 +85,8 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ pm.dexopt.shared=speed # Enable resolution of startup const strings. -# PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ -# dalvik.vm.dex2oat-resolve-startup-strings=true +PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ + dalvik.vm.dex2oat-resolve-startup-strings=true # Enable minidebuginfo generation unless overridden. PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ From 5c17bbc567a5548bd7b2262c989586c14da683fc Mon Sep 17 00:00:00 2001 From: Paul Scovanner Date: Fri, 5 Apr 2019 16:45:25 -0700 Subject: [PATCH 3/5] Update Security String to 2019-05-05 Bug:128322951 --- core/version_defaults.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/version_defaults.mk b/core/version_defaults.mk index a96bf74b4b..5717368ec3 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -259,7 +259,7 @@ ifndef PLATFORM_SECURITY_PATCH # It must be of the form "YYYY-MM-DD" on production devices. # It must match one of the Android Security Patch Level strings of the Public Security Bulletins. # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty. - PLATFORM_SECURITY_PATCH := 2019-04-05 + PLATFORM_SECURITY_PATCH := 2019-05-05 endif .KATI_READONLY := PLATFORM_SECURITY_PATCH From c2e947715e14c30ead09e868ec5c07945393a230 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Fri, 5 Apr 2019 17:49:56 +0100 Subject: [PATCH 4/5] Move the profile rule out of dex_preopt_libart.mk. We only need to define it once. dex_preopt_libart.mk can be read multiple times if there are many boot image. Test: m && no warning Bug:119800099 (cherry picked from commit 7e8ca9a17423c7acb4a944059fd78b7cb3a7eb13) Change-Id: I16d67b77142fce93c6d4acc15f557ad073b2de44 Merged-In: If5b8fbb0c3310eb42f676d7b5267dcee679f7e19 --- core/dex_preopt.mk | 4 ++++ core/dex_preopt_libart.mk | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk index d43158ef25..8017486b76 100644 --- a/core/dex_preopt.mk +++ b/core/dex_preopt.mk @@ -13,6 +13,10 @@ else install-on-system-other = $(filter-out $(PRODUCT_DEXPREOPT_SPEED_APPS) $(PRODUCT_SYSTEM_SERVER_APPS),$(basename $(notdir $(filter $(foreach f,$(SYSTEM_OTHER_ODEX_FILTER),$(TARGET_OUT)/$(f)),$(1))))) endif +# We want to install the profile even if we are not using preopt since it is required to generate +# the image on the device. +ALL_DEFAULT_INSTALLED_MODULES += $(call copy-many-files,$(DEXPREOPT_IMAGE_PROFILE_BUILT_INSTALLED),$(PRODUCT_OUT)) + # Install boot images. Note that there can be multiple. DEFAULT_DEX_PREOPT_INSTALLED_IMAGE := $(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_INSTALLED_IMAGE := diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk index edd82df587..85f2f3b2d0 100644 --- a/core/dex_preopt_libart.mk +++ b/core/dex_preopt_libart.mk @@ -5,11 +5,6 @@ # #################################### -# We want to install the profile even if we are not using preopt since it is required to generate -# the image on the device. -my_installed := $(call copy-many-files,$(DEXPREOPT_IMAGE_PROFILE_BUILT_INSTALLED),$(PRODUCT_OUT)) -ALL_DEFAULT_INSTALLED_MODULES += $(my_installed) - # Install primary arch vdex files into a shared location, and then symlink them to both the primary # and secondary arch directories. my_vdex_copy_pairs := $(DEXPREOPT_IMAGE_VDEX_BUILT_INSTALLED_$(my_boot_image_name)_$(TARGET_ARCH)) From 1f8f84de6133f82df8210fa9214475d7c5aaa2f0 Mon Sep 17 00:00:00 2001 From: Paul Scovanner Date: Mon, 8 Apr 2019 10:58:31 -0700 Subject: [PATCH 5/5] [DO NOT MERGE] Update Security String to 2019-06-01 Bug:129374896 --- core/version_defaults.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 5193eb21b1..7d45245dd1 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -181,7 +181,7 @@ ifndef PLATFORM_SECURITY_PATCH # It must be of the form "YYYY-MM-DD" on production devices. # It must match one of the Android Security Patch Level strings of the Public Security Bulletins. # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty. - PLATFORM_SECURITY_PATCH := 2019-05-05 + PLATFORM_SECURITY_PATCH := 2019-06-01 endif ifndef PLATFORM_BASE_OS