summaryrefslogtreecommitdiffstats
path: root/core/install_jni_libs_internal.mk
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2015-04-17 21:29:17 -0700
committerNick Kralevich <nnk@google.com>2015-04-18 15:11:36 -0700
commit445e111def0f955df7f9cb6ae7269dc9492cff38 (patch)
treeaa3f1611aa41368c84c12a588f0730eb5fdfe7b7 /core/install_jni_libs_internal.mk
parente128152c4cd83f1fb7457c0769b84cea36b57567 (diff)
downloadbuild-445e111def0f955df7f9cb6ae7269dc9492cff38.zip
build-445e111def0f955df7f9cb6ae7269dc9492cff38.tar.gz
build-445e111def0f955df7f9cb6ae7269dc9492cff38.tar.bz2
Error out if LOCAL_PREBUILT_JNI_LIBS and LOCAL_CERTIFICATE := PRESIGNED are used
LOCAL_PREBUILT_JNI_LIBS is an indication to the build system that all shared libraries should be deleted from an APK, and the shared libraries should be placed in the application's /system/app directory. However, using this option isn't appropriate for pre-signed APKs. Any attempt to delete files from a pre-signed APK will corrupt it's signature or waste disk space. Bug: 20247329 Bug: 8076853 Bug: 1162500 Change-Id: I89ce8f06d3889dd79dd9ffe86fc5fa60814498ad
Diffstat (limited to 'core/install_jni_libs_internal.mk')
-rw-r--r--core/install_jni_libs_internal.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/install_jni_libs_internal.mk b/core/install_jni_libs_internal.mk
index c28bb15..634fdf3 100644
--- a/core/install_jni_libs_internal.mk
+++ b/core/install_jni_libs_internal.mk
@@ -85,6 +85,15 @@ ifdef my_extracted_jni_libs
ifndef my_prebuilt_src_file
$(error No prebuilt apk to extract prebuilt jni libraries $(my_extracted_jni_libs))
endif
+ifeq ($(LOCAL_CERTIFICATE),PRESIGNED)
+$(warning Extracting files using LOCAL_PREBUILT_JNI_LIBS cannot be done while)
+$(warning using LOCAL_CERTIFICATE:=PRESIGNED, as this would corrupt)
+$(warning the APK or waste disk space. Instead, you should delete)
+$(warning LOCAL_PREBUILT_JNI_LIBS and use LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES:=true)
+$(warning This will allow loading of shared libraries directly from the APK,)
+$(warning eliminating the need to separately extract them.)
+$(error Failed to build: $(LOCAL_MODULE))
+endif
# We use the first jni lib file as dependency.
my_installed_prebuilt_jni := $(my_app_lib_path)/$(notdir $(firstword $(my_extracted_jni_libs)))
$(my_installed_prebuilt_jni): PRIVATE_JNI_LIBS := $(my_extracted_jni_libs)