import{_ as i,r as o,o as p,c as d,b as s,d as l,w as a,e,a as r}from"./app.f643a53b.js";const A={},u=s("h1",{id:"introduce",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#introduce","aria-hidden":"true"},"#"),e(" Introduce")],-1),y=s("blockquote",null,[s("p",null,[s("code",null,"YukiHookAPI"),e(" is an integrated Hook API Framework, which does not provide any Hook functions, and needs the support of Xposed related basic APIs.")])],-1),m=s("h2",{id:"background",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#background","aria-hidden":"true"},"#"),e(" Background")],-1),h=s("p",null,[e("This is an efficient Hook API rebuilt based on the Xposed API using "),s("code",null,"Kotlin"),e(", and creates rich function extensions for the development of Xposed Modules.")],-1),D=e("The name is taken from "),C={href:"https://www.bilibili.com/bangumi/play/ss5016",target:"_blank",rel:"noopener noreferrer"},B=e('"\u3082\u3082\u304F\u308A" heroine Yuki Kurihara'),b=e("."),_=e("Formerly the Innocent Xposed API used in "),v={href:"https://github.com/fankes/TMore",target:"_blank",rel:"noopener noreferrer"},F=e("Development Learning Project"),k=e(", now renamed and open sourced."),f=r('<h2 id="usage" tabindex="-1"><a class="header-anchor" href="#usage" aria-hidden="true">#</a> Usage</h2><p><code>YukiHookAPI</code> is built entirely with <code>Kotlin</code> <code>lambda</code> syntax.</p><p>Abandoning the original less friendly <code>XposedHelpers</code>, you can use it to easily create Xposed Modules and easily implement custom Hook API.</p><h2 id="language-requirement" tabindex="-1"><a class="header-anchor" href="#language-requirement" aria-hidden="true">#</a> Language Requirement</h2><p>Please use <code>Kotlin</code>, the framework part of the code composition is also compatible with <code>Java</code> but the implementation of the basic Hook scene <strong>may not work at all</strong>.</p><p>All demo code in this document will be described using <code>Kotlin</code>, if you don&#39;t know how to use <code>Kotlin</code> then you may not be able to use <code>YukiHookAPI</code>.</p>',6),g=e("Part of the Java Demo code can be found "),H={href:"https://github.com/fankes/YukiHookAPI/tree/master/demo-module/src/main/java/com/highcapable/yukihookapi/demo_module/hook/java",target:"_blank",rel:"noopener noreferrer"},P=e("here"),w=e(", but not recommended."),I=r('<h2 id="source-of-inspiration" tabindex="-1"><a class="header-anchor" href="#source-of-inspiration" aria-hidden="true">#</a> Source of Inspiration</h2><p>Previously, when we built an Xposed Module, we first needed to create an <code>xposed_init</code> file under <code>assets</code>.</p><p>Then, manually fill in your own entry class name into the file and use <code>XposedHelpers</code> to implement our Hook logic.</p><p>Since <code>Kotlin</code> is the main Android development language, this API is really not very elegant to use.</p><p>Is there any <strong>easy to use, light, elegant</strong> solution?</p><p>With this idea, <code>YukiHookAPI</code> was born.</p><p>Now, we only need to write a small amount of code, and all the time and expense are handed over to automation.</p><p>With <code>Kotlin</code>&#39;s elegant <code>lambda</code> writing and <code>YukiHookAPI</code>, you can make your Hook logic more beautiful and clear.</p><blockquote><p>The following example</p></blockquote>',9),X=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"}},"@InjectYukiHookWithXposed")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#F47067"}},"object"),s("span",{style:{color:"#ADBAC7"}}," HookEntry "),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"IYukiHookXposedInit"),s("span",{style:{color:"#ADBAC7"}}," {")]),e(`
`),s("span",{class:"line"}),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),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 {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        loadZygote {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            "),s("span",{style:{color:"#F69D50"}},"ActivityClass"),s("span",{style:{color:"#ADBAC7"}},".hook {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                injectMember {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    method {")]),e(`
`),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"}},'"onCreate"')]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        param("),s("span",{style:{color:"#F69D50"}},"BundleClass"),s("span",{style:{color:"#ADBAC7"}},")")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    beforeHook {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        "),s("span",{style:{color:"#768390"}},"// Your code here.")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    afterHook {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        "),s("span",{style:{color:"#768390"}},"// Your code here.")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            resources().hook {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                injectResource {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    conditions {")]),e(`
`),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"}},'"sym_def_app_icon"')]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        mipmap()")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    replaceToModuleResource("),s("span",{style:{color:"#F69D50"}},"R"),s("span",{style:{color:"#ADBAC7"}},".mipmap.ic_launcher)")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        }")]),e(`
`),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.android.browser"'),s("span",{style:{color:"#ADBAC7"}},") {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            "),s("span",{style:{color:"#F69D50"}},"ActivityClass"),s("span",{style:{color:"#ADBAC7"}},".hook {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                injectMember {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    method {")]),e(`
`),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"}},'"onCreate"')]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        param("),s("span",{style:{color:"#F69D50"}},"BundleClass"),s("span",{style:{color:"#ADBAC7"}},")")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    beforeHook {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        "),s("span",{style:{color:"#768390"}},"// Your code here.")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    afterHook {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        "),s("span",{style:{color:"#768390"}},"// Your code here.")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            resources().hook {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                injectResource {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    conditions {")]),e(`
`),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"')]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        mipmap()")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    replaceToModuleResource("),s("span",{style:{color:"#F69D50"}},"R"),s("span",{style:{color:"#ADBAC7"}},".mipmap.ic_launcher)")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),e(`
`),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"}),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),x=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"}},"class"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"HookEntry"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#6CB6FF"}},"IXposedHookZygoteInit"),s("span",{style:{color:"#ADBAC7"}},", "),s("span",{style:{color:"#F69D50"}},"IXposedHookLoadPackage"),s("span",{style:{color:"#ADBAC7"}},", "),s("span",{style:{color:"#F69D50"}},"IXposedHookInitPackageResources"),s("span",{style:{color:"#ADBAC7"}}," {")]),e(`
`),s("span",{class:"line"}),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),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")]),e(`
`),s("span",{class:"line"}),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),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"}},") {")]),e(`
`),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"}},")")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        "),s("span",{style:{color:"#F69D50"}},"XResources"),s("span",{style:{color:"#ADBAC7"}},".setSystemWideReplacement(")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            "),s("span",{style:{color:"#96D0FF"}},'"android"'),s("span",{style:{color:"#ADBAC7"}},", "),s("span",{style:{color:"#96D0FF"}},'"mipmap"'),s("span",{style:{color:"#ADBAC7"}},", "),s("span",{style:{color:"#96D0FF"}},'"sym_def_app_icon"'),s("span",{style:{color:"#ADBAC7"}},",")]),e(`
`),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)")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        )")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        "),s("span",{style:{color:"#F69D50"}},"XposedHelpers"),s("span",{style:{color:"#ADBAC7"}},".findAndHookMethod(")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                Activity::"),s("span",{style:{color:"#6CB6FF"}},"class"),s("span",{style:{color:"#ADBAC7"}},".java.name,")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                "),s("span",{style:{color:"#6CB6FF"}},"null"),s("span",{style:{color:"#ADBAC7"}},", "),s("span",{style:{color:"#96D0FF"}},'"onCreate"'),s("span",{style:{color:"#ADBAC7"}},",")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                Bundle::"),s("span",{style:{color:"#6CB6FF"}},"class"),s("span",{style:{color:"#ADBAC7"}},".java,")]),e(`
`),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"}},"() {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    override fun beforeHookedMethod(param"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"MethodHookParam?"),s("span",{style:{color:"#ADBAC7"}},") {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        "),s("span",{style:{color:"#F47067"}},"//"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"Your"),s("span",{style:{color:"#ADBAC7"}}," code here.")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"}),e(`
`),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"}},") {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        "),s("span",{style:{color:"#F47067"}},"//"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"Your"),s("span",{style:{color:"#ADBAC7"}}," code here.")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                })")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    }")]),e(`
`),s("span",{class:"line"}),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),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"}},") {")]),e(`
`),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.android.browser"'),s("span",{style:{color:"#ADBAC7"}},")")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            "),s("span",{style:{color:"#F69D50"}},"XposedHelpers"),s("span",{style:{color:"#ADBAC7"}},".findAndHookMethod(")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                Activity::"),s("span",{style:{color:"#6CB6FF"}},"class"),s("span",{style:{color:"#ADBAC7"}},".java.name,")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                lpparam.classLoader, "),s("span",{style:{color:"#96D0FF"}},'"onCreate"'),s("span",{style:{color:"#ADBAC7"}},",")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                Bundle::"),s("span",{style:{color:"#6CB6FF"}},"class"),s("span",{style:{color:"#ADBAC7"}},".java,")]),e(`
`),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"}},"() {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    override fun beforeHookedMethod(param"),s("span",{style:{color:"#F47067"}},":"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"MethodHookParam?"),s("span",{style:{color:"#ADBAC7"}},") {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        "),s("span",{style:{color:"#F47067"}},"//"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"Your"),s("span",{style:{color:"#ADBAC7"}}," code here.")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"}),e(`
`),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"}},") {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                        "),s("span",{style:{color:"#F47067"}},"//"),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#F69D50"}},"Your"),s("span",{style:{color:"#ADBAC7"}}," code here.")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                })")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    }")]),e(`
`),s("span",{class:"line"}),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    "),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"}},") {")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"        "),s("span",{style:{color:"#F47067"}},"if"),s("span",{style:{color:"#ADBAC7"}}," (resparam.packageName "),s("span",{style:{color:"#F47067"}},"=="),s("span",{style:{color:"#ADBAC7"}}," "),s("span",{style:{color:"#96D0FF"}},'"com.android.browser"'),s("span",{style:{color:"#ADBAC7"}},")")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            resparam.res.setReplacement(")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"                "),s("span",{style:{color:"#96D0FF"}},'"com.android.browser"'),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"}},",")]),e(`
`),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)")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"            )")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"    }")]),e(`
`),s("span",{class:"line"},[s("span",{style:{color:"#ADBAC7"}},"}")]),e(`
`),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"}),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("p",null,"Yes, you read that right, just needing these codes can completely replace the Xposed API to achieve the same function.",-1),R=s("p",null,[e("Now, with the help of the efficient and powerful "),s("code",null,"YukiHookAPI"),e(", you can implement a very simple Xposed Module.")],-1),Y=s("h2",{id:"suppored-hook-framework",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#suppored-hook-framework","aria-hidden":"true"},"#"),e(" Suppored Hook Framework")],-1),L=s("p",null,[e("The following are the "),s("code",null,"Hook Framework"),e(" and Xposed framework supported by "),s("code",null,"YukiHookAPI"),e(".")],-1),j=s("thead",null,[s("tr",null,[s("th",null,"Hook Framework"),s("th",null,"ST"),s("th",null,"Description")])],-1),S={href:"https://github.com/LSPosed/LSPosed",target:"_blank",rel:"noopener noreferrer"},N=e("LSPosed"),T=s("td",null,"\u2705",-1),E=s("td",null,"Stable use in multiple scenarios",-1),K={href:"https://github.com/LSPosed/LSPatch",target:"_blank",rel:"noopener noreferrer"},W=e("LSPatch"),q=s("td",null,"\u2B55",-1),G=s("td",null,"WIP after this project is improved",-1),V={href:"https://github.com/ElderDrivers/EdXposed",target:"_blank",rel:"noopener noreferrer"},Z=e("EdXposed"),O=s("td",null,"\u274E",-1),J=s("td",null,"Maintenance has stopped, no longer recommended",-1),U={href:"https://github.com/canyie/pine",target:"_blank",rel:"noopener noreferrer"},z=e("Pine"),Q=s("td",null,"\u2B55",-1),$=s("td",null,"Only available",-1),ss={href:"https://github.com/asLody/SandHook",target:"_blank",rel:"noopener noreferrer"},es=e("SandHook"),ls=s("td",null,"\u2B55",-1),ns=s("td",null,"Only available",-1),os={href:"https://github.com/asLody/whale",target:"_blank",rel:"noopener noreferrer"},as=e("Whale"),ts=s("td",null,"\u2B55",-1),rs=e("Need "),cs={href:"https://github.com/WindySha/xposed-hook-based-on-whale",target:"_blank",rel:"noopener noreferrer"},is=e("xposed-hook-based-on-whale"),ps={href:"https://github.com/PAGalaxyLab/YAHFA",target:"_blank",rel:"noopener noreferrer"},ds=e("YAHFA"),As=s("td",null,"\u2757",-1),us=s("td",null,"Need to implement the Xposed API yourself",-1),ys={href:"https://github.com/turing-technician/FastHook",target:"_blank",rel:"noopener noreferrer"},ms=e("FastHook"),hs=s("td",null,"\u2757",-1),Ds=s("td",null,"Need to implement the Xposed API yourself",-1),Cs={href:"https://github.com/tiann/epic",target:"_blank",rel:"noopener noreferrer"},Bs=e("Epic"),bs=s("td",null,"\u2757",-1),_s=e("Need "),vs={href:"https://github.com/alibaba/dexposed",target:"_blank",rel:"noopener noreferrer"},Fs=e("Dexposed"),ks=e(" by yourself"),fs={href:"https://github.com/taichi-framework/TaiChi",target:"_blank",rel:"noopener noreferrer"},gs=e("TaiChi"),Hs=s("td",null,"\u2B55",-1),Ps=s("td",null,"Only available for Xposed Module",-1),ws={href:"https://github.com/rovo89/Xposed",target:"_blank",rel:"noopener noreferrer"},Is=e("Xposed"),Xs=s("td",null,"\u2B55",-1),xs=s("td",null,"Recommended minimum system version is Android 7.0",-1);function Ms(Rs,Ys){const n=o("ExternalLinkIcon"),t=o("CodeGroupItem"),c=o("CodeGroup");return p(),d("div",null,[u,y,m,h,s("p",null,[D,s("a",C,[B,l(n)]),b]),s("p",null,[_,s("a",v,[F,l(n)]),k]),f,s("p",null,[g,s("a",H,[P,l(n)]),w]),I,l(c,null,{default:a(()=>[l(t,{title:"Yuki Hook API"},{default:a(()=>[X]),_:1}),l(t,{title:"Xposed API"},{default:a(()=>[x]),_:1})]),_:1}),M,R,Y,L,s("table",null,[j,s("tbody",null,[s("tr",null,[s("td",null,[s("a",S,[N,l(n)])]),T,E]),s("tr",null,[s("td",null,[s("a",K,[W,l(n)])]),q,G]),s("tr",null,[s("td",null,[s("a",V,[Z,l(n)])]),O,J]),s("tr",null,[s("td",null,[s("a",U,[z,l(n)])]),Q,$]),s("tr",null,[s("td",null,[s("a",ss,[es,l(n)])]),ls,ns]),s("tr",null,[s("td",null,[s("a",os,[as,l(n)])]),ts,s("td",null,[rs,s("a",cs,[is,l(n)])])]),s("tr",null,[s("td",null,[s("a",ps,[ds,l(n)])]),As,us]),s("tr",null,[s("td",null,[s("a",ys,[ms,l(n)])]),hs,Ds]),s("tr",null,[s("td",null,[s("a",Cs,[Bs,l(n)])]),bs,s("td",null,[_s,s("a",vs,[Fs,l(n)]),ks])]),s("tr",null,[s("td",null,[s("a",fs,[gs,l(n)])]),Hs,Ps]),s("tr",null,[s("td",null,[s("a",ws,[Is,l(n)])]),Xs,xs])])])])}const js=i(A,[["render",Ms],["__file","home.html.vue"]]);export{js as default};
