[core] Compatible with applications with 32-bit native libraries only (#786)

if the target application with 32-bit native libraries only, we don't need 64-bit nativepath included

Co-authored-by: CallMESuper <zj7859256@gmail.com>
This commit is contained in:
CallMESuper 2021-06-28 17:26:10 +08:00 committed by GitHub
parent 21f9aedce6
commit 64c89d7fa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -369,8 +369,15 @@ public final class XposedInit {
// module can load it's own so
StringBuilder nativePath = new StringBuilder();
for (String i : Build.SUPPORTED_ABIS) {
nativePath.append(apk).append("!/lib/").append(i).append(File.pathSeparator);
// Compatible with applications with 32-bit native libraries only
if (android.os.Process.is64Bit()) {
for (String i : Build.SUPPORTED_64_BIT_ABIS) {
nativePath.append(apk).append("!/lib/").append(i).append(File.pathSeparator);
}
} else {
for (String i : Build.SUPPORTED_32_BIT_ABIS) {
nativePath.append(apk).append("!/lib/").append(i).append(File.pathSeparator);
}
}
// Log.d(TAG, "Allowed native path" + nativePath.toString());
ClassLoader initLoader = XposedInit.class.getClassLoader();