github HighCapable/YukiHook 1.5.1

one hour ago

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 throws UnsupportedOperationException. Check isWritable before editing
  • ⚠️ Breaking Change: ModulePreferenceFragment.onCreatePreferences is now final and onCreatePreferencesInModuleApp has been removed. Move your initialization code to onPreferencesReady
  • ⚠️ Breaking Change: Method.invokeSpecial<T>() now returns T?. Handle possible null results
  • ⚠️ Breaking Change: Use hookAllByMember from Java to call Collection<Member>.hookAll with a configuration block. Kotlin callers only need to recompile
  • Debug logs now consistently show the process name. Deprecated YLog.Config.PACKAGE_NAME and YLogData.packageName, please use YLog.Config.PROCESS_NAME and YLogData.processName now
  • 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 isAvailable before relying on persistent storage
  • Added Fragment.dataChannel and Fragment.systemDataChannel so fragments in the same Activity can 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 Activity in each task, including tasks in the background
  • Added ArgumentEditor.getOrNull<T>() for classic hooks to return null when the argument is missing or its type does not match
  • Added argOrNull, firstArgOrNull and lastArgOrNull for safely reading optional arguments in chain hooks
  • registerModuleLifecycle can now be called from onInit with the Xposed 82 base module. Hot reload still requires a base module that supports it
  • Fixed a registration failure for registerModuleLifecycle and registerFrameworkEvents when onInit is delegated
  • Calling the module overloads of encase outside the entry point's onHook now throws an exception
  • Fixed application lifecycle broadcast callbacks ignoring the throwToHostOnFailure setting
  • Fixed a host crash when an application lifecycle callback encounters an auxiliary Application without an attached Context
  • 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 Parcelable caching, and a state restoration failure when hot reloading from 1.5.0 to 1.5.1
  • Improved Lint Rules for module entry calls and APIs specific to a base module
  • Extended UseHookInvocationApi with suggestions and quick fixes for argument access, return values and continuing the hook chain
  • Added UseHookBlock to suggest configuring hooks with hook { ... } and hookAll { ... }
  • Added UseApplicationReady to suggest using withApplicationReady, which supports hot reload, when lifecycle hooks are used to obtain the host's Application

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 returns T?. Handle possible null results
  • 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.observeFrameworkService is now annotated with @MainThread. Register listeners on the main thread
  • Fixed an exception in onModuleLoaded causing a successfully initialized module to be marked as failed

yukihook-runtime-xposed82

  • Fixed onInitZygote being 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.packageName,现在请使用 YLog.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 回调的问题

详情请查看更新日志。

Don't miss a new YukiHook release

NewReleases is sending notifications on new releases.