From 1eced785435865ae7d57af3e531b1f50d0fcaf51 Mon Sep 17 00:00:00 2001 From: canghe Date: Mon, 6 Apr 2026 09:37:39 +0800 Subject: [PATCH] docs: add Full Disk Access prerequisite for macOS Users must grant Full Disk Access to their terminal before running init, otherwise key extraction will fail silently. --- README.md | 10 ++++++++++ README_CN.md | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/README.md b/README.md index 759e114..89bfc39 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,16 @@ If you're unsure which WeChat account is currently active, navigate to the data ![init-claude-code-4](image/init-claude-code-4.png) +#### macOS: Grant Full Disk Access to Terminal + +Before running `init`, make sure your terminal app has **Full Disk Access**: + +1. Open **System Settings → Privacy & Security → Full Disk Access** +2. Add your terminal app (e.g. Terminal, iTerm2, or the terminal in your IDE) +3. Restart the terminal after enabling + +Without this permission, the tool cannot access WeChat's data directory and key extraction will fail. + #### macOS: `task_for_pid failed` Error On some macOS systems, `init` may fail with `task_for_pid failed` even when running with `sudo`. This is due to macOS security restrictions on process memory access. diff --git a/README_CN.md b/README_CN.md index 561c99d..93999b1 100644 --- a/README_CN.md +++ b/README_CN.md @@ -107,6 +107,16 @@ wechat-cli init ![init-claude-code-4](image/init-claude-code-4.png) +#### macOS:提前开启终端的完全磁盘访问权限 + +在执行 `init` 之前,请确保已为终端开启**完全磁盘访问权限**: + +1. 打开 **系统设置 → 隐私与安全性 → 完全磁盘访问权限** +2. 添加你使用的终端应用(如 Terminal、iTerm2 或 IDE 内置终端) +3. 开启后重启终端 + +未开启此权限会导致工具无法访问微信数据目录,密钥提取将失败。 + #### macOS 遇到 `task_for_pid failed` 错误? 在某些 macOS 系统上,即使使用了 `sudo`,`init` 也可能报 `task_for_pid failed`。这是 macOS 的安全策略限制了进程内存访问。