Repository navigation
Add qq-bot: native Linux QQ + NapCat component - #86
Merged
Merged
Conversation
Runs Linux QQ and NapCat natively on cccodroid without proot or root: bionic Xvfb + loopback X proxy + Debian GTK3 root via the glibc runtime, with QQ's interpreter pointing at the bundled glibc loader. The component ships scripts only; QQ and NapCat are downloaded on first run after user consent, from their official sources, with pinned SHA256. The bridge is a small OneBot v11 -> OpenAI-compatible client with empty default allow-lists, group replies only on @, explicit AI identity, and no proactive/persona/mass-account behaviour. Co-Authored-By: Claude Code <noreply@anthropic.com>
组件审计报告底座 🟡 qq-bot 3.2.34-r1下载 2.5 MB · 装后 11.1 MB · 742 个文件 · 15 个包 (第一次发布)
人要看的:
和别的组件共用的包:godot:libxinerama, xkeyboard-config;libreoffice:libuuid, libxinerama, opengl;music:libuuid 包清单
CI 实跑 selftest(arm64 + termux-docker)
环境同 App 里 Claude 的 Bash 工具(PREFIX / HOME / TMPDIR / termux-exec),没有 GPU、屏幕、Shizuku。通过只说明「装得上、跑得起来」,安卓特有的问题仍要真机。 |
- Disclaimer (zh/en) in NOTICE, a short version in the description, and a skill section Claude must relay verbatim and get explicit consent for before the first setup: unofficial and not affiliated with Tencent, may breach QQ's terms, account restriction/ban risk is the user's, the user is responsible for what the bot sends, no mass/spam use, provided as is. - `qq-bot start` drops CCAPP_RUN / CCAPP_RUN_ID / CLAUDECODE / CLAUDE_CODE_ENTRYPOINT before spawning the supervisor, so cccodroid no longer kills the bot when the Claude turn that started it is stopped (0.6.17) or the gateway restarts. Same as openai-bridge's start-bridge.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
组件 / Component
qq-botusr/share/cccodroid/components/qq-bot/lib/NOTICE)What
在手机上原生跑 Linux QQ + NapCat,不使用 proot、不需要 root:
patchelf指到$PREFIX/glibc/lib/ld-linux-aarch64.so.1;否则/proc/self/exe指向加载器,Chromium 找不到icudtl.dat就退出。$PREFIX下的 tmp);QQ 用的 Debianlibxcb 写死了系统临时目录,所以加一个只监听
127.0.0.1的 TCP→Unix 代理。系统提示明确要求 AI 身份,没有主动发言、人格仿真或批量操作。
常用命令:
与原教程的差异
原教程(DSHA + proot Ubuntu)用 NapCat + qq-bridge + DSH。这里保留 NapCat,后半段换了:
没有这些。组件自带的桥只做白名单会话问答,走任意 OpenAI 兼容接口(默认 DeepSeek)。
体积与共用包 / Size and sharing
组件本身:
首次运行由用户确认后下载:
和别的组件共用的包:godot(libxinerama、xkeyboard-config)、libreoffice(libuuid、
libxinerama、opengl)、music(libuuid)。
Tested
在 HONOR Magic V6 / Android 17 上完整跑过
qq-bot setup --yes(158 秒,150 个 Debian 包 +QQ + NapCat),随后:
cache/qrcode.png,扫码页能取到二维码;qq-bot stop能清掉 supervisor / QQ / Xvfb;杀掉 QQ 后 supervisor 会自动重启;清理、
send_private_msg带 token,全部通过;qq-bot selftest本机通过:没有完成真实 QQ 账号扫码登录(需要用户自己的手机扫码),因此 NapCat 登录后的
OneBot 3000/3001 实际收发还没有在真机上走过;桥的 OneBot 侧用 mock 验证。建议合并后
由有账号的维护者补一次真机登录与收发记录。
本地构建与审计(
devkit-2026.10.28):0 错;🟡 警告为 shebang 走 termux-exec、底座与仓库版本漂移、额外 x11 仓库、9 个自带脚本、与其它组件共用 X 库。
许可与风险
不再分发,只在用户确认后从腾讯官方地址下载;使用受腾讯服务条款约束。
会把上游 LICENSE 保存为
LICENSE.NapCat。组件不修改 NapCat 本体。不做批量注册/养号/刷评论/冒充真人/未经邀请的群发。
检查 / Checklist
node tools/check-recipes.mjs通过 / passesci-build.mjs --dry依赖都能解 / resolves (also built fordevkit-2026.10.28)needs如实填写 / filled honestly (shizuku,display,gpuall false)真机测试 / Device test
node tools/verify-device.mjs全过,记录另开 PR 进verified.json/ not run yet; needs a real QQ scan🤖 Generated with Claude Code
合并前补的 / Added before merge
NOTICE(中英)、组件描述(短版)和 skill。skill 要求 Claude 在第一次setup前原文转告、取得用户明确同意:非官方、与腾讯无关;可能违反 QQ 服务协议,账号有被限制或封禁的风险,后果自负,建议用小号;机器人发出的内容由使用者负责;不得批量、刷屏、冒充真人;按现状提供、不作担保。/ Disclaimer added to NOTICE, the description and the skill (relayed verbatim before first setup).qq-bot start起 supervisor 前去掉 cccodroid 的运行标记,停止那一轮对话或网关重启时不再被清掉。/ The supervisor now starts without cccodroid's run marks.