diff --git a/edxp-sandhook/build.gradle b/edxp-sandhook/build.gradle index 952c8f64..ec77f3ea 100644 --- a/edxp-sandhook/build.gradle +++ b/edxp-sandhook/build.gradle @@ -28,7 +28,7 @@ dependencies { compileOnly files("${hiddenApiStubJarFilePath}") implementation project(':edxp-common') implementation project(':xposed-bridge') - implementation 'com.swift.sandhook:hooklib:4.0.2' + implementation 'com.swift.sandhook:hooklib:4.1.2' compileOnly project(':dexmaker') } diff --git a/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/XposedCompat.java b/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/XposedCompat.java index ed21c1bb..4802f8c4 100644 --- a/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/XposedCompat.java +++ b/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/XposedCompat.java @@ -5,8 +5,8 @@ import android.os.Process; import android.text.TextUtils; import com.elderdrivers.riru.edxp.config.ConfigManager; -import com.swift.sandhook.SandHook; import com.elderdrivers.riru.edxp.util.ComposeClassLoader; +import com.swift.sandhook.wrapper.HookWrapper; import com.swift.sandhook.xposedcompat.methodgen.SandHookXposedBridge; import com.swift.sandhook.xposedcompat.utils.ApplicationUtils; import com.swift.sandhook.xposedcompat.utils.FileUtils; @@ -38,7 +38,7 @@ public class XposedCompat { return; for (Class hooker : hookers) { try { - SandHook.addHookClass(classLoader, hooker); + HookWrapper.addHookClass(classLoader, hooker); } catch (Throwable throwable) { } } diff --git a/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/methodgen/SandHookXposedBridge.java b/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/methodgen/SandHookXposedBridge.java index aa30436d..9fc19b20 100644 --- a/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/methodgen/SandHookXposedBridge.java +++ b/edxp-sandhook/src/main/java/com/swift/sandhook/xposedcompat/methodgen/SandHookXposedBridge.java @@ -1,5 +1,6 @@ package com.swift.sandhook.xposedcompat.methodgen; +import android.os.Build; import android.os.Process; import android.os.Trace; @@ -137,6 +138,17 @@ public final class SandHookXposedBridge { } }; SandHookConfig.DEBUG = true; + SandHookConfig.compiler = false; + //already impl in edxp + SandHookConfig.delayHook = false; + //use when call origin + HookBlackList.methodBlackList.add("java.lang.reflect.isStatic"); + HookBlackList.methodBlackList.add("java.lang.reflect.Method.getModifiers"); + if (Build.VERSION.SDK_INT >= 29) { + //unknown bug, disable tmp + //TODO Fix + XposedCompat.useInternalStub = false; + } //in zygote disable compile } } diff --git a/edxp-sandhook/template_override/system/lib/libsandhook.edxp.so b/edxp-sandhook/template_override/system/lib/libsandhook.edxp.so old mode 100755 new mode 100644 index 6608f917..b6f4958a Binary files a/edxp-sandhook/template_override/system/lib/libsandhook.edxp.so and b/edxp-sandhook/template_override/system/lib/libsandhook.edxp.so differ diff --git a/edxp-sandhook/template_override/system/lib64/libsandhook.edxp.so b/edxp-sandhook/template_override/system/lib64/libsandhook.edxp.so old mode 100755 new mode 100644 index b0a53d8f..26311036 Binary files a/edxp-sandhook/template_override/system/lib64/libsandhook.edxp.so and b/edxp-sandhook/template_override/system/lib64/libsandhook.edxp.so differ diff --git a/hiddenapi-stubs/libs/framework-stub.jar b/hiddenapi-stubs/libs/framework-stub.jar index 8d60307d..2c94a740 100644 Binary files a/hiddenapi-stubs/libs/framework-stub.jar and b/hiddenapi-stubs/libs/framework-stub.jar differ