Skip to content

Commit cbe63ea

Browse files
author
weishu
authored
Merge pull request tiann#2 from yemengsky/patch-1
Update HookHelper.java
2 parents 50d0d2d + a6802ec commit cbe63ea

File tree

1 file changed

+1
-0
lines changed
  • dynamic-proxy-hook/src/main/java/com/weishu/upf/dynamic_proxy_hook/app2/hook

1 file changed

+1
-0
lines changed

dynamic-proxy-hook/src/main/java/com/weishu/upf/dynamic_proxy_hook/app2/hook/HookHelper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public static void attachContext() throws Exception{
1616
Class<?> activityThreadClass = Class.forName("android.app.ActivityThread");
1717
Method currentActivityThreadMethod = activityThreadClass.getDeclaredMethod("currentActivityThread");
1818
currentActivityThreadMethod.setAccessible(true);
19+
//currentActivityThread是一个static函数所以可以直接invoke,不需要带实例参数
1920
Object currentActivityThread = currentActivityThreadMethod.invoke(null);
2021

2122
// 拿到原始的 mInstrumentation字段

0 commit comments

Comments
 (0)