docs: add milestone related plans & modify some documents

This commit is contained in:
2023-09-22 12:16:20 +08:00
parent ac316d1427
commit d6f83ffc3c
13 changed files with 178 additions and 119 deletions

View File

@@ -2,7 +2,7 @@
> `YukiHookAPI` encapsulates a set of reflection API with near-zero reflection writing for developers, which can almost completely replace the usage of reflection API in Java.
The core part of this functionality has been decoupled into the [YukiReflection](https://github.com/fankes/YukiReflection) project, which can be used independently in any Android project.
The core part of this functionality has been decoupled into the [YukiReflection](https://github.com/fankes/YukiReflection) project, which can be used independently in any Java or Android project.
Now `YukiReflection` is integrated into `YukiHookAPI` as a core dependency.
@@ -151,6 +151,14 @@ Please note that the more the same type **Class** is matched, the slower the spe
:::
::: danger
After **YukiHookAPI** 2.x.x released, this function will be deprecated and will no longer be migrated to [YukiReflection](https://github.com/fankes/YukiReflection).
We welcome all developers to start using [DexKit](https://github.com/LuckyPray/DexKit), which is a igh-performance runtime parsing library for **Dex** implemented in C++, which is more efficient than the Java layer in terms of performance, efficient and excellent, it is still in the development stage, your valuable suggestions are welcome.
:::
#### Get Started
Below is a simple usage example.

View File

@@ -105,7 +105,7 @@ object HookEntry : IYukiHookXposedInit {
```
:::
::: code-group-item Xposed API
::: code-group-item Rovo89 Xposed API
```kotlin
class HookEntry : IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInitPackageResources {
@@ -163,24 +163,6 @@ class HookEntry : IXposedHookZygoteInit, IXposedHookLoadPackage, IXposedHookInit
:::
::::
Yes, you read that right, just needing these codes can completely replace the Xposed API to achieve the same function.
Yes, you read that right, just needing these codes can completely replace the traditional Xposed API to achieve the same function.
Now, with the help of the efficient and powerful `YukiHookAPI`, you can implement a very simple Xposed Module.
## Suppored Hook Framework
The following are the `Hook Framework` and Xposed framework supported by `YukiHookAPI`.
| Hook Framework | ST | Description |
| --------------------------------------------------------- | --- | ----------------------------------------------------------------------------------------- |
| [LSPosed](https://github.com/LSPosed/LSPosed) | ✅ | Stable use in multiple scenarios |
| [LSPatch](https://github.com/LSPosed/LSPatch) | ⭕ | WIP after this project is improved |
| [EdXposed](https://github.com/ElderDrivers/EdXposed) | ❎ | Maintenance has stopped, no longer recommended |
| [Pine](https://github.com/canyie/pine) | ⭕ | Only available |
| [SandHook](https://github.com/asLody/SandHook) | ⭕ | Only available |
| [Whale](https://github.com/asLody/whale) | ⭕ | Need [xposed-hook-based-on-whale](https://github.com/WindySha/xposed-hook-based-on-whale) |
| [YAHFA](https://github.com/PAGalaxyLab/YAHFA) | ❗ | Need to implement the Xposed API yourself |
| [FastHook](https://github.com/turing-technician/FastHook) | ❗ | Need to implement the Xposed API yourself |
| [Epic](https://github.com/tiann/epic) | ❗ | Need [Dexposed](https://github.com/alibaba/dexposed) by yourself |
| [TaiChi](https://github.com/taichi-framework/TaiChi) | ⭕ | Only available for Xposed Module |
| [Xposed](https://github.com/rovo89/Xposed) | ⭕ | Recommended minimum system version is Android 7.0 |
Now, with the help of the efficient and powerful `YukiHookAPI`, you can implement a very simple Xposed Module.

View File

@@ -1,8 +1,12 @@
# Migrate from Xposed API
# Migrate from Other Hook APIs
> If you are familiar with Xposed API, you can refer to the same point below to quickly migrate your API to `YukiHookAPI`.
This document can help you quickly migrate from the Hook APIs you are familiar with to `YukiHookAPI` to become familiar with the related writing methods of `YukiHookAPI`.
## Migrate Hook Entry Point
## Rovo89 Xposed API
> If you are familiar with [Rovo89 Xposed API](https://api.xposed.info/), you can refer to the same point below to quickly migrate your API to `YukiHookAPI`.
### Migrate Hook Entry Point
> Migrated from `XC_LoadPackage.LoadPackageParam` to `PackageParam`.
@@ -52,7 +56,7 @@ override fun onHook() = encase {
```
:::
::: code-group-item Xposed API
::: code-group-item Rovo89 Xposed API
```kotlin
private lateinit var moduleResources: XModuleResources
@@ -67,7 +71,7 @@ override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
// Get the ApplicationInfo of the current Hook
lpparam.applicationInfo
// Get the system context object
// There is no ready-made calling method in the native Xposed API, you need to reflect ActivityThread to achieve it
// There is no ready-made calling method in the Rovo89 Xposed API, you need to reflect ActivityThread to achieve it
// Get the host Application lifecycle
AndroidAppHelper.currentApplication()
// Class Hook
@@ -97,11 +101,11 @@ override fun handleInitPackageResources(resparam: XC_InitPackageResources.InitPa
:::
::::
## Migrate Hook Method Body
### Migrate Hook Method Body
> Migrated from `XC_MethodHook.MethodHookParam` to `HookParam`.
### Before/After Hook
#### Before/After Hook
`YukiHookAPI` also implements the `lambda` method body `this` usage for `HookParam`, and the `HookParam` object can be obtained globally in the method bodies such as `beforeHook` and `afterHook`.
@@ -148,7 +152,7 @@ afterHook {
```
:::
::: code-group-item Xposed API
::: code-group-item Rovo89 Xposed API
```kotlin
override fun afterHookedMethod(param: MethodHookParam) {
@@ -188,7 +192,7 @@ override fun afterHookedMethod(param: MethodHookParam) {
:::
::::
### Replace Hook
#### Replace Hook
The `replaceHook` method is special, and the `YukiHookAPI` makes a variety of forms for it to choose from.
@@ -226,7 +230,7 @@ intercept()
```
:::
::: code-group-item Xposed API
::: code-group-item Rovo89 Xposed API
```kotlin
/// A method with no return value void
@@ -258,6 +262,6 @@ override fun replaceHookedMethod(param: MethodHookParam) = null
:::
::::
## Migrate Other Features
## Migrate More Functions Related to Hook API
`YukiHookAPI` is a complete rewrite of the Xposed API, you can refer to [API Document](../api/home) and [Special Features](../api/special-features/reflection) to determine some functional Migration and use.
`YukiHookAPI` is a brand new Hook API, which is fundamentally different from other Hook APIs, you can refer to [API Document](../api/home) and [Special Features](../api/special-features/reflection) to determine some functional Migration and use.

View File

@@ -299,7 +299,7 @@ Then, you can start writing Hook code.
For configuration details related to use as an Xposed Module, you can [click here](../config/xposed-using) to continue reading.
If you are currently using Xposed API, you can refer to [Migrate from Xposed API](../guide/move-to-new-api).
If you are currently using Hook APIs such as Rovo89 Xposed API, you can refer to [Migrate from Other Hook APIs](../guide/move-to-new-api).
### Use as Hook API
@@ -311,7 +311,7 @@ Create your custom `Application`.
Regardless of the **Hook Framework** you use, you need to add its docking Xposed dependency support.
If the target **Hook Framework** does not integrate Xposed API, you need to implement and connect **XposedBridge** by yourself.
If the target **Hook Framework** does not integrate Rovo89 Xposed API, you need to implement and connect **XposedBridge** by yourself.
:::

View File

@@ -0,0 +1,51 @@
# Supportive
The following are the related functions, Xposed Frameworks, Hook Frameworks and Hook APIs supported by `YukiHookAPI`.
> Basic Functions
| Name | ST | Description |
| -------------------------- | --- | ---------------------------------------------------------------------------------------------------------------- |
| Xposed Module Auto Builder | ✅ | Will use [New Xposed Module Config Plan](https://github.com/fankes/YukiHookAPI/issues/49) on `YukiHookAPI` 2.x.x |
| ART Dynamic Method Hook | ✅ | Stable use in multiple scenarios |
| Xposed Resources Hook | ❗ | Supported, but will be deprecated on `YukiHookAPI` 2.x.x |
> Extended Functions
| Name | ST | Description |
| -------------------------------------------------------------------------------------------------- | --- | ---------------------------------------------------------------------------------------------------- |
| [Reflection Extensions](../api/special-features/reflection) | ⭕ | Will be merge into [YukiReflection](https://github.com/fankes/YukiReflection) on `YukiHookAPI` 2.x.x |
| [Xposed Module Data Storage](../api/special-features/xposed-storage) | ✅ | Normal use |
| [Xposed Module and Host Channel](../api/special-features/xposed-channel) | ✅ | Normal use |
| [Host Lifecycle Extension](../api/special-features/host-lifecycle) | ✅ | Normal use |
| [Inject Module Apps Resources](../api/special-features/host-inject#inject-module-apps-resources) | ✅ | Normal use |
| [Register Module Apps Activity](../api/special-features/host-inject#register-module-apps-activity) | ✅ | Normal use |
> Xposed Frameworks
| Name | ST | Description |
| ---------------------------------------------------- | --- | --------------------------------------------------------------------------- |
| [LSPosed](https://github.com/LSPosed/LSPosed) | ✅ | Stable use in multiple scenarios |
| [LSPatch](https://github.com/LSPosed/LSPatch) | ⭕ | Support, API support will be gradually added after the project is completed |
| [EdXposed](https://github.com/ElderDrivers/EdXposed) | ❎ | Maintenance has stopped and is no longer recommended |
| [Dreamland](https://github.com/canyie/Dreamland) | ⭕ | Theoretical support (not tested by developer) |
| [TaiChi](https://github.com/taichi-framework/TaiChi) | ⭕ | Hook functions normally (some functions have restrictions) |
| [Xposed](https://github.com/rovo89/Xposed) | ❎ | Maintenance has stopped and is no longer recommended |
> Hook Frameworks
| Name | ST | Description |
| --------------------------------------------------------- | --- | -------------------------------------------------------------------------------------------- |
| [Pine](https://github.com/canyie/pine) | ⭕ | Theoretical support (not tested by developer) |
| [SandHook](https://github.com/asLody/SandHook) | ❎ | The latests Android are not supported, you need to integrated the Rovo89 Xposed API yourself |
| [Whale](https://github.com/asLody/whale) | ❎ | The latests Android are not supported, you need to integrated the Rovo89 Xposed API yourself |
| [YAHFA](https://github.com/PAGalaxyLab/YAHFA) | ❎ | The latests Android are not supported, you need to integrated the Rovo89 Xposed API yourself |
| [FastHook](https://github.com/turing-technician/FastHook) | ❎ | Maintenance has stopped and is no longer recommended |
| [Epic](https://github.com/tiann/epic) | ❎ | Maintenance has stopped and is no longer recommended |
> Hook APIs
| Name | ST | Description |
| ------------------------------------------------- | --- | ---------------------------------------- |
| [Rovo89 Xposed API](https://api.xposed.info/) | ✅ | Stable use in multiple scenarios |
| [Modern Xposed API](https://github.com/libxposed) | ❎ | Will be supported on `YukiHookAPI` 2.x.x |