Merge pull request #39 from codestuding/master

修复宿主 APK 的 SO 文件为空导致 libsandhook.so 拷贝失败的问题。
This commit is contained in:
Windy 2019-09-30 01:37:44 +08:00 committed by GitHub
commit f8607dc0c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -51,9 +51,11 @@ public class SoAndDexCopyTask implements Runnable {
private void copySoFile() {
for (String libPath : APK_LIB_PATH_ARRAY) {
String apkSoFullPath = fullLibPath(libPath);
if(new File(apkSoFullPath).exists()) {
copyLibFile(apkSoFullPath, SO_FILE_PATH_MAP.get(libPath));
File apkSoFullPathFile= new File(apkSoFullPath);
if (!apkSoFullPathFile.exists()){
apkSoFullPathFile.mkdirs();
}
copyLibFile(apkSoFullPath, SO_FILE_PATH_MAP.get(libPath));
}
// copy xposed modules into the lib path
if (xposedModuleArray != null && xposedModuleArray.length > 0) {