refactor: big modified

- update dependencies
- migration reflection api to KavaRef
- merge to new api usage
This commit is contained in:
2025-06-16 17:05:06 +08:00
parent cca6e1d2a8
commit c8f1e3441e
191 changed files with 2794 additions and 583 deletions

View File

@@ -17,6 +17,7 @@ const navigationLinks = {
'/config/xposed-using',
'/config/api-using',
'/config/move-to-api-1-2-x',
'/config/move-to-api-1-3-x',
'/config/r8-proguard'
],
tools: '/tools/yukihookapi-projectbuilder',
@@ -145,7 +146,8 @@ export const navBarItems = {
{ text: 'Use as Xposed Module Configs', link: i18n.string(navigationLinks.config[2], 'en') },
{ text: 'Use as Hook API Configs', link: i18n.string(navigationLinks.config[3], 'en') },
{ text: 'Migrate to YukiHookAPI 1.2.x', link: i18n.string(navigationLinks.config[4], 'en') },
{ text: 'R8 & Proguard Obfuscate', link: i18n.string(navigationLinks.config[5], 'en') }
{ text: 'Migrate to YukiHookAPI 1.3.x', link: i18n.string(navigationLinks.config[5], 'en') },
{ text: 'R8 & Proguard Obfuscate', link: i18n.string(navigationLinks.config[6], 'en') }
]
}, {
text: 'Tools',
@@ -196,7 +198,8 @@ export const navBarItems = {
{ text: '作为 Xposed 模块使用的相关配置', link: i18n.string(navigationLinks.config[2], 'zh-cn') },
{ text: '作为 Hook API 使用的相关配置', link: i18n.string(navigationLinks.config[3], 'zh-cn') },
{ text: '迁移到 YukiHookAPI 1.2.x', link: i18n.string(navigationLinks.config[4], 'zh-cn') },
{ text: 'R8 与 Proguard 混淆', link: i18n.string(navigationLinks.config[5], 'zh-cn') }
{ text: '迁移到 YukiHookAPI 1.3.x', link: i18n.string(navigationLinks.config[5], 'zh-cn') },
{ text: 'R8 与 Proguard 混淆', link: i18n.string(navigationLinks.config[6], 'zh-cn') }
]
}, {
text: '工具',

View File

@@ -34,7 +34,10 @@ If you like the Reflection API of `YukiHookAPI`, but your project may not need r
Well here is some good news for you:
The core Reflection API of `YukiHookAPI` has been decoupled into [YukiReflection](https://github.com/HighCapable/YukiReflection) project, which can now be used in any Android project.
~~The core Reflection API of `YukiHookAPI` has been decoupled into [YukiReflection](https://github.com/HighCapable/YukiReflection) project, which can now be used in any Android project.~~
The `YukiReflection` project has been deprecated due to many unsolved black box issues, so we no longer recommend anyone to use it.
Please now migrate to the brand new design [KavaRef](https://github.com/HighCapable/KavaRef).
::: tip To be Discussed
@@ -58,4 +61,4 @@ All functions are expected to be completed in `2.0.0` version, so stay tuned.
- [New Xposed Module Config Plan](https://github.com/HighCapable/YukiHookAPI/issues/49)
- [New Hook Entry Class](https://github.com/HighCapable/YukiHookAPI/issues/48)
- [New Hook Code Style](https://github.com/HighCapable/YukiHookAPI/issues/33)
- ~~[New Hook Code Style](https://github.com/HighCapable/YukiHookAPI/issues/33)~~ (Replaced by [KavaRef](https://github.com/HighCapable/KavaRef))

View File

@@ -8,6 +8,14 @@ next:
> The document here will synchronize the relevant usage of the latest API version, please keep `YukiHookAPI` as the latest version to use the latest version of the function.
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the
Dokka plugin in version `2.0.0`.
If you encounter unsolvable problems, you can contact us via [Contact Us](../about/contacts).
:::
## Function Description
> The function description mainly introduces the related usage and purpose of the current API.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -4,6 +4,12 @@ pageClass: code-page
::: warning
Due to maintenance costs, the `YukiHookAPI` will no longer update this document from version `1.3.0` and switch to the API document automatically generated by the Dokka plugin in version `2.0.0`.
:::
::: warning
The English translation of this page has not been completed, you are welcome to contribute translations to us.
You can use the **Chrome Translation Plugin** to translate entire pages for reference.

View File

@@ -37,9 +37,9 @@ After the Host App is hooked, we can directly inject the `Context` obtained in t
> The following example
```kotlin
method {
resolve().firstMethod {
name = "onCreate"
param(BundleClass)
parameters(Bundle::class)
}.hook {
after {
instance<Activity>().also {
@@ -90,9 +90,9 @@ After the Host App is hooked, we can directly register the `Activity` proxy of t
> The following example
```kotlin
method {
resolve().firstMethod {
name = "onCreate"
param(BundleClass)
parameters(Bundle::class)
}.hook {
after {
instance<Activity>().registerModuleAppActivities()
@@ -236,9 +236,9 @@ At this time, we want to use `MaterialAlertDialogBuilder` to create a dialog in
> The following example
```kotlin
method {
resolve().firstMethod {
name = "onCreate"
param(BundleClass)
parameters(Bundle::class)
}.hook {
after {
// Use applyModuleTheme to create a theme resource in the current Module App
@@ -260,9 +260,9 @@ Which requires at least Android 10 and above system version support and the curr
> The following example
```kotlin
method {
resolve().firstMethod {
name = "onCreate"
param(BundleClass)
parameters(Bundle::class)
}.hook {
after {
// Define the theme resource in the current Module App

View File

@@ -2,6 +2,14 @@
> Log is the most important part of the debugging process, `YukiHookAPI` encapsulates a set of stable and efficient debugging log functions for developers.
::: warning
The log of `KavaRef` will be managed separately by itself.
For detailed configuration plans, you can refer to [here](https://highcapable.github.io/KavaRef/en/library/kavaref-core#exception-handling),
which will jump to the `KavaRef` document.
:::
## Normal Logs
You can call `YLog.debug`, `YLog.info`, `YLog.warn` to print normal logs to the console.

View File

@@ -1,12 +1,26 @@
# Reflection Extensions
# Reflection Extensions (Migrated)
> `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/HighCapable/YukiReflection) project, which can be used independently in any Java or Android project.
~~The core part of this functionality has been decoupled into the [YukiReflection](https://github.com/HighCapable/YukiReflection) project, which can be used independently in any Java or Android project.~~
Now `YukiReflection` is integrated into `YukiHookAPI` as a core dependency.
~~Now `YukiReflection` is integrated into `YukiHookAPI` as a core dependency.~~
`YukiHookAPI` adds related extensions for Hook functions on the basis of `YukiReflection`, and there is no need to introduce this dependency to use `YukiHookAPI`.
~~`YukiHookAPI` adds related extensions for Hook functions on the basis of `YukiReflection`, and there is no need to introduce this dependency to use `YukiHookAPI`.~~
::: warning
Starting with version `1.3.0`, `YukiHookAPI` has moved its own reflection API partially to
[KavaRef](https://github.com/HighCapable/KavaRef), we no longer recommend the reflection API of `YukiHookAPI` itself, which have been marked as deprecated.
The `YukiReflection` project has been deprecated due to many unsolved black box issues, and we no longer recommend anyone to use it.
If you are still using the reflection API section of `YukiHookAPI`,
please refer to the migration document [here](https://highcapable.github.io/KavaRef/zh-cn/config/migration) which will jump to the `KavaRef` document.
:::
<div style="opacity: 0.35">
## Class Extensions
@@ -1958,4 +1972,6 @@ For more types, see [ComponentTypeFactory](../public/com/highcapable/yukihookapi
:::
At the same time, you are welcome to contribute more commonly used types.
At the same time, you are welcome to contribute more commonly used types.
</div>

View File

@@ -52,7 +52,8 @@ The `encase` method can be created in the `onHook` method using two schemes.
YukiHookAPI.encase {
loadApp(name = "com.example.demo") {
"$packageName.DemoClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -67,7 +68,8 @@ YukiHookAPI.encase {
encase {
loadApp(name = "com.example.demo") {
"$packageName.DemoClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -127,7 +129,8 @@ object CustomHooker : YukiBaseHooker() {
override fun onHook() {
loadApp(name = "com.example.demo1") {
"$packageName.DemoClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -135,7 +138,8 @@ object CustomHooker : YukiBaseHooker() {
}
loadApp(name = "com.example.demo2") {
"$packageName.CustomClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -161,7 +165,8 @@ object ChildCustomHooker : YukiBaseHooker() {
override fun onHook() {
"$packageName.DemoClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -179,7 +184,8 @@ object FirstHooker : YukiBaseHooker() {
override fun onHook() {
"$packageName.DemoClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -254,7 +260,8 @@ In `YukiHookAPI`, these functions **are seamless**.
encase {
loadApp(name = "com.example.demo") {
"$packageName.DemoClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -274,7 +281,7 @@ You can also use the `loadZygote` method to load the first event `initZygote` af
```kotlin
encase {
loadZygote {
ActivityClass.hook {
Activity::class.resolve().firstMethod {
// Your code here.
}
// Create a Resources Hook in Zygote
@@ -284,7 +291,8 @@ encase {
}
loadApp(name = "com.example.demo") {
"$packageName.DemoClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -324,7 +332,8 @@ Below are two **error** examples.
encase {
// Wrong usage, can't start Hook directly
"com.example.demo.DemoClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -357,7 +366,8 @@ object CustomHooker : YukiBaseHooker() {
// Wrong method of use
// Because there is no judgment object in the outer layer, you cannot start Hook directly
"com.example.demo.DemoClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -388,7 +398,8 @@ encase {
loadHooker(CustomHooker)
// ✅ Correct usage, Hook in app scope
"com.example.demo.DemoClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -418,7 +429,8 @@ object CustomHooker : YukiBaseHooker() {
// it is necessary to judge the scope of the app before performing Hook
loadApp(/** name parameter optional */) {
"com.example.demo.DemoClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.

View File

@@ -8,6 +8,17 @@ pageClass: hidden-anchor-page
The exception description here will only synchronize the latest API version, and the exception of the older API version will not be described again, please always keep the API version up-to-date.
::: warning
Due to maintenance costs, `YukiHookAPI` will no longer update this document from the `1.3.0` version and there will be no new unspecified exceptions added here.
If you encounter unsolvable problems, you can contact us via [Contact Us](../about/contacts).
The exception of `KavaRef` will be managed separately by itself.
For detailed configuration plans, you can refer to [here](https://highcapable.github.io/KavaRef/en/library/kavaref-core#exception-handling),
which will jump to the `KavaRef` document.
:::
## Non-Blocking Exceptions
> These exceptions will not cause the app to stop running (FC), but will print `E` level logs on the console, and may also stop continuing to execute related functions.

View File

@@ -2,6 +2,14 @@
`YukiHookAPI` has undergone a lot of adjustments since version `1.2.0`, you can read on to see what are the notes and new features.
::: warning
If you are using the YukiHookAPI previous version of `1.2.x`, it is recommended to refer to this document to migrate to the `1.2.x` version first.
If you are using the `1.2.x` version of `YukiHookAPI`, please read directly [Migrate to YukiHookAPI 1.3.x](move-to-api-1-3-x) instead of this document.
:::
## Default Behavior Changes
Since version `1.2.0`, the `isUsingResourcesHook` function in `@InjectYukiHookWithXposed` is no longer enabled by default, please enable it manually if necessary.

View File

@@ -0,0 +1,80 @@
# Migrate to YukiHookAPI 1.3.x
`YukiHookAPI` has deprecated its own reflection API since `1.3.0`, you can read on to see what are the notes and new features.
::: warning
If you are using `1.2.x` and previous versions of `YukiHookAPI`, it is recommended to read [Migrate to YukiHookAPI 1.2.x](move-to-api-1-2-x) instead of this document.
:::
## Self-reflection API Deprecated
`YukiHookAPI` has deprecated its own reflection API since the `1.3.0` version. Now we recommend that all developers move to a brand new development.
[KavaRef](https://github.com/HighCapable/KavaRef), we no longer recommend the reflection API of `YukiHookAPI` itself, which have been marked as deprecated.
Please refer to the migration document [here](https://highcapable.github.io/KavaRef/en/config/migration) which will jump to the `KavaRef` document.
`YukiHookAPI` has now implemented complete decoupling of the reflection API.
The reflection API used by its internal API has also been migrated to `KavaRef` and has been tested stably.
In later versions of `2.0.0`, the self-reflection API will be completely removed,
during which time you will have enough time to learn and migrate to this brand new set of reflection APIs.
## FreeReflection Deprecated
`YukiHookAPI` has deprecated [FreeReflection](https://github.com/tiann/FreeReflection) since the `1.3.0` version and migrated to a maintained by the LSPosed team
[AndroidHiddenApiBypass](https://github.com/LSPosed/AndroidHiddenApiBypass).
When the reflection system hides the API, you cannot reflect directly like before, but need to do some operations.
YukiHookAPI has built-in `AndroidHiddenApiBypassResolver` in `KavaRef`'s third-party Member parser,
and now you can use it like this where you need the reflection system to hide the API.
> The following example
```kotlin
"android.app.ActivityThread".toClass()
.resolve()
// Add a custom Member parser
.processor(AndroidHiddenApiBypassResolver.get())
.firstMethod {
name = "currentActivityThread"
emptyParameters()
}.invoke()
```
::: warning
`AndroidHiddenApiBypassResolver` is a tentative feature and may be migrated to a separate module in the `2.0.0` version,
you can also refer to [Third-party Member Resolvers](https://highcapable.github.io/KavaRef/en/config/processor-resolvers) implement one by yourself,
which will jump to the `KavaRef` document.
:::
## Original Method Call
`Xposed` provides the `XposedBridge.invokeOriginalMethod` function, which can call original methods without a Hook.
Due to deprecation of the self-reflection API, the method `method { ... }.get().original().call(...)` will no longer be available.
So, YukiHookAPI has added an extension to `KavaRef`, and you can still implement this feature now.
`YukiHookAPI` provides the following methods to connect to the original method calls of `KavaRef`.
- `invokeOriginal(...)``invoke(...)`
- `invokeOriginalQuietly(...)``invokeQuietly(...)`
> The following example
```kotlin
// Suppose this is an instance of the Test class
val instance: Any
// Original call to the method using KavaRef
"com.example.Test".toClass()
.resolve()
.firstMethod {
name = "test"
emptyParameters()
}.of(instance).invokeOriginal()
```

View File

@@ -33,7 +33,25 @@ Host Environment
> The above structure can be written in the following form in code.
```kotlin
// New version
// KavaRef
TargetClass.resolve().firstMethod {
// Your code here.
}.hook {
before {
// Your code here.
}
after {
// Your code here.
}
}
```
<details>
<summary>Click to view the previous writing method</summary>
```kotlin
// Old version (1.2.x-1.3.0 (Not included))
TargetClass.method {
// Your code here.
}.hook {
@@ -58,6 +76,11 @@ TargetClass.hook {
}
}
}
```
</details>
```kotlin
// Resources Hook (2.0.0 will be discontinued)
resources().hook {
injectResource {
@@ -83,6 +106,14 @@ Install the Host App and Module App Demo at the same time, and test the hooked f
> Here are examples of Hook App, Hook System Framework and Hook Resources for reference.
::: tip
Starting with version `1.3.0`, YukiHookAPI has moved its own reflection API partially to
[KavaRef](https://github.com/HighCapable/KavaRef), the reflection APIs in the demonstration section below use the `KavaRef` writing method.
We no longer recommend using the `YukiHookAPI`'s own reflection API.
:::
### Hook App
Suppose, we want to hook the `onCreate` method in `com.android.browser` and show a dialog.
@@ -93,10 +124,9 @@ Add code in the body of the `encase` method.
```kotlin
loadApp(name = "com.android.browser") {
ActivityClass.method {
Activity::class.resolve().firstMethod {
name = "onCreate"
param(BundleClass)
returnType = UnitType
parameters(Bundle::class)
}.hook {
after {
AlertDialog.Builder(instance())
@@ -113,17 +143,16 @@ At this point, the `onCreate` method will be successfully hooked and this dialog
So, what should I do if I want to continue the Hook `onStart` method?
We can use Kotlin's `apply` method on `ActivityClass` to create a call space.
We can use Kotlin's `apply` method on `Activity::class.resolve()` to create a call space.
> The following example
```kotlin
loadApp(name = "com.android.browser") {
ActivityClass.apply {
method {
Activity::class.resolve().apply {
firstMethod {
name = "onCreate"
param(BundleClass)
returnType = UnitType
parameters(Bundle::class)
}.hook {
after {
AlertDialog.Builder(instance())
@@ -133,10 +162,9 @@ loadApp(name = "com.android.browser") {
.show()
}
}
method {
firstMethod {
name = "onStart"
emptyParam()
returnType = UnitType
emptyParameters()
}.hook {
after {
// Your code here.
@@ -154,7 +182,8 @@ For example, I want to get `com.example.demo.TestClass`.
```kotlin
"com.example.demo.TestClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -167,7 +196,8 @@ If `com.example.demo` is the app you want to hook, then the writing method can b
```kotlin
"$packageName.TestClass".toClass()
.method {
.resolve()
.firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -187,7 +217,7 @@ val TestClass by lazyClass("com.example.demo.TestClass")
Use it when appropriate.
```kotlin
TestClass.method {
TestClass.resolve().firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -212,10 +242,9 @@ Add code in the body of the `encase` method.
```kotlin
loadZygote {
ActivityClass.method {
Activity::class.resolve().firstMethod {
name = "onCreate"
param(BundleClass)
returnType = UnitType
parameters(Bundle::class)
}.hook {
after {
// Your code here.
@@ -242,12 +271,12 @@ Add code in the body of the `encase` method.
```kotlin
loadSystem {
ApplicationInfoClass.method {
ApplicationInfo::class.resolve().firstMethod {
// Your code here.
}.hook {
// Your code here.
}
PackageInfoClass.method {
PackageInfo::class.resolve().firstMethod {
// Your code here.
}.hook {
// Your code here.
@@ -341,9 +370,9 @@ The first way, save the `Result` instance of the current injected object, and ca
```kotlin
// Set a variable to save the current instance
val hookResult =
method {
resolve().firstMethod {
name = "test"
returnType = UnitType
returnType = Void.TYPE
}.hook {
after {
// ...
@@ -358,9 +387,9 @@ The second method, call `removeSelf` in the Hook callback method to remove itsel
> The following example
```kotlin
method {
resolve().firstMethod {
name = "test"
returnType = UnitType
returnType = Void.TYPE
}.hook {
after {
// Just call the following method directly
@@ -427,7 +456,7 @@ TargetClass.hook {
}
```
You can also handle exceptions when looking up methods.
**(Applicable to older versions)** You can also handle exceptions when looking up methods.
> The following example
@@ -447,6 +476,14 @@ For more functions, please refer to [MemberHookCreator.Result](../api/public/com
Common exceptions that may occur are described here. For more information, please refer to [API Exception Handling](../config/api-exception).
::: warning
The exception of `KavaRef` will be managed separately by itself.
For detailed configuration plans, you can refer to [here](https://highcapable.github.io/KavaRef/en/library/kavaref-core#exception-handling),
which will jump to the `KavaRef` document.
:::
### Throw an Exception
In some cases, you can **manually throw exceptions** to alert some functionality that there is a problem.
@@ -593,7 +630,7 @@ You can also abbreviate the `hook { ... }` method body when you only need a Hook
> The following example
```kotlin
ActivityClass.method {
Activity::class.resolve().firstMethod {
// Your code here.
}.hook().after {
// Your code here.

View File

@@ -22,8 +22,6 @@ Please use Kotlin, the framework part of the code composition is also compatible
All demo code in this document will be described using Kotlin, if you don't know how to use Kotlin then you may not be able to use `YukiHookAPI`.
Part of the Java Demo code can be found [here](https://github.com/HighCapable/YukiHookAPI/tree/master/samples/demo-module/src/main/java/com/highcapable/yukihookapi/demo_module/hook/java), but not recommended.
## Source of Inspiration
Previously, when we built an Xposed Module, we first needed to create an `xposed_init` file under `assets`.
@@ -51,9 +49,9 @@ object HookEntry : IYukiHookXposedInit {
override fun onHook() = encase {
loadZygote {
ActivityClass.method {
Activity::class.resolve().firstMethod {
name = "onCreate"
param(BundleClass)
parameters(Bundle::class)
}.hook {
before {
// Your code here.
@@ -64,9 +62,9 @@ object HookEntry : IYukiHookXposedInit {
}
}
loadApp(name = "com.android.browser") {
ActivityClass.method {
Activity::class.resolve().firstMethod {
name = "onCreate"
param(BundleClass)
parameters(Bundle::class)
}.hook {
before {
// Your code here.
@@ -129,4 +127,12 @@ class HookEntry : IXposedHookZygoteInit, IXposedHookLoadPackage {
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.
Now, with the help of the efficient and powerful `YukiHookAPI`, you can implement a very simple Xposed Module.
::: tip
Starting with version `1.3.0`, `YukiHookAPI` has migrated its own reflection API part to [KavaRef](https://github.com/HighCapable/KavaRef) (including the reflection API part demonstrated above).
Now, you can make the `YukiHookAPI` more easy to use with the powerful reflection ability of `KavaRef`.
:::

View File

@@ -31,9 +31,10 @@ override fun onHook() = encase {
loadApp(name = "com.demo.test") {
// Member Hook
"com.demo.test.TestClass".toClass()
.method {
.resolve()
.firstMethod {
name = "test"
param(BooleanType)
parameters(Boolean::class)
}.hook {
after {
// ...
@@ -268,6 +269,16 @@ Here is a guide to avoid common pitfalls.
Methods like `XposedHelpers.callMethod` and `XposedHelpers.callStaticMethod` automatically search and invoke all public methods (including those in superclasses), which is a feature of native Java reflection. In contrast, the reflection solution provided by `YukiHookAPI` first searches and then calls, and by default, the search process does not automatically look for methods in superclasses.
::: warning
The reflection API of `YukiHookAPI` itself has been deprecated in `1.3.0` version.
The following content is only used as migration guidelines before `1.3.0` version, we will retain it but will not update the content again.
You can migrate to [KavaRef](https://github.com/HighCapable/KavaRef), and this feature is also applicable to `KavaRef`.
:::
For example, class `A` inherits from `B`, and `B` has a public method `test`, while `A` does not.
```java

View File

@@ -2,23 +2,15 @@
> Integrate `YukiHookAPI` into your project.
## Environment Requirements
## Project Requirements
- Windows 7 and above / macOS 10.14 and above / Linux distributions (Arch/Debian)
The project needs to be created using `Android Studio` or `IntelliJ IDEA` and be of type Android project and have integrated Kotlin environment dependencies.
- Android Studio 2021.1 and above
- Android Studio (It is recommended to get the latest version [from here](https://developer.android.com/studio))
- IntelliJ IDEA 2021.1 and above
- IntelliJ IDEA (It is recommended to get the latest version [from here](https://www.jetbrains.com/idea))
- Kotlin 1.7.0 and above
- Android Gradle Plugin 7.0 and above
- Gradle 7.0 and above
- Java 11 and above (Since API `1.0.80`)
- Java 17 and above (Since API `1.2.0`)
- Kotlin 1.9.0+, Gradle 8+, Java 11, 17+, Android Gradle Plugin 8+
## Automatically Build Project
@@ -49,9 +41,6 @@ repositories:
# Must be added when used as an Xposed Module, otherwise optional
rovo89-xposed-api:
url: https://api.xposed.info/
# MavenCentral has a 2-hour cache,
# if the latest version cannot be integrated, please add this
sonatype-oss-releases:
plugins:
# Must be added when used as an Xposed Module, otherwise optional
@@ -72,6 +61,13 @@ libraries:
# Must be added when used as an Xposed Module, otherwise optional
ksp-xposed:
version-ref: <this>::api
# YukiHookAPI version 1.3.0 uses KavaRef as core reflection API
# YukiHookAPI no longer binds its own reflection API, you can start trying to use KavaRef
com.highcapable.kavaref:
kavaref-core:
version: +
kavaref-extension:
version: +
...
```
@@ -97,6 +93,9 @@ Then, deploy dependencies in your project `build.gradle.kts`.
dependencies {
// Basic dependencies
implementation(com.highcapable.yukihookapi.api)
// It is recommended to use KavaRef as the core reflection API
implementation(com.highcapable.kavaref.kavaref.core)
implementation(com.highcapable.kavaref.kavaref.extension)
// Must be added when used as an Xposed Module, otherwise optional
compileOnly(de.robv.android.xposed.api)
// Must be added when used as an Xposed Module, otherwise optional
@@ -104,9 +103,9 @@ dependencies {
}
```
#### Traditional Method
#### Version Catalog
Add repositories in your project `build.gradle.kts` or `build.gradle`.
Add repositories in your project `build.gradle.kts`.
> Kotlin DSL
@@ -116,25 +115,81 @@ repositories {
mavenCentral()
// Must be added when used as an Xposed Module, otherwise optional
maven { url("https://api.xposed.info/") }
// MavenCentral has a 2-hour cache, if the latest version cannot be integrated, please add this URL
maven { url("https://s01.oss.sonatype.org/content/repositories/releases/") }
}
```
> Groovy DSL
Add dependency in your project's `gradle/libs.versions.toml`.
```groovy
> The following example
```toml
[versions]
yukihookapi = "<yuki-version>"
ksp = "<ksp-version>"
kavaref-core = "<kavaref-version>"
kavaref-extension = "<kavaref-version>"
[plugins]
# Must be added when used as an Xposed Module, otherwise optional
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
[libraries]
yukihookapi-api = { module = "com.highcapable.yukihookapi:api", version.ref = "yukihookapi" }
# Must be added when used as an Xposed Module, otherwise optional
yukihookapi-ksp-xposed = { module = "com.highcapable.yukihookapi:ksp-xposed", version.ref = "yukihookapi" }
# YukiHookAPI version 1.3.0 uses KavaRef as core reflection API
# YukiHookAPI no longer binds its own reflection API, you can start trying to use KavaRef
kavaref-core = { module = "com.highcapable.kavaref:kavaref-core", version.ref = "kavaref-core" }
kavaref-extension = { module = "com.highcapable.kavaref:kavaref-extension", version.ref = "kavaref-extension" }
# Must be added when used as an Xposed Module, otherwise optional
xposed-api = { module = "de.robv.android.xposed:api", version = "82" }
```
Next, deploy plugins in your project `build.gradle.kts`.
> Kotlin DSL
```kotlin
plugins {
// Must be added when used as an Xposed Module, otherwise optional
alias(libs.plugins.ksp)
}
```
Then, deploy dependencies in your project `build.gradle.kts`.
> Kotlin DSL
```kotlin
dependencies {
// Basic dependency
implementation(libs.yukihookapi.api)
// It is recommended to use KavaRef as the core reflection API
implementation(libs.kavaref.core)
implementation(libs.kavaref.extension)
// Must be added when used as an Xposed Module, otherwise optional
compileOnly(libs.xposed.api)
// Must be added when used as an Xposed Module, otherwise optional
ksp(libs.yukihookapi.ksp.xposed)
}
```
#### Traditional Method
Add repositories in your project `build.gradle.kts`.
> Kotlin DSL
```kotlin
repositories {
google()
mavenCentral()
// Must be added when used as an Xposed Module, otherwise optional
maven { url 'https://api.xposed.info/' }
// MavenCentral has a 2-hour cache, if the latest version cannot be integrated, please add this URL
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' }
maven { url("https://api.xposed.info/") }
}
```
Add plugins in your project `build.gradle.kts` or `build.gradle`.
Add plugins in your project `build.gradle.kts`.
> Kotlin DSL
@@ -145,16 +200,7 @@ plugins {
}
```
> Groovy DSL
```groovy
plugins {
// Must be added when used as an Xposed Module, otherwise optional
id 'com.google.devtools.ksp' version '<ksp-version>'
}
```
Add dependencies in your project `build.gradle.kts` or `build.gradle`.
Add dependencies in your project `build.gradle.kts`.
> Kotlin DSL
@@ -162,6 +208,9 @@ Add dependencies in your project `build.gradle.kts` or `build.gradle`.
dependencies {
// Basic dependency
implementation("com.highcapable.yukihookapi:api:<yuki-version>")
// It is recommended to use KavaRef as the core reflection API
implementation("com.highcapable.kavaref:kavaref-core:<kavaref-version>")
implementation("com.highcapable.kavaref:kavaref-extension:<kavaref-version>")
// Must be added when used as an Xposed Module, otherwise optional
compileOnly("de.robv.android.xposed:api:82")
// Must be added when used as an Xposed Module, otherwise optional
@@ -169,29 +218,16 @@ dependencies {
}
```
> Groovy DSL
```groovy
dependencies {
// Basic dependency
implementation 'com.highcapable.yukihookapi:api:<yuki-version>'
// Must be added when used as an Xposed Module, otherwise optional
compileOnly 'de.robv.android.xposed:api:82'
// Must be added when used as an Xposed Module, otherwise optional
ksp 'com.highcapable.yukihookapi:ksp-xposed:<yuki-version>'
}
```
Please modify **&lt;ksp-version&gt;** to the latest version found [here](https://github.com/google/ksp/releases) **(please note to select your current corresponding Kotlin version)**.
Please change **&lt;yuki-version&gt;** to the latest version [here](../about/changelog).
Please change **&lt;kavaref-version&gt;** to the latest version [here](https://highcapable.github.io/KavaRef/en/about/changelog).
:::danger
The **api** and **ksp-xposed** dependency versions of **YukiHookAPI** must correspond one-to-one, otherwise a version mismatch error will occur.
We recommend using [SweetDependency](https://github.com/HighCapable/SweetDependency) to autowire dependencies for you.
:::
#### Configure Java Version

View File

@@ -4,22 +4,22 @@ The following are the related functions, Xposed Frameworks, Hook Frameworks and
> Basic Functions
| Name | ST | Description |
| -------------------------- | --- | ------------------------------------------------------------------------------------------------------------------ |
| Name | ST | Description |
| -------------------------- | --- | ----------------------------------------------------------------------------------------------------------------------- |
| Xposed Module Auto Builder | ✅ | Will use [New Xposed Module Config Plan](https://github.com/HighCapable/YukiHookAPI/issues/49) on `YukiHookAPI` `2.0.0` |
| ART Dynamic Method Hook | ✅ | Stable use in multiple scenarios |
| Xposed Resources Hook | ❗ | Supported, but will be deprecated on `YukiHookAPI` `2.0.0` |
| ART Dynamic Method Hook | ✅ | Stable use in multiple scenarios |
| Xposed Resources Hook | ❗ | Supported, but will be removed on `YukiHookAPI` `2.0.0` |
> Extended Functions
| Name | ST | Description |
| -------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------------------------------------------ |
| [Reflection Extensions](../api/special-features/reflection) | | Will be merge into [YukiReflection](https://github.com/HighCapable/YukiReflection) on `YukiHookAPI` `2.0.0` |
| [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 |
| Name | ST | Description |
| -------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| ~~[Reflection Extensions](../api/special-features/reflection)~~ | | Completely deprecated, recommended to migrate to [KavaRef](https://github.com/HighCapable/KavaRef), planned `YukiHookAPI` `2.0.0` version removed |
| [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

View File

@@ -29,9 +29,9 @@ footer: Apache-2.0 License | Copyright (C) 2019 HighCapable
```kotlin
loadApp(name = "com.android.browser") {
ActivityClass.method {
Activity::class.resolve().firstMethod {
name = "onCreate"
param(BundleClass)
parameters(Bundle::class)
}.hook {
before {
// Your code here.

View File

@@ -34,7 +34,9 @@ LSPosed 现已实验性推出了 [Modern Xposed API](https://github.com/libxpose
那么这里有一个好消息要告诉你:
`YukiHookAPI` 的核心反射 API 已被解耦合为 [YukiReflection](https://github.com/HighCapable/YukiReflection) 项目,它现在能在任何 Android 项目中使用。
~~`YukiHookAPI` 的核心反射 API 已被解耦合为 [YukiReflection](https://github.com/HighCapable/YukiReflection) 项目,它现在能在任何 Android 项目中使用。~~
`YukiReflection` 项目由于很多未能解决的黑盒问题已被弃用,我们不再推荐任何人使用它,现在请迁移到全新设计的 [KavaRef](https://github.com/HighCapable/KavaRef)。
::: tip 待讨论
@@ -52,4 +54,4 @@ API 已经提供了 Xposed 原生 API 监听接口,你可以 [在这里](../co
- [New Xposed Module Config Plan](https://github.com/HighCapable/YukiHookAPI/issues/49)
- [New Hook Entry Class](https://github.com/HighCapable/YukiHookAPI/issues/48)
- [New Hook Code Style](https://github.com/HighCapable/YukiHookAPI/issues/33)
- ~~[New Hook Code Style](https://github.com/HighCapable/YukiHookAPI/issues/33)~~ (已由 [KavaRef](https://github.com/HighCapable/KavaRef) 取代)

View File

@@ -8,6 +8,12 @@ next:
> 这里的文档将同步最新 API 版本的相关用法,请保持 `YukiHookAPI` 为最新版本以使用最新版本的功能。
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档,如遇到无法解决的问题,你可以通过 [联系我们](../about/contacts) 与我们联系。
:::
## 功能描述说明
> 功能描述主要介绍当前 API 的相关用法和用途。

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# YukiHookAPI <span class="symbol">- object</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# InjectYukiHookWithXposed <span class="symbol">- annotation</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# CurrentClass <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# GenericClass <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# HookClass <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# VariousClass <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# YukiMemberHookCreator <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# YukiResourcesHookCreator <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# ExecutorType <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# YukiHookPriority <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# BaseFinder <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# CountRules <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# ModifierRules <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# NameRules <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# ObjectRules <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# DexClassFinder <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# ConstructorRules <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# FieldRules <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# MemberRules <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# MethodRules <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# MemberRulesResult <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# ConstructorFinder <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# FieldFinder <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# MethodFinder <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# YukiBaseHooker <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# ReflectionFactory <span class="symbol">- kt</span>
**变更记录**

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# YukiHookFactory <span class="symbol">- kt</span>
**变更记录**

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# YLog <span class="symbol">- object</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# YLogData <span class="symbol">- class</span>
```kotlin:no-line-numbers

View File

@@ -2,6 +2,12 @@
pageClass: code-page
---
::: warning
由于维护成本,`YukiHookAPI``1.3.0` 版本开始将不再会对此文档进行更新且在 `2.0.0` 版本切换为 Dokka 插件自动生成的 API 文档。
:::
# HookParam <span class="symbol">- class</span>
```kotlin:no-line-numbers

Some files were not shown because too many files have changed in this diff Show More