From 587484abe553b44ccd3b53fffc7a8205705b6c40 Mon Sep 17 00:00:00 2001 From: Alex Klyubin Date: Tue, 17 May 2016 13:33:34 -0700 Subject: [PATCH] Uncompress native libs only if they are compressed. This changes the build system to uncompress native libraries in preinstalled APKs only if the libraries are actually compressed. Previously, any preinstalled APK containing native libraries was modified by having all native libraries removed from the APK and then re-added to the APK in uncompressed form. Bug: 27887819 Change-Id: I3db172133e141bb6282bf3ed7070b068a826724e --- core/definitions.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/definitions.mk b/core/definitions.mk index 5d24b671f..e2d5de4f0 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2497,7 +2497,7 @@ endif # Uncompress shared libraries embedded in an apk. # define uncompress-shared-libs -$(hide) if unzip -l $@ $(PRIVATE_EMBEDDED_JNI_LIBS) >/dev/null ; then \ +$(hide) if (zipinfo $@ $(PRIVATE_EMBEDDED_JNI_LIBS) 2>/dev/null | grep -v ' stor ' >/dev/null) ; then \ rm -rf $(dir $@)uncompressedlibs && mkdir $(dir $@)uncompressedlibs; \ unzip $@ $(PRIVATE_EMBEDDED_JNI_LIBS) -d $(dir $@)uncompressedlibs && \ zip -d $@ 'lib/*.so' && \