mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-01 08:15:37 +08:00
docs: update example, xposed-using
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
> As an Xposed Module, `YukiHookAPI` provides an automatic builder.
|
||||
|
||||
You need to integrate the latest version of the `com.highcapable.yukihookapi:ksp-xposed` dependency in your `build.gradle`.
|
||||
You need to integrate the latest version of the `com.highcapable.yukihookapi:ksp-xposed` dependency in your build script.
|
||||
|
||||
## Custom Automatic Builder
|
||||
|
||||
@@ -19,6 +19,7 @@ annotation class InjectYukiHookWithXposed(
|
||||
val sourcePath: String,
|
||||
val modulePackageName: String,
|
||||
val entryClassName: String,
|
||||
val isUsingXposedModuleStatus: Boolean,
|
||||
val isUsingResourcesHook: Boolean
|
||||
)
|
||||
```
|
||||
@@ -186,9 +187,17 @@ The **entryClassName** you define must not be the same as the class name in **xp
|
||||
|
||||
:::
|
||||
|
||||
#### isUsingXposedModuleStatus Parameter
|
||||
|
||||
`isUsingXposedModuleStatus` determines whether the automatic builder generates relevant code for status functions such as Xposed Module activation, this feature is enabled by default.
|
||||
|
||||
After generation, you will be able to use the related functions of `YukiHookAPI.Status` in the Module App's process.
|
||||
|
||||
If you do not want to generate related code, you can manually turn off this feature, which will only take effect for the Module App's process.
|
||||
|
||||
#### isUsingResourcesHook Parameter
|
||||
|
||||
`isUsingResourcesHook` determines whether the automatic builder generates relevant code for the Resources Hook, This feature is not enabled by default.
|
||||
`isUsingResourcesHook` determines whether the automatic builder generates relevant code for the Resources Hook, this feature is not enabled by default.
|
||||
|
||||
By default the generated entry class will look like this.
|
||||
|
||||
|
@@ -676,7 +676,7 @@ For more functions, please refer to [YukiHookAPI.Status.Executor](../api/public/
|
||||
|
||||
**YukiHookAPI** after **1.0.91** version modifies the logical judgment method of obtaining the status of the Xposed Module, and now you can use this API in the Module App and Host App at the same time;
|
||||
|
||||
Need to make sure **YukiHookAPI.Configs.isEnableHookModuleStatus** is enabled;
|
||||
Need to make sure **InjectYukiHookWithXposed.isUsingXposedModuleStatus** is enabled;
|
||||
|
||||
**YukiHookAPI** only connects to the known acquisition methods.
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
> 作为 Xposed 模块,`YukiHookAPI` 提供了一个自动处理程序。
|
||||
|
||||
你需要在你的 `build.gradle` 中集成 `com.highcapable.yukihookapi:ksp-xposed` 依赖的最新版本。
|
||||
你需要在你的构建脚本中集成 `com.highcapable.yukihookapi:ksp-xposed` 依赖的最新版本。
|
||||
|
||||
## 自定义处理程序
|
||||
|
||||
@@ -19,6 +19,7 @@ annotation class InjectYukiHookWithXposed(
|
||||
val sourcePath: String,
|
||||
val modulePackageName: String,
|
||||
val entryClassName: String,
|
||||
val isUsingXposedModuleStatus: Boolean,
|
||||
val isUsingResourcesHook: Boolean
|
||||
)
|
||||
```
|
||||
@@ -180,6 +181,14 @@ class HookXposedEntry : IXposedHookZygoteInit, IXposedHookLoadPackage, ...
|
||||
|
||||
:::
|
||||
|
||||
#### isUsingXposedModuleStatus 参数
|
||||
|
||||
`isUsingXposedModuleStatus` 决定了自动处理程序是否生成针对 Xposed 模块激活等状态功能的相关代码,此功能默认启用。
|
||||
|
||||
生成后你将可以在模块进程中使用 `YukiHookAPI.Status` 的相关功能。
|
||||
|
||||
如果你不希望生成相关代码,你可以手动关闭此功能,仅对模块进程生效。
|
||||
|
||||
#### isUsingResourcesHook 参数
|
||||
|
||||
`isUsingResourcesHook` 决定了自动处理程序是否生成针对 Resources Hook 的相关代码,此功能默认不启用。
|
||||
|
@@ -676,7 +676,7 @@ val frameworkApiLevel = YukiHookAPI.Status.Executor.apiLevel
|
||||
|
||||
**1.0.91** 版本后的 **YukiHookAPI** 修改了获取 Xposed 模块状态的逻辑判断方式,现在你可以在模块与 Hook APP (宿主) 中同时使用此 API;
|
||||
|
||||
需要确保 **YukiHookAPI.Configs.isEnableHookModuleStatus** 是启用状态;
|
||||
需要确保 **InjectYukiHookWithXposed.isUsingXposedModuleStatus** 是启用状态;
|
||||
|
||||
**YukiHookAPI** 仅对已知的获取方式进行了对接,除了提供标准 API 的 Hook Framework 之外,其它情况下模块可能都将无法判断自己是否被激活或是获取 Hook Framework 的相关信息。
|
||||
|
||||
|
Reference in New Issue
Block a user