Commit 44ec38da authored by swift_gan's avatar swift_gan

should not resolve dex cache when use stub backups

parent 8b2924d0
package com.swift.sandhook; package com.swift.sandhook;
import android.os.Build;
import com.swift.sandhook.annotation.HookMode; import com.swift.sandhook.annotation.HookMode;
import com.swift.sandhook.utils.ReflectionUtils; import com.swift.sandhook.utils.ReflectionUtils;
import com.swift.sandhook.utils.Unsafe; import com.swift.sandhook.utils.Unsafe;
...@@ -252,6 +254,8 @@ public class SandHook { ...@@ -252,6 +254,8 @@ public class SandHook {
public static boolean hasJavaArtMethod() { public static boolean hasJavaArtMethod() {
if (SandHookConfig.SDK_INT >= Build.VERSION_CODES.O)
return false;
if (artMethodClass != null) if (artMethodClass != null)
return true; return true;
try { try {
......
...@@ -76,6 +76,7 @@ public class HookWrapper { ...@@ -76,6 +76,7 @@ public class HookWrapper {
try { try {
field.set(null, hookEntity.backup); field.set(null, hookEntity.backup);
hookEntity.hookIsStub = true; hookEntity.hookIsStub = true;
hookEntity.resolveDexCache = false;
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
e.printStackTrace(); e.printStackTrace();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment