YukiHook 1.5.0 Released
- This is a major update, the project has been officially renamed to YukiHook and is now published as multiple modules, please refer to Migration to YukiHook 1.5.x for details
- All modules are released with a unified version, and the
groupIdof the dependencies and the package name of the code are stillcom.highcapable.yukihookapi - Added yukihook-bom for unified version management of all modules
- Added the base modules yukihook-runtime-libxposed and yukihook-runtime-xposed82 for libxposed API and Xposed Framework API, only one of them can be added to a build variant
- Existing Xposed modules can keep running on their existing hook frameworks with yukihook-runtime-xposed82, its
AndroidManifest.xmlalready declaresxposedmoduleandxposedminversion - yukihook-runtime-libxposed supports remote
SharedPreferences, shared files, the module scope and module hot reload - Added the extension module yukihook-extension-kavaref for using KavaRef related features in YukiHook, you need to add the KavaRef dependencies yourself
yukihook-bom
- The first version is submitted to Maven
yukihook-core
- ⚠️ Breaking Change: Renamed the
apidependency to yukihook-core, it now needs yukihook-compiler and one base module to work - ⚠️ Breaking Change: Removed Resources Hook,
resources().hook { ... }is no longer available - ⚠️ Breaking Change: Removed the own reflection API deprecated in version
1.3.0and old hook styles such asinjectMember, please migrate to KavaRef now - ⚠️ Breaking Change:
onXposedEventandYukiXposedEventare no longer called, please useregisterFrameworkEventsprovided by the base module now - ⚠️ Breaking Change:
loadAppnow throws an exception whenandroidorsystemis mixed into its multiple package names, please useloadSystemnow - ⚠️ Breaking Change: KavaRef related hook functions and
String.toClass,VariousClass.toClassandlazyClasshave been moved to yukihook-extension-kavaref - ⚠️ Breaking Change:
AndroidHiddenApiBypassResolverhas been moved to yukihook-extension-kavaref andAndroidHiddenApiBypassResolver.get()has been removed, please create its instance directly now - ⚠️ Breaking Change: Removed
ExecutorType,YukiHookAPI.Status.Executor.typecan no longer be used, please useYukiHook.Status.Executor.nameto get the name of the hook framework now - ⚠️ Breaking Change:
throwToHostOnFailurenow only applies to the callback it is set on, it no longer applies to bothbeforeandafter - Deprecated
, please useYukiHookAPIYukiHooknow - Deprecated
and@InjectYukiHookWithXposed, please use the entry annotation of your base module andIYukiHookXposedInitYukiHookXposedModulenow - Deprecated
, please useYukiHookAPI.configsYukiHook.configurenow, all config properties have also been renamed - Deprecated
,prefsandYukiHookPrefsBridge, please usePrefsDatapreferences,YukiHookPreferencesandPreferenceDatanow - Deprecated
,onAppLifecycleandregisterModuleAppActivities, please useinjectModuleAppResourcesregisterAppLifecycle,registerModuleActivitiesandinjectModuleResourcesnow - Deprecated
andloadZygote, they are now only available in yukihook-runtime-xposed82YukiHook.encase(baseContext) - Deprecated many old functions in
HookParamand hook callbacks, please use new functions such asarg,firstArg,lastArg,interceptandthrowToHostnow - Added chain hooks, you can use
interceptandHookChainto continue the chain withproceed, when an exception occurs in the callback, the invocation continues as if this hook did not exist by default, and you can also usethrowToHostOnFailureto throw the exception to the caller interceptof classic hooks now returnsHookCallback, you can usethrowToHostOnFailureto throw exceptions to the host, andthrowToHostnow also takes effect inintercept- Added
Handle.replaceto replace registered callbacks without hooking again - Added hooking static initializers, deoptimizing, and calling functions such as
invokeSpecial,newInstanceOriginalandnewInstanceSpecial - Added
withApplicationReadyto run code when theApplicationof the host is available, it is called again after the module hot reloads - Added the
exportedparameter toregisterReceiverinAppLifecycle, the receivers are unregistered and registered again automatically when the module hot reloads - Added
PackageParam.ModuleSpecfeatures such asmodule.resourcesandmodule.sourceDirto get information about the current module - Added
YukiHookSharedFilesto share files between the module and hosts - Added
YukiHookModuleScopeto query and request the scope of the module in the module - Added module hot reload, together with
YukiHookModuleReload,registerModuleLifecycleandremember - Added
YukiHook.Status.observeFrameworkServiceandYukiHook.Status.runtime - Added a set of Lint Rules to find wrong API calls at compile time
- Fixed an issue where the original method ran twice when it threw an exception itself while being called after an exception occurred in the
interceptcallback - Fixed an issue where exceptions in
onInitin the module process were not printed - Adjusted the exception handling, it now only protects the host and not the module, exceptions in the module process are thrown directly while internal exceptions in the host process are still printed to the log
yukihook-compiler
- ⚠️ Breaking Change: Renamed the
ksp-xposeddependency to yukihook-compiler - ⚠️ Breaking Change: Removed the
sourcePathparameter, entry and configuration files are now generated in the build directory for each build variant, and the build is rejected when these files exist in the source directory - Added processing of the
@YukiHookLibXposedEntryand@YukiHookXposed82Entryentry annotations, and checks whether the entry annotation matches the base module - Added generating
java_init.list,module.prop,scope.listandnative_init.listinMETA-INF/xposedfor libxposed API
yukihook-extension-kavaref
- The first version is submitted to Maven
yukihook-runtime-libxposed
- The first version is submitted to Maven
yukihook-runtime-xposed82
- The first version is submitted to Maven
For more details, please check the changelog.
YukiHook 1.5.0 已发布
- 这是一次重大更新,项目正式更名为 YukiHook,并拆分为多个模块进行发布,详情请参考 迁移至 YukiHook 1.5.x
- 全部模块采用统一版本发布,依赖的
groupId与代码的包名依然为com.highcapable.yukihookapi - 新增 yukihook-bom,用于统一管理全部模块的版本
- 新增底座模块 yukihook-runtime-libxposed 与 yukihook-runtime-xposed82,分别对接 libxposed API 与 Xposed Framework API,一个构建变体中只能引入其中一个
- 原有的 Xposed 模块可以使用 yukihook-runtime-xposed82 继续运行在原有的 Hook 框架上,它的
AndroidManifest.xml已声明xposedmodule与xposedminversion - yukihook-runtime-libxposed 支持 Remote
SharedPreferences、共享文件、模块作用域以及模块热重载 - 新增扩展模块 yukihook-extension-kavaref,用于在 YukiHook 中使用 KavaRef 的相关功能,KavaRef 的依赖需要自行引入
yukihook-bom
- 首个版本提交至 Maven
yukihook-core
- ⚠️ 破坏性更新:原
api依赖更名为 yukihook-core,现在需要同时引入 yukihook-compiler 与一个底座模块才能工作 - ⚠️ 破坏性更新:移除了 Resources Hook,
resources().hook { ... }已不再可用 - ⚠️ 破坏性更新:移除了在
1.3.0版本中弃用的自身反射 API 以及injectMember等旧版 Hook 写法,现在请迁移到 KavaRef - ⚠️ 破坏性更新:
onXposedEvent与YukiXposedEvent已不再被回调,现在请使用底座模块提供的registerFrameworkEvents - ⚠️ 破坏性更新:在
loadApp的多个包名中混入android或system时将抛出异常,现在请使用loadSystem - ⚠️ 破坏性更新:KavaRef 相关的 Hook 方法以及
String.toClass、VariousClass.toClass、lazyClass已迁移至 yukihook-extension-kavaref - ⚠️ 破坏性更新:
AndroidHiddenApiBypassResolver已迁移至 yukihook-extension-kavaref,并移除了AndroidHiddenApiBypassResolver.get(),现在请直接创建它的实例 - ⚠️ 破坏性更新:移除了
ExecutorType,YukiHookAPI.Status.Executor.type已无法使用,现在请使用YukiHook.Status.Executor.name获取 Hook 框架的名称 - ⚠️ 破坏性更新:
throwToHostOnFailure现在只对设置它的回调生效,不再同时作用于before与after - 弃用了
,现在请使用YukiHookAPIYukiHook - 弃用了
、@InjectYukiHookWithXposed,现在请使用与底座模块对应的入口注解以及IYukiHookXposedInitYukiHookXposedModule - 弃用了
,现在请使用YukiHookAPI.configsYukiHook.configure,全部配置项也已重新命名 - 弃用了
、prefs、YukiHookPrefsBridge,现在请使用PrefsDatapreferences、YukiHookPreferences、PreferenceData - 弃用了
、onAppLifecycle、registerModuleAppActivities,现在请使用injectModuleAppResourcesregisterAppLifecycle、registerModuleActivities、injectModuleResources - 弃用了
、loadZygote,它们现在仅在 yukihook-runtime-xposed82 中可用YukiHook.encase(baseContext) - 弃用了
HookParam与 Hook 回调中的大量旧版方法,现在请使用arg、firstArg、lastArg、intercept、throwToHost等新的方法 - 新增链式 Hook,可以使用
intercept与HookChain通过proceed继续执行调用链,回调中发生异常时默认将按照此 Hook 不存在的方式继续调用,你也可以使用throwToHostOnFailure将异常抛给调用方 - 经典 Hook 的
intercept现在会返回HookCallback,可以使用throwToHostOnFailure将异常抛给宿主,throwToHost现在也会在intercept中生效 - 新增
Handle.replace,可以在不重新 Hook 的情况下替换已注册的回调 - 新增 Hook 静态初始化、解除内联化以及
invokeSpecial、newInstanceOriginal、newInstanceSpecial等调用方法 - 新增
withApplicationReady,可以在宿主的Application可用时执行代码,模块热重载后会再次回调 AppLifecycle中的registerReceiver新增exported参数,模块热重载时将自动注销并重新注册- 新增
module.resources、module.sourceDir等PackageParam.ModuleSpec功能,用于获取当前模块的信息 - 新增
YukiHookSharedFiles,可以在模块与宿主之间共享文件 - 新增
YukiHookModuleScope,可以在模块中查询与请求模块的作用域 - 新增模块热重载功能,以及
YukiHookModuleReload、registerModuleLifecycle与remember - 新增
YukiHook.Status.observeFrameworkService、YukiHook.Status.runtime - 新增一套 Lint 静态检查规范,可以在编译期发现错误的 API 调用
- 修复
intercept回调发生异常后调用原始方法时,原始方法自身抛出异常会导致其被执行两次的问题 - 修复模块进程中
onInit发生的异常不会被打印的问题 - 调整异常处理方案,现在只会保护宿主而不会保护模块,模块进程中发生的异常将直接抛出,宿主进程中的内部异常仍会被打印到日志
yukihook-compiler
- ⚠️ 破坏性更新:原
ksp-xposed依赖更名为 yukihook-compiler - ⚠️ 破坏性更新:移除了
sourcePath参数,入口文件与配置文件现在会按照每个构建变体生成在构建目录中,源码目录中存在这些文件时将拒绝构建 - 新增对
@YukiHookLibXposedEntry与@YukiHookXposed82Entry入口注解的处理,并会检查入口注解与底座模块是否匹配 - 新增为 libxposed API 生成
META-INF/xposed中的java_init.list、module.prop、scope.list与native_init.list
yukihook-extension-kavaref
- 首个版本提交至 Maven
yukihook-runtime-libxposed
- 首个版本提交至 Maven
yukihook-runtime-xposed82
- 首个版本提交至 Maven
详情请查看更新日志。