本项目目前处于停止状态,连续测试发现理应是安全的hook仍然会触发踢下线的问题,再搞懂qq检测与回报之前本项目没有NTQQBattery (com.wkeqin.ntqqbattery)更加具有价值
本项目由大语言模型(AI)在人类指导下生成,包括全部 Hook 代码、设置界面、构建流水线与文档。 代码未经人工长期审计,请自行评估风险后使用;欢迎人工审查与 PR。
This project was generated and iterated by a large language model (AI) under human direction, including all hook code, the settings UI, the build pipeline and these docs. The code has not been long-term audited by humans — evaluate the risk yourself; human review and PRs are welcome.
面向手机 QQ com.tencent.mobileqq(实测适配 9.3.35 / versionCode 15560)的 LSPosed 模块。
An LSPosed module for the mobile QQ app (com.tencent.mobileqq, tested against 9.3.35 / versionCode 15560).
两大功能:省电 · 去开屏广告。 Two feature groups: power saving · splash-ad removal.
| 开关 Switch (默认 Default) | 说明 / Description |
|---|---|
| power_block_core_keepalive (开/on) | 后台拦截并停止 CoreService(GuardManager) 前台保活;前台不受影响 / Block & stop the CoreService keep-alive in background; foreground untouched |
| power_block_bg_services (开/on) | 后台拦截游戏中心(Wadl)/云游戏/小世界发布/彩签/ilink 等杂项服务 / Block game-center & misc services in background |
| power_cap_wakelocks (开/on) | 后台 WakeLock 无限期改 60s、超长截断;音视频/导航/推送白名单 / Cap background wakelocks; audio/video/nav/push whitelisted |
| power_relax_alarms (关/off) | 后台 setExact* 降级为非精确闹钟 / Relax exact alarms in background |
| power_tombstone_mode (关/off) | 激进墓碑:进后台立即停保活与杂项服务组 / Aggressive tombstone: stop keep-alive & misc services on background |
| power_tombstone_keep_push (开/on) | 墓碑/后台拦截时保留消息推送保活(MSF/推送服务/推送唤醒锁豁免) / Keep message-push alive under tombstone (MSF/push services/wake-locks exempt) |
| ad_block_splash (开/on) | 拦截开屏广告:掐断 vas-splash 缓存投喂与广告跳转闸门 / Block splash ads at cache-feed & jump-gate |
所有开关可在设置页独立切换;总开关 master_enabled 关闭后模块完全休眠。 Every switch is independently reversible in the settings UI; the master switch disables the whole module.
- 只做 Java 层钩子,不碰 native 库、不碰 MSF 协议与登录链路 / Java-layer hooks only; never touch native libs, MSF protocol or the login path;
- 省电类钩子仅后台生效,前台体验零改动 / Power hooks act only in background; zero foreground impact;
- 不做任何「返回假数据」式欺骗(曾有的环境探测清洗/热更守卫已因风控顾虑移除) / no fake-return deception of any kind (former env-probe cleaning & hotfix guard were removed over risk concerns);
- 全部开关独立容错,任一 Hook 失败不影响宿主运行 / Every hook is fault-isolated; a failed hook never breaks the host.
本模块的实现思路与安全取舍参考了以下项目,在此致谢(仅参考思路,未复制代码;第三方许可证详见各自仓库): This module's approach and risk trade-offs are inspired by the following projects (ideas only, no code copied; see each repo for its license):
| 项目 / Project | 贡献 / Contribution | 链接 / Link |
|---|---|---|
| NTQQBattery (com.wkeqin.ntqqbattery) | 墓碑模式与后台服务收敛思路、beacon 后台静默、模块结构参考 / tombstone-mode & background service trimming, background beacon quieting, module structure | https://modules.lsposed.org/module/com.wkeqin.ntqqbattery |
| QQNTHookBypass(QQNT 过环境检测, io.github.jhl337.qqhook) | 环境检测对抗要安静地「说谎」而非硬崩检测 / quiet env-detection deflection instead of hard crashes | https://modules.lsposed.org/module/io.github.jhl337.qqhook/ |
| qqmax(手表QQ魔改 M2.5) | 「没动内核」的纯 Java/smali 层改动面,风控最安全的注入范式 / pure-Java modification surface without touching native — the risk-safest injection pattern | 设备端魔改包(未开源)/ device-side mod (not open-source) |
| TSBattery (com.fankes.tsbattery) | 后台唤醒抑制与省电模块生态的祖师爷 / the origin of background wake-suppression power modules | https://github.com/Xposed-Modules-Repo/com.fankes.tsbattery |
| HonorMarketTamer (mengwuzhuanshou/HonorMarketTamer) | 无 SDK 构建管线、配置三副本方案、容错 Hook 模式与踩坑体系 / no-SDK build pipeline, 3-copy config scheme, fault-tolerant hook patterns & pitfall corpus | https://github.com/mengwuzhuanshou/HonorMarketTamer |
- Magisk/KernelSU + Zygisk + LSPosed 环境 / rooted device with Zygisk + LSPosed;
- 安装
dist/QQTamer-v1.1.5.apk/ install the APK; - LSPosed 中启用模块,作用域勾选 QQ(com.tencent.mobileqq) / enable in LSPosed and select the QQ scope;
- 打开模块桌面图标可调开关(纯代码 UI,无资源依赖)/ open the module's settings icon (pure-code UI);
- 强制停止 QQ 后重新打开生效 / force-stop QQ and reopen for changes to take effect.
日志:logcat/LSPosed 日志过滤 QQTamer;存活标记写入 /data/data/com.tencent.mobileqq/files/qq_tamer_alive.txt。
Logs: filter QQTamer in logcat / LSPosed log; a liveness marker is written to the QQ files dir.
python tools/build_module.py
无 Android SDK 依赖:javac(--release 8, 编译桩) → dalvik-dx → 手写 AXML → zip(arsc 对齐) → apksig 签名,约 30 秒。
No Android SDK required: javac(--release 8, compile stubs) → dalvik-dx → hand-written AXML → zip (aligned arsc) → apksig signing, ~30s.
构建引擎来自共享构件 common/builder.py(位置可用环境变量 MB_TOOLS 覆盖,默认取仓库同级 ../common);
签名密钥经各项目 gitignored 的 tools/signing.local 提供,仓库不含任何密钥。
The build engine lives in the shared common/builder.py (override with MB_TOOLS, default sibling ../common);
the signing keystore is supplied per-project via gitignored tools/signing.local — the repo contains no keys.
- GDT(gdtad) 实时拉新开屏未拦(v1 只掐 vas-splash 缓存投喂与跳转闸门)/ GDT real-time splash fetch not blocked yet (v1 covers vas-splash cache feed & jump gate);
- 消息流/空间/小世界信息流广告未处理 / AIO feed / Qzone / mini-world in-feed ads not handled;
- 仅主进程生效(:tool/:miniapp/:qzone 等子进程跳过)/ main process only (sub-processes skipped);
- QQ 升级可能使混淆锚点漂移,升级后先看
hook FAILED日志 / obfuscated anchors may drift on QQ updates — watchhook FAILEDlogs after upgrades.
MIT © mengwuzhuanshou。详见 LICENSE。/ MIT © mengwuzhuanshou. See LICENSE.