Repository navigation
YukiHook 1.5.1 Released
- Added a YukiHook Agent Skill to guide AI coding assistants through module setup, API usage and migration. See Agent Skills for details
yukihook-core
⚠️ Breaking Change: Editing the module's shared preferences in a host now throwsUnsupportedOperationException. CheckisWritablebefore editing⚠️ Breaking Change:ModulePreferenceFragment.onCreatePreferencesis now final andonCreatePreferencesInModuleApphas been removed. Move your initialization code toonPreferencesReady⚠️ Breaking Change:Method.invokeSpecial<T>()now returnsT?. Handle possiblenullresults⚠️ Breaking Change: UsehookAllByMemberfrom Java to callCollection<Member>.hookAllwith a configuration block. Kotlin callers only need to recompile- Debug logs now consistently show the process name. Deprecated
andYLog.Config.PACKAGE_NAME, please useYLogData.packageNameYLog.Config.PROCESS_NAMEandYLogData.processNamenow - Shared preferences now use temporary in-memory storage when unavailable. These changes are lost when the process exits and are never written back when persistent storage becomes available. Check
isAvailablebefore relying on persistent storage - Added
Fragment.dataChannelandFragment.systemDataChannelso fragments in the sameActivitycan listen to the same key independently. Listeners are removed when their views are destroyed - The data channel now delivers messages to the most recently resumed module
Activityin each task, including tasks in the background - Added
ArgumentEditor.getOrNull<T>()for classic hooks to returnnullwhen the argument is missing or its type does not match - Added
argOrNull,firstArgOrNullandlastArgOrNullfor safely reading optional arguments in chain hooks registerModuleLifecyclecan now be called fromonInitwith the Xposed 82 base module. Hot reload still requires a base module that supports it- Fixed a registration failure for
registerModuleLifecycleandregisterFrameworkEventswhenonInitis delegated - Calling the module overloads of
encaseoutside the entry point'sonHooknow throws an exception - Fixed application lifecycle broadcast callbacks ignoring the
throwToHostOnFailuresetting - Fixed a host crash when an application lifecycle callback encounters an auxiliary
Applicationwithout an attachedContext - Fixed an issue where a listener exception for a segmented data channel message was reported as a failure to reassemble the message
- Fixed an exception when injecting module resources on Android 11 and above if the module APK path is unavailable
- Fixed a possible host crash when hot reload ran initialization code with unavailable module resources
- Fixed an issue that kept old module classes in memory after hot reload because of
Parcelablecaching, and a state restoration failure when hot reloading from1.5.0to1.5.1 - Improved Lint Rules for module entry calls and APIs specific to a base module
- Extended
UseHookInvocationApiwith suggestions and quick fixes for argument access, return values and continuing the hook chain - Added
UseHookBlockto suggest configuring hooks withhook { ... }andhookAll { ... } - Added
UseApplicationReadyto suggest usingwithApplicationReady, which supports hot reload, when lifecycle hooks are used to obtain the host'sApplication
yukihook-compiler
- Fixed a build failure when generating the libxposed module entry on JDK versions below 21
yukihook-extension-kavaref
⚠️ Breaking Change:MethodResolver.invokeSpecial<T>()now returnsT?. Handle possiblenullresults- Added support for finding hidden fields on Android 9 and above with
AndroidHiddenApiBypassResolver - Fixed incorrect Lint warnings about the host class loader for some KavaRef calls
yukihook-runtime-libxposed
YukiHook.Status.observeFrameworkServiceis now annotated with@MainThread. Register listeners on the main thread- Fixed an exception in
onModuleLoadedcausing a successfully initialized module to be marked as failed
yukihook-runtime-xposed82
- Fixed
onInitZygotebeing called after module initialization failed
For more details, please check the changelog.
YukiHook 1.5.1 已发布
- 新增 YukiHook Agent Skill,可为 AI 编程助手提供模块配置、API 用法与迁移指引,详情请参考 Agent Skills
yukihook-core
⚠️ 破坏性更新:在宿主中修改模块的共享偏好设置时,现在会抛出UnsupportedOperationException,修改前请使用isWritable判断是否可写⚠️ 破坏性更新:ModulePreferenceFragment的onCreatePreferences不再允许覆写,已移除onCreatePreferencesInModuleApp,请将初始化代码迁移至onPreferencesReady⚠️ 破坏性更新:Method.invokeSpecial<T>()的返回值类型改为T?,请处理可能的null返回值⚠️ 破坏性更新:从 Java 调用带配置块的Collection<Member>.hookAll时,请使用hookAllByMember,Kotlin 调用方重新编译即可- 调试日志统一显示进程名,弃用了
与YLog.Config.PACKAGE_NAME,现在请使用YLogData.packageNameYLog.Config.PROCESS_NAME与YLogData.processName - 共享偏好设置不可用时改用临时内存存储,数据会在进程退出后丢失,也不会在存储恢复可用后写回,请使用
isAvailable判断当前是否可用 - 新增
Fragment.dataChannel与Fragment.systemDataChannel,同一Activity中的不同Fragment可以各自监听相同的key,监听会在视图销毁时自动移除 - 数据通道现在按任务向最近一次进入
RESUMED状态的模块Activity分发消息,任务退到后台后仍可接收 - 新增经典 Hook 的
ArgumentEditor.getOrNull<T>(),读取不到参数或类型不匹配时返回null - 链式 Hook 新增
argOrNull、firstArgOrNull与lastArgOrNull,可以安全读取可选参数 registerModuleLifecycle现在也可在 Xposed 82 底座的onInit中注册,执行热重载仍需要支持热重载的底座- 修复通过委托实现
onInit时,registerModuleLifecycle与registerFrameworkEvents可能无法注册的问题 - 在模块入口的
onHook之外调用模块版encase时,现在会抛出异常 - 修复应用生命周期中的广播回调未遵循
throwToHostOnFailure设置的问题 - 修复宿主创建未附加
Context的辅助Application时,生命周期回调可能导致宿主崩溃的问题 - 修复分片消息的监听回调抛出异常时,被误报为数据通道分片合并失败的问题
- 修复 Android 11 及以上系统中,模块 APK 路径不可用时资源注入可能直接抛出异常的问题
- 修复模块资源不可用时热重载仍执行初始化代码,可能导致宿主崩溃的问题
- 修复热重载后旧模块可能因
Parcelable缓存无法释放的问题,以及从1.5.0热重载到1.5.1时可能出现的状态恢复失败问题 - 改进 Lint 静态检查规范 对模块入口调用和底座模块专属 API 的检查
- 扩展
UseHookInvocationApi,为经典 Hook 和链式 Hook 中的参数、返回值及调用链写法提供提示和快速修复 - 新增
UseHookBlock,建议使用hook { ... }与hookAll { ... }配置 Hook - 新增
UseApplicationReady,在手动 Hook 生命周期来获取宿主Application时,提示可以使用支持热重载的withApplicationReady
yukihook-compiler
- 修复使用低于 JDK 21 的版本生成 libxposed 模块入口时构建失败的问题
yukihook-extension-kavaref
⚠️ 破坏性更新:MethodResolver.invokeSpecial<T>()的返回值类型改为T?,请处理可能的null返回值AndroidHiddenApiBypassResolver新增在 Android 9 及以上系统中查找隐藏字段的支持- 修复部分 KavaRef 调用被 Lint 误报为未使用宿主类加载器的问题
yukihook-runtime-libxposed
YukiHook.Status.observeFrameworkService新增主线程标注,请在主线程注册监听- 修复
onModuleLoaded回调抛出异常会使已完成的模块初始化被判定为失败的问题
yukihook-runtime-xposed82
- 修复模块初始化失败后仍调用
onInitZygote回调的问题
详情请查看更新日志。