修复宿主 APK 的 SO 文件为空导致 libsandhook.so 拷贝失败的问题。

This commit is contained in:
cxcx 2019-09-05 22:28:48 +08:00
parent 82a8d6a0ea
commit 44643ed654
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) {