Skip to content

Commit

Permalink
修复加载so文件未考虑到进程位数的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
imlk0 committed May 10, 2018
1 parent 2e0eff9 commit 89a821f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion app/src/main/java/com/android/reverse/util/SoFileLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.annotation.TargetApi;
import android.os.Build;
import android.os.Process;

import com.android.reverse.mod.ReverseXposedModule;

Expand Down Expand Up @@ -34,7 +35,7 @@ public static void loadLibrary(String libName) {


if (Build.VERSION.SDK_INT >= 21) {
soEntryPath = "lib" + "/" + Build.SUPPORTED_ABIS[0] + "/lib" + libName + ".so";
soEntryPath = "lib" + "/" + getSuitAbi() + "/lib" + libName + ".so";
} else {
soEntryPath = "lib" + "/" + Build.CPU_ABI + "/lib" + libName + ".so";
}
Expand Down Expand Up @@ -86,4 +87,13 @@ public static void loadLibrary(String libName) {

}


public static String getSuitAbi() {
if (Process.is64Bit()) {
return Build.SUPPORTED_64_BIT_ABIS[0];
} else {
return Build.SUPPORTED_32_BIT_ABIS[0];
}
}

}

0 comments on commit 89a821f

Please sign in to comment.