mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
Fix documentation contents bugs
This commit is contained in:
@@ -40,9 +40,9 @@ const navigationLinks = {
|
||||
baseApiPath + 'hook/xposed/parasitic/activity/base/ModuleAppCompatActivity',
|
||||
baseApiPath + 'hook/xposed/parasitic/context/wrapper/ModuleContextThemeWrapper',
|
||||
baseApiPath + 'hook/xposed/parasitic/reference/ModuleClassLoader',
|
||||
baseApiPath + 'hook/xposed/bridge/dummy/YukiModuleResources',
|
||||
baseApiPath + 'hook/xposed/bridge/dummy/YukiResources',
|
||||
baseApiPath + 'hook/xposed/bridge/dummy/YukiResForwarder',
|
||||
baseApiPath + 'hook/xposed/bridge/resources/YukiModuleResources',
|
||||
baseApiPath + 'hook/xposed/bridge/resources/YukiResources',
|
||||
baseApiPath + 'hook/xposed/bridge/resources/YukiResForwarder',
|
||||
baseApiPath + 'hook/xposed/bridge/event/YukiXposedEvent',
|
||||
baseApiPath + 'hook/type/android/ComponentTypeFactory',
|
||||
baseApiPath + 'hook/type/android/GraphicsTypeFactory',
|
||||
|
@@ -372,7 +372,7 @@ var isDebug: Boolean
|
||||
|
||||
> 是否启用 DEBUG 模式。
|
||||
|
||||
默认为开启状态,开启后模块将会向 `Logcat` 和 `XposedBridge.log` 打印详细的 Hook 日志,关闭后仅会打印 `E` 级别的日志。
|
||||
默认为开启状态,开启后模块将会向 `Logcat` 和 (Xposed) 宿主环境中的日志功能打印详细的 Hook 日志,关闭后仅会打印 `E` 级别的日志。
|
||||
|
||||
<h3 class="deprecated">isAllowPrintingLogs - field</h3>
|
||||
|
||||
@@ -536,12 +536,12 @@ inline fun configs(initiate: Configs.() -> Unit)
|
||||
|
||||
**Function Example**
|
||||
|
||||
你可以在 `HookEntryClass` 的 `onInit` 方法中调用 `configs` 方法和 `debugLog` 方法完成对 API 的功能配置,实时生效。
|
||||
你可以在 Hook 入口类的 `onInit` 方法中调用 `configs` 方法和 `debugLog` 方法完成对 API 的功能配置,实时生效。
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
YukiHookAPI.configs {
|
||||
@@ -572,7 +572,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() = configs {
|
||||
debugLog {
|
||||
@@ -601,7 +601,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
YukiHookLogger.Configs.tag = "YukiHookAPI"
|
||||
|
@@ -48,7 +48,7 @@ For example we only use `android.util.Log` to print logs.
|
||||
loggerD(tag = "YukiHookAPI", msg = "This is a log", type = LoggerType.LOGD)
|
||||
```
|
||||
|
||||
Or just use `XposedBridge.log` to print the log, this method can only be used in the (Xposed) Host environment.
|
||||
Or just use the log function that in the (Xposed) Host environment to print the log, this method can only be used in the (Xposed) Host environment.
|
||||
|
||||
> The following example
|
||||
|
||||
|
@@ -138,7 +138,7 @@ As a child hooker, you can also call the `loadApp` method externally, and then d
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase {
|
||||
loadApp(name = "com.example.demo", ChildCustomHooker)
|
||||
@@ -172,12 +172,12 @@ object FirstHooker : YukiBaseHooker() {
|
||||
}
|
||||
```
|
||||
|
||||
Once all Hookers are set up, you can load your Hooker in the `onHook` method of your `HookEntryClass`.
|
||||
Once all Hookers are set up, you can load your Hooker in the `onHook` method of your Hook entry class.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() =
|
||||
YukiHookAPI.encase(FirstHooker, SecondHooker, ThirdHooker ...)
|
||||
@@ -189,7 +189,7 @@ Of course, we can also abbreviate it.
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase(FirstHooker, SecondHooker, ThirdHooker ...)
|
||||
}
|
||||
@@ -285,7 +285,7 @@ encase {
|
||||
> Sample Code 2
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() {
|
||||
// <Scenario 1>
|
||||
@@ -344,7 +344,7 @@ encase {
|
||||
> Sample Code 2
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() {
|
||||
encase(CustomHooker)
|
||||
|
@@ -43,7 +43,7 @@ You try to load the `encase` method in the `onInit` or `onXposedEvent` method of
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
// ❗ Wrong usage
|
||||
@@ -72,7 +72,7 @@ Please load the `encase` method in the `onHook` method.
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
// Only the configs method can be loaded here
|
||||
|
@@ -238,7 +238,7 @@ class _YukiHookXposedInit : IXposedHookZygoteInit, IXposedHookLoadPackage {
|
||||
|
||||
### IYukiHookXposedInit Interface
|
||||
|
||||
The `IYukiHookXposedInit` interface that your `HookEntryClass` must implements it, which is the entry point for your Module App to start hooking.
|
||||
The `IYukiHookXposedInit` interface that your Hook entry class must implements it, which is the entry point for your Module App to start hooking.
|
||||
|
||||
::: tip
|
||||
|
||||
|
@@ -47,7 +47,7 @@ With `Kotlin`'s elegant `lambda` writing and `YukiHookAPI`, you can make your Ho
|
||||
|
||||
```kotlin
|
||||
@InjectYukiHookWithXposed
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase {
|
||||
loadZygote {
|
||||
|
@@ -218,6 +218,6 @@ For configuration details related to use as a Hook API, you can [click here](../
|
||||
|
||||
::: warning
|
||||
|
||||
**YukiHookModuleStatus**, **YukiHookModulePrefs**, **YukiHookDataChannel** and Resources Hook functionality will not work when using a custom Hook Framework instead of the full Xposed Module.
|
||||
**YukiHookModulePrefs**, **YukiHookDataChannel** and Resources Hook functionality will not work when using a custom Hook Framework instead of the full Xposed Module.
|
||||
|
||||
:::
|
@@ -16,7 +16,7 @@ features:
|
||||
details: A powerful, elegant, beautiful API built with Kotlin lambda can help you quickly implement members search and methods hooks.
|
||||
- title: Debugging Efficient
|
||||
details: A rich debug log function, detailing the name of each hooked method, time-consuming to find the class can quickly debug and find errors.
|
||||
- title: Easy to transplant
|
||||
- title: Easy to Transplant
|
||||
details: Native support for Xposed API usage, in any case, the supported Hook Framework with Xposed API can be quickly spliced with it.
|
||||
- title: Obfuscate Support
|
||||
details: The built Xposed Module simply supports R8, obfuscate will not destroy the hook entry point, and no other configuration is required under R8.
|
||||
|
@@ -364,7 +364,7 @@ var isDebug: Boolean
|
||||
|
||||
> 是否启用 DEBUG 模式。
|
||||
|
||||
默认为开启状态,开启后模块将会向 `Logcat` 和 `XposedBridge.log` 打印详细的 Hook 日志,关闭后仅会打印 `E` 级别的日志。
|
||||
默认为开启状态,开启后模块将会向 `Logcat` 和 (Xposed) 宿主环境中的日志功能打印详细的 Hook 日志,关闭后仅会打印 `E` 级别的日志。
|
||||
|
||||
<h3 class="deprecated">isAllowPrintingLogs - field</h3>
|
||||
|
||||
@@ -528,12 +528,12 @@ inline fun configs(initiate: Configs.() -> Unit)
|
||||
|
||||
**功能示例**
|
||||
|
||||
你可以在 `HookEntryClass` 的 `onInit` 方法中调用 `configs` 方法和 `debugLog` 方法完成对 API 的功能配置,实时生效。
|
||||
你可以在 Hook 入口类的 `onInit` 方法中调用 `configs` 方法和 `debugLog` 方法完成对 API 的功能配置,实时生效。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
YukiHookAPI.configs {
|
||||
@@ -564,7 +564,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() = configs {
|
||||
debugLog {
|
||||
@@ -593,7 +593,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
YukiHookLogger.Configs.tag = "YukiHookAPI"
|
||||
|
@@ -46,7 +46,7 @@ loggerD(tag = "YukiHookAPI", msg = "This is a log")
|
||||
loggerD(tag = "YukiHookAPI", msg = "This is a log", type = LoggerType.LOGD)
|
||||
```
|
||||
|
||||
或又仅使用 `XposedBridge.log` 来打印日志,此方法仅可在 (Xposed) 宿主环境使用。
|
||||
或仅使用 (Xposed) 宿主环境中的日志功能来打印日志,此方法仅可在 (Xposed) 宿主环境使用。
|
||||
|
||||
> 示例如下
|
||||
|
||||
|
@@ -138,7 +138,7 @@ object CustomHooker : YukiBaseHooker() {
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase {
|
||||
loadApp(name = "com.example.demo", ChildCustomHooker)
|
||||
@@ -172,12 +172,12 @@ object FirstHooker : YukiBaseHooker() {
|
||||
}
|
||||
```
|
||||
|
||||
搭建完全部 Hooker 后,你就可以在你的 `HookEntryClass` 入口类中的 `onHook` 方法中装载你的 Hooker 了。
|
||||
搭建完全部 Hooker 后,你就可以在你的 Hook 入口类中的 `onHook` 方法中装载你的 Hooker 了。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() =
|
||||
YukiHookAPI.encase(FirstHooker, SecondHooker, ThirdHooker ...)
|
||||
@@ -189,7 +189,7 @@ class HookEntry : IYukiHookXposedInit {
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase(FirstHooker, SecondHooker, ThirdHooker ...)
|
||||
}
|
||||
@@ -284,7 +284,7 @@ encase {
|
||||
> 示例代码 2
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() {
|
||||
// <情景1>
|
||||
@@ -342,7 +342,7 @@ encase {
|
||||
> 示例代码 2
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() {
|
||||
encase(CustomHooker)
|
||||
|
@@ -43,7 +43,7 @@ You cannot load a hooker in "onInit" or "onXposedEvent" method! Aborted
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
// ❗错误的使用方法
|
||||
@@ -72,7 +72,7 @@ class HookEntry : IYukiHookXposedInit {
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
// 这里只能装载 configs 方法
|
||||
|
@@ -232,7 +232,7 @@ class _YukiHookXposedInit : IXposedHookZygoteInit, IXposedHookLoadPackage {
|
||||
|
||||
### IYukiHookXposedInit 接口
|
||||
|
||||
`IYukiHookXposedInit` 接口为你的 `HookEntryClass` 必须实现的接口,这是你的模块开始 Hook 的起点。
|
||||
`IYukiHookXposedInit` 接口为你的 Hook 入口类必须实现的接口,这是你的模块开始 Hook 的起点。
|
||||
|
||||
::: tip
|
||||
|
||||
|
@@ -47,7 +47,7 @@
|
||||
|
||||
```kotlin
|
||||
@InjectYukiHookWithXposed
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase {
|
||||
loadZygote {
|
||||
|
@@ -215,6 +215,6 @@ override fun attachBaseContext(base: Context?) {
|
||||
|
||||
::: warning
|
||||
|
||||
使用自定义的 Hook Framework 而并非完整的 Xposed 模块时,**YukiHookModuleStatus**、**YukiHookModulePrefs**、**YukiHookDataChannel** 以及 Resources Hook 功能将失效。
|
||||
使用自定义的 Hook Framework 而并非完整的 Xposed 模块时,**YukiHookModulePrefs**、**YukiHookDataChannel** 以及 Resources Hook 功能将失效。
|
||||
|
||||
:::
|
Reference in New Issue
Block a user