import{_ as i,r as l,o as d,c as p,a as e,b as s,w as t,e as c,d as o}from"./app.87c2e303.js";const h={},_=c('<h1 id="\u4ECB\u7ECD" tabindex="-1"><a class="header-anchor" href="#\u4ECB\u7ECD" aria-hidden="true">#</a> \u4ECB\u7ECD</h1><blockquote><p><code>YukiReflection</code> \u662F\u4E00\u4E2A\u57FA\u4E8E Android \u5E73\u53F0\u7684\u53CD\u5C04 API\u3002</p></blockquote><h2 id="\u80CC\u666F" tabindex="-1"><a class="header-anchor" href="#\u80CC\u666F" aria-hidden="true">#</a> \u80CC\u666F</h2><p>\u8FD9\u662F\u4E00\u4E2A\u4F7F\u7528 <code>Kotlin</code> \u57FA\u4E8E <code>Java</code> \u539F\u751F\u53CD\u5C04 API \u91CD\u65B0\u6253\u9020\u7684\u4E00\u5957\u7B80\u6D01\u3001\u9AD8\u6548\u7684\u53CD\u5C04 API\u3002</p>',4),u=e("code",null,"YukiReflection",-1),A=o(" \u540C\u65F6\u4E5F\u662F "),y={href:"https://github.com/fankes/YukiHookAPI",target:"_blank",rel:"noopener noreferrer"},m=o("YukiHookAPI"),b=o(" \u6B63\u5728\u4F7F\u7528\u7684\u6838\u5FC3\u529F\u80FD\u3002"),C=o("\u540D\u79F0\u53D6\u81EA "),k={href:"https://www.bilibili.com/bangumi/play/ss5016",target:"_blank",rel:"noopener noreferrer"},f=o("\u300A\u3082\u3082\u304F\u308A\u300B\u5973\u4E3B \u6817\u539F \u96EA(Yuki)"),D=o("\u3002"),B=e("h2",{id:"\u7528\u9014",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u7528\u9014","aria-hidden":"true"},"#"),o(" \u7528\u9014")],-1),F=e("p",null,[e("code",null,"YukiReflection"),o(" \u5B8C\u5168\u91C7\u7528 "),e("code",null,"Kotlin"),o(),e("code",null,"lambda"),o(" \u8BED\u6CD5\u6784\u5EFA\u3002")],-1),g=o("\u5B83\u80FD\u53D6\u4EE3 "),v={href:"https://pdai.tech/md/java/basic/java-basic-x-reflection.html",target:"_blank",rel:"noopener noreferrer"},x=o("Java \u539F\u751F\u7684\u53CD\u5C04 API"),I=o("\uFF0C\u4F7F\u7528\u66F4\u52A0\u4EBA\u6027\u5316\u7684\u8BED\u8A00\u5B9E\u73B0\u4E00\u5957\u66F4\u52A0\u5B8C\u5584\u7684\u53CD\u5C04\u65B9\u6848\u3002"),P=c('<h2 id="\u8BED\u8A00\u8981\u6C42" tabindex="-1"><a class="header-anchor" href="#\u8BED\u8A00\u8981\u6C42" aria-hidden="true">#</a> \u8BED\u8A00\u8981\u6C42</h2><p>\u8BF7\u4F7F\u7528 <code>Kotlin</code>\uFF0CAPI \u90E8\u5206\u4EE3\u7801\u6784\u6210\u540C\u6837\u517C\u5BB9 <code>Java</code> \u4F46\u57FA\u7840\u53CD\u5C04\u573A\u666F\u7684\u5B9E\u73B0<strong>\u53EF\u80FD\u5B8C\u5168\u65E0\u6CD5\u4F7F\u7528</strong>\u3002</p><p>\u6587\u6863\u5168\u90E8\u7684 Demo \u793A\u4F8B\u4EE3\u7801\u90FD\u5C06\u4F7F\u7528 <code>Kotlin</code> \u8FDB\u884C\u63CF\u8FF0\uFF0C\u5982\u679C\u4F60\u5B8C\u5168\u4E0D\u4F1A\u4F7F\u7528 <code>Kotlin</code> \u90A3\u4F60\u5C06\u6709\u53EF\u80FD\u65E0\u6CD5\u4F7F\u7528 <code>YukiReflection</code>\u3002</p><h2 id="\u7075\u611F\u6765\u6E90" tabindex="-1"><a class="header-anchor" href="#\u7075\u611F\u6765\u6E90" aria-hidden="true">#</a> \u7075\u611F\u6765\u6E90</h2>',4),Y=e("code",null,"YukiReflection",-1),R=o(" \u6700\u521D\u662F\u96C6\u6210\u5728 "),S={href:"https://github.com/fankes/YukiHookAPI",target:"_blank",rel:"noopener noreferrer"},K=o("YukiHookAPI"),w=o(" \u9879\u76EE\u4E2D\u7684\u6838\u5FC3\u529F\u80FD\uFF0C\u73B0\u5728\u8FDB\u884C\u4E86\u89E3\u8026\u5408\uFF0C\u4F7F\u5F97\u8FD9\u5957\u53CD\u5C04 API \u53EF\u4EE5\u5728\u4EFB\u4F55 Android \u5E73\u53F0\u7684\u9879\u76EE\u4E2D\u4F7F\u7528\u3002"),N=e("p",null,"\u73B0\u5728\uFF0C\u6211\u4EEC\u53EA\u9700\u8981\u7F16\u5199\u5C11\u91CF\u7684\u4EE3\u7801\uFF0C\u5C31\u80FD\u5B9E\u73B0\u4E00\u4E2A\u7B80\u5355\u7684\u53CD\u5C04\u8C03\u7528\u3002",-1),j=e("p",null,[o("\u501F\u52A9 "),e("code",null,"Kotlin"),o(" \u4F18\u96C5\u7684 "),e("code",null,"lambda"),o(" \u5199\u6CD5\u4EE5\u53CA "),e("code",null,"YukiReflection"),o("\uFF0C\u53EF\u4EE5\u8BA9\u4F60\u7684\u53CD\u5C04\u903B\u8F91\u66F4\u52A0\u7F8E\u89C2\u6E05\u6670\u3002")],-1),G=e("blockquote",null,[e("p",null,"\u793A\u4F8B\u5982\u4E0B")],-1),H=e("div",{class:"language-kotlin ext-kt line-numbers-mode"},[e("pre",{class:"shiki",style:{"background-color":"#22272e"}},[e("code",null,[e("span",{class:"line"},[e("span",{style:{color:"#96D0FF"}},'"android.os.SystemProperties"'),e("span",{style:{color:"#ADBAC7"}},".toClass()")]),o(`
`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}},"    .method {")]),o(`
`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}},"        name "),e("span",{style:{color:"#F47067"}},"="),e("span",{style:{color:"#ADBAC7"}}," "),e("span",{style:{color:"#96D0FF"}},'"get"')]),o(`
`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}},"        param("),e("span",{style:{color:"#F69D50"}},"StringClass"),e("span",{style:{color:"#ADBAC7"}},", "),e("span",{style:{color:"#F69D50"}},"StringClass"),e("span",{style:{color:"#ADBAC7"}},")")]),o(`
`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}},"    }.get().call("),e("span",{style:{color:"#96D0FF"}},'"ro.system.build.fingerprint"'),e("span",{style:{color:"#ADBAC7"}},", "),e("span",{style:{color:"#96D0FF"}},'"none"'),e("span",{style:{color:"#ADBAC7"}},")")]),o(`
`),e("span",{class:"line"})])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"})])],-1),J=e("div",{class:"language-kotlin ext-kt line-numbers-mode"},[e("pre",{class:"shiki",style:{"background-color":"#22272e"}},[e("code",null,[e("span",{class:"line"},[e("span",{style:{color:"#F69D50"}},"Class"),e("span",{style:{color:"#ADBAC7"}},".forName("),e("span",{style:{color:"#96D0FF"}},'"android.os.SystemProperties"'),e("span",{style:{color:"#ADBAC7"}},")")]),o(`
`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}},"    .getDeclaredMethod("),e("span",{style:{color:"#96D0FF"}},'"get"'),e("span",{style:{color:"#ADBAC7"}},", String::"),e("span",{style:{color:"#6CB6FF"}},"class"),e("span",{style:{color:"#ADBAC7"}},".java, String::"),e("span",{style:{color:"#6CB6FF"}},"class"),e("span",{style:{color:"#ADBAC7"}},".java)")]),o(`
`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}},"    ."),e("span",{style:{color:"#6CB6FF"}},"apply"),e("span",{style:{color:"#ADBAC7"}}," { isAccessible "),e("span",{style:{color:"#F47067"}},"="),e("span",{style:{color:"#ADBAC7"}}," "),e("span",{style:{color:"#6CB6FF"}},"true"),e("span",{style:{color:"#ADBAC7"}}," }")]),o(`
`),e("span",{class:"line"},[e("span",{style:{color:"#ADBAC7"}},"    .invoke("),e("span",{style:{color:"#6CB6FF"}},"null"),e("span",{style:{color:"#ADBAC7"}},", "),e("span",{style:{color:"#96D0FF"}},'"ro.system.build.fingerprint"'),e("span",{style:{color:"#ADBAC7"}},", "),e("span",{style:{color:"#96D0FF"}},'"none"'),e("span",{style:{color:"#ADBAC7"}},")")]),o(`
`),e("span",{class:"line"})])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"}),e("div",{class:"line-number"})])],-1);function V(q,E){const n=l("ExternalLinkIcon"),a=l("CodeGroupItem"),r=l("CodeGroup");return d(),p("div",null,[_,e("p",null,[u,A,e("a",y,[m,s(n)]),b]),e("p",null,[C,e("a",k,[f,s(n)]),D]),B,F,e("p",null,[g,e("a",v,[x,s(n)]),I]),P,e("p",null,[Y,R,e("a",S,[K,s(n)]),w]),N,j,G,s(r,null,{default:t(()=>[s(a,{title:"Yuki Reflection"},{default:t(()=>[H]),_:1}),s(a,{title:"Java Reflection"},{default:t(()=>[J]),_:1})]),_:1})])}const M=i(h,[["render",V],["__file","home.html.vue"]]);export{M as default};
