Revert "[core] fix loading embedded module so (#1036)" (#1042)

This reverts commit 1075743360.
This commit is contained in:
vvb2060 2021-09-03 19:52:27 +08:00 committed by GitHub
parent 1075743360
commit c2cdecf644
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 17 deletions

View File

@ -1,7 +1,6 @@
package org.lsposed.lspd.models;
parcelable PreLoadedApk {
String hostApk;
List<SharedMemory> preLoadedDexes;
List<String> moduleClassNames;
List<String> moduleLibraryNames;

View File

@ -336,22 +336,8 @@ public final class XposedInit {
var sb = new StringBuilder();
var abis = Process.is64Bit() ? Build.SUPPORTED_64_BIT_ABIS : Build.SUPPORTED_32_BIT_ABIS;
if (file.hostApk != null) {
try {
var runtime = XposedHelpers.callStaticMethod(Class.forName("dalvik.system.VMRuntime"), "getRuntime");
var arch = (String) XposedHelpers.callMethod(runtime, "vmInstructionSet");
var hostDir = new File(file.hostApk).getParent();
for (String abi : abis) {
sb.append(hostDir).append("/lib/").append(arch).append("/").append(name).append(".so!/lib/").append(abi).append(File.pathSeparator);
}
} catch (ClassNotFoundException e) {
Log.e(TAG, " Cannot load module: " + name, e);
return false;
}
} else {
for (String abi : abis) {
sb.append(apk).append("!/lib/").append(abi).append(File.pathSeparator);
}
for (String abi : abis) {
sb.append(apk).append("!/lib/").append(abi).append(File.pathSeparator);
}
var librarySearchPath = sb.toString();