Update version to 1.1.5

This commit is contained in:
2023-01-13 04:16:13 +08:00
parent d4d26645be
commit 2badbeea6c
6 changed files with 97 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
# Yuki Hook API
![Blank](https://img.shields.io/badge/license-MIT-blue)
![Blank](https://img.shields.io/badge/version-v1.1.4-green)
![Blank](https://img.shields.io/badge/version-v1.1.5-green)
[![Telegram](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/YukiHookAPI)
<br/><br/>
<img src="https://github.com/fankes/YuKiHookAPI/blob/master/img-src/icon.png?raw=true" width = "100" height = "100"/>

View File

@@ -1,7 +1,7 @@
# Yuki Hook API
![Blank](https://img.shields.io/badge/license-MIT-blue)
![Blank](https://img.shields.io/badge/version-v1.1.4-green)
![Blank](https://img.shields.io/badge/version-v1.1.5-green)
[![Telegram](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/YukiHookAPI)
<br/><br/>
<img src="https://github.com/fankes/YuKiHookAPI/blob/master/img-src/icon.png?raw=true" width = "100" height = "100"/>

View File

@@ -10,7 +10,7 @@ ext {
devUser = "fankesyooni"
userEmail = "qzmmcn@163.com"
groupId = "com.highcapable.yukihookapi"
apiVersion = "1.1.4"
apiVersion = "1.1.5"
repoName = "YukiHookAPI"
repoDescription = "An efficient Hook API and Xposed Module solution built in Kotlin."
licenceName = "MIT License"

View File

@@ -16,7 +16,49 @@ Time zone of version release date: **UTC+8**
:::
### 1.1.4 | 2022.10.04 &ensp;<Badge type="tip" text="latest" vertical="middle" />
### 1.1.5 | 2023.01.13 &ensp;<Badge type="tip" text="latest" vertical="middle" />
- Standardize and optimize the overall code style
- Privatized some APIs called internally
- The underlying API interface is decoupled as a whole to prepare for compatibility with more Hook Frameworks
- Move some of the functions integrated in the API to `ksp-xposed` dependencies (decoupling), and the separate introduction of `api` dependencies will no longer contain references to functions such as third-party libraries
- Documentation [Quick Start](../guide/quick-start) page added instructions on when `YukiHookAPI.Configs.isDebug` needs to be closed
- Standardize Java Primitive Types in type definitions and sync update to docs
- Java `type` adds `NumberClass` type
- Improved (Xposed) Host environment recognition
- Take over all exceptions after loading the Xposed Module, if an exception occurs, it will automatically intercept and print the error log
- Modify the `Class` that does not exist in the lower Android system version (Android 5.0) in the type definition to be an empty safe type
- Adapt and support native Xposed, the minimum recommended version is Android 7.0
- Added support for Hook entry class declared as `object` type (singleton)
- Fixed the problem that the system below Android 8 does not support the `Executable` type, causing the Hook to fail
- Fixed the problem of reporting an error when using the `Activity` proxy function for systems below Android 9 and limit the minimum supported version of this function to Android 7.0
- Added the prohibition of resource injection and `Activity` proxy function injection into the current module's own instance process to prevent problems
- Fixed a serious error that the return value of a method in the Hook process is not consistent with the target's inherited class and interface.
- Fixed the problem that the object is empty when calling `HookParam.callOriginal` and `HookParam.invokeOriginal` when the current Hook instance object is static
- Optimize the function of judging the Tai Chi activation method and update the relevant instructions of the document synchronously
- Obsolete ~~`YukiHookAPI.Status.executorName`~~, ~~`YukiHookAPI.Status.executorVersion`~~, please move to `YukiHookAPI.Status.Executor`
- Adapted the `YukiHookAPI.Status.Executor.name` name display function of some third-party Hook Frameworks
- Added `Class.extends`, `Class.implements` and other methods, which can more conveniently judge the inheritance and interface relationship of the current `Class`
- Added generic methods of the same name as `Class.toClass`, `Class.toClassOrNull` and other related methods, you can use generics to constrain the instance object type of known `Class`
- Modify the return value of the `classOf<T>` method to the generic type `T` to constrain the instance object type of the known `Class`
- Added `initialize` parameter of `Class` related extension method, which can control whether to initialize its static method block at the same time when getting `Class` object
- Added `param { ... }`, `type { ... }` and other usages in the variable, method, and construction method search functions, which can add more specific conditional judgments to the searched objects
- The `loadApp` method of `PackageParam` adds the `isExcludeSelf` parameter, which can be used to exclude Hook-related functions from injecting into the module's own instance process
- The `onAppLifecycle` method of `PackageParam` adds the `isOnFailureThrowToApp` parameter, which can directly throw the exception that occurs in the lifecycle method body to the host
- Modify `appClassLoader` in `PackageParam` to be a modifiable variable, which can dynamically set the `ClassLoader` used by the host in the Hook process
- Added `dataExtra` function in `HookParam`, which can be used to temporarily store the data in the Hook method body
- Obsolete ~~`isRunInNewXShareMode`~~, ~~`isXSharePrefsReadable`~~ in `YukiHookModulePrefs`, merged into `isPreferencesAvailable`
- `Class.allFields`, `Class.allMethods` and other related methods add the `isAccessible` parameter, which can control when the member object can be set as an accessible type
- Fixed the problem that only the last method body will be called back when receiving the same key-value data in an Activity when there are multiple hosts in `YukiHookDataChannel`
- Added `priority` parameter in `wait` and other related methods of `YukiHookDataChannel`, you can pass in `ChannelPriority` to customize the conditions for callback data results
- `YukiHookDataChannel` adds the function of automatically using `ChannelDataWrapper` type wrapper when sending data, which improves the user experience and enhances data protection
- `YukiHookDataChannel` has added the function of limiting the maximum byte size of data sent at one time to prevent the app from crashing due to excessive data
- `YukiHookDataChannel` has added the function of automatically segmenting when the sent data is too large, only supports `List`, `Map`, `Set`, `String` types
- `YukiHookLogger` adds the `contents` method and the `data` parameter of `saveToFile`, which can be passed in custom debug log data for formatting or saving to a file
- Fixed the problem that the debug log data package name processed by `YukiHookLogger` may be incorrect in the (Xposed) Host environment
- Fixed the problem that the package name may be incorrect on some systems (in some system apps) when the Xposed Module loads the Resource Hook event
### 1.1.4 | 2022.10.04 &ensp;<Badge type="warning" text="stale" vertical="middle" />
- Fixed the issue that `YukiHookDataChannel` may not respond to broadcast events in the system framework, reproduced in A13
- Fixed the issue that `YukiHookDataChannel` could not communicate with Module App in Host App for multiple versions
@@ -31,7 +73,7 @@ Time zone of version release date: **UTC+8**
- Fixed a fatal bug where the Hook entry class name could not be customized
- Added some code notes in `LoggerFactory` and updated special features documentation
### 1.1.2 | 2022.09.30 &ensp;<Badge type="warning" text="stale" vertical="middle" />
### 1.1.2 | 2022.09.30 &ensp;<Badge type="danger" text="outdate" vertical="middle" />
- Documentation [Basic Knowledge](../guide/knowledge) page add a friend link to the English version
- Fixed `YukiBaseHooker` comments in English code note link errors
@@ -41,13 +83,13 @@ Time zone of version release date: **UTC+8**
- Added `YukiLoggerData` real-time log data class, you can get the log array in real time through `YukiHookLogger.inMemoryData`
- Added `ClassLoader.listOfClasses` method, which can directly get all `Class` in the current `Dex`
### 1.1.1 | 2022.09.28 &ensp;<Badge type="warning" text="stale" vertical="middle" />
### 1.1.1 | 2022.09.28 &ensp;<Badge type="danger" text="outdate" vertical="middle" />
- Fixed the problem of wrong document friend links in [Basic Knowledge](../guide/knowledge) page
- Fixed document `favicon` not showing up
- Fixed bug in `DexClassFinder` search conditions
### 1.1.0 | 2022.09.28 &ensp;<Badge type="warning" text="stale" vertical="middle" />
### 1.1.0 | 2022.09.28 &ensp;<Badge type="danger" text="outdate" vertical="middle" />
- This is a major version update, please refer to [API Document](../api/home) and [Special Features](../api/special-features/reflection) for the changes and usage mentioned in the changelog
- Change the help documentation framework to [VuePress](https://v2.vuepress.vuejs.org)

View File

@@ -8,7 +8,49 @@
:::
### 1.1.4 | 2022.10.04 &ensp;<Badge type="tip" text="最新" vertical="middle" />
### 1.1.5 | 2023.01.13 &ensp;<Badge type="tip" text="最新" vertical="middle" />
- 规范并优化整体代码风格
- 对部分内部调用的 API 进行了私有化处理
- 底层 API 接口整体解耦合,为兼容更多 Hook Framework 做准备
- 将部分集成于 API 中的功能移动到 `ksp-xposed` 依赖 (解耦合),单独引入 `api` 依赖将不再包含第三方库等功能的引用
- 文档 [快速开始](../guide/quick-start) 页面加入 `YukiHookAPI.Configs.isDebug` 何时需要关闭的说明
- 规范类型定义中的 Java 原始类型 (Primitive Type) 并同步更新到文档
- Java `type` 新增 `NumberClass` 类型
- 改进了 (Xposed) 宿主环境的识别能力
- 接管了 Xposed 模块装载后的全部异常,若发生异常将会自动拦截并打印错误日志
- 修改类型定义中较低 Android 系统版本 (Android 5.0) 中不存在的 `Class` 为空安全类型
- 适配并支持原生 Xposed最低推荐版本为 Android 7.0
- Hook 入口类新增支持声明为 `object` 类型 (单例)
- 修复 Android 8 以下系统不支持 `Executable` 类型导致 Hook 失效的问题
- 修复 Android 9 以下系统在使用 `Activity` 代理功能时报错问题并限制此功能最低支持版本为 Android 7.0
- 新增禁止资源注入与 `Activity` 代理功能注入当前模块自身实例进程,防止发生问题
- 修复一个 Hook 过程中方法返回值的对象是目标的继承类和接口时被识别为返回值不符的严重错误
- 修复在当前 Hook 的实例对象是静态的情况下调用 `HookParam.callOriginal``HookParam.invokeOriginal` 出现对象为空问题
- 优化对太极激活方法相关判断功能以及同步更新文档相关说明
- 作废了 ~~`YukiHookAPI.Status.executorName`~~、~~`YukiHookAPI.Status.executorVersion`~~,请转移到 `YukiHookAPI.Status.Executor`
- 适配了一些第三方 Hook Framework 的 `YukiHookAPI.Status.Executor.name` 名称显示功能
- 新增 `Class.extends``Class.implements` 等方法,可更加方便地判断当前 `Class` 的继承与接口关系
- 新增 `Class.toClass``Class.toClassOrNull` 等相关方法的同名泛型方法,可使用泛型来约束已知 `Class` 的实例对象类型
- 修改 `classOf<T>` 方法的返回值为泛型 `T`,以约束已知 `Class` 的实例对象类型
- 新增 `Class` 相关扩展方法的 `initialize` 参数,可控制在得到 `Class` 对象时是否同时初始化其静态方法块
- 变量、方法、构造方法查找功能中新增 `param { ... }``type { ... }` 等用法,可对查找的对象增加更加具体的条件判断
- `PackageParam``loadApp` 方法新增 `isExcludeSelf` 参数,可用于排除 Hook 相关功能注入模块自身实例进程
- `PackageParam``onAppLifecycle` 方法新增 `isOnFailureThrowToApp` 参数,可将生命周期方法体内发生的异常直接抛给宿主
- 修改 `PackageParam` 中的 `appClassLoader` 为可修改变量,可在 Hook 过程中动态设置宿主使用的 `ClassLoader`
- `HookParam` 中新增 `dataExtra` 功能,可用于临时存储 Hook 方法体中的数据
- 作废 `YukiHookModulePrefs` 中的 ~~`isRunInNewXShareMode`~~、~~`isXSharePrefsReadable`~~,统一合并到 `isPreferencesAvailable`
- `Class.allFields``Class.allMethods` 等相关方法新增 `isAccessible` 参数,可控制成员对象何时可被设置为可访问类型
- 修复 `YukiHookDataChannel` 存在多个宿主时在一个 `Activity` 中接收相同键值数据时仅会回调最后一个方法体的问题
- `YukiHookDataChannel``wait` 等相关方法中新增 `priority` 参数,可传入 `ChannelPriority` 来自定义回调数据结果的条件
- `YukiHookDataChannel` 新增发送数据时自动使用 `ChannelDataWrapper` 类型包装功能,提升使用体验并增强数据保护
- `YukiHookDataChannel` 新增限制一次性发送数据的最大字节大小功能,防止数据过大造成 APP 崩溃
- `YukiHookDataChannel` 新增发送数据过大时自动分段发送功能,仅支持 `List``Map``Set``String` 类型
- `YukiHookLogger` 新增 `contents` 方法与 `saveToFile``data` 参数,可传入自定义的调试日志数据进行格式化或保存到文件
- 修复 `YukiHookLogger` 处理后的调试日志数据包名可能在 (Xposed) 宿主环境不正确的问题
- 修复 Xposed 模块装载资源钩子 (Resources Hook) 事件时在部分系统上 (部分系统 APP 中) 包名可能不正确的问题
### 1.1.4 | 2022.10.04 &ensp;<Badge type="warning" text="过旧" vertical="middle" />
- 修复 `YukiHookDataChannel` 可能不能响应系统框架中响应广播事件的问题,在 Android 13 中复现
- 修复 `YukiHookDataChannel` 长达多个版本在 (Xposed) 宿主环境无法与模块通讯的问题
@@ -23,7 +65,7 @@
- 修复一个无法自定义 Hook 入口类名的致命错误
- 添加 `LoggerFactory` 中的部分代码注释文案并更新特色功能文档
### 1.1.2 | 2022.09.30 &ensp;<Badge type="warning" text="过" vertical="middle" />
### 1.1.2 | 2022.09.30 &ensp;<Badge type="danger" text="过" vertical="middle" />
- 文档 [基础知识](../guide/knowledge) 页面新增 English 版本友情链接
- 修复 `YukiBaseHooker` 注释中的 English 文档链接错误问题
@@ -33,13 +75,13 @@
- 新增 `YukiLoggerData` 实时日志数据类,可实时通过 `YukiHookLogger.inMemoryData` 获取日志数组
- 新增 `ClassLoader.listOfClasses` 方法,可直接获取当前 `Dex` 中的全部 `Class`
### 1.1.1 | 2022.09.28 &ensp;<Badge type="warning" text="过" vertical="middle" />
### 1.1.1 | 2022.09.28 &ensp;<Badge type="danger" text="过" vertical="middle" />
- 修复了文档 [基础知识](../guide/knowledge) 页面友情链接错误的问题
- 修复了文档 `favicon` 不显示的问题
- 修复 `DexClassFinder` 查找条件中的 BUG
### 1.1.0 | 2022.09.28 &ensp;<Badge type="warning" text="过" vertical="middle" />
### 1.1.0 | 2022.09.28 &ensp;<Badge type="danger" text="过" vertical="middle" />
- 这是一次大版本更新,有关更新日志中提到的变化及用法请参考 [API 文档](../api/home) 以及 [特色功能](../api/special-features/reflection)
- 更换帮助文档框架到 [VuePress](https://v2.vuepress.vuejs.org)

View File

@@ -80,10 +80,10 @@ object YukiHookAPI {
internal var isLoadedFromBaseContext = false
/** 获取当前 [YukiHookAPI] 的版本 */
const val API_VERSION_NAME = "1.1.4"
const val API_VERSION_NAME = "1.1.5"
/** 获取当前 [YukiHookAPI] 的版本号 */
const val API_VERSION_CODE = 38
const val API_VERSION_CODE = 39
/**
* 当前 [YukiHookAPI] 的状态