BetterZUIKey v1.5.1
Please scroll down for English / 英语请向下滚动
摘要
本次为安全加固、代码清理与作用域检测修复版本。修复了配置 IPC 的一个越权隐患,纠正了模块激活状态误判,并移除了一处冗余组件。
完整变更: 15-v1.5.0-beta1...16-v1.5.1
Bug 修复
- 作用域检测误报:模块此前会在作用域正确时仍持续显示"作用域错误"。现改为直接通过 libxposed API 101 的
getScope()获取激活作用域列表,不再依赖不可靠的 SharedPreferences 写入。感谢 @WASDDestroy 提交 PR #9,以及 @luochen88 在 issue #8 中的报告。
安全
- 配置 IPC 调用方校验:
ConfigSyncProvider现通过Binder.getCallingUid()校验调用方,仅放行system_server与模块自身。- 此前任意第三方应用可借 IPC 在模块进程中执行命令或覆写配置,现已阻断。
其他
- 命令输出脱敏:智能键脚本输出降级为 DEBUG 并截断(512 字符),不再全量写入 logcat。
- 队列解析重构:
sys_write_queue读写两端由手写 JSON 解析改为 Gson。 - 移除冗余组件:删除未使用的
RemotePrefProvider与remotepreferences依赖,配置常量统一迁移至ConfigSyncProvider。 - 健壮性:共享可变状态补
volatile;为空catch补充了 DEBUG 日志(受日志级别门控);移除system_server侧无效的配置写盘调用。
致谢
- @WASDDestroy — 作用域检测修复(PR #9)
- @luochen88 — 作用域误报问题报告(issue #8)
BetterZUIKey v1.5.1
Highlights
A security hardening, code cleanup, and scope-detection fix release. Fixes an IPC authorization flaw, corrects module status misreporting, and removes a redundant component.
Full Changelog: 15-v1.5.0-beta1...16-v1.5.1
Bug Fixes
- Scope detection misreporting: The module previously kept showing a "wrong scope" error even when the scope was correct. It now fetches the active scope list directly via the libxposed API 101
getScope(), no longer relying on the unreliable SharedPreferences write. Thanks to @WASDDestroy for PR #9 and @luochen88 for reporting issue #8.
Security
- Config IPC caller validation:
ConfigSyncProvidernow validates the caller viaBinder.getCallingUid(), allowing onlysystem_serverand the module itself.- Previously any third-party app could execute commands or overwrite config in the module process via IPC. This is now blocked.
Other
- Command output sanitization: Smart-key script output is downgraded to DEBUG and truncated (512 chars), no longer dumped in full to logcat.
- Queue parsing refactor:
sys_write_queueread/write now uses Gson instead of hand-rolled JSON parsing. - Removed redundant component: Dropped the unused
RemotePrefProviderand theremotepreferencesdependency; config constants migrated toConfigSyncProvider. - Robustness: Added
volatileto shared mutable state; added DEBUG logging to emptycatchblocks (gated by log level); removed ineffective config writes on thesystem_serverside.
Credits
- @WASDDestroy — scope detection fix (PR #9)
- @luochen88 — scope misreporting report (issue #8)