File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ afterHook {
136136 result = .. .
137137 // Remove the content of the return value
138138 resultNull()
139+ // Get the data storage instance within the scope of the current callback method body
140+ dataExtra
139141 // Throw an exception to the Hook app
140142 Throwable (" Fatal" ).throwToApp()
141143 // Execute the original method without hook and call with the original method parameters, generics can be omitted
@@ -174,6 +176,8 @@ override fun afterHookedMethod(param: MethodHookParam) {
174176 param.result = .. .
175177 // Remove the content of the return value
176178 param.result = null
179+ // Get the data storage instance within the scope of the current callback method body
180+ param.extra
177181 // Throw an exception to the Hook app
178182 param.throwable = Throwable (" Fatal" )
179183 // Execute the original method without hooking
Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ afterHook {
136136 result = .. .
137137 // 删除返回值内容
138138 resultNull()
139+ // 获取当前回调方法体范围内的数据存储实例
140+ dataExtra
139141 // 向 Hook APP 抛出异常
140142 Throwable (" Fatal" ).throwToApp()
141143 // 执行未经 Hook 的原始方法并使用原始方法参数调用,泛型可略
@@ -174,6 +176,8 @@ override fun afterHookedMethod(param: MethodHookParam) {
174176 param.result = .. .
175177 // 删除返回值内容
176178 param.result = null
179+ // 获取当前回调方法体范围内的数据存储实例
180+ param.extra
177181 // 向 Hook APP 抛出异常
178182 param.throwable = Throwable (" Fatal" )
179183 // 执行未经 Hook 的原始方法
You can’t perform that action at this time.
0 commit comments