diff options
author | Dimitry Ivanov <dimitry@google.com> | 2015-06-04 18:32:06 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-04 18:33:00 +0000 |
commit | 72bced8a758a3a8427768d97e6d763f6a706d2b1 (patch) | |
tree | 67eb9ea9b83e94c08ef514156664a32b1ddd3ee9 /core/definitions.mk | |
parent | cf7fbcd03d9f13d1c2fe6e65f02247feadec136d (diff) | |
parent | 226eb92321ef5b71a448b8e857eaedeb3dd0419e (diff) | |
download | build-72bced8a758a3a8427768d97e6d763f6a706d2b1.zip build-72bced8a758a3a8427768d97e6d763f6a706d2b1.tar.gz build-72bced8a758a3a8427768d97e6d763f6a706d2b1.tar.bz2 |
Merge changes from topic 'prebuilt-open-from-apk' into mnc-dev
* changes:
Uncompress .so files before signing the apk.
Don't extract jni from prebuilt apks.
Diffstat (limited to 'core/definitions.mk')
-rw-r--r-- | core/definitions.mk | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/core/definitions.mk b/core/definitions.mk index 6b9abd8..474a4e6 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2030,8 +2030,7 @@ $(hide) mkdir -p $(addprefix $(dir $@)lib/,$(PRIVATE_JNI_SHARED_LIBRARIES_ABI)) $(foreach abi,$(PRIVATE_JNI_SHARED_LIBRARIES_ABI),\ $(call _add-jni-shared-libs-to-package-per-abi,$(abi),\ $(patsubst $(abi):%,%,$(filter $(abi):%,$(PRIVATE_JNI_SHARED_LIBRARIES))))) -$(hide) (cd $(dir $@) && zip -r \ - $(if $(filter true, $(PRIVATE_PAGE_ALIGN_JNI_SHARED_LIBRARIES)),-0,) $(notdir $@) lib) +$(hide) (cd $(dir $@) && zip -r -0 $(notdir $@) lib) $(hide) rm -rf $(dir $@)lib endef @@ -2077,21 +2076,22 @@ endef define align-package $(hide) mv $@ $@.unaligned $(hide) $(ZIPALIGN) \ - -f \ - $(if $(filter true, $(PRIVATE_PAGE_ALIGN_JNI_SHARED_LIBRARIES)),-p,) \ + -f -p \ 4 \ $@.unaligned $@.aligned $(hide) mv $@.aligned $@ endef +# Uncompress shared libraries embedded in an apk. +# define uncompress-shared-libs -$(hide) rm -rf $(dir $@)/tmpworkdir -$(hide) mv $@ $@.compressed -$(hide) mkdir $(dir $@)/tmpworkdir -$(hide) unzip $@.compressed 'lib/*.so' -d $(dir $@)/tmpworkdir -$(hide) ( cd $(dir $@)/tmpworkdir && zip -D -r -0 ../$(notdir $@).compressed lib ) -$(hide) mv $@.compressed $@ -$(hide) rm -rf $(dir $@)/tmpworkdir +$(hide) if unzip -l $@ $(PRIVATE_EMBEDDED_JNI_LIBS) >/dev/null ; then \ + rm -rf $(dir $@)uncompressedlibs && mkdir $(dir $@)uncompressedlibs; \ + unzip $@ $(PRIVATE_EMBEDDED_JNI_LIBS) -d $(dir $@)uncompressedlibs && \ + zip -d $@ 'lib/*.so' && \ + ( cd $(dir $@)uncompressedlibs && zip -D -r -0 ../$(notdir $@) lib ) && \ + rm -rf $(dir $@)uncompressedlibs; \ + fi endef define install-dex-debug |