-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patheasy_aop_config.yaml
106 lines (95 loc) · 3.26 KB
/
easy_aop_config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: "1.0.0"
logEnabled: true
#输出日志level; VERBOSE:1;DEBUG:2;WARN:3;ERROR:4
logLevel: 2
needAopCheck: false
needDexCheck: false
skipClazz:
- _regex_^\S+\.R\.class$
- _regex_^\S+\.R\$anim\.class$
- _regex_^\S+\.R\$array\.class$
- _regex_^\S+\.R\$attr\.class$
- _regex_^\S+\.R\$animator\.class$
- _regex_^\S+\.R\$bool\.class$
- _regex_^\S+\.R\$color\.class$
- _regex_^\S+\.R\$dimen\.class$
- _regex_^\S+\.R\$drawable\.class$
- _regex_^\S+\.R\$font\.class$
- _regex_^\S+\.R\$integer\.class$
- _regex_^\S+\.R\$id\.class$
- _regex_^\S+\.R\$interpolator\.class$
- _regex_^\S+\.R\$layout\.class$
- _regex_^\S+\.R\$menu\.class$
- _regex_^\S+\.R\$mipmap\.class$
- _regex_^\S+\.R\$navigation\.class$
- _regex_^\S+\.R\$plurals\.class$
- _regex_^\S+\.R\$raw\.class$
- _regex_^\S+\.R\$string\.class$
- _regex_^\S+\.R\$style\.class$
- _regex_^\S+\.R\$styleable\.class$
- _regex_^\S+\.R\$xml\.class$
skipJars:
# eg: jetified-kotlin-stdlib-jdk7-1.3.50.jar
- _regex_^\S+kotlin-stdlib-jdk\d-(\d+\.)+jar$
# eg: jetified-kotlin-stdlib-1.3.50.jar
- _regex_^\S+kotlin-stdlib-(\d+\.)+jar$
proxyItemsCfg:
#调用目标类
"com.wuba.easyaopdemo.Waiter":
enabled: false
# 调用替换代理类
proxyClass: "com.wuba.proxy.WaiterProxy"
methodMappingList:
# 目标方法名称##目标方法描述(可省略,省略后就是全匹配): 代理方法名称
"drink##(Landroid/content/Context;)V": "drinkBeer"
"tea##(Ljava/lang/String;)Ljava/lang/String;": "specialTea"
"android.content.pm.PackageManager":
enabled: false
proxyClass: "com.wuba.proxy.TestProxy"
methodMappingList:
"getInstalledPackages": "getInstalledPackages"
android.telephony.TelephonyManager:
enabled: false
proxyClass: "com.wuba.proxy.TestProxy"
methodMappingList:
"getCellLocation": "getCellLocation"
"getAllCellInfo": "getAllCellInfo"
"getLine1Number": "getLine1Number"
"getImei": "getImei"
"getDeviceId": "getDeviceId"
"getSubscriberId": "getSubscriberId"
java.lang.reflect.Method:
enabled: true
proxyClass: "com.wuba.proxy.TestProxy"
methodMappingList:
"invoke": "invoke"
# "android/telephony/TelephonyManager" {
# enable = true
# hookerClass = "com/wuba/permission/TelephonyManagerProxy"
# targetHookMethodsMap = [
# "getCellLocation": "getCellLocation",
# "getAllCellInfo" : "getAllCellInfo",
# "getLine1Number" : "getLine1Number",
# "getImei" : "getImei",
# "getDeviceId" : "getDeviceId",
# "getSubscriberId": "getSubscriberId",
# ]
# }
emptyItemsCfg:
# eg: OAID sdk 热修复后弹toast问题 方法置空
"com.wuba.easyaopdemo.Waiter":
enabled: false
methodList:
- "waitingErrorTime##()V"
insertItemsCfg:
"com.wuba.easyaopdemo.Waiter":
enabled: false
# 方法体头部插入配置:
insertEnterClass: "com.wuba.proxy.WaiterProxy"
insertEnterMethodName: "insertMethodEnter"
targetEnterMethodList:
- "makeTea##(I)V"
insertExitClass: "com.wuba.proxy.WaiterProxy"
insertExitMethodName: "insertMethodExit"
targetExitMethodList:
- "makeTea##(I)V"