• **WeChatHook.java — 语音发送四个关键 fix**:
    - 跳过 H():DB INSERT 在 r0 构造器内已完成,H() 只触发 CDN 上传,
      服务端拒绝后会删消息;skip H 彻底解决消息消失问题
    - status=4 双写:ContentValues + f9.r1(4) 内存字段同时写,
      防止 K(0) 回调再次 convertTo 时读到 status=1 覆盖回转圈
    - sDatabaseF9 精准捕获:在 convertTo() hook 里捕获入库的 f9 对象
      放入 r0.i,修复旧逻辑取第三个 f9(内容为空)导致点击崩溃
    - K(0) 而非 I(0):onSceneEnd code=0 时调成功路径 K 而非失败路径 I,
      修复红色感叹号问题
    - fromusername 兜底:sMyWxid 为 null 时回退硬编码 wxid
    
    **tts_voice_send.sh(新)**:
    一行命令 TTS 发语音:edge-tts → ffmpeg(16kHz PCM) → silk-wasm(SILK V3) → adb push → SEND_VOICE_INTERNAL
    
    **wechat_send.sh(新)**:统一 text / image / voice 三种发送模式的 CLI
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    yibo authored
     
    Browse Dir »

  • Hermes 重编 APK 时连踩三坑导致平板登录失效:
    1. 用 XposedBridgeApi.jar 而非 LSPosed legacy JAR 编译 → 所有 hook NoSuchMethodError
    2. xposed_init 放在 APK 根目录而非 assets/ → daemon 验证失败每次重启自动删模块 DB 注册
    3. 换了 keystore → INSTALL_FAILED_UPDATE_INCOMPATIBLE
    
    修复:从 wechathook_v2_signed.apk(正确 legacy JAR 编译)提取 DEX 复用,重打包含正确
    assets/xposed_init,debug.keystore 签名,fix_lspd_final.py 重建 DB 注册。
    2026-07-04 重启后验证平板登录恢复正常,所有 tablet hook 日志无 NoSuchMethodError。
    
    新增文件:
    - wechathook_v2_signed.apk: 黄金基准 APK(legacy JAR 编译,DEX 可复用)
    - do_not_break.md: 给 Hermes 的禁止事项清单
    - hermes_task.md: 已在顶部加 DO NOT BREAK 警告 banner
    - analyze_wechathook.py: DEX 字节码分析工具(Tinker patch)
    - rebuild_wechathook.sh / update_wechathook_db.sh: Mac 侧重建脚本
    - termux_build.sh: Hermes 的手机侧 build script(有编译 JAR bug,留作参考)
    - wechat_send_internal/: Hermes 对 WeChat 内部发送 API 的研究产出(进行中)
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    yibo authored
     
    Browse Dir »

  • Hook.java v3.1 (315 行):
    - body 捕获:okio.Buffer 读取 POST/PUT body(截断 2000 字符)
    - Proxy poller(后台线程,1s 轮询 /xhs_proxy/pending):
        executeOkHttp() 在 XHS 进程内用 OkHttpClient 执行代理请求,
        自动经过 XHS 拦截器签名,结果 POST /xhs_proxy/result
    - 手写 JSON 解析器(无外部依赖)
    - 保留 /xhs_params 转发(每条 edith 请求实时上报)
    
    event_server.py(Hermes 编写):
    - proxy_requests 表(pending→ok/error 状态机)
    - POST /xhs_proxy — Hermes 下发代理请求
    - GET  /xhs_proxy/pending — Hook 轮询取下一个任务
    - POST /xhs_proxy/result — Hook 上报执行结果
    - GET  /xhs_proxy/result/{id} — Hermes 轮询取结果
    - DELETE /xhs_proxy/{id} — 清理完成的任务
    
    架构:Hermes → event_server → Hook(XHS进程内OkHttp签名) → event_server → Hermes
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    yibo authored
     
    Browse Dir »
  • - STATUS.md: file index updated to v3 (DEX=6328B, HTTP forwarding), add
      ~/.hermes/event_bus/event_server.py to index
    - update_xhshook_db.sh: phase 3 — after checkpoint, verify scope table has
      row for current mid; auto-insert if missing (mid changes after every reinstall,
      missing scope → lspd skips injection silently)
    - .gitignore: ignore *.idsig (apksigner side-car, not useful in git)
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    yibo authored
     
    Browse Dir »
  • - event_server.py: POST /xhs_params receives forwarded XHS edith requests from
      xhshook v3 (Hook.java background thread), stores as type='xhs_request' in events DB;
      GET /xhs_params returns latest N captures for Hermes to query
    - Pushed to device ~/.hermes/event_bus/event_server.py
    - STATUS.md: reflect v3 state (mid=4, DEX=6328B, HTTP forwarding live), mark task C done,
      add Hermes startup instructions for event_server + xhs_params query
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    yibo authored
     
    Browse Dir »
  • Hook.java v3:在现有 logcat 日志基础上,后台线程 POST 每条
    edith.xiaohongshu.com 请求(method/url/全量 headers)到
    Hermes event_server(127.0.0.1:8765/xhs_params)。
    Hermes server 未运行时静默失败,logcat 捕获不受影响。
    
    rebuild_xhshook.sh:d8 步骤改用 find 通配所有 .class 文件,
    避免新增匿名类时漏掉(之前写死 Hook$1.class)。
    
    update_xhshook_db.sh:两阶段更新策略
    - Phase 1:Python in-place UPDATE + commit(不做 checkpoint,
      lspd 持有写锁时 checkpoint 会 OperationalError)
    - Phase 2:pull DB+WAL → Mac 本地 checkpoint → push 干净主文件
      → 删设备端 WAL/SHM,确保重启后 DB 正确
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    yibo authored
     
    Browse Dir »
  • - STATUS.md:更新至 2026-06-30 00:33 验证通过状态,新增捕获到的额外
      签名 header(x-mini-sig/mua/s1/gid、x-legacy-sid、shield),
      补充 curl HTTP 200 复现验证结果,记录 lspd crash 恢复流程
    - update_xhshook_db.sh:改用 Termux Python 原地 UPDATE + wal_checkpoint
      代替 cp/adb push(后者改变 inode,lspd FileObserver 监听旧 inode 不刷缓存)
    - STATUS.md "已知不行的路线" 新增 adb push DB 和手动重启 lspd 两条陷阱
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    yibo authored
     
    Browse Dir »

  • 修复 LSPosed(JingMatrix/Vector fork)在 Android 16 上 zygote64 崩溃问题,
    并完成 xhshook Xposed 模块注入 XHS(com.xingin.xhs),实现 edith.xiaohongshu.com
    xy-common-params header 的实时拦截。
    
    A16 崩溃根因:NDK 26 compile-time sizeof(JNINativeInterface) 不包含 Android 16 ART
    新增的函数指针,memcpy 截断导致垃圾指针 → zygote 崩溃。
    修复:从 env->functions->reserved0 读运行期实际大小,heap-alloc 后 memcpy。
    
    其他修复:
    - service.sh 去掉 Android toybox 不支持的 --propagation slave flag
    - daemon 入口类名 org.lsposed.lspd.Main → org.matrix.vector.daemon.VectorDaemon
    
    xhshook 踩坑记录:
    - APK 必须含 assets/xposed_init(而非根目录),VectorConfigCache 只认这个路径
    - adb install 必须加 --no-incremental,Incremental Install marker 破坏 ZipFile 解析
    - Xposed API 类不能打进 module DEX,LSPosed 会检查 XposedBridge classloader 一致性
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    yibo authored
     
    Browse Dir »