-
症状:群没有自定义名字时 rcontact.nickname 为空,getContactNickname fallback 返 wxid(如 "57100316212@chatroom"),A11y 拿这个去搜索框 搜不到群,发送失败。 修复:rcontact 没拿到 conRemark/nickname 时,对 @chatroom 后缀的 wxid 额外查 chatroom.displayname,这是微信前端默认拼出来的群名 (如 "丁鹏、🍋火星人、火星人"),可以被 A11y 搜索定位。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
-
症状:群里 @小火子 发消息,auto-reply 完全没响应,日志里只有 [NOTIF] 没有 [GROUP-AT],但 DB 里这条消息确实存在。 根因:sqlcipher .mode line 输出多行 TEXT(如 message.content 是 "yibooo:\n@小火子 在吗")时长这样: content = yibooo: @小火子 在吗 createTime = 1779591001000 旧 _parseRows 看到第二行 "@小火子 在吗" 没有 ": " 或 " = " 分隔符, 就直接 IGNORED,导致 content 被截断成 "yibooo:"。isAtMe("yibooo:") 返回 false,replyType=null,handleMessage 静默 return(没 log)。 修复: - 引入 KNOWN_COLS 白名单(msgId/type/isSend/talker/content/createTime), 只在 key 是已知列名时才当作新字段,避免内容里碰巧带 "xxx = yyy" 误判为新字段 - 不匹配新字段的行作为上一字段 value 的续行追加(带 \n) - 添加单元测试式的语义注释解释 .mode line 输出格式 unit test (synthetic input): input: 'content = yibooo:\n@小火子 在吗\ncreateTime = 1779...' before: { content: 'yibooo:', createTime: '1779...' } ❌ after: { content: 'yibooo:\n@小火子 在吗', createTime: '1779...' } ✅ Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> -
#17 群昵称查询: - android-wechat-tracker-sqlcipher.js:getContactNickname 删掉 if (wxid.endsWith('@chatroom')) return wxid 的早退分支 - 群(xxxx@chatroom)和私聊都走同一 rcontact 表查询,nickname 就是群名 - A11y 现在可以用群名搜索进入群聊 - 在 Pixel 已部署并重启 auto-reply (PID 18678) #18 wake-lock + keepalive 重写: - 通过 am startservice com.termux.service_wake_lock 启用 wake-lock (确认 dumpsys power 已持有 'termux:service-wakelock') - 重写 keepalive.sh 对齐当前部署: - 守护 4 项:wake-lock / A11y service / hermes gateway / auto-reply - hermes 走 termux native gateway 而不是 proot-distro Ubuntu(已淘汰) - 健康检查端口 8642(不再是 3010) - A11y 被关掉时自动 settings put secure 重新启用 - 在 Pixel 已部署到 ~/hermes-wechat/keepalive.sh #16 残留清理(仅 phone 操作,无 git 文件): - pkill -9 frida-server + rm -rf ~/.frida_queue/ - ~/.hermes/auth.json 删掉 credential_pool['kimi-coding'] 老 sk-kimi 条目 保留 anthropic + kimi-coding-cn Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> -
把 6 步链路接到唯一可用的发送路径(HermesAccessibilityService): 1. termux-notification-list 监听通知(息屏兜底) 2. input keyevent 224 点亮屏幕 + wm dismiss-keyguard 解锁 3. am start LauncherUI 切微信前台 4. sqlcipher 轮询 EnMicroMsg.db 拉新消息 + 最近 N 条上下文 5. 调 hermes-agent /v1/chat/completions 生成回复 6. am broadcast com.hermes.wechat.SEND_MSG → A11y UI 自动化发送 关键改动: - android-wechat-sender.js - sendTextMessageBroadcast 增加 options.toUserDisplayName(A11y 搜索必传) - 新增 checkAccessibilityServiceEnabled / enableAccessibilityService - android-wechat-tracker-sqlcipher.js - 新增 getContactNickname(wxid):查 rcontact 拿 conRemark/nickname, 带 filehelper/weixin 等内置 helper 的硬编码 fallback - 新增 fetchHistory(talker, limit):拉最近 N 条文本消息正序返回 - auto-reply.js - 移除已废弃的 sendTextMessageFrida - 启动时校验 A11y service,未启用则尝试自动启用并打印 manual fix 命令 - handleMessage 中:先 getContactNickname 拿 displayName、再 fetchHistory 给 hermes 做多轮上下文,最后用 broadcast + displayName 发送 - buildHermesMessages 重写:自动把历史按 isSend 转 user/assistant 多轮 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
-
- auto-reply.js 接入 hermes-agent OpenAI-compatible API (:8642) - 新增 android-wechat-tracker-sqlcipher.js 替代 LSPosed 日志 tail - 新增 android-wechat-sender-frida.js 替代 am broadcast 发送 - 更新 keepalive.sh、README、HermesWeChatModule.java - 添加 .gitignore SQLite 变体规则 - 新增 docs: 息屏发送尝试记录与屏幕自动唤醒方案 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>