OSDN Git Service

Enable the PRC compatibility package feature for PRC market
authorxiajiang <xia1.jiang@intel.com>
Wed, 17 Feb 2016 18:59:14 +0000 (13:59 -0500)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 29 May 2018 05:56:47 +0000 (13:56 +0800)
commitb68d93331b89f72a7542f5f64c143475f804938b
tree5795674c94248dc8c05403b40a16395b9c8d9edc
parent30be80a0f086a804ddb460ae0a24961980ea47b0
Enable the PRC compatibility package feature for PRC market

In PRC market, some APKs are packed in non-standard way, that is,
the x86(_64) libraries aren't workable although they're found in the APK.
This patch intends to relieve the impact from below 2 defects,
which is based-on the heuristic algorithm.

NOTE: To enable this feature, set "PRC_COMPATIBILITY_PACKAGE := true"
in device BoardConfig.mk before enabling houdini.

1. Missing x86(_64) libraries: The x86(_64) libraries are ported and
   existing in the APK. But it's incomplete, and not workable.
2. Mixed arm(64) libraries: Several libraries are existing in lib/x86(_64)/
   directory in the APK. But some of them are arm(64) libraries,
   instead of x86(_64) ones.

All of above always cause APP crash if installed x86(_64) libraries
by PackageManager.

This patch aims to improve PackageManager to figure out these defects
and install arm(64) libraries to run the APP with houdini support.
The basic idea is to compare x86(_64) libraries with arm(64) alternatives
to determine which one should be workable.

To customize it for specific APPs, 3 lists are provided under
/system/vendor/etc/misc/ on the device.

1. /system/vendor/etc/misc/.OEMWhiteList:
   This patch will be disabled for the APPs containing in the OEMWhiteList
2. /system/vendor/etc/misc/.OEMBlackList:
   The APP is enforced to install the arm(64) libraries if existed.
3. /system/vendor/etc/misc/.ThirdPartySO:
   This is another list which contains the names of all 3rd-party libraries,
   which will impact on the final decision of APP installation.

Change-Id: I2613d9ebc8fe012c801f4a38fc5dede413f15a91
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-20470
Signed-off-by: xiajiang <xia1.jiang@intel.com>
Reviewed-on: https://android.intel.com:443/471490
core/java/com/android/internal/content/NativeLibraryHelper.java
core/jni/Android.bp
core/jni/abipicker/ABIPicker.cpp [new file with mode: 0644]
core/jni/abipicker/ABIPicker.h [new file with mode: 0644]
core/jni/abipicker/ELFLite.h [new file with mode: 0644]
core/jni/com_android_internal_content_NativeLibraryHelper.cpp