import{_ as p,r as c,o as i,c as t,d as n,w as e,a as r,b as s,e as l}from"./app.f643a53b.js";const A={},y=r('<h1 id="\u4ECE-xposed-api-\u8FC1\u79FB" tabindex="-1"><a class="header-anchor" href="#\u4ECE-xposed-api-\u8FC1\u79FB" aria-hidden="true">#</a> \u4ECE Xposed API \u8FC1\u79FB</h1><blockquote><p>\u82E5\u4F60\u719F\u6089 Xposed API\uFF0C\u4F60\u53EF\u4EE5\u53C2\u8003\u4E0B\u65B9\u7684\u76F8\u540C\u70B9\u5C06\u81EA\u5DF1\u7684 API \u5FEB\u901F\u8FC1\u79FB\u5230 <code>YukiHookAPI</code>\u3002</p></blockquote><h2 id="\u8FC1\u79FB-hook-\u5165\u53E3\u70B9" tabindex="-1"><a class="header-anchor" href="#\u8FC1\u79FB-hook-\u5165\u53E3\u70B9" aria-hidden="true">#</a> \u8FC1\u79FB Hook \u5165\u53E3\u70B9</h2><blockquote><p>\u4ECE <code>XC_LoadPackage.LoadPackageParam</code> \u8FC1\u79FB\u81F3 <code>PackageParam</code>\u3002</p></blockquote><p><code>YukiHookAPI</code> \u5BF9 <code>PackageParam</code> \u5B9E\u73B0\u4E86 <code>lambda</code> \u65B9\u6CD5\u4F53 <code>this</code> \u7528\u6CD5\uFF0C\u5728 <code>encase</code> \u65B9\u6CD5\u4F53\u5185\u5373\u53EF\u5168\u5C40\u5F97\u5230 <code>PackageParam</code> \u5BF9\u8C61\u3002</p><blockquote><p>API \u529F\u80FD\u5DEE\u5F02\u5BF9\u6BD4\u5982\u4E0B</p></blockquote>',6),d=s("div",{class:"language-kotlin ext-kt line-numbers-mode"},[s("pre",{class:"shiki",style:{"background-color":"#22272e"}},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"override"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"fun"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},"onHook"),s("span",{style:{color:"#ADBAC7"}},"() "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," encase {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5F53\u524D Hook \u7684\u5305\u540D")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    packageName")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5F53\u524D Hook \u7684 ApplicationInfo")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    appInfo")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u7CFB\u7EDF\u4E0A\u4E0B\u6587\u5BF9\u8C61")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    systemContext")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5BBF\u4E3B Application \u751F\u547D\u5468\u671F")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    appContext")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// Hook \u6307\u5B9A\u7684 APP")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    loadApp(name "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#96D0FF"}},'"com.demo.test"'),s("span",{style:{color:"#ADBAC7"}},") {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        "),s("span",{style:{color:"#768390"}},"// Class Hook")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        findClass("),s("span",{style:{color:"#96D0FF"}},'"com.demo.test.TestClass"'),s("span",{style:{color:"#ADBAC7"}},").hook {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            injectMember {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                method {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    name "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#96D0FF"}},'"test"')]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    param("),s("span",{style:{color:"#F69D50"}},"BooleanType"),s("span",{style:{color:"#ADBAC7"}},")")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                }")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                afterHook {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    "),s("span",{style:{color:"#768390"}},"// ...")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                }")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            }")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        }")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        "),s("span",{style:{color:"#768390"}},"// Resources Hook (\u56FA\u5B9A\u7528\u6CD5)")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        resources().hook {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            injectResource {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                conditions {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    name "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#96D0FF"}},'"ic_launcher"')]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    mipmap()")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                }")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                replaceToModuleResource("),s("span",{style:{color:"#F69D50"}},"R"),s("span",{style:{color:"#ADBAC7"}},".mipmap.ic_launcher)")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            }")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        }")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    }")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),l(`
`),s("span",{class:"line"})])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"})])],-1),D=s("div",{class:"language-kotlin ext-kt line-numbers-mode"},[s("pre",{class:"shiki",style:{"background-color":"#22272e"}},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"private"),s("span",{style:{color:"#ADBAC7"}}," lateinit "),s("span",{style:{color:"#F47067"}},"var"),s("span",{style:{color:"#ADBAC7"}}," moduleResources"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"XModuleResources")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"override"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"fun"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},"initZygote"),s("span",{style:{color:"#ADBAC7"}},"(sparam"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"IXposedHookZygoteInit"),s("span",{style:{color:"#ADBAC7"}},"."),s("span",{style:{color:"#F69D50"}},"StartupParam"),s("span",{style:{color:"#ADBAC7"}},") {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    moduleResources "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"XModuleResources"),s("span",{style:{color:"#ADBAC7"}},".createInstance(sparam.modulePath, "),s("span",{style:{color:"#6CB6FF"}},"null"),s("span",{style:{color:"#ADBAC7"}},")")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"override"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"fun"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},"handleLoadPackage"),s("span",{style:{color:"#ADBAC7"}},"(lpparam"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"XC_LoadPackage"),s("span",{style:{color:"#ADBAC7"}},"."),s("span",{style:{color:"#F69D50"}},"LoadPackageParam"),s("span",{style:{color:"#ADBAC7"}},") {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5F53\u524D Hook \u7684\u5305\u540D")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    lpparam.packageName")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5F53\u524D Hook \u7684 ApplicationInfo")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    lpparam.applicationInfo")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u7CFB\u7EDF\u4E0A\u4E0B\u6587\u5BF9\u8C61")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5728\u539F\u751F Xposed API \u4E2D\u6CA1\u6709\u73B0\u6210\u7684\u8C03\u7528\u65B9\u6CD5\uFF0C\u4F60\u9700\u8981\u81EA\u884C\u53CD\u5C04 ActivityThread \u6765\u5B9E\u73B0")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5BBF\u4E3B Application \u751F\u547D\u5468\u671F")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#F69D50"}},"AndroidAppHelper"),s("span",{style:{color:"#ADBAC7"}},".currentApplication()")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// Class Hook")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#F47067"}},"if"),s("span",{style:{color:"#ADBAC7"}},"(lpparam.packageName "),s("span",{style:{color:"#F47067"}},"=="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#96D0FF"}},'"com.demo.test"'),s("span",{style:{color:"#ADBAC7"}},")")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        "),s("span",{style:{color:"#F69D50"}},"XposedHelpers"),s("span",{style:{color:"#ADBAC7"}},".findAndHookMethod(")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            "),s("span",{style:{color:"#96D0FF"}},'"com.demo.test.TestClass"'),s("span",{style:{color:"#ADBAC7"}},", lpparam.classLoader,")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            "),s("span",{style:{color:"#96D0FF"}},'"test"'),s("span",{style:{color:"#ADBAC7"}},", Boolean::"),s("span",{style:{color:"#6CB6FF"}},"class"),s("span",{style:{color:"#ADBAC7"}},".java,")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            "),s("span",{style:{color:"#F47067"}},"object"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"XC_MethodHook"),s("span",{style:{color:"#ADBAC7"}},"() {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                override fun afterHookedMethod(param"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"MethodHookParam"),s("span",{style:{color:"#ADBAC7"}},") {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    "),s("span",{style:{color:"#F47067"}},"//"),s("span",{style:{color:"#ADBAC7"}}," ...")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                }")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            }")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        )")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"override"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"fun"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},"handleInitPackageResources"),s("span",{style:{color:"#ADBAC7"}},"(resparam"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"XC_InitPackageResources"),s("span",{style:{color:"#ADBAC7"}},"."),s("span",{style:{color:"#F69D50"}},"InitPackageResourcesParam"),s("span",{style:{color:"#ADBAC7"}},") {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5F53\u524D Hook \u7684\u5305\u540D")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    resparam.packageName")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// Resources Hook")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    resparam.res.setReplacement(")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        "),s("span",{style:{color:"#96D0FF"}},'"com.demo.test"'),s("span",{style:{color:"#ADBAC7"}},", "),s("span",{style:{color:"#96D0FF"}},'"mipmap"'),s("span",{style:{color:"#ADBAC7"}},","),s("span",{style:{color:"#96D0FF"}},'"ic_launcher"'),s("span",{style:{color:"#ADBAC7"}},",")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        moduleResources.fwd("),s("span",{style:{color:"#F69D50"}},"R"),s("span",{style:{color:"#ADBAC7"}},".mipmap.ic_launcher)")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    )")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),l(`
`),s("span",{class:"line"})])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"})])],-1),u=r('<h2 id="\u8FC1\u79FB-hook-\u65B9\u6CD5\u4F53" tabindex="-1"><a class="header-anchor" href="#\u8FC1\u79FB-hook-\u65B9\u6CD5\u4F53" aria-hidden="true">#</a> \u8FC1\u79FB Hook \u65B9\u6CD5\u4F53</h2><blockquote><p>\u4ECE <code>XC_MethodHook.MethodHookParam</code> \u8FC1\u79FB\u81F3 <code>HookParam</code>\u3002</p></blockquote><h3 id="before-after-hook" tabindex="-1"><a class="header-anchor" href="#before-after-hook" aria-hidden="true">#</a> Before/After Hook</h3><p><code>YukiHookAPI</code> \u540C\u6837\u5BF9 <code>HookParam</code> \u5B9E\u73B0\u4E86 <code>lambda</code> \u65B9\u6CD5\u4F53 <code>this</code> \u7528\u6CD5\uFF0C\u5728 <code>beforeHook</code>\u3001<code>afterHook</code> \u7B49\u65B9\u6CD5\u4F53\u5185\u5373\u53EF\u5168\u5C40\u5F97\u5230 <code>HookParam</code> \u5BF9\u8C61\u3002</p><blockquote><p>API \u529F\u80FD\u5DEE\u5F02\u5BF9\u6BD4\u5982\u4E0B</p></blockquote>',5),C=s("div",{class:"language-kotlin ext-kt line-numbers-mode"},[s("pre",{class:"shiki",style:{"background-color":"#22272e"}},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"afterHook {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5F53\u524D Hook \u7684\u5B9E\u4F8B")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    instance")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5F53\u524D Hook \u7684 Class \u5B9E\u4F8B")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    instanceClass")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5E76 cast \u5F53\u524D Hook \u7684\u5B9E\u4F8B\u4E3A\u6307\u5B9A\u7C7B\u578B T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    instance"),s("span",{style:{color:"#F47067"}},"<"),s("span",{style:{color:"#F69D50"}},"T"),s("span",{style:{color:"#F47067"}},">"),s("span",{style:{color:"#ADBAC7"}},"()")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u65B9\u6CD5\u53C2\u6570\u6570\u7EC4")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    args")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u65B9\u6CD5\u53C2\u6570\u7684\u7B2C\u4E00\u4F4D T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    args().first().cast"),s("span",{style:{color:"#F47067"}},"<"),s("span",{style:{color:"#F69D50"}},"T"),s("span",{style:{color:"#F47067"}},">"),s("span",{style:{color:"#ADBAC7"}},"()")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u65B9\u6CD5\u53C2\u6570\u7684\u6700\u540E\u4E00\u4F4D T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    args().last().cast"),s("span",{style:{color:"#F47067"}},"<"),s("span",{style:{color:"#F69D50"}},"T"),s("span",{style:{color:"#F47067"}},">"),s("span",{style:{color:"#ADBAC7"}},"()")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u65B9\u6CD5\u53C2\u6570\u7684\u4EFB\u610F\u4E0B\u6807 T\uFF0C\u8FD9\u91CC\u7528 2 \u4E3E\u4F8B")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    args(index "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"2"),s("span",{style:{color:"#ADBAC7"}},").cast"),s("span",{style:{color:"#F47067"}},"<"),s("span",{style:{color:"#F69D50"}},"T"),s("span",{style:{color:"#F47067"}},">"),s("span",{style:{color:"#ADBAC7"}},"()")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u8BBE\u7F6E\u65B9\u6CD5\u53C2\u6570\u7684\u4EFB\u610F\u4E0B\u6807\uFF0C\u8FD9\u91CC\u7528 2 \u4E3E\u4F8B")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    args(index "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"2"),s("span",{style:{color:"#ADBAC7"}},").set(...)")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u8FD4\u56DE\u503C")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    result")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u8FD4\u56DE\u503C\u5E76 cast \u4E3A T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    result"),s("span",{style:{color:"#F47067"}},"<"),s("span",{style:{color:"#F69D50"}},"T"),s("span",{style:{color:"#F47067"}},">"),s("span",{style:{color:"#ADBAC7"}},"()")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u4FEE\u6539\u8FD4\u56DE\u503C\u5185\u5BB9")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    result "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," ...")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5220\u9664\u8FD4\u56DE\u503C\u5185\u5BB9")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    resultNull()")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u83B7\u53D6\u5F53\u524D\u56DE\u8C03\u65B9\u6CD5\u4F53\u8303\u56F4\u5185\u7684\u6570\u636E\u5B58\u50A8\u5B9E\u4F8B")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    dataExtra")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5411 Hook APP \u629B\u51FA\u5F02\u5E38")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#F69D50"}},"Throwable"),s("span",{style:{color:"#ADBAC7"}},"("),s("span",{style:{color:"#96D0FF"}},'"Fatal"'),s("span",{style:{color:"#ADBAC7"}},").throwToApp()")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u6267\u884C\u672A\u7ECF Hook \u7684\u539F\u59CB\u65B9\u6CD5\u5E76\u4F7F\u7528\u539F\u59CB\u65B9\u6CD5\u53C2\u6570\u8C03\u7528\uFF0C\u6CDB\u578B\u53EF\u7565")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    callOriginal"),s("span",{style:{color:"#F47067"}},"<"),s("span",{style:{color:"#6CB6FF"}},"Any?"),s("span",{style:{color:"#F47067"}},">"),s("span",{style:{color:"#ADBAC7"}},"()")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u6267\u884C\u672A\u7ECF Hook \u7684\u539F\u59CB\u65B9\u6CD5\u5E76\u81EA\u5B9A\u4E49\u65B9\u6CD5\u53C2\u6570\u8C03\u7528\uFF0C\u6CDB\u578B\u53EF\u7565")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    invokeOriginal"),s("span",{style:{color:"#F47067"}},"<"),s("span",{style:{color:"#6CB6FF"}},"Any?"),s("span",{style:{color:"#F47067"}},">"),s("span",{style:{color:"#ADBAC7"}},"(...)")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),l(`
`),s("span",{class:"line"})])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"})])],-1),B=s("div",{class:"language-kotlin ext-kt line-numbers-mode"},[s("pre",{class:"shiki",style:{"background-color":"#22272e"}},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"override"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"fun"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},"afterHookedMethod"),s("span",{style:{color:"#ADBAC7"}},"(param"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"MethodHookParam"),s("span",{style:{color:"#ADBAC7"}},") {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5F53\u524D Hook \u7684\u5B9E\u4F8B")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.thisObject")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5F53\u524D Hook \u7684 Class \u5B9E\u4F8B")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.thisObject.javaClass")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u5E76 cast \u5F53\u524D Hook \u7684\u5B9E\u4F8B\u4E3A\u6307\u5B9A\u7C7B\u578B T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.thisObject "),s("span",{style:{color:"#F47067"}},"as"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u65B9\u6CD5\u53C2\u6570\u6570\u7EC4")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.args")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u65B9\u6CD5\u53C2\u6570\u7684\u7B2C\u4E00\u4F4D T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.args["),s("span",{style:{color:"#6CB6FF"}},"0"),s("span",{style:{color:"#ADBAC7"}},"] "),s("span",{style:{color:"#F47067"}},"as"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u65B9\u6CD5\u53C2\u6570\u7684\u6700\u540E\u4E00\u4F4D T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.args[param.args.lastIndex] "),s("span",{style:{color:"#F47067"}},"as"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u65B9\u6CD5\u53C2\u6570\u7684\u4EFB\u610F\u4E0B\u6807 T\uFF0C\u8FD9\u91CC\u7528 2 \u4E3E\u4F8B")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.args["),s("span",{style:{color:"#6CB6FF"}},"2"),s("span",{style:{color:"#ADBAC7"}},"] "),s("span",{style:{color:"#F47067"}},"as"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u8BBE\u7F6E\u65B9\u6CD5\u53C2\u6570\u7684\u4EFB\u610F\u4E0B\u6807\uFF0C\u8FD9\u91CC\u7528 2 \u4E3E\u4F8B")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.args["),s("span",{style:{color:"#6CB6FF"}},"2"),s("span",{style:{color:"#ADBAC7"}},"] "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," ...")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u8FD4\u56DE\u503C")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.result")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5F97\u5230\u8FD4\u56DE\u503C\u5E76 cast \u4E3A T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.result "),s("span",{style:{color:"#F47067"}},"as"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"T")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u4FEE\u6539\u8FD4\u56DE\u503C\u5185\u5BB9")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.result "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," ...")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5220\u9664\u8FD4\u56DE\u503C\u5185\u5BB9")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.result "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"null")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u83B7\u53D6\u5F53\u524D\u56DE\u8C03\u65B9\u6CD5\u4F53\u8303\u56F4\u5185\u7684\u6570\u636E\u5B58\u50A8\u5B9E\u4F8B")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.extra")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5411 Hook APP \u629B\u51FA\u5F02\u5E38")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    param.throwable "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"Throwable"),s("span",{style:{color:"#ADBAC7"}},"("),s("span",{style:{color:"#96D0FF"}},'"Fatal"'),s("span",{style:{color:"#ADBAC7"}},")")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u6267\u884C\u672A\u7ECF Hook \u7684\u539F\u59CB\u65B9\u6CD5")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#F69D50"}},"XposedBridge"),s("span",{style:{color:"#ADBAC7"}},".invokeOriginalMethod(param.method, param.thisObject, ...)")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),l(`
`),s("span",{class:"line"})])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"})])],-1),m=s("h3",{id:"replace-hook",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#replace-hook","aria-hidden":"true"},"#"),l(" Replace Hook")],-1),b=s("p",null,[s("code",null,"replaceHook"),l(" \u65B9\u6CD5\u6BD4\u8F83\u7279\u6B8A\uFF0C"),s("code",null,"YukiHookAPI"),l(" \u4E3A\u5B83\u505A\u51FA\u4E86\u591A\u79CD\u5F62\u5F0F\u4EE5\u4F9B\u9009\u62E9\u3002")],-1),v=s("blockquote",null,[s("p",null,"API \u529F\u80FD\u5DEE\u5F02\u5BF9\u6BD4\u5982\u4E0B")],-1),F=s("div",{class:"language-kotlin ext-kt line-numbers-mode"},[s("pre",{class:"shiki",style:{"background-color":"#22272e"}},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"/// \u65E0\u8FD4\u56DE\u503C\u7684\u65B9\u6CD5 void")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"replaceUnit {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u76F4\u63A5\u5728\u8FD9\u91CC\u5B9E\u73B0\u88AB\u66FF\u6362\u7684\u903B\u8F91")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"/// \u6709\u8FD4\u56DE\u503C\u7684\u65B9\u6CD5")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"replaceAny {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5728\u8FD9\u91CC\u5B9E\u73B0\u88AB\u66FF\u6362\u7684\u903B\u8F91")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// ...")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u9700\u8981\u8FD4\u56DE\u65B9\u6CD5\u5BF9\u5E94\u7684\u8FD4\u56DE\u503C\uFF0C\u65E0\u9700\u5199 return\uFF0C\u53EA\u9700\u5C06\u53C2\u6570\u653E\u5230\u6700\u540E\u4E00\u4F4D")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5047\u8BBE\u8FD9\u4E2A\u65B9\u6CD5\u7684\u8FD4\u56DE\u503C\u662F Int\uFF0C\u6211\u4EEC\u53EA\u9700\u8981\u4FDD\u8BC1\u6700\u540E\u4E00\u4F4D\u662F\u6211\u4EEC\u9700\u8981\u7684\u8FD4\u56DE\u503C\u5373\u53EF")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#6CB6FF"}},"0")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"/// \u6709\u4E9B\u65B9\u6CD5\u6211\u4EEC\u53EA\u9700\u66FF\u6362\u5176\u8FD4\u56DE\u503C\uFF0C\u5219\u6709\u5982\u4E0B\u5B9E\u73B0")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"/// \u9700\u8981\u6CE8\u610F\u7684\u662F\uFF1A\u76F4\u63A5\u66FF\u6362\u8FD4\u56DE\u503C\u7684\u65B9\u6CD5\u4F20\u5165\u7684\u53C2\u6570\u662F\u56FA\u5B9A\u4E0D\u53D8\u7684\uFF0C\u82E5\u60F3\u5B9E\u73B0\u52A8\u6001\u66FF\u6362\u8FD4\u56DE\u503C\u8BF7\u4F7F\u7528\u4E0A\u9762\u7684 replaceAny \u65B9\u6CD5\u4F53")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"// \u66FF\u6362\u4E3A\u4F60\u9700\u8981\u7684\u8FD4\u56DE\u503C")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"replaceTo(...)")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"// \u66FF\u6362\u4E3A Boolean \u7C7B\u578B\u7684\u8FD4\u56DE\u503C")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"replaceToTrue()")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"// \u62E6\u622A\u8FD4\u56DE\u503C")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"intercept()")]),l(`
`),s("span",{class:"line"})])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"})])],-1),k=s("div",{class:"language-kotlin ext-kt line-numbers-mode"},[s("pre",{class:"shiki",style:{"background-color":"#22272e"}},[s("code",null,[s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"/// \u65E0\u8FD4\u56DE\u503C\u7684\u65B9\u6CD5 void")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"override"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"fun"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},"replaceHookedMethod"),s("span",{style:{color:"#ADBAC7"}},"(param"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"MethodHookParam"),s("span",{style:{color:"#ADBAC7"}},")"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"Any?"),s("span",{style:{color:"#ADBAC7"}}," {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u76F4\u63A5\u5728\u8FD9\u91CC\u5B9E\u73B0\u88AB\u66FF\u6362\u7684\u903B\u8F91")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#F47067"}},"return"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"null")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"/// \u6709\u8FD4\u56DE\u503C\u7684\u65B9\u6CD5")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"override"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"fun"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},"replaceHookedMethod"),s("span",{style:{color:"#ADBAC7"}},"(param"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"MethodHookParam"),s("span",{style:{color:"#ADBAC7"}},")"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"Int"),s("span",{style:{color:"#ADBAC7"}}," {")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5728\u8FD9\u91CC\u5B9E\u73B0\u88AB\u66FF\u6362\u7684\u903B\u8F91")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// ...")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#768390"}},"// \u5047\u8BBE\u8FD9\u4E2A\u65B9\u6CD5\u7684\u8FD4\u56DE\u503C\u662F Int")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),s("span",{style:{color:"#F47067"}},"return"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"0")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"/// \u6709\u4E9B\u65B9\u6CD5\u6211\u4EEC\u53EA\u9700\u66FF\u6362\u5176\u8FD4\u56DE\u503C\uFF0C\u5219\u6709\u5982\u4E0B\u5B9E\u73B0")]),l(`
`),s("span",{class:"line"}),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"// \u66FF\u6362\u4E3A\u4F60\u9700\u8981\u7684\u8FD4\u56DE\u503C")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"override"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"fun"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},"replaceHookedMethod"),s("span",{style:{color:"#ADBAC7"}},"(param"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"MethodHookParam"),s("span",{style:{color:"#ADBAC7"}},") "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," ...")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"// \u66FF\u6362\u4E3A Boolean \u7C7B\u578B\u7684\u8FD4\u56DE\u503C")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"override"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"fun"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},"replaceHookedMethod"),s("span",{style:{color:"#ADBAC7"}},"(param"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"MethodHookParam"),s("span",{style:{color:"#ADBAC7"}},") "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"true")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#768390"}},"// \u62E6\u622A\u8FD4\u56DE\u503C")]),l(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"override"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},"fun"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#DCBDFB"}},"replaceHookedMethod"),s("span",{style:{color:"#ADBAC7"}},"(param"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"MethodHookParam"),s("span",{style:{color:"#ADBAC7"}},") "),s("span",{style:{color:"#F47067"}},"="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"null")]),l(`
`),s("span",{class:"line"})])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"}),s("div",{class:"line-number"})])],-1),h=s("h2",{id:"\u8FC1\u79FB\u5176\u5B83\u529F\u80FD",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u8FC1\u79FB\u5176\u5B83\u529F\u80FD","aria-hidden":"true"},"#"),l(" \u8FC1\u79FB\u5176\u5B83\u529F\u80FD")],-1),H=s("p",null,[s("code",null,"YukiHookAPI"),l(" \u5BF9 Xposed API \u8FDB\u884C\u4E86\u5B8C\u5168\u91CD\u5199\uFF0C\u4F60\u53EF\u4EE5\u53C2\u8003 "),s("a",{href:"../api/home"},"API \u6587\u6863"),l(" \u4EE5\u53CA "),s("a",{href:"../api/special-features/reflection"},"\u7279\u8272\u529F\u80FD"),l(" \u6765\u51B3\u5B9A\u4E00\u4E9B\u529F\u80FD\u6027\u7684\u8FC1\u79FB\u548C\u4F7F\u7528\u3002")],-1);function _(f,P){const a=c("CodeGroupItem"),o=c("CodeGroup");return i(),t("div",null,[y,n(o,null,{default:e(()=>[n(a,{title:"Yuki Hook API"},{default:e(()=>[d]),_:1}),n(a,{title:"Xposed API"},{default:e(()=>[D]),_:1})]),_:1}),u,n(o,null,{default:e(()=>[n(a,{title:"Yuki Hook API"},{default:e(()=>[C]),_:1}),n(a,{title:"Xposed API"},{default:e(()=>[B]),_:1})]),_:1}),m,b,v,n(o,null,{default:e(()=>[n(a,{title:"Yuki Hook API"},{default:e(()=>[F]),_:1}),n(a,{title:"Xposed API"},{default:e(()=>[k]),_:1})]),_:1}),h,H])}const I=p(A,[["render",_],["__file","move-to-new-api.html.vue"]]);export{I as default};
