History log of /build/make/core/install_jni_libs.mk
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e1a3b367fe11b9eb4bc78db0426e4c4b240d1f24 19-Apr-2017 Jiyong Park <jiyong@google.com> Embed jni libs in vendor apks for treble-ized devices

JNI libs used by bundled APKs have been installed outside of the APK
(e.g. /system/lib and /vendor/lib) to save space because multiple APKs
may share the same set of JNI libs.

However, this causes problem for treble-ized devices where access to
/vendor/lib is prohibited for system processes including Java apps.

So, the JNI libs are embedded into the APK when the APK is installed to
/vendor partition and the device is fully treble-ized.

Bug: 37491282
Test: Move an APK and its JNI libraries to vendor partition by setting
LOCAL_PROPRIETARY_MODULE := true and build:
The jni lib does not exist under /system or /vendor. unzipping
the apk reveals the jni lib under ./lib/<abi> directory.

Merged-In: I8389761dfbd28d181869d79f0bf988a1e4df2fca
Change-Id: I8389761dfbd28d181869d79f0bf988a1e4df2fca
(cherry picked from commit 1cb8dea625b442880e3aac9104f687826417654d)
/build/make/core/install_jni_libs.mk
1fb0152ff7bf24b565b44a57e51290f2a5430107 01-May-2015 Ying Wang <wangying@google.com> Don't extract jni from prebuilt apks.

- We don't need LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES now, for we always
page-align jni shared libraries and store them umcompressed.
- For prebuilt apks, we don't extract jni any more; Instead we always run
uncompress-shared-libs on them.
- For apks built from source, we still install the jni separately, because
that way multiple apks can share the same jni and it saves space.

With this change, for most prebuilt apks, we don't need to specify
LOCAL_PREBUILT_JNI_LIBS ("@lib/<abi>/foo.so") any more, for the build
system automatically replaces the embedded jni with uncompressed files;
But if a prebuilt is a fat apk (i.e. containing jni not needed by the
current product architecture), you still need LOCAL_PREBUILT_JNI_LIBS to
specify what jni to keep. Otherwise all embedded jni will be replaced with
uncompressed files, that wastes space.

Bug: 8076853
Change-Id: Ic3666dc72bf17cd293787414dd185470b365f967
/build/make/core/install_jni_libs.mk
97dfa3177d9594f9691424052b2a85befeb0b3d8 04-May-2015 Ying Wang <wangying@google.com> Revert "Don't extract jni from prebuilt apks."

This reverts commit 3797466fbd31cc3ca5a1eddea64e7fdf0921ea67.

Bug: 20810492
Bug: 20811499
Change-Id: Ic922d9daccc4550db489c0f3d4ad6b4ff85b5e60
/build/make/core/install_jni_libs.mk
3797466fbd31cc3ca5a1eddea64e7fdf0921ea67 01-May-2015 Ying Wang <wangying@google.com> Don't extract jni from prebuilt apks.

- We don't need LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES now, for we always
page-align jni shared libraries and store them umcompressed.
- For prebuilt apks, we don't extract jni any more; Instead we always run
uncompress-shared-libs on them.
- For apks built from source, we still install the jni separately, because
that way multiple apks can share the same jni and it saves space.

With this change, for most prebuilt apks, we don't need to specify
LOCAL_PREBUILT_JNI_LIBS ("@lib/<abi>/foo.so") any more, for the build
system automatically replaces the embedded jni with uncompressed files;
But if a prebuilt is a fat apk (i.e. containing jni not needed by the
current product architecture), you still need LOCAL_PREBUILT_JNI_LIBS to
specify what jni to keep. Otherwise all embedded jni will be replaced with
uncompressed files, that wastes space.

Bug: 8076853
Change-Id: Icf07e0998ac3602e6e05e80fed836fbafca33e01
/build/make/core/install_jni_libs.mk
a626d3b44b00c5aeef6d36a45020425331a80fc4 30-Jun-2014 Ying Wang <wangying@google.com> Fix missing rs_compatibility_jni_libs.

Bug: 15935150
Change-Id: I2971bcf4a9fa96e7a5098a759ecc67ba4f565b6c
/build/make/core/install_jni_libs.mk
8e20ef6205b3c96135b1c1e4484d523dbecb1b98 25-Jun-2014 Ying Wang <wangying@google.com> Support to add JNI of both archs in multilib build.

Use "LOCAL_MULTILIB := both" to install jni libraries of both archs in
multilib build.
The build system will package jni of both archs to the apk, or install
them to the right location on the system image and create symlinks,
extract .so files from prebuilt apk, etc if appropriate.

Bug: 15849902
Change-Id: I7e147b5a47db476584c38250de7b36c75ea40d81
/build/make/core/install_jni_libs.mk
966c1e0cae6a59f15264d3b542af08e21e2dc06c 20-May-2014 Ying Wang <wangying@google.com> Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build

We already support pure 32-bit and 64-bit-by-default multilib build.
With HOST_PREFER_32_BIT we can build 32-bit-by-default multilib build.
This will be lest disruptive during the period we transition to
64-bit-by-default.

Bug: 13751317
Change-Id: I0d56ce4abbe4afeaacfd70d709f6a349791c0722
/build/make/core/install_jni_libs.mk
7cf9f28b5f064f309a5023eb73234cecb5cf3de9 19-Apr-2014 Ying Wang <wangying@google.com> Support to extract JNI libs from prebuilt APK

Use LOCAL_PREBUILT_JNI_LIBS to install prebuilt JNI libraries extracted
from the prebuilt apk, or prebuilts as source, to the app specific lib path.
LOCAL_PREBUILT_JNI_LIBS accepts 2 kinds of files:
- Files like @path/to/libfoo.so (path inside the apk) are JNI libs
extracted from the prebuilt apk. In this case, all embedded JNI libs
inside the prebuilt apk are stripped.
- Files like path/to/libfoo.so (path relative to LOCAL_PATH) are
prebuilts in the source tree.

Those prebuilt JNI libs are not defined as modules in the build system,
so this works around possible module name conflict.

Bug: 13170859
Change-Id: I91bb844cc11b3621a85733bc7e8910f168957ef0
/build/make/core/install_jni_libs.mk
695e826a0cc1da05a0d7bedf73c031cb8ead97c0 17-Apr-2014 Ying Wang <wangying@google.com> Update rules to install JNI libraries.

Previously we have to use LOCAL_REQUIRED_MODULES to install jni
libraries for an apk in bundled build.
With this change, we'll use LOCAL_JNI_SHARED_LIBRARIES alone to
install jni shared libraries.

The new rules are:
- If we are doing unbundled build, or the apk isn't going to be
installed to system partitions, we'll embed the jni libs in the
built apk.
- Otherwise, the jni libraries will be installed to the system
lib path, and symlinks created in the app specific lib path.

Change-Id: Id6bd5301eb632bda3593664acee580f0d8b1d5d4
/build/make/core/install_jni_libs.mk