mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-01 08:15:37 +08:00
docs: update future
This commit is contained in:
@@ -16,6 +16,14 @@ Some Xposed Module developers currently choose the Hook target app self's Shared
|
||||
|
||||
In the later period, the permissions of the Android system will become more and more strict, and `selinux` is a big problem currently facing, which needs to be discussed and studied.
|
||||
|
||||
::: tip Updated on 2023.10.06
|
||||
|
||||
LSPosed has now experimentally launched [Modern Xposed API](https://github.com/libxposed), which uses Service to communicate with modules, which will solve the problem of module data storage.
|
||||
|
||||
In order to ensure the compatibility of most modules, **YukiHookAPI** plans to use a customized ContentProvider to realize data exchange between the Module App and the Host App in the future, so stay tuned.
|
||||
|
||||
:::
|
||||
|
||||
## Future Plans
|
||||
|
||||
> Features that `YukiHookAPI` may add later are included here.
|
||||
@@ -42,8 +50,58 @@ You can submit **issues** with us.
|
||||
|
||||
We have provided the Xposed native API listening interface, you can find or view the implementation method of the Demo [here](../config/xposed-using#native-xposed-api-events).
|
||||
|
||||
### Support for More Hook Framework
|
||||
### Milestone Plan
|
||||
|
||||
As an API, currently only docking `XposedBridge` as a compatibility layer still has certain limitations.
|
||||
The plans below have been published in `issues` on GitHub, and you can view the progress of each project.
|
||||
|
||||
Most `inline hook` do not have a Java compatibility layer, and the Java compatibility layer adaptation of `native hook` may be considered later.
|
||||
All functions are expected to be completed in `2.0.0` version, so stay tuned.
|
||||
|
||||
- [New Xposed Module Config Plan](https://github.com/fankes/YukiHookAPI/issues/49)
|
||||
- [New Hook Entry Class](https://github.com/fankes/YukiHookAPI/issues/48)
|
||||
- [New Hook Code Style](https://github.com/fankes/YukiHookAPI/issues/33)
|
||||
|
||||
#### New Hook Code Style (Preview)
|
||||
|
||||
`YukiHookAPI` introduced the `New Hook Code Style` (New API) of `2.0.0` in the `1.2.0` version, it is now in the experimental stage.
|
||||
|
||||
You can before the `2.0.0` version is officially released, start migrating and experience the New API.
|
||||
|
||||
For example, we want to Hook the `test` method in the `com.example.Test` class.
|
||||
|
||||
> Legacy API
|
||||
|
||||
```kotlin
|
||||
findClass("com.example.Test").hook {
|
||||
injectMember {
|
||||
method {
|
||||
name = "test"
|
||||
}
|
||||
beforeHook {
|
||||
// Your code here.
|
||||
}
|
||||
afterHook {
|
||||
// Your code here.
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> New API
|
||||
|
||||
```kotlin
|
||||
"com.example.Test".toClass()
|
||||
.method {
|
||||
name = "test"
|
||||
}.hook {
|
||||
before {
|
||||
// Your code here.
|
||||
}
|
||||
after {
|
||||
// Your code here.
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The Hook object of the New API has been migrated from `Class` to `Member`, which will be more intuitive.
|
||||
|
||||
All legacy APIs have been marked `LegacyHookApi`, you can use `@OptIn(LegacyHookApi::class)` to eliminate the warning and continue to use the legacy API.
|
@@ -16,6 +16,14 @@
|
||||
|
||||
后期 Android 系统的权限将越来越严格,`selinux` 就是目前面临的一个大问题,有待讨论和研究。
|
||||
|
||||
::: tip 2023.10.06 更新
|
||||
|
||||
LSPosed 现已实验性推出了 [Modern Xposed API](https://github.com/libxposed),它采用 Service 的方式与模块通信,这将能够解决模块数据存储的问题。
|
||||
|
||||
为了保证大部分模块的兼容性,后期 **YukiHookAPI** 计划使用自定义的 ContentProvider 实现模块与宿主的数据互通,敬请期待。
|
||||
|
||||
:::
|
||||
|
||||
## 未来的计划
|
||||
|
||||
> 这里收录了 `YukiHookAPI` 可能会在后期添加的功能。
|
||||
@@ -36,8 +44,56 @@
|
||||
|
||||
API 已经提供了 Xposed 原生 API 监听接口,你可以 [在这里](../config/xposed-using#原生-xposed-api-事件) 找到或查看 Demo 的实现方法。
|
||||
|
||||
### 支持更多 Hook Framework
|
||||
### 里程碑计划
|
||||
|
||||
作为 API 来讲,目前仅仅对接 `XposedBridge` 作为兼容层,还是有一定的局限性。
|
||||
下方这些计划已在 GitHub 的 `issues` 中发布,你可以查看每个项目的进度。
|
||||
|
||||
大部分 `inline hook` 没有 Java 兼容层,后期可能会考虑 `native hook` 的 Java 兼容层适配。
|
||||
所有功能预计在 `2.0.0` 版本完成,敬请期待。
|
||||
|
||||
- [New Xposed Module Config Plan](https://github.com/fankes/YukiHookAPI/issues/49)
|
||||
- [New Hook Entry Class](https://github.com/fankes/YukiHookAPI/issues/48)
|
||||
- [New Hook Code Style](https://github.com/fankes/YukiHookAPI/issues/33)
|
||||
|
||||
#### New Hook Code Style (Preview)
|
||||
|
||||
`YukiHookAPI` 在 `1.2.0` 版本引入了 `2.0.0` 准备实现的 `New Hook Code Style` (新版 API),现处于实验性阶段,你可以在 `2.0.0` 版本正式发布前,开始迁移并体验新版 API。
|
||||
|
||||
例如,我们要 Hook `com.example.Test` 类中的 `test` 方法。
|
||||
|
||||
> 旧版 API
|
||||
|
||||
```kotlin
|
||||
findClass("com.example.Test").hook {
|
||||
injectMember {
|
||||
method {
|
||||
name = "test"
|
||||
}
|
||||
beforeHook {
|
||||
// Your code here.
|
||||
}
|
||||
afterHook {
|
||||
// Your code here.
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> 新版 API
|
||||
|
||||
```kotlin
|
||||
"com.example.Test".toClass()
|
||||
.method {
|
||||
name = "test"
|
||||
}.hook {
|
||||
before {
|
||||
// Your code here.
|
||||
}
|
||||
after {
|
||||
// Your code here.
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
新版 API 的 Hook 对象从 `Class` 迁移到了 `Member`,这种方式将更加直观。
|
||||
|
||||
所有旧版 API 已被标记 `LegacyHookApi`,你可以使用 `@OptIn(LegacyHookApi::class)` 的方式消除警告,继续使用旧版 API。
|
Reference in New Issue
Block a user