mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-07 03:05:36 +08:00
327 lines
130 KiB
HTML
327 lines
130 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
<meta name="generator" content="VuePress 2.0.0-beta.51">
|
||
<style>
|
||
:root {
|
||
--c-bg: #fff;
|
||
}
|
||
html.dark {
|
||
--c-bg: #22272e;
|
||
}
|
||
html, body {
|
||
background-color: var(--c-bg);
|
||
}
|
||
</style>
|
||
<script>
|
||
const userMode = localStorage.getItem('vuepress-color-scheme');
|
||
const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||
if (userMode === 'dark' || (userMode !== 'light' && systemDarkMode)) {
|
||
document.documentElement.classList.toggle('dark', true);
|
||
}
|
||
</script>
|
||
<link rel="icon" href="/YukiHookAPI/images/logo.png"><title>用法示例 | Yuki Hook API</title><meta name="description" content="一个使用 Kotlin 构建的高效 Hook API 与 Xposed 模块解决方案">
|
||
<link rel="modulepreload" href="/YukiHookAPI/assets/app.f643a53b.js"><link rel="modulepreload" href="/YukiHookAPI/assets/example.html.5bca6c9f.js"><link rel="modulepreload" href="/YukiHookAPI/assets/example.html.667f5444.js"><link rel="prefetch" href="/YukiHookAPI/assets/index.html.1ad46905.js"><link rel="prefetch" href="/YukiHookAPI/assets/index.html.58270dd2.js"><link rel="prefetch" href="/YukiHookAPI/assets/index.html.962e6741.js"><link rel="prefetch" href="/YukiHookAPI/assets/about.html.bac55135.js"><link rel="prefetch" href="/YukiHookAPI/assets/changelog.html.49537782.js"><link rel="prefetch" href="/YukiHookAPI/assets/contacts.html.5dc8225c.js"><link rel="prefetch" href="/YukiHookAPI/assets/future.html.290989e8.js"><link rel="prefetch" href="/YukiHookAPI/assets/home.html.f6b9c2a4.js"><link rel="prefetch" href="/YukiHookAPI/assets/example.html.bb6da37d.js"><link rel="prefetch" href="/YukiHookAPI/assets/home.html.ca5e9385.js"><link rel="prefetch" href="/YukiHookAPI/assets/knowledge.html.13983a8b.js"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-new-api.html.f91df01f.js"><link rel="prefetch" href="/YukiHookAPI/assets/quick-start.html.d9d91363.js"><link rel="prefetch" href="/YukiHookAPI/assets/yukihookapi-projectbuilder.html.ed4fa356.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-example.html.c60371a6.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-exception.html.ba1743d2.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-using.html.c794f69e.js"><link rel="prefetch" href="/YukiHookAPI/assets/r8-proguard.html.15e04e11.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-using.html.09de8b71.js"><link rel="prefetch" href="/YukiHookAPI/assets/about.html.4de66a22.js"><link rel="prefetch" href="/YukiHookAPI/assets/changelog.html.bb9eda6f.js"><link rel="prefetch" href="/YukiHookAPI/assets/contacts.html.3df7cacf.js"><link rel="prefetch" href="/YukiHookAPI/assets/future.html.3e784ab5.js"><link rel="prefetch" href="/YukiHookAPI/assets/home.html.cad3998c.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-example.html.29a2e3ae.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-exception.html.b279975a.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-using.html.0a59e2e0.js"><link rel="prefetch" href="/YukiHookAPI/assets/r8-proguard.html.683a5429.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-using.html.73248b21.js"><link rel="prefetch" href="/YukiHookAPI/assets/home.html.ced3162e.js"><link rel="prefetch" href="/YukiHookAPI/assets/knowledge.html.830e8c66.js"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-new-api.html.4bf89a9b.js"><link rel="prefetch" href="/YukiHookAPI/assets/quick-start.html.bf02518e.js"><link rel="prefetch" href="/YukiHookAPI/assets/yukihookapi-projectbuilder.html.d499d226.js"><link rel="prefetch" href="/YukiHookAPI/assets/host-inject.html.433c5f35.js"><link rel="prefetch" href="/YukiHookAPI/assets/host-lifecycle.html.7e81cf29.js"><link rel="prefetch" href="/YukiHookAPI/assets/logger.html.a59ab5f0.js"><link rel="prefetch" href="/YukiHookAPI/assets/reflection.html.850b6810.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-channel.html.d35b34eb.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-storage.html.bf4a811f.js"><link rel="prefetch" href="/YukiHookAPI/assets/host-inject.html.0f378e76.js"><link rel="prefetch" href="/YukiHookAPI/assets/host-lifecycle.html.136055f0.js"><link rel="prefetch" href="/YukiHookAPI/assets/logger.html.ed51ab5d.js"><link rel="prefetch" href="/YukiHookAPI/assets/reflection.html.eb335976.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-channel.html.5dd91d68.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-storage.html.909201c9.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookAPI.html.45822706.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookAPI.html.edb07f76.js"><link rel="prefetch" href="/YukiHookAPI/assets/InjectYukiHookWithXposed.html.cf9b500d.js"><link rel="prefetch" href="/YukiHookAPI/assets/CurrentClass.html.641fcd58.js"><link rel="prefetch" href="/YukiHookAPI/assets/GenericClass.html.5d4a2ffe.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookClass.html.486aa6ea.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookResources.html.4f07fd98.js"><link rel="prefetch" href="/YukiHookAPI/assets/VariousClass.html.a490557a.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiMemberHookCreator.html.e217488d.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResourcesHookCreator.html.1f540f56.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiBaseHooker.html.b68236f9.js"><link rel="prefetch" href="/YukiHookAPI/assets/ReflectionFactory.html.d78fe330.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookFactory.html.6555413e.js"><link rel="prefetch" href="/YukiHookAPI/assets/LoggerFactory.html.ae54c997.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookParam.html.9db30e67.js"><link rel="prefetch" href="/YukiHookAPI/assets/PackageParam.html.83d09a1a.js"><link rel="prefetch" href="/YukiHookAPI/assets/CurrentClass.html.16c29272.js"><link rel="prefetch" href="/YukiHookAPI/assets/GenericClass.html.f94281cf.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookClass.html.52e59cf0.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookResources.html.2486cf29.js"><link rel="prefetch" href="/YukiHookAPI/assets/VariousClass.html.153f4c39.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiMemberHookCreator.html.7e0c1b2e.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResourcesHookCreator.html.2fa2ff0f.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiBaseHooker.html.99eec744.js"><link rel="prefetch" href="/YukiHookAPI/assets/ReflectionFactory.html.d2d3ba9a.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookFactory.html.0143ac70.js"><link rel="prefetch" href="/YukiHookAPI/assets/LoggerFactory.html.52af0d44.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookParam.html.61e05f29.js"><link rel="prefetch" href="/YukiHookAPI/assets/PackageParam.html.cf48302c.js"><link rel="prefetch" href="/YukiHookAPI/assets/InjectYukiHookWithXposed.html.56391530.js"><link rel="prefetch" href="/YukiHookAPI/assets/ComponentTypeFactory.html.57f1d79e.js"><link rel="prefetch" href="/YukiHookAPI/assets/GraphicsTypeFactory.html.bd3fae8e.js"><link rel="prefetch" href="/YukiHookAPI/assets/ViewTypeFactory.html.a2b13a44.js"><link rel="prefetch" href="/YukiHookAPI/assets/DefinedTypeFactory.html.ba3bdd0b.js"><link rel="prefetch" href="/YukiHookAPI/assets/VariableTypeFactory.html.5c25c0fb.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleApplication.html.a386b8db.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookDataChannel.html.c8a74f24.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPrefsBridge.html.b7eccf96.js"><link rel="prefetch" href="/YukiHookAPI/assets/IYukiHookXposedInit.html.78a55860.js"><link rel="prefetch" href="/YukiHookAPI/assets/ComponentTypeFactory.html.98825c67.js"><link rel="prefetch" href="/YukiHookAPI/assets/GraphicsTypeFactory.html.cb6ff63d.js"><link rel="prefetch" href="/YukiHookAPI/assets/ViewTypeFactory.html.87f19810.js"><link rel="prefetch" href="/YukiHookAPI/assets/DefinedTypeFactory.html.8137c32c.js"><link rel="prefetch" href="/YukiHookAPI/assets/VariableTypeFactory.html.07a0f5f6.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleApplication.html.57573770.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookDataChannel.html.2123b109.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPrefsBridge.html.316d8e8c.js"><link rel="prefetch" href="/YukiHookAPI/assets/IYukiHookXposedInit.html.b37a852b.js"><link rel="prefetch" href="/YukiHookAPI/assets/BaseFinder.html.8f275c85.js"><link rel="prefetch" href="/YukiHookAPI/assets/DexClassFinder.html.78c5f805.js"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorFinder.html.8e38ad6f.js"><link rel="prefetch" href="/YukiHookAPI/assets/FieldFinder.html.30e6d2df.js"><link rel="prefetch" href="/YukiHookAPI/assets/MethodFinder.html.9be50874.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiXposedEvent.html.a93ee4ef.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiModuleResources.html.46222277.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResForwarder.html.70fb824b.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResources.html.8714bbf2.js"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelData.html.5ca343ea.js"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelPriority.html.b460c4bc.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleClassLoader.html.0388bffd.js"><link rel="prefetch" href="/YukiHookAPI/assets/PrefsData.html.343169a5.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModulePreferenceFragment.html.0c7dadc7.js"><link rel="prefetch" href="/YukiHookAPI/assets/BaseFinder.html.a5dbb7a7.js"><link rel="prefetch" href="/YukiHookAPI/assets/DexClassFinder.html.5d8e12f0.js"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorFinder.html.282236a6.js"><link rel="prefetch" href="/YukiHookAPI/assets/FieldFinder.html.ce7337a4.js"><link rel="prefetch" href="/YukiHookAPI/assets/MethodFinder.html.9a97f14f.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiModuleResources.html.90f23dcd.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResForwarder.html.65998e9e.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResources.html.cc9ce9fb.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiXposedEvent.html.560fa41c.js"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelData.html.1981f416.js"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelPriority.html.7d2ec81d.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleClassLoader.html.2ddf88b6.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModulePreferenceFragment.html.764fecc3.js"><link rel="prefetch" href="/YukiHookAPI/assets/PrefsData.html.34c51103.js"><link rel="prefetch" href="/YukiHookAPI/assets/ExecutorType.html.3e98ffe1.js"><link rel="prefetch" href="/YukiHookAPI/assets/CountRules.html.2639d392.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModifierRules.html.f7582dc2.js"><link rel="prefetch" href="/YukiHookAPI/assets/NameRules.html.34ee16d6.js"><link rel="prefetch" href="/YukiHookAPI/assets/ObjectRules.html.4b682129.js"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorRules.html.f8ba43ee.js"><link rel="prefetch" href="/YukiHookAPI/assets/FieldRules.html.a499e892.js"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRules.html.b3e5d297.js"><link rel="prefetch" href="/YukiHookAPI/assets/MethodRules.html.afeaf85e.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppActivity.html.c4a0eeb4.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppCompatActivity.html.e544662e.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleContextThemeWrapper.html.229a46ac.js"><link rel="prefetch" href="/YukiHookAPI/assets/ExecutorType.html.7e3dd355.js"><link rel="prefetch" href="/YukiHookAPI/assets/CountRules.html.2d5ab94d.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModifierRules.html.c36dff17.js"><link rel="prefetch" href="/YukiHookAPI/assets/NameRules.html.e986a067.js"><link rel="prefetch" href="/YukiHookAPI/assets/ObjectRules.html.70d91cad.js"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorRules.html.c7161b83.js"><link rel="prefetch" href="/YukiHookAPI/assets/FieldRules.html.c8edc48c.js"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRules.html.a071b3c6.js"><link rel="prefetch" href="/YukiHookAPI/assets/MethodRules.html.6c9a8df6.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppActivity.html.98cb78a4.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppCompatActivity.html.4c0f53a9.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleContextThemeWrapper.html.0879426b.js"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRulesResult.html.58e81c94.js"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRulesResult.html.e79843c3.js"><link rel="prefetch" href="/YukiHookAPI/assets/404.html.c038a05a.js"><link rel="prefetch" href="/YukiHookAPI/assets/index.html.e0ba9d06.js"><link rel="prefetch" href="/YukiHookAPI/assets/index.html.2182569c.js"><link rel="prefetch" href="/YukiHookAPI/assets/index.html.ecde69cd.js"><link rel="prefetch" href="/YukiHookAPI/assets/about.html.8c21376b.js"><link rel="prefetch" href="/YukiHookAPI/assets/changelog.html.7535d1bc.js"><link rel="prefetch" href="/YukiHookAPI/assets/contacts.html.87553cba.js"><link rel="prefetch" href="/YukiHookAPI/assets/future.html.cec35036.js"><link rel="prefetch" href="/YukiHookAPI/assets/home.html.f46eccfc.js"><link rel="prefetch" href="/YukiHookAPI/assets/example.html.3900946b.js"><link rel="prefetch" href="/YukiHookAPI/assets/home.html.1d7575fe.js"><link rel="prefetch" href="/YukiHookAPI/assets/knowledge.html.86f06e91.js"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-new-api.html.0a02f53c.js"><link rel="prefetch" href="/YukiHookAPI/assets/quick-start.html.3f3afc29.js"><link rel="prefetch" href="/YukiHookAPI/assets/yukihookapi-projectbuilder.html.5d43aa5a.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-example.html.671d41e0.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-exception.html.95d64baf.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-using.html.ca9326ea.js"><link rel="prefetch" href="/YukiHookAPI/assets/r8-proguard.html.ec79e97c.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-using.html.34241ede.js"><link rel="prefetch" href="/YukiHookAPI/assets/about.html.6402a0ad.js"><link rel="prefetch" href="/YukiHookAPI/assets/changelog.html.66bbb299.js"><link rel="prefetch" href="/YukiHookAPI/assets/contacts.html.9cf369d9.js"><link rel="prefetch" href="/YukiHookAPI/assets/future.html.a7a230a8.js"><link rel="prefetch" href="/YukiHookAPI/assets/home.html.0f9b4abe.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-example.html.c1738f94.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-exception.html.dd408217.js"><link rel="prefetch" href="/YukiHookAPI/assets/api-using.html.75d4a0ea.js"><link rel="prefetch" href="/YukiHookAPI/assets/r8-proguard.html.0579cd4e.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-using.html.ac70c5e3.js"><link rel="prefetch" href="/YukiHookAPI/assets/home.html.be06c02a.js"><link rel="prefetch" href="/YukiHookAPI/assets/knowledge.html.998b4830.js"><link rel="prefetch" href="/YukiHookAPI/assets/move-to-new-api.html.8918dea3.js"><link rel="prefetch" href="/YukiHookAPI/assets/quick-start.html.b973dbd4.js"><link rel="prefetch" href="/YukiHookAPI/assets/yukihookapi-projectbuilder.html.628e4394.js"><link rel="prefetch" href="/YukiHookAPI/assets/host-inject.html.6d53994e.js"><link rel="prefetch" href="/YukiHookAPI/assets/host-lifecycle.html.6a663fb5.js"><link rel="prefetch" href="/YukiHookAPI/assets/logger.html.d6070d67.js"><link rel="prefetch" href="/YukiHookAPI/assets/reflection.html.2214baad.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-channel.html.4f58f26e.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-storage.html.a541db8c.js"><link rel="prefetch" href="/YukiHookAPI/assets/host-inject.html.ad00dd4e.js"><link rel="prefetch" href="/YukiHookAPI/assets/host-lifecycle.html.319e86cd.js"><link rel="prefetch" href="/YukiHookAPI/assets/logger.html.68d61cb5.js"><link rel="prefetch" href="/YukiHookAPI/assets/reflection.html.00550fc4.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-channel.html.47936ba5.js"><link rel="prefetch" href="/YukiHookAPI/assets/xposed-storage.html.8c44e3af.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookAPI.html.00941116.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookAPI.html.caa72540.js"><link rel="prefetch" href="/YukiHookAPI/assets/InjectYukiHookWithXposed.html.30edb248.js"><link rel="prefetch" href="/YukiHookAPI/assets/CurrentClass.html.106d39c5.js"><link rel="prefetch" href="/YukiHookAPI/assets/GenericClass.html.c73df2de.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookClass.html.a4e5a7f3.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookResources.html.49dd8807.js"><link rel="prefetch" href="/YukiHookAPI/assets/VariousClass.html.78bf92f7.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiMemberHookCreator.html.dcafc114.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResourcesHookCreator.html.f4cba156.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiBaseHooker.html.b8453b66.js"><link rel="prefetch" href="/YukiHookAPI/assets/ReflectionFactory.html.abd530fa.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookFactory.html.be7b653c.js"><link rel="prefetch" href="/YukiHookAPI/assets/LoggerFactory.html.f340322f.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookParam.html.8c4d80fd.js"><link rel="prefetch" href="/YukiHookAPI/assets/PackageParam.html.e1c4350b.js"><link rel="prefetch" href="/YukiHookAPI/assets/CurrentClass.html.7391f90b.js"><link rel="prefetch" href="/YukiHookAPI/assets/GenericClass.html.4f669f27.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookClass.html.b124666e.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookResources.html.18641aea.js"><link rel="prefetch" href="/YukiHookAPI/assets/VariousClass.html.0ed01b01.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiMemberHookCreator.html.64b92517.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResourcesHookCreator.html.e7b6eee3.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiBaseHooker.html.cac0dae7.js"><link rel="prefetch" href="/YukiHookAPI/assets/ReflectionFactory.html.0063d796.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookFactory.html.89107920.js"><link rel="prefetch" href="/YukiHookAPI/assets/LoggerFactory.html.0b09f39d.js"><link rel="prefetch" href="/YukiHookAPI/assets/HookParam.html.0731d04a.js"><link rel="prefetch" href="/YukiHookAPI/assets/PackageParam.html.a1ac3039.js"><link rel="prefetch" href="/YukiHookAPI/assets/InjectYukiHookWithXposed.html.c1ce163a.js"><link rel="prefetch" href="/YukiHookAPI/assets/ComponentTypeFactory.html.f5d1204f.js"><link rel="prefetch" href="/YukiHookAPI/assets/GraphicsTypeFactory.html.31df8bc5.js"><link rel="prefetch" href="/YukiHookAPI/assets/ViewTypeFactory.html.515d27f8.js"><link rel="prefetch" href="/YukiHookAPI/assets/DefinedTypeFactory.html.45f8b277.js"><link rel="prefetch" href="/YukiHookAPI/assets/VariableTypeFactory.html.e16c195a.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleApplication.html.7a1d4263.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookDataChannel.html.55bd746e.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPrefsBridge.html.9b0fbd99.js"><link rel="prefetch" href="/YukiHookAPI/assets/IYukiHookXposedInit.html.af7ab766.js"><link rel="prefetch" href="/YukiHookAPI/assets/ComponentTypeFactory.html.ee7e089a.js"><link rel="prefetch" href="/YukiHookAPI/assets/GraphicsTypeFactory.html.04b3b02f.js"><link rel="prefetch" href="/YukiHookAPI/assets/ViewTypeFactory.html.107a99ef.js"><link rel="prefetch" href="/YukiHookAPI/assets/DefinedTypeFactory.html.21331662.js"><link rel="prefetch" href="/YukiHookAPI/assets/VariableTypeFactory.html.f2efa4bc.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleApplication.html.f079b7cd.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookDataChannel.html.76c635af.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiHookPrefsBridge.html.9cd83fdb.js"><link rel="prefetch" href="/YukiHookAPI/assets/IYukiHookXposedInit.html.25ec7528.js"><link rel="prefetch" href="/YukiHookAPI/assets/BaseFinder.html.2ff37655.js"><link rel="prefetch" href="/YukiHookAPI/assets/DexClassFinder.html.c566bd51.js"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorFinder.html.f66e071b.js"><link rel="prefetch" href="/YukiHookAPI/assets/FieldFinder.html.7eb8fd1e.js"><link rel="prefetch" href="/YukiHookAPI/assets/MethodFinder.html.f0a501a0.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiXposedEvent.html.8e539d31.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiModuleResources.html.a9d8c169.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResForwarder.html.bf4abc16.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResources.html.a2c69983.js"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelData.html.ba0e607a.js"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelPriority.html.322de5cb.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleClassLoader.html.bd4ea569.js"><link rel="prefetch" href="/YukiHookAPI/assets/PrefsData.html.92a80177.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModulePreferenceFragment.html.9f2cf2aa.js"><link rel="prefetch" href="/YukiHookAPI/assets/BaseFinder.html.bdb1050e.js"><link rel="prefetch" href="/YukiHookAPI/assets/DexClassFinder.html.5528dec5.js"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorFinder.html.2bb603e0.js"><link rel="prefetch" href="/YukiHookAPI/assets/FieldFinder.html.d93e0b5a.js"><link rel="prefetch" href="/YukiHookAPI/assets/MethodFinder.html.7bdaba1d.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiModuleResources.html.87630916.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResForwarder.html.617cc8ab.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiResources.html.28e3d21e.js"><link rel="prefetch" href="/YukiHookAPI/assets/YukiXposedEvent.html.df166d1b.js"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelData.html.b4f5a2f6.js"><link rel="prefetch" href="/YukiHookAPI/assets/ChannelPriority.html.96dd056e.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleClassLoader.html.46d7f41d.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModulePreferenceFragment.html.4538994a.js"><link rel="prefetch" href="/YukiHookAPI/assets/PrefsData.html.8d78be56.js"><link rel="prefetch" href="/YukiHookAPI/assets/ExecutorType.html.3291de5c.js"><link rel="prefetch" href="/YukiHookAPI/assets/CountRules.html.06f6ba1f.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModifierRules.html.7357a201.js"><link rel="prefetch" href="/YukiHookAPI/assets/NameRules.html.3f799942.js"><link rel="prefetch" href="/YukiHookAPI/assets/ObjectRules.html.c4d0e6b6.js"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorRules.html.333b8d42.js"><link rel="prefetch" href="/YukiHookAPI/assets/FieldRules.html.81c8d4a9.js"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRules.html.53021147.js"><link rel="prefetch" href="/YukiHookAPI/assets/MethodRules.html.b075ed0f.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppActivity.html.acd49ae1.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppCompatActivity.html.bb1146fa.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleContextThemeWrapper.html.ae132879.js"><link rel="prefetch" href="/YukiHookAPI/assets/ExecutorType.html.1f77c183.js"><link rel="prefetch" href="/YukiHookAPI/assets/CountRules.html.3bc27b1d.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModifierRules.html.c86821e7.js"><link rel="prefetch" href="/YukiHookAPI/assets/NameRules.html.2f941c5a.js"><link rel="prefetch" href="/YukiHookAPI/assets/ObjectRules.html.4005c0a5.js"><link rel="prefetch" href="/YukiHookAPI/assets/ConstructorRules.html.ef34015b.js"><link rel="prefetch" href="/YukiHookAPI/assets/FieldRules.html.60c3abf3.js"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRules.html.0c170008.js"><link rel="prefetch" href="/YukiHookAPI/assets/MethodRules.html.2b39d4c6.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppActivity.html.b7bc1cfd.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleAppCompatActivity.html.28457636.js"><link rel="prefetch" href="/YukiHookAPI/assets/ModuleContextThemeWrapper.html.9726886e.js"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRulesResult.html.9965dc43.js"><link rel="prefetch" href="/YukiHookAPI/assets/MemberRulesResult.html.d4d52324.js"><link rel="prefetch" href="/YukiHookAPI/assets/404.html.42b721d3.js">
|
||
<link rel="stylesheet" href="/YukiHookAPI/assets/style.e115708c.css">
|
||
</head>
|
||
<body>
|
||
<div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/YukiHookAPI/zh-cn/" class=""><img class="logo" src="/YukiHookAPI/images/logo.png" alt="Yuki Hook API"><span class="site-name can-hide">Yuki Hook API</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="导航"><span class="title">导航</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="导航"><span class="title">导航</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>入门</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/guide/home" class="" aria-label="介绍"><!--[--><!--]--> 介绍 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/guide/knowledge" class="" aria-label="基础知识"><!--[--><!--]--> 基础知识 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/guide/quick-start" class="" aria-label="快速开始"><!--[--><!--]--> 快速开始 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/guide/example" class="router-link-active" aria-label="用法示例"><!--[--><!--]--> 用法示例 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/guide/move-to-new-api" class="" aria-label="从 Xposed API 迁移"><!--[--><!--]--> 从 Xposed API 迁移 <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>配置</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/config/api-example" class="" aria-label="API 基本配置"><!--[--><!--]--> API 基本配置 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/config/api-exception" class="" aria-label="API 异常处理"><!--[--><!--]--> API 异常处理 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/config/xposed-using" class="" aria-label="作为 Xposed 模块使用的相关配置"><!--[--><!--]--> 作为 Xposed 模块使用的相关配置 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/config/api-using" class="" aria-label="作为 Hook API 使用的相关配置"><!--[--><!--]--> 作为 Hook API 使用的相关配置 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/config/r8-proguard" class="" aria-label="R8 与 Proguard 混淆"><!--[--><!--]--> R8 与 Proguard 混淆 <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>工具</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/tools/yukihookapi-projectbuilder" class="" aria-label="YukiHookAPI 构建工具"><!--[--><!--]--> YukiHookAPI 构建工具 <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>API 文档</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/api/home" class="" aria-label="文档介绍"><!--[--><!--]--> 文档介绍 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/YukiHookAPI" class="" aria-label="Public API"><!--[--><!--]--> Public API <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/api/special-features/reflection" class="" aria-label="特色功能"><!--[--><!--]--> 特色功能 <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>关于</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/about/changelog" class="" aria-label="更新日志"><!--[--><!--]--> 更新日志 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/about/future" class="" aria-label="展望未来"><!--[--><!--]--> 展望未来 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/about/contacts" class="" aria-label="联系我们"><!--[--><!--]--> 联系我们 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/about/about" class="" aria-label="关于此文档"><!--[--><!--]--> 关于此文档 <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><!--]--></ul></div></div><div class="navbar-item"><a href="/YukiHookAPI/zh-cn/about/contacts" class="" aria-label="联系我们"><!--[--><!--]--> 联系我们 <!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Select language"><span class="title">简体中文 (CN)</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Select language"><span class="title">简体中文 (CN)</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a href="/YukiHookAPI/en/guide/example.html" class="" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html" class="router-link-active router-link-exact-active router-link-active" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a class="external-link" href="https://github.com/fankes/YukiHookAPI" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">在新窗口中打开</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-color-mode-button" title="切换颜色模式"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><form class="search-box" role="search"><input type="search" placeholder="搜索" autocomplete="off" spellcheck="false" value><!----></form></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-items"><!--[--><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="导航"><span class="title">导航</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="导航"><span class="title">导航</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>入门</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/guide/home" class="" aria-label="介绍"><!--[--><!--]--> 介绍 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/guide/knowledge" class="" aria-label="基础知识"><!--[--><!--]--> 基础知识 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/guide/quick-start" class="" aria-label="快速开始"><!--[--><!--]--> 快速开始 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/guide/example" class="router-link-active" aria-label="用法示例"><!--[--><!--]--> 用法示例 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/guide/move-to-new-api" class="" aria-label="从 Xposed API 迁移"><!--[--><!--]--> 从 Xposed API 迁移 <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>配置</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/config/api-example" class="" aria-label="API 基本配置"><!--[--><!--]--> API 基本配置 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/config/api-exception" class="" aria-label="API 异常处理"><!--[--><!--]--> API 异常处理 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/config/xposed-using" class="" aria-label="作为 Xposed 模块使用的相关配置"><!--[--><!--]--> 作为 Xposed 模块使用的相关配置 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/config/api-using" class="" aria-label="作为 Hook API 使用的相关配置"><!--[--><!--]--> 作为 Hook API 使用的相关配置 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/config/r8-proguard" class="" aria-label="R8 与 Proguard 混淆"><!--[--><!--]--> R8 与 Proguard 混淆 <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>工具</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/tools/yukihookapi-projectbuilder" class="" aria-label="YukiHookAPI 构建工具"><!--[--><!--]--> YukiHookAPI 构建工具 <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>API 文档</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/api/home" class="" aria-label="文档介绍"><!--[--><!--]--> 文档介绍 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/YukiHookAPI" class="" aria-label="Public API"><!--[--><!--]--> Public API <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/api/special-features/reflection" class="" aria-label="特色功能"><!--[--><!--]--> 特色功能 <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><li class="navbar-dropdown-item"><!--[--><h4 class="navbar-dropdown-subtitle"><span>关于</span></h4><ul class="navbar-dropdown-subitem-wrapper"><!--[--><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/about/changelog" class="" aria-label="更新日志"><!--[--><!--]--> 更新日志 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/about/future" class="" aria-label="展望未来"><!--[--><!--]--> 展望未来 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/about/contacts" class="" aria-label="联系我们"><!--[--><!--]--> 联系我们 <!--[--><!--]--></a></li><li class="navbar-dropdown-subitem"><a href="/YukiHookAPI/zh-cn/about/about" class="" aria-label="关于此文档"><!--[--><!--]--> 关于此文档 <!--[--><!--]--></a></li><!--]--></ul><!--]--></li><!--]--></ul></div></div><div class="navbar-item"><a href="/YukiHookAPI/zh-cn/about/contacts" class="" aria-label="联系我们"><!--[--><!--]--> 联系我们 <!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Select language"><span class="title">简体中文 (CN)</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Select language"><span class="title">简体中文 (CN)</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a href="/YukiHookAPI/en/guide/example.html" class="" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html" class="router-link-active router-link-exact-active router-link-active" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a class="external-link" href="https://github.com/fankes/YukiHookAPI" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--> GitHub <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">在新窗口中打开</span></span><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active collapsible">入门 <span class="down arrow"></span></p><ul style="" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/zh-cn/guide/home.html" class="sidebar-item" aria-label="介绍"><!--[--><!--]--> 介绍 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/guide/knowledge.html" class="sidebar-item" aria-label="基础知识"><!--[--><!--]--> 基础知识 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/guide/quick-start.html" class="sidebar-item" aria-label="快速开始"><!--[--><!--]--> 快速开始 <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html" class="router-link-active router-link-exact-active router-link-active sidebar-item active" aria-label="用法示例"><!--[--><!--]--> 用法示例 <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#结构图解" class="router-link-active router-link-exact-active sidebar-item" aria-label="结构图解"><!--[--><!--]--> 结构图解 <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#demo" class="router-link-active router-link-exact-active sidebar-item" aria-label="Demo"><!--[--><!--]--> Demo <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#一个简单的-hook-例子" class="router-link-active router-link-exact-active sidebar-item" aria-label="一个简单的 Hook 例子"><!--[--><!--]--> 一个简单的 Hook 例子 <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#hook-app" class="router-link-active router-link-exact-active sidebar-item" aria-label="Hook APP"><!--[--><!--]--> Hook APP <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#hook-zygote" class="router-link-active router-link-exact-active sidebar-item" aria-label="Hook Zygote"><!--[--><!--]--> Hook Zygote <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#hook-系统框架" class="router-link-active router-link-exact-active sidebar-item" aria-label="Hook 系统框架"><!--[--><!--]--> Hook 系统框架 <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#hook-resources" class="router-link-active router-link-exact-active sidebar-item" aria-label="Hook Resources"><!--[--><!--]--> Hook Resources <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#解除-hook" class="router-link-active router-link-exact-active sidebar-item" aria-label="解除 Hook"><!--[--><!--]--> 解除 Hook <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#异常处理" class="router-link-active router-link-exact-active sidebar-item" aria-label="异常处理"><!--[--><!--]--> 异常处理 <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#监听异常" class="router-link-active router-link-exact-active sidebar-item" aria-label="监听异常"><!--[--><!--]--> 监听异常 <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#抛出异常" class="router-link-active router-link-exact-active sidebar-item" aria-label="抛出异常"><!--[--><!--]--> 抛出异常 <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#状态监听" class="router-link-active router-link-exact-active sidebar-item" aria-label="状态监听"><!--[--><!--]--> 状态监听 <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#扩展用法" class="router-link-active router-link-exact-active sidebar-item" aria-label="扩展用法"><!--[--><!--]--> 扩展用法 <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#多个宿主" class="router-link-active router-link-exact-active sidebar-item" aria-label="多个宿主"><!--[--><!--]--> 多个宿主 <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#多个进程" class="router-link-active router-link-exact-active sidebar-item" aria-label="多个进程"><!--[--><!--]--> 多个进程 <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#写法优化" class="router-link-active router-link-exact-active sidebar-item" aria-label="写法优化"><!--[--><!--]--> 写法优化 <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#xposed-模块状态" class="router-link-active router-link-exact-active sidebar-item" aria-label="Xposed 模块状态"><!--[--><!--]--> Xposed 模块状态 <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#判断自身激活状态" class="router-link-active router-link-exact-active sidebar-item" aria-label="判断自身激活状态"><!--[--><!--]--> 判断自身激活状态 <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/YukiHookAPI/zh-cn/guide/example.html#获取-hook-framework-信息" class="router-link-active router-link-exact-active sidebar-item" aria-label="获取 Hook Framework 信息"><!--[--><!--]--> 获取 Hook Framework 信息 <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul></li><li><a href="/YukiHookAPI/zh-cn/guide/move-to-new-api.html" class="sidebar-item" aria-label="从 Xposed API 迁移"><!--[--><!--]--> 从 Xposed API 迁移 <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">配置 <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/zh-cn/config/api-example.html" class="sidebar-item" aria-label="API 基本配置"><!--[--><!--]--> API 基本配置 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/config/api-exception.html" class="sidebar-item" aria-label="API 异常处理"><!--[--><!--]--> API 异常处理 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/config/xposed-using.html" class="sidebar-item" aria-label="作为 Xposed 模块使用的相关配置"><!--[--><!--]--> 作为 Xposed 模块使用的相关配置 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/config/api-using.html" class="sidebar-item" aria-label="作为 Hook API 使用的相关配置"><!--[--><!--]--> 作为 Hook API 使用的相关配置 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/config/r8-proguard.html" class="sidebar-item" aria-label="R8 与 Proguard 混淆"><!--[--><!--]--> R8 与 Proguard 混淆 <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">工具 <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/zh-cn/tools/yukihookapi-projectbuilder.html" class="sidebar-item" aria-label="YukiHookAPI 构建工具"><!--[--><!--]--> YukiHookAPI 构建工具 <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">API 文档 <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/zh-cn/api/home.html" class="sidebar-item" aria-label="文档介绍"><!--[--><!--]--> 文档介绍 <!--[--><!--]--></a><!----></li><li><p tabindex="0" class="sidebar-item collapsible">Public API <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/YukiHookAPI.html" class="sidebar-item" aria-label="YukiHookAPI - object"><!--[--><!--]--> YukiHookAPI - object <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/param/PackageParam.html" class="sidebar-item" aria-label="PackageParam - class"><!--[--><!--]--> PackageParam - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/param/HookParam.html" class="sidebar-item" aria-label="HookParam - class"><!--[--><!--]--> HookParam - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/annotation/xposed/InjectYukiHookWithXposed.html" class="sidebar-item" aria-label="InjectYukiHookWithXposed - annotation"><!--[--><!--]--> InjectYukiHookWithXposed - annotation <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/proxy/IYukiHookXposedInit.html" class="sidebar-item" aria-label="IYukiHookXposedInit - interface"><!--[--><!--]--> IYukiHookXposedInit - interface <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/prefs/YukiHookPrefsBridge.html" class="sidebar-item" aria-label="YukiHookPrefsBridge - class"><!--[--><!--]--> YukiHookPrefsBridge - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/prefs/ui/ModulePreferenceFragment.html" class="sidebar-item" aria-label="ModulePreferenceFragment - class"><!--[--><!--]--> ModulePreferenceFragment - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/prefs/data/PrefsData.html" class="sidebar-item" aria-label="PrefsData - class"><!--[--><!--]--> PrefsData - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/channel/YukiHookDataChannel.html" class="sidebar-item" aria-label="YukiHookDataChannel - class"><!--[--><!--]--> YukiHookDataChannel - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/channel/data/ChannelData.html" class="sidebar-item" aria-label="ChannelData - class"><!--[--><!--]--> ChannelData - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/channel/priority/ChannelPriority.html" class="sidebar-item" aria-label="ChannelPriority - class"><!--[--><!--]--> ChannelPriority - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/application/ModuleApplication.html" class="sidebar-item" aria-label="ModuleApplication - class"><!--[--><!--]--> ModuleApplication - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/base/ModuleAppActivity.html" class="sidebar-item" aria-label="ModuleAppActivity - class"><!--[--><!--]--> ModuleAppActivity - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/parasitic/activity/base/ModuleAppCompatActivity.html" class="sidebar-item" aria-label="ModuleAppCompatActivity - class"><!--[--><!--]--> ModuleAppCompatActivity - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/parasitic/context/wrapper/ModuleContextThemeWrapper.html" class="sidebar-item" aria-label="ModuleContextThemeWrapper - class"><!--[--><!--]--> ModuleContextThemeWrapper - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/parasitic/reference/ModuleClassLoader.html" class="sidebar-item" aria-label="ModuleClassLoader - class"><!--[--><!--]--> ModuleClassLoader - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/bridge/resources/YukiModuleResources.html" class="sidebar-item" aria-label="YukiModuleResources - class"><!--[--><!--]--> YukiModuleResources - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/bridge/resources/YukiResources.html" class="sidebar-item" aria-label="YukiResources - class"><!--[--><!--]--> YukiResources - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/bridge/resources/YukiResForwarder.html" class="sidebar-item" aria-label="YukiResForwarder - class"><!--[--><!--]--> YukiResForwarder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/xposed/bridge/event/YukiXposedEvent.html" class="sidebar-item" aria-label="YukiXposedEvent - object"><!--[--><!--]--> YukiXposedEvent - object <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.html" class="sidebar-item" aria-label="ComponentTypeFactory - kt"><!--[--><!--]--> ComponentTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/type/android/GraphicsTypeFactory.html" class="sidebar-item" aria-label="GraphicsTypeFactory - kt"><!--[--><!--]--> GraphicsTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/type/android/ViewTypeFactory.html" class="sidebar-item" aria-label="ViewTypeFactory - kt"><!--[--><!--]--> ViewTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/type/java/VariableTypeFactory.html" class="sidebar-item" aria-label="VariableTypeFactory - kt"><!--[--><!--]--> VariableTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/type/defined/DefinedTypeFactory.html" class="sidebar-item" aria-label="DefinedTypeFactory - kt"><!--[--><!--]--> DefinedTypeFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/log/LoggerFactory.html" class="sidebar-item" aria-label="LoggerFactory - kt"><!--[--><!--]--> LoggerFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/factory/ReflectionFactory.html" class="sidebar-item" aria-label="ReflectionFactory - kt"><!--[--><!--]--> ReflectionFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/factory/YukiHookFactory.html" class="sidebar-item" aria-label="YukiHookFactory - kt"><!--[--><!--]--> YukiHookFactory - kt <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/entity/YukiBaseHooker.html" class="sidebar-item" aria-label="YukiBaseHooker - class"><!--[--><!--]--> YukiBaseHooker - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/api/compat/type/ExecutorType.html" class="sidebar-item" aria-label="ExecutorType - class"><!--[--><!--]--> ExecutorType - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/YukiMemberHookCreator.html" class="sidebar-item" aria-label="YukiMemberHookCreator - class"><!--[--><!--]--> YukiMemberHookCreator - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/YukiResourcesHookCreator.html" class="sidebar-item" aria-label="YukiResourcesHookCreator - class"><!--[--><!--]--> YukiResourcesHookCreator - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/members/MethodFinder.html" class="sidebar-item" aria-label="MethodFinder - class"><!--[--><!--]--> MethodFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/members/ConstructorFinder.html" class="sidebar-item" aria-label="ConstructorFinder - class"><!--[--><!--]--> ConstructorFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/members/FieldFinder.html" class="sidebar-item" aria-label="FieldFinder - class"><!--[--><!--]--> FieldFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/DexClassFinder.html" class="sidebar-item" aria-label="DexClassFinder - class"><!--[--><!--]--> DexClassFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/rules/result/MemberRulesResult.html" class="sidebar-item" aria-label="MemberRulesResult - class"><!--[--><!--]--> MemberRulesResult - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/rules/MemberRules.html" class="sidebar-item" aria-label="MemberRules - class"><!--[--><!--]--> MemberRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/rules/FieldRules.html" class="sidebar-item" aria-label="FieldRules - class"><!--[--><!--]--> FieldRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/rules/MethodRules.html" class="sidebar-item" aria-label="MethodRules - class"><!--[--><!--]--> MethodRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/classes/rules/ConstructorRules.html" class="sidebar-item" aria-label="ConstructorRules - class"><!--[--><!--]--> ConstructorRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/base/BaseFinder.html" class="sidebar-item" aria-label="BaseFinder - class"><!--[--><!--]--> BaseFinder - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/base/rules/CountRules.html" class="sidebar-item" aria-label="CountRules - class"><!--[--><!--]--> CountRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/base/rules/ModifierRules.html" class="sidebar-item" aria-label="ModifierRules - class"><!--[--><!--]--> ModifierRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/base/rules/NameRules.html" class="sidebar-item" aria-label="NameRules - class"><!--[--><!--]--> NameRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/core/finder/base/rules/ObjectRules.html" class="sidebar-item" aria-label="ObjectRules - class"><!--[--><!--]--> ObjectRules - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/bean/HookClass.html" class="sidebar-item" aria-label="HookClass - class"><!--[--><!--]--> HookClass - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/bean/VariousClass.html" class="sidebar-item" aria-label="VariousClass - class"><!--[--><!--]--> VariousClass - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/bean/CurrentClass.html" class="sidebar-item" aria-label="CurrentClass - class"><!--[--><!--]--> CurrentClass - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/bean/GenericClass.html" class="sidebar-item" aria-label="GenericClass - class"><!--[--><!--]--> GenericClass - class <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/public/com/highcapable/yukihookapi/hook/bean/HookResources.html" class="sidebar-item" aria-label="HookResources - class"><!--[--><!--]--> HookResources - class <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item collapsible">特色功能 <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/zh-cn/api/special-features/reflection.html" class="sidebar-item" aria-label="字节码与反射扩展"><!--[--><!--]--> 字节码与反射扩展 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/special-features/logger.html" class="sidebar-item" aria-label="调试日志"><!--[--><!--]--> 调试日志 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/special-features/xposed-storage.html" class="sidebar-item" aria-label="Xposed 模块数据存储"><!--[--><!--]--> Xposed 模块数据存储 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/special-features/xposed-channel.html" class="sidebar-item" aria-label="Xposed 模块与宿主通讯桥"><!--[--><!--]--> Xposed 模块与宿主通讯桥 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/special-features/host-lifecycle.html" class="sidebar-item" aria-label="宿主生命周期扩展"><!--[--><!--]--> 宿主生命周期扩展 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/api/special-features/host-inject.html" class="sidebar-item" aria-label="宿主资源注入扩展"><!--[--><!--]--> 宿主资源注入扩展 <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul></li><li><p tabindex="0" class="sidebar-item sidebar-heading collapsible">关于 <span class="right arrow"></span></p><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/YukiHookAPI/zh-cn/about/changelog.html" class="sidebar-item" aria-label="更新日志"><!--[--><!--]--> 更新日志 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/about/future.html" class="sidebar-item" aria-label="展望未来"><!--[--><!--]--> 展望未来 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/about/contacts.html" class="sidebar-item" aria-label="联系我们"><!--[--><!--]--> 联系我们 <!--[--><!--]--></a><!----></li><li><a href="/YukiHookAPI/zh-cn/about/about.html" class="sidebar-item" aria-label="关于此文档"><!--[--><!--]--> 关于此文档 <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><!--]--><div><h1 id="用法示例" tabindex="-1"><a class="header-anchor" href="#用法示例" aria-hidden="true">#</a> 用法示例</h1><blockquote><p>这里介绍了 <code>YukiHookAPI</code> 的基本工作方式以及列举了简单的 Hook 例子和常用功能。</p></blockquote><h2 id="结构图解" tabindex="-1"><a class="header-anchor" href="#结构图解" aria-hidden="true">#</a> 结构图解</h2><blockquote><p>下方的结构描述了 <code>YukiHookAPI</code> 的基本工作方式和原理。</p></blockquote><div class="language-text ext-text"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#adbac7;">Host Environment</span></span>
|
||
<span class="line"><span style="color:#adbac7;">└── YukiMemberHookCreator</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── Class</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── MemberHookCreator</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── Member</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> ├── Before</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── After</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> MemberHookCreator</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── Member</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> ├── Before</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── After</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> ...</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> YukiResourcesHookCreator</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── Resources</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── ResourcesHookCreator</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── Drawable</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── Replace</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> ResourcesHookCreator</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── Layout</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> └── Inject</span></span>
|
||
<span class="line"><span style="color:#adbac7;"> ...</span></span>
|
||
<span class="line"><span style="color:#adbac7;"></span></span></code></pre></div><blockquote><p>上方的结构换做代码将可写为如下形式。</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F69D50;">TargetClass</span><span style="color:#ADBAC7;">.hook { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectMember { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> beforeHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> afterHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">resources().hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectResource {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> conditions {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> replaceTo(...)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="demo" tabindex="-1"><a class="header-anchor" href="#demo" aria-hidden="true">#</a> Demo</h2><blockquote><p>你可以在下方找到 API 提供的 Demo 来学习 <code>YukiHookAPI</code> 的使用方法。</p></blockquote><ul><li><p>宿主 APP Demo <a href="https://github.com/fankes/YukiHookAPI/tree/master/demo-app" target="_blank" rel="noopener noreferrer">点击这里查看<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">在新窗口中打开</span></span></a></p></li><li><p>模块 APP Demo <a href="https://github.com/fankes/YukiHookAPI/tree/master/demo-module" target="_blank" rel="noopener noreferrer">点击这里查看<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">在新窗口中打开</span></span></a></p></li></ul><p>同时安装宿主和模块 Demo,通过激活模块来测试宿主中被 Hook 的功能。</p><h2 id="一个简单的-hook-例子" tabindex="-1"><a class="header-anchor" href="#一个简单的-hook-例子" aria-hidden="true">#</a> 一个简单的 Hook 例子</h2><blockquote><p>这里给出了 Hook APP、Hook 系统框架与 Hook Resources 等例子,可供参考。</p></blockquote><h3 id="hook-app" tabindex="-1"><a class="header-anchor" href="#hook-app" aria-hidden="true">#</a> Hook APP</h3><p>假设,我们要 Hook <code>com.android.browser</code> 中的 <code>onCreate</code> 方法并弹出一个对话框。</p><p>在 <code>encase</code> 方法体中添加代码。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loadApp(name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.android.browser"</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ActivityClass</span><span style="color:#ADBAC7;">.hook { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectMember { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"onCreate"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> param(</span><span style="color:#F69D50;">BundleClass</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">UnitType</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> afterHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">AlertDialog</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Builder</span><span style="color:#ADBAC7;">(instance())</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .setTitle(</span><span style="color:#96D0FF;">"Hooked"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .setMessage(</span><span style="color:#96D0FF;">"I am hook!"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .setPositiveButton(</span><span style="color:#96D0FF;">"OK"</span><span style="color:#ADBAC7;">, </span><span style="color:#6CB6FF;">null</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .show()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>至此,<code>onCreate</code> 方法将被成功 Hook 并在 <code>com.android.browser</code> 中的每个 <code>Activity</code> 启动时弹出此对话框。</p><p>那么,我想继续 Hook <code>onStart</code> 方法要怎么做呢?</p><p>在刚刚的代码中,继续插入一个 <code>injectMember</code> 方法体即可。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loadApp(name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.android.browser"</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ActivityClass</span><span style="color:#ADBAC7;">.hook { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectMember { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"onCreate"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> param(</span><span style="color:#F69D50;">BundleClass</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">UnitType</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> afterHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">AlertDialog</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Builder</span><span style="color:#ADBAC7;">(instance())</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .setTitle(</span><span style="color:#96D0FF;">"Hooked"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .setMessage(</span><span style="color:#96D0FF;">"I am hook!"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .setPositiveButton(</span><span style="color:#96D0FF;">"OK"</span><span style="color:#ADBAC7;">, </span><span style="color:#6CB6FF;">null</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> .show()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectMember { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"onStart"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> emptyParam()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">UnitType</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> afterHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>对于当前项目下没有的 <code>Class</code>,你可以使用 <code>stub</code> 方式或 <code>findClass</code> 方法来得到需要 Hook 的类。</p><p>比如,我要得到 <code>com.example.demo.TestClass</code>。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">findClass(name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.example.demo.TestClass"</span><span style="color:#ADBAC7;">).hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectMember {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>若 <code>com.example.demo</code> 是你要 Hook 的 APP,那么写法可以更简单。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">findClass(name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"$packageName.TestClass"</span><span style="color:#ADBAC7;">).hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectMember {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>到这里有些同学可能就开始说了,在某些场景下 <code>findClass</code> 显得有些繁琐。</p><p>因为可能有些同学有如下需求。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">const</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">TestClass</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.example.demo.TestClass"</span></span>
|
||
<span class="line"></span>
|
||
<span class="line"><span style="color:#F69D50;">TestClass</span><span style="color:#ADBAC7;">.hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectMember {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>没关系,你还可以使用字符串类名直接创建一个 Hook。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#96D0FF;">"$packageName.TestClass"</span><span style="color:#ADBAC7;">.hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectMember {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">小提示</p><p>更多功能请参考 <a href="../api/public/com/highcapable/yukihookapi/hook/core/YukiMemberHookCreator#memberhookcreator-class">MemberHookCreator</a>。</p></div><h3 id="hook-zygote" tabindex="-1"><a class="header-anchor" href="#hook-zygote" aria-hidden="true">#</a> Hook Zygote</h3><p>在 APP 启动时,新的进程被 fork 后的第一个事件 <code>initZygote</code>。</p><p>假设我们要全局 Hook 一个 APP <code>Activity</code> 的 <code>onCreate</code> 事件</p><p>在 <code>encase</code> 方法体中添加代码。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loadZygote {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ActivityClass</span><span style="color:#ADBAC7;">.hook { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectMember { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"onCreate"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> param(</span><span style="color:#F69D50;">BundleClass</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">UnitType</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> afterHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container warning"><p class="custom-container-title">注意</p><p>在 <strong>loadZygote</strong> 中进行的功能十分有限,几乎很少的情况下需要用到 <strong>loadZygote</strong> 方法。</p></div><h3 id="hook-系统框架" tabindex="-1"><a class="header-anchor" href="#hook-系统框架" aria-hidden="true">#</a> Hook 系统框架</h3><p>在 <code>YukiHookAPI</code> 中,Hook 系统框架的实现非常简单。</p><p>假设,你要得到 <code>ApplicationInfo</code> 与 <code>PackageInfo</code> 并对它们进行一些操作。</p><p>在 <code>encase</code> 方法体中添加代码。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loadSystem {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ApplicationInfoClass</span><span style="color:#ADBAC7;">.hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">PackageInfoClass</span><span style="color:#ADBAC7;">.hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container danger"><p class="custom-container-title">特别注意</p><p><strong>loadZygote</strong> 与 <strong>loadSystem</strong> 有直接性区别,<strong>loadZygote</strong> 会在 <strong>initZygote</strong> 中装载,系统框架被视为 <strong>loadApp(name = "android")</strong> 而存在,若要 Hook 系统框架,可直接使用 <strong>loadSystem</strong>。</p></div><h3 id="hook-resources" tabindex="-1"><a class="header-anchor" href="#hook-resources" aria-hidden="true">#</a> Hook Resources</h3><p>假设,我们要 Hook <code>com.android.browser</code> 中 <code>string</code> 类型的 <code>app_name</code> 内容替换为 <code>123</code>。</p><p>在 <code>encase</code> 方法体中添加代码。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loadApp(name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.android.browser"</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> resources().hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectResource {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> conditions {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"app_name"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> string()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> replaceTo(</span><span style="color:#96D0FF;">"123"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>若当前 APP 使用 <code>app_name</code> 设置了标题栏文本,则它就会变成我们的 <code>123</code>。</p><p>你还可以使用当前 Xposed 模块的 Resources 替换 Hook APP 的 Resources。</p><p>假设,我们要继续 Hook <code>com.android.browser</code> 中 <code>mipmap</code> 类型的 <code>ic_launcher</code>。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loadApp(name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.android.browser"</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> resources().hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectResource {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> conditions {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"ic_launcher"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> mipmap()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> replaceToModuleResource(</span><span style="color:#F69D50;">R</span><span style="color:#ADBAC7;">.mipmap.ic_launcher)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>至此目标 APP 的图标将会被替换为我们设置的图标。</p><p>若你想替换系统框架的资源,同样也可以这样实现,只需要把 <code>loadApp</code> 换成 <code>loadZygote</code> 即可。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loadZygote {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> resources().hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">小提示</p><p>更多功能请参考 <a href="../api/public/com/highcapable/yukihookapi/hook/core/YukiResourcesHookCreator#resourceshookcreator-class">ResourcesHookCreator</a>。</p></div><h3 id="解除-hook" tabindex="-1"><a class="header-anchor" href="#解除-hook" aria-hidden="true">#</a> 解除 Hook</h3><p>原生的 Xposed 为我们提供了一个 <code>XC_MethodHook.Unhook</code> 功能,可以从 Hook 队列中将当前 Hook 移除,<code>YukiHookAPI</code> 同样可以实现此功能。</p><p>第一种方法,保存当前注入对象的 <code>Result</code> 实例,在适当的时候和地方调用 <code>remove</code> 即可解除该注入对象。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#768390;">// 设置一个变量保存当前实例</span></span>
|
||
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> hookResult </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> injectMember { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"test"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">UnitType</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> afterHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"><span style="color:#768390;">// 在适当的时候调用如下方法即可</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">hookResult.remove()</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>第二种方法,在 Hook 回调方法中调用 <code>removeSelf</code> 移除自身。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">injectMember { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method { </span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"test"</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> returnType </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">UnitType</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> afterHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// 直接调用如下方法即可</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> removeSelf()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">小提示</p><p>更多功能请参考 <a href="../api/public/com/highcapable/yukihookapi/hook/core/YukiMemberHookCreator#memberhookcreator-class">MemberHookCreator</a>。</p></div><h2 id="异常处理" tabindex="-1"><a class="header-anchor" href="#异常处理" aria-hidden="true">#</a> 异常处理</h2><blockquote><p><code>YukiHookAPI</code> 重新设计了对异常的监听,任何异常都不会在 Hook 过程中抛出,避免打断下一个 Hook 流程导致 Hook 进程“死掉”。</p></blockquote><h3 id="监听异常" tabindex="-1"><a class="header-anchor" href="#监听异常" aria-hidden="true">#</a> 监听异常</h3><p>你可以处理 Hook 方法过程发生的异常。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">injectMember {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.result {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// 处理 Hook 开始时的异常</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> onHookingFailure {}</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// 处理 Hook 过程中的异常</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> onConductFailure { param, throwable </span><span style="color:#F47067;">-></span><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// 处理全部异常</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> onAllFailure {}</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>在 Resources Hook 时此方法同样适用。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">injectResource {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.result {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// 处理 Hook 时的任意异常</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> onHookingFailure {}</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>你还可以处理 Hook 的 <code>Class</code> 不存在时发生的异常。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F69D50;">TargetClass</span><span style="color:#ADBAC7;">.hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> injectMember {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.onHookClassNotFoundFailure {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>你还可以处理查找方法时的异常。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.onNoSuchMethod {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">小提示</p><p>更多功能请参考 <a href="../api/public/com/highcapable/yukihookapi/hook/core/YukiMemberHookCreator#result-class">MemberHookCreator.Result</a>、<a href="../api/public/com/highcapable/yukihookapi/hook/core/YukiResourcesHookCreator#result-class">ResourcesHookCreator.Result</a>。</p></div><p>这里介绍了可能发生的常见异常,若要了解更多请参考 <a href="../config/api-exception">API 异常处理</a>。</p><h3 id="抛出异常" tabindex="-1"><a class="header-anchor" href="#抛出异常" aria-hidden="true">#</a> 抛出异常</h3><p>在某些情况下,你可以<strong>手动抛出异常</strong>来达到提醒某些功能存在问题的目的。</p><p>上面已经介绍过,在 <code>hook</code> 方法体内抛出的异常会被 <code>YukiHookAPI</code> 接管,避免打断下一个 Hook 流程导致 Hook 进程“死掉”。</p><p>以下是 <code>YukiHookAPI</code> 接管时这些异常的运作方式。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#768390;">// <情景1></span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">injectMember {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">throw</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">RuntimeException</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"Exception Test"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> afterHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.result {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// 能够捕获到 RuntimeException</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> onHookingFailure {}</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"><span style="color:#768390;">// <情景2></span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">injectMember {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> afterHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">throw</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">RuntimeException</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"Exception Test"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.result {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// 能够捕获到 RuntimeException</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> onConductFailure { param, throwable </span><span style="color:#F47067;">-></span><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>以上情景只会在 (Xposed) 宿主环境被处理,不会对宿主自身造成任何影响。</p><p>若我们想将这些异常直接抛给宿主,原生的 Xposed 为我们提供了 <code>param.throwable</code> 方法,<code>YukiHookAPI</code> 同样可以实现此功能。</p><p>若想在 Hook 回调方法体中将一个异常直接抛给宿主,可以有如下实现方法。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">injectMember {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> afterHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">RuntimeException</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"Exception Test"</span><span style="color:#ADBAC7;">).throwToApp()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>你也可以直接在 Hook 回调方法体中抛出异常,然后标识将异常抛给宿主。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">injectMember {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> method {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// ...</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> afterHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">throw</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">RuntimeException</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"Exception Test"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> }.onFailureThrowToApp()</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>以上两种方法均可在宿主接收到异常从而使宿主进程崩溃。</p><div class="custom-container warning"><p class="custom-container-title">注意</p><p>为了保证 Hook 调用域与宿主内调用域相互隔离,异常只有在 <strong>beforeHook</strong> 与 <strong>afterHook</strong> 回调方法体中才能抛给宿主。</p></div><div class="custom-container tip"><p class="custom-container-title">小提示</p><p>更多功能请参考 <a href="../api/public/com/highcapable/yukihookapi/hook/param/HookParam#throwable-throwtoapp-i-ext-method">Throwable.throwToApp</a>、<a href="../api/public/com/highcapable/yukihookapi/hook/core/YukiMemberHookCreator#hookcallback-class">YukiMemberHookCreator.MemberMookCreator.HookCallback</a>。</p></div><h2 id="状态监听" tabindex="-1"><a class="header-anchor" href="#状态监听" aria-hidden="true">#</a> 状态监听</h2><p>在使用 <code>XposedHelpers</code> 的同学往往会在 Hook 后打印 <code>Unhook</code> 的方法确定是否 Hook 成功。</p><p>在 <code>YukiHookAPI</code> 中,你可以用以下方法方便地重新实现这个功能。</p><p>首先我们可以监听 Hook 已经准备开始。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F69D50;">YourClass</span><span style="color:#ADBAC7;">.hook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.onPrepareHook {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> loggerD(msg </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"$instanceClass hook start"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container danger"><p class="custom-container-title">特别注意</p><p><strong>instanceClass</strong> 建议只在 <strong>onPrepareHook</strong> 中使用,否则被 Hook 的 <strong>Class</strong> 不存在会抛出无法拦截的异常导致 Hook 进程“死掉”。</p></div><p>然后,我们还可以对 Hook 的方法结果进行监听是否成功。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">injectMember {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}.onHooked { member </span><span style="color:#F47067;">-></span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> loggerD(msg </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"$member has hooked"</span><span style="color:#ADBAC7;">)</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="扩展用法" tabindex="-1"><a class="header-anchor" href="#扩展用法" aria-hidden="true">#</a> 扩展用法</h2><blockquote><p>你可以在 Hook 过程中使用下面的方法方便地实现各种判断和功能。</p></blockquote><h3 id="多个宿主" tabindex="-1"><a class="header-anchor" href="#多个宿主" aria-hidden="true">#</a> 多个宿主</h3><p>如果你的模块需要同时处理多个 APP 的 Hook 事件,你可以使用 <code>loadApp</code> 方法体来区分你要 Hook 的 APP。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loadApp(name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.android.browser"</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">loadApp(name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"com.android.phone"</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">小提示</p><p>更多功能请参考 <a href="../api/public/com/highcapable/yukihookapi/hook/param/PackageParam#loadapp-method">PackageParam.loadApp</a>。</p></div><h3 id="多个进程" tabindex="-1"><a class="header-anchor" href="#多个进程" aria-hidden="true">#</a> 多个进程</h3><p>如果你 Hook 的宿主 APP 有多个进程,你可以使用 <code>withProcess</code> 方法体来对它们分别进行 Hook。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">withProcess(mainProcessName) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">withProcess(name </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">"$packageName:tool"</span><span style="color:#ADBAC7;">) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">小提示</p><p>更多功能请参考 <a href="../api/public/com/highcapable/yukihookapi/hook/param/PackageParam#withprocess-method">PackageParam.withProcess</a>。</p></div><h2 id="写法优化" tabindex="-1"><a class="header-anchor" href="#写法优化" aria-hidden="true">#</a> 写法优化</h2><p>为了使代码更加简洁,你可以删去 <code>YukiHookAPI</code> 的名称,将你的 <code>onHook</code> 入口写作 <code>lambda</code> 形式。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">onHook</span><span style="color:#ADBAC7;">() </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> encase {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="xposed-模块状态" tabindex="-1"><a class="header-anchor" href="#xposed-模块状态" aria-hidden="true">#</a> Xposed 模块状态</h2><p>通常情况下,Xposed 模块的开发者都会去选择读取当前 Xposed 模块的激活信息以更好地向用户展示当前功能的生效状态。</p><p>除了基本的 Hook 功能,<code>YukiHookAPI</code> 还为开发者设计了一套 Xposed 模块状态判断的功能,如激活状态、Hook Framework 信息。</p><h3 id="判断自身激活状态" tabindex="-1"><a class="header-anchor" href="#判断自身激活状态" aria-hidden="true">#</a> 判断自身激活状态</h3><p>通常情况下,我们会选择写一个方法,使其返回 <code>false</code>,然后 Hook 掉这个方法使其返回 <code>true</code> 来证明 Hook 已经生效。</p><p>在 <code>YukiHookAPI</code> 中你完全不需要再这么做了,<code>YukiHookAPI</code> 已经帮你封装好了这个操作,你可以直接进行使用。</p><p>现在,你可以直接使用 <code>YukiHookAPI.Status.isXposedModuleActive</code> 在模块中判断自身是否被激活。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">if</span><span style="color:#ADBAC7;">(</span><span style="color:#F69D50;">YukiHookAPI</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Status</span><span style="color:#ADBAC7;">.isXposedModuleActive) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>由于一些特殊原因,在太极、无极中的模块无法使用标准方法检测激活状态。</p><p>此时你可以使用 <code>YukiHookAPI.Status.isTaiChiModuleActive</code> 判断自身是否被激活。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">if</span><span style="color:#ADBAC7;">(</span><span style="color:#F69D50;">YukiHookAPI</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Status</span><span style="color:#ADBAC7;">.isTaiChiModuleActive) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>若你想使用两者得兼的判断方案,<code>YukiHookAPI</code> 同样为你封装了便捷的方式。</p><p>此时你可以使用 <code>YukiHookAPI.Status.isModuleActive</code> 判断自身是否在 Xposed 或太极、无极中被激活。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">if</span><span style="color:#ADBAC7;">(</span><span style="color:#F69D50;">YukiHookAPI</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Status</span><span style="color:#ADBAC7;">.isModuleActive) {</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">小提示</p><p>更多功能请参考 <a href="../api/public/com/highcapable/yukihookapi/YukiHookAPI#status-object">YukiHookAPI.Status</a>。</p></div><div class="custom-container warning"><p class="custom-container-title">注意</p><p>如果你的模块 API 版本高于 29 且正在目标 API 为 29 以上的系统中运行,你需要在 <strong>AndroidManifest.xml</strong> 中添加如下权限声明才能正常判断模块在太极、无极中的激活状态。</p><blockquote><p>示例如下</p></blockquote><div class="language-xml ext-xml line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;"><</span><span style="color:#8DDB8C;">queries</span><span style="color:#ADBAC7;">></span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> <</span><span style="color:#8DDB8C;">intent</span><span style="color:#ADBAC7;">></span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> <</span><span style="color:#8DDB8C;">action</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">android:name</span><span style="color:#ADBAC7;">=</span><span style="color:#96D0FF;">"android.intent.action.MAIN"</span><span style="color:#ADBAC7;"> /></span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"> </</span><span style="color:#8DDB8C;">intent</span><span style="color:#ADBAC7;">></span></span>
|
||
<span class="line"><span style="color:#ADBAC7;"></</span><span style="color:#8DDB8C;">queries</span><span style="color:#ADBAC7;">></span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>还有一种方案,你可以直接声明 <strong>android.permission.QUERY_ALL_PACKAGES</strong> 权限,但是不推荐且会被代码检查警告。</p><blockquote><p>示例如下</p></blockquote><div class="language-xml ext-xml line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;"><</span><span style="color:#8DDB8C;">uses-permission</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">android:name</span><span style="color:#ADBAC7;">=</span><span style="color:#96D0FF;">"android.permission.QUERY_ALL_PACKAGES"</span><span style="color:#ADBAC7;"> /></span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>若模块激活判断中包含太极、无极中的激活状态,就必须将模块的 <strong>Application</strong> 继承于 <strong>ModuleApplication</strong> 或直接使用 <strong>ModuleApplication</strong>。</p></div><h3 id="获取-hook-framework-信息" tabindex="-1"><a class="header-anchor" href="#获取-hook-framework-信息" aria-hidden="true">#</a> 获取 Hook Framework 信息</h3><p>除了判断自身激活状态之外,你还可以通过 <code>YukiHookAPI.Status</code> 中的 <code>Executor</code> 来获取当前 Hook Framework 的相关信息。</p><p>例如我们可以使用 <code>YukiHookAPI.Status.Executor.name</code> 来获取当前 Hook Framework 的名称。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> frameworkName </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">YukiHookAPI</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Status</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Executor</span><span style="color:#ADBAC7;">.name</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>我们还可以使用 <code>YukiHookAPI.Status.Executor.apiLevel</code> 来获取当前 Hook Framework 的 API Level。</p><blockquote><p>示例如下</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> frameworkApiLevel </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">YukiHookAPI</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Status</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">Executor</span><span style="color:#ADBAC7;">.apiLevel</span></span>
|
||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">小提示</p><p>更多功能请参考 <a href="../api/public/com/highcapable/yukihookapi/YukiHookAPI#executor-object">YukiHookAPI.Status.Executor</a>。</p></div><div class="custom-container warning"><p class="custom-container-title">注意</p><p><strong>1.0.91</strong> 版本后的 <strong>YukiHookAPI</strong> 修改了获取 Xposed 模块状态的逻辑判断方式,现在你可以在模块与 Hook APP (宿主) 中同时使用此 API;</p><p>需要确保 <strong>YukiHookAPI.Configs.isEnableHookModuleStatus</strong> 是启用状态;</p><p><strong>YukiHookAPI</strong> 仅对已知的获取方式进行了对接,除了提供标准 API 的 Hook Framework 之外,其它情况下模块可能都将无法判断自己是否被激活或是获取 Hook Framework 的相关信息。</p></div></div><!--[--><!--]--></div><footer class="page-meta"><div class="meta-item edit-link"><a class="external-link meta-item-label" href="https://github.com/fankes/YukiHookAPI/edit/master/docs-source/src/zh-cn/guide/example.md" rel="noopener noreferrer" target="_blank" aria-label="在 Github 上编辑此页"><!--[--><!--]--> 在 Github 上编辑此页 <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">在新窗口中打开</span></span><!--[--><!--]--></a></div><div class="meta-item last-updated"><span class="meta-item-label">上次更新: </span><!----></div><div class="meta-item contributors"><span class="meta-item-label">贡献者: </span><span class="meta-item-info"><!--[--><!--[--><span class="contributor" title="email: qzmmcn@163.com">fankesyooni</span><!----><!--]--><!--]--></span></div></footer><nav class="page-nav"><p class="inner"><span class="prev"><a href="/YukiHookAPI/zh-cn/guide/quick-start.html" class="" aria-label="快速开始"><!--[--><!--]--> 快速开始 <!--[--><!--]--></a></span><span class="next"><a href="/YukiHookAPI/zh-cn/guide/move-to-new-api.html" class="" aria-label="从 Xposed API 迁移"><!--[--><!--]--> 从 Xposed API 迁移 <!--[--><!--]--></a></span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
|
||
<script type="module" src="/YukiHookAPI/assets/app.f643a53b.js" defer></script>
|
||
</body>
|
||
</html>
|