Always embed jni libs and store uncompressed
Previously, unlike unbundled apps, if a platform app depends on a native library, it is not embedded in the app, but installed to <partition>/lib and the app is instead provided with a symlink to the lib. This actualy is a legacy from the original Android where native libraries couldn't be executed while embedded in the apk. To be executed, the native libs had to be extracted to a mutable storage, but that had a risk of breaking the verified boot, so libs couldn't be embedded. Since API level 23, execute-in-place of native libs has become possible. But platform apps had to opt-in (use_embedded_native_libs: true) for the feature for a reason that is unclear today. Perhaps, it was to save disk space in case when multiple apps share the same native library, but such cases are found to be very rare, or non-existing. With this CL, two changes are introduced: 1. jni libs are always embededd for all apps (bundled or unbundled) 2. use_embedded_native_libs is deprecated unless the module type is android_test or android_test_helper_app. It is now a no-op property. It's left just to not break existing bp files. This will make unbundled apps bigger, but given that unbundled apps built using android platform build system are tests, the size increase should be acceptible. Bug: 330276359 Test: m Change-Id: I7df993ea85bce1c0a7222000c403a974818c3362
Loading
Please register or sign in to comment