SkyBlue997/enableMacosAIPublic

国行 Mac 一键开启完整 Apple 智能(端侧 + Private Cloud Compute 云端)· macOS 27 / Apple Silicon

AI summary: A system script that patches IORegistry values to enable Apple Intelligence on restricted macOS Sequoia installations.

Stars
2.4K
+22 today
Forks
134
Watchers
13
Open issues
34
Open PRs
2
Contributors
~2
Commits
10
Branches
1

ShellApache-2.0Created Jun 10, 2026Last push 8d ago+36 stars this week+136 this month

Quick answers

What is enableMacosAI?
A system script that patches IORegistry values to enable Apple Intelligence on restricted macOS Sequoia installations.
What does enableMacosAI do?
This utility enables Apple Intelligence features on macOS Sequoia installations that are either running on unsupported hardware or located in regionally restricted areas like the EU. It works by automating the complex process of modifying deep system configurations, specifically spoofing the Mac's regional identifiers (e.g., changing 'CH/A' to 'LL/A') within the IORegistry. It safely navigates the required toggling of System Integrity Protection (SIP) and clears the necessary daemon caches to force the OS to fetch and activate the local AI models. This allows power users to bypass artificial limitations on their machines.
Who is enableMacosAI for?
This tool is exclusively for advanced Mac users and developers who are comfortable modifying core OS settings and disabling SIP. It carries risks and should only be used by those understanding the implications of system patching.
How do I get started with enableMacosAI?
sudo ./enableAI.sh
How popular is enableMacosAI on GitHub?
SkyBlue997/enableMacosAI has 2,374 stars and 134 forks on GitHub, and gained 36 stars in the last 7 days.
What license does enableMacosAI use?
SkyBlue997/enableMacosAI is released under the Apache-2.0 license.

Star history

since Jul 28, 2026
01K2KJul 2026Sep 2026Oct 2026Nov 2026
2.4K stars as of Nov 17, 2026. Measured daily since Jul 28, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
NovDecJanFebMarAprMayJunJulAugSepOctNovMonWedFri2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 0 commits2026-04-02: 0 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 0 commits2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 0 commits2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 0 commits2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 0 commits2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 0 commits2026-05-21: 0 commits2026-05-22: 0 commits2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 0 commits2026-05-28: 0 commits2026-05-29: 0 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 0 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 0 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 1 commit2026-06-11: 0 commits2026-06-12: 1 commit2026-06-13: 1 commit2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 0 commits2026-06-19: 0 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 0 commits2026-06-23: 0 commits2026-06-24: 0 commits2026-06-25: 0 commits2026-06-26: 0 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 0 commits2026-06-30: 0 commits2026-07-01: 0 commits2026-07-02: 0 commits2026-07-03: 0 commits2026-07-04: 0 commits2026-07-05: 0 commits2026-07-06: 0 commits2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 0 commits2026-07-14: 0 commits2026-07-15: 0 commits2026-07-16: 0 commits2026-07-17: 0 commits2026-07-18: 0 commits2026-07-19: 0 commits2026-07-20: 0 commits2026-07-21: 0 commits2026-07-22: 0 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 0 commits2026-07-26: 0 commits2026-07-27: 0 commits2026-07-28: 0 commits2026-07-29: 0 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits2026-08-02: 0 commits2026-08-03: 0 commits2026-08-04: 0 commits2026-08-05: 0 commits2026-08-06: 0 commits2026-08-07: 0 commits2026-08-08: 0 commits2026-08-09: 0 commits2026-08-10: 0 commits2026-08-11: 0 commits2026-08-12: 0 commits2026-08-13: 0 commits2026-08-14: 0 commits2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 0 commits2026-08-28: 0 commits2026-08-29: 0 commits2026-08-30: 0 commits2026-08-31: 0 commits2026-09-01: 0 commits2026-09-02: 0 commits2026-09-03: 0 commits2026-09-04: 0 commits2026-09-05: 0 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 0 commits2026-09-09: 0 commits2026-09-10: 1 commit2026-09-11: 0 commits2026-09-12: 0 commits2026-09-13: 0 commits2026-09-14: 0 commits2026-09-15: 0 commits2026-09-16: 0 commits2026-09-17: 0 commits2026-09-18: 0 commits2026-09-19: 0 commits2026-09-20: 0 commits2026-09-21: 0 commits2026-09-22: 0 commits2026-09-23: 0 commits2026-09-24: 0 commits2026-09-25: 0 commits2026-09-26: 0 commits2026-09-27: 0 commits2026-09-28: 0 commits2026-09-29: 0 commits2026-09-30: 0 commits2026-10-01: 0 commits2026-10-02: 0 commits2026-10-03: 0 commits2026-10-04: 0 commits2026-10-05: 0 commits2026-10-06: 0 commits2026-10-07: 0 commits2026-10-08: 0 commits2026-10-09: 0 commits2026-10-10: 0 commits2026-10-11: 1 commit2026-10-12: 0 commits2026-10-13: 0 commits2026-10-14: 0 commits2026-10-15: 0 commits2026-10-16: 0 commits2026-10-17: 0 commits2026-10-18: 0 commits2026-10-19: 0 commits2026-10-20: 0 commits2026-10-21: 1 commit2026-10-22: 0 commits2026-10-23: 0 commits2026-10-24: 0 commits2026-10-25: 0 commits2026-10-26: 0 commits2026-10-27: 0 commits2026-10-28: 0 commits2026-10-29: 0 commits2026-10-30: 0 commits2026-10-31: 0 commits2026-11-01: 0 commits2026-11-02: 0 commits2026-11-03: 0 commits2026-11-04: 0 commits2026-11-05: 0 commits2026-11-06: 0 commits2026-11-07: 0 commits2026-11-08: 0 commits2026-11-09: 0 commits2026-11-10: 0 commits2026-11-11: 1 commit2026-11-12: 0 commits2026-11-13: 2 commits2026-11-14: 0 commits2026-11-15: 0 commits2026-11-16: 0 commits2026-11-17: 0 commits2026-11-18: 0 commits2026-11-19: 0 commits2026-11-20: 0 commits2026-11-21: 0 commits
9 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Permissive license

    Apache-2.0

  • Continuous integration

    Automated checks passing

What enableMacosAI does

This utility enables Apple Intelligence features on macOS Sequoia installations that are either running on unsupported hardware or located in regionally restricted areas like the EU. It works by automating the complex process of modifying deep system configurations, specifically spoofing the Mac's regional identifiers (e.g., changing 'CH/A' to 'LL/A') within the IORegistry. It safely navigates the required toggling of System Integrity Protection (SIP) and clears the necessary daemon caches to force the OS to fetch and activate the local AI models. This allows power users to bypass artificial limitations on their machines.

This tool is exclusively for advanced Mac users and developers who are comfortable modifying core OS settings and disabling SIP. It carries risks and should only be used by those understanding the implications of system patching.

  • IORegistry Spoofing: Alters deep system variables to trick macOS into believing it is in a supported region.
  • Automated Patching: Replaces error-prone manual terminal commands with a single, streamlined shell script.
  • Cache Invalidation: Automatically clears the relevant daemon caches to trigger immediate re-evaluation of AI eligibility.
  • SIP Awareness: Guides users through the mandatory steps of disabling System Integrity Protection required for these modifications.
  • Hardware Check Bypass: Helps bypass the artificial hardware limitations placed on older Apple Silicon Macs.

Where teams use it

Regional Unlocking

Enable Apple Intelligence features like advanced Siri and writing tools on Macs physically located in the EU.

Testing on Older Hardware

Force-enable AI features on early Apple Silicon machines that Apple has artificially restricted.

Feature Exploration

Allow developers outside the US to test their applications against the new Apple Intelligence APIs.

System Modification

Automate the tedious process of spoofing device identifiers for various macOS tweaks.

Getting started: sudo ./enableAI.sh

README

main branch

enableMacosAI:在国行 Mac(macOS 27)上恢复 Apple 智能资格

本项目用一个极简内核扩展 RegionSpoof(kext),在 IORegistry 源头把设备区域码从 CH/A 改成 LL/A(美版),让 MobileGestalt 对全系统每个进程都返回美版区域,从而让国行机通过 Apple 智能的 设备区域资格门。

它解决的是资格层,不是 Apple 服务端或 Private Cloud Compute(PCC)的网络层。GREYMATTER=4 只说明资格通过,不代表云端功能一定可用;联网功能报错时请看「故障排查」里的 PCC 一节。

**只有国行机型需要它。**在「系统信息 → 硬件」里看型号编号,以 CH/A 结尾才是国行。港版(ZP/A) 等非国行机型本身就有资格,在大陆用不了多半是网络问题,见「故障排查」的 PCC 一节,不需要关 SIP 装本项目。

当前状态

  • macOS 27.3 Beta(26C5035r):在 Mac15,9 / M3 Max 上 kext 已加载、region-info=LL/A、 GREYMATTER=4,端侧模型与 PCC 云端功能均可用。

前置条件(Apple Silicon)

  1. **允许第三方 kext。**这是两道独立的闸门,都在恢复模式(1TR)里开,顺序不能反(#79):

    1. 启动安全性实用工具 → 选当前系统 → 安全策略 →「降低安全性」,勾选 「允许用户管理来自被认可开发者的内核扩展」;
    2. 在同一次恢复模式里打开终端,运行 csrutil enable --without kext(第 1 步会重置 SIP 设置, 所以必须在它之后)。系统不接受时再用 csrutil disable,后者关闭的保护超过本项目所需。

    配置后 csrutil status 里 Kernel Integrity Protections 也会显示 disabled,这是该命令本身的行为; 本地启动策略会是 Permissive,不是 Reduced。代价是为 iPhone / iPad 设计的 App 在这台 Mac 上 无法打开(#111),目前没有既加载本 kext 又保持 Reduced 的办法。

  2. nvram boot-args 里不能有 amfi_get_out_of_my_way=1,它会破坏 PCC。安装器会检测并移除它。

  3. **首次加载要批准。**在「系统设置 → 隐私与安全性」底部点 允许 / Allow,然后重启,首次可能要 重启两次。如果那里只有「启用系统扩展… / Enable System Extensions…」按钮,说明第 1 条的第一道 闸门没开。

  4. Apple 账户「媒体与购买项目」地区必须是 Apple 智能支持区,不能是中国。改成美国、日本等: 系统设置 → 顶部你的名字 → 媒体与购买项目 → 管理 → 国家/地区。

  5. 系统语言与 Siri 语言一致,且是 Apple 智能支持的语言,最稳是两者都设成 English (US)。新 Siri 目前只认英文。想要中文界面请看「中文界面」一节,不要改全局语言。

安装

一键安装(推荐)

sudo ./install.sh

脚本会检查 Apple Silicon、SIP 与第三方 kext 启动策略,移除 amfi_get_out_of_my_way,安装 kext 并配置开机自启,然后加载 kext、刷新 Apple 智能守护进程。首次运行会提示你去批准并重启(前置条件 第 3 条),重启后再运行一次即可。加载失败时,脚本会区分「未批准」「已批准待重启」「启动策略未允许 第三方 kext」三种情况,分别给出处理步骤。

常用命令

sudo ./install.sh status      # 体检:SIP / AMFI / region / kext / 资格 / 开机自启
sudo ./install.sh refresh     # region 已是 LL/A 时重新计算资格,不改 SIP 或文件权限
sudo ./install.sh diagnose    # 一键诊断:全部关键状态打成一段纯文本,报 issue 直接贴这个
sudo ./install.sh pcc         # 只读分类最近 30 分钟的 PCC / 中继 / 令牌状态
sudo ./install.sh uninstall   # 卸载,重启后恢复原始区域

安装后的预期结果:status 里 region=LL/A 为「是」、kext 已加载、GREYMATTER 为 4。

升级与系统更新

  • 升级本项目:拉取新版本后重新运行 sudo ./install.sh,不用先卸载。脚本会比较已安装的 kext, 没变就跳过;二进制变了会提示你重新允许并重启。
  • macOS 更新后:第一次开机系统要重建扩展缓存,AI 可能暂时失效,再重启一次通常就恢复 (#113)。仍不行再跑 sudo ./install.sh status。

手动安装(可选)

sudo cp -R RegionSpoof.kext /Library/Extensions/
sudo chown -R 0:0 /Library/Extensions/RegionSpoof.kext
sudo mkdir -p /usr/local/bin   # 干净系统上这个目录可能不存在
sudo cp region-kext-load.sh /usr/local/bin/ && sudo chmod +x /usr/local/bin/region-kext-load.sh
sudo cp com.local.regionkext.plist /Library/LaunchDaemons/
sudo kmutil load -p /Library/Extensions/RegionSpoof.kext   # 首次会提示去设置里允许,然后重启

不用安装器时,手动核对结果:

# region-info 应为 0x4c4c2f41("LL/A")
ioreg -ard1 -c IOPlatformExpertDevice | plutil -p - | grep region-info
# GREYMATTER 资格应为 4
sudo /usr/libexec/PlistBuddy -c 'Print :OS_ELIGIBILITY_DOMAIN_GREYMATTER:os_eligibility_answer_t' \
  /private/var/db/eligibilityd/eligibility.plist

手动卸载(可选)

优先用 sudo ./install.sh uninstall。手动操作如下,重启后恢复原区域:

sudo launchctl bootout system/com.local.regionkext 2>/dev/null
sudo kmutil unload -b com.local.RegionSpoof 2>/dev/null
sudo rm -f /Library/LaunchDaemons/com.local.regionkext.plist /usr/local/bin/region-kext-load.sh
sudo rm -rf /Library/Extensions/RegionSpoof.kext

中文界面(逐 App 汉化,不掉资格)

资格判定读的是用户全局的 AppleLanguages 与 Siri 语言,而新 Siri 的语言白名单目前只有英文。 系统语言一旦切成中文,新 Siri 就会掉。这一点已在 eligibilityd 里逐指令核实:界面语言和资格用的是 同一个值,没有「选中文但对检测器伪装英文」的余地。

perapp-zh/ 反过来做:全局保持 English,把中文写进每个 App 自己的偏好域,等价于在「语言与地区 → 应用程序」里逐个添加,eligibilityd 不读这些域。系统设置这类被 Apple 硬排除的 App,由一个常驻代理 带 -AppleLanguages 启动参数拉起,Dock 里只有一个图标,深链接也不丢目标。所有改动记录在案,可一键回退。

cd perapp-zh
./perapp-zh.sh dry-run       # 只统计,不改任何东西
./perapp-zh.sh all           # Finder / Dock / 自带 App / 小组件 / 系统设置
./perapp-zh.sh third-party   # 第三方 App(范围大,单独执行)
./perapp-zh.sh status        # 查看当前状态
./perapp-zh.sh revert        # 一键回退,逐项恢复原值

不要用 sudo 运行它,它改的是当前用户的偏好。细节、边界与回退机制见 perapp-zh/README.md。

故障排查

拿不准卡在哪,先跑一键诊断:

sudo ./install.sh diagnose

它把 SIP、AMFI、本地启动策略、region、kext、开机加载日志、资格逐项输入、语言与汉化状态、PCC 分类 一次性打成一段纯文本,对照下面各节即可定位。提 issue 时请贴这段输出,分享前先检查并去掉你不想 公开的信息。

kext 没加载(region 不是 LL/A)

  • kext 签名检查仍开启:回恢复模式运行 csrutil enable --without kext,或完整 csrutil disable。
  • 没批准:kmutil load -p 报 not approved。去「隐私与安全性」点允许,然后重启。
  • 隐私与安全性里找不到 RegionSpoof,只有「启用系统扩展…」:第三方 kext 的启动策略没开。 diagnose 的本地安全策略里会看到 3rd Party Kexts Status: Disabled (smb2),开机日志里有 auxiliary extensions not allowed。按「前置条件」第 1 条的顺序在恢复模式里处理(#79、#105)。
  • 批准过了,重启后仍未加载:看 diagnose 里「最近一次开机加载日志」,它会记录 kmutil 的原始 报错。本地安全策略里只有 auxp、没有 auxi / auxr,说明批准了但扩展缓存没建成,再重启一次。
  • Authenticating extension failed: Bad code signature:先确认 csrutil status 里是 Kext Signing: disabled,不要只凭「部分 / 完整 SIP」猜测。
  • 系统版本差异:太新或太旧的 macOS 可能验签或 KPI 不符,需按 BUILD.md 从源码重编。

kext 已就位,但 GREYMATTER 仍是 2

区域只是约 10 个资格输入之一,需检查设备地区、账户地区和语言等条件。查看各项输入:

sudo /usr/libexec/PlistBuddy -c "Print :OS_ELIGIBILITY_DOMAIN_GREYMATTER:status" \
  /private/var/db/eligibilityd/eligibility.plist

2 表示不满足、3 表示满足,但个别输入为 2 不一定导致整个域失败,最终以 GREYMATTER 的 answer 为准。改完对应设置后,在项目目录运行 sudo ./install.sh refresh。

恢复 SIP 后资格回到 2(文件未锁定)

如果 region=LL/A、文件没有 uchg/schg,但 DEVICE_REGION_CODE=2,可能是资格服务在 kext 修改区域之前启动,保留了旧地区结果。csrutil enable --without kext 并不保证允许 launchctl kickstart -k system/com.apple.eligibilityd,它仍可能报 SIP 错误 150。 旧脚本会吞掉这个错误,仅凭区域为 LL/A 就打印刷新成功。 类似反馈见 #92(评论已提出先手动终止进程)、 #126 和 #131。

在本项目目录执行:

sudo ./install.sh refresh

安装器与开机脚本共用同一流程:对运行中的资格服务发送 TERM,等待旧进程退出,再发送 AFLanguageCodeDidChangeDarwinNotification。这是该服务订阅的按需启动事件,不修改实际语言设置。 仅终止服务不够,因为它不一定自行重新启动;此时读 plist 仍可能得到旧结果。 脚本会检查新 PID 和资格文件更新,并最多等待 30 秒让资格重算;超时、通知失败或文件锁定会明确报错。 modelcatalogd 和 modelmanagerd 会先尝试 kickstart -k,被 SIP 拒绝时分别改用 KILL 和 TERM 结束旧进程,由系统按需重新拉起(modelcatalogd 收到 TERM 会卡在退出流程,所以不用它)。 两者刷新失败只记录提示,不影响资格结果。

refresh 只处理当前会话。要让开机使用修正后的流程,更新项目后执行一次 sudo ./install.sh, 将新版加载脚本复制到 /usr/local/bin/region-kext-load.sh。下次重启后用 status 与 /var/log/region-kext.log 验证,成功日志应包含 OK: region=LL/A, GREYMATTER=4。

资格文件被锁定

症状:region=LL/A,但 DEVICE_REGION_CODE 仍是 2,或者重启后又回退。 此症状本身不能证明文件锁定;先看 status / diagnose 是否实际检测到 uchg/schg,没有则参考上一节。

旧教程常让人 chflags uchg 锁定资格文件。锁住后 eligibilityd 写不进新结果,status / diagnose 读到的是锁定那天的旧值,可能一直是 2,也可能是一个过时的 4。现在 status 和 diagnose 发现这种 情况会直接标出「资格文件被锁定」并列出文件。

解锁即可,不需要改权限:正常状态下这些文件本来就是只读(0444,root:_eligibilityd), eligibilityd 通过替换文件写入。

# 在项目目录执行,避免 cd /private/var/db 后找不到 install.sh
sudo chflags nouchg,noschg /private/var/db/eligibilityd/* /private/var/db/os_eligibility/eligibility.plist
ls -lO /private/var/db/eligibilityd /private/var/db/os_eligibility  # 应无 uchg / schg
# 仅当目录属主被改过时需要:
# sudo chown _eligibilityd:_eligibilityd /private/var/db/eligibilityd /private/var/db/os_eligibility
sudo ./install.sh refresh
sudo ./install.sh status

chflags 报 Operation not permitted 时,先给「终端」开「完全磁盘访问权限」再试。若确认带有 schg 且仍无法解锁,需要进恢复模式临时 csrutil disable 后解锁,完成后再恢复原来的 SIP 设置 (#20)。恢复后仍回退时,检查上一节的服务刷新流程。

PCC 云端功能报错(写作工具语气改写、图乐园、Siri 联网回答等)

**端侧模型正常不能证明 PCC 正常。**PCC 走的是 Apple 私有中继,普通的系统 HTTP 代理对它无效。 多位用户反复验证出的代理写法(#49、#59、#80):

  • **TUN / 增强模式 + 全局。**规则模式要给 Apple 相关域名补规则,最省事是全局。Surge 用户只开 增强模式,不要开 system proxy(#59)。
  • 开机联网后立刻挂上代理,再登录、再用 AI。节点要稳定且快,速度忽快忽慢会表现为时好时坏的报错(#49)。
  • Apple 的服务端围栏会变(#51 里 8 月 13 日放开、14 日又收紧),时好时坏不一定是本地问题。

反复失败时别连点,每次失败都可能触发 Apple 后端限流。先用只读分类器判断卡在哪:

sudo ./install.sh pcc                 # 默认最近 30 分钟
sudo ./install.sh pcc --since 2h      # 自定义窗口
分类 含义 解法
HEALTHY 最近请求完成了证明验证和 PCC 调用 云端链路在该时刻已实证可用
CALLER_TIMEOUT_PCC_LATE PCC 最终成功,但调用方应用已经先超时 只能算 PCC 基础链路通,不算端到端成功;检查证明池和预取
RATE_LIMITED 32001 / RetryAfter 停手,按提示时间等待;没有时间时至少等几个小时
RELAY_OR_INLINE_TIMEOUT NWError 89 / 32057 / 32080,或只收到不足 2 个内联节点 等令牌补充后只重试一次;检查当前中继和网络,不删库
ATTESTATION_CACHE_MISS 本地证明库暂时没有可用节点 让守护进程在线回填,先等待
PREFETCH_STALLED 后台预取持续超过 2 分钟,证明池仍为空 预取卡在中继或服务端;不要删库,先处理网络路径或稍后再试
NO_RECENT_REQUEST 窗口内没有结束的 PCC 请求 触发一次不含隐私内容的联网操作,等约 60 秒再跑
PCC_REQUEST_FAILED 请求失败,但不符合以上任何已知模式 先确认代理配置;社区在 27.0.1 上用 launchctl kickstart -k gui/$(id -u)/com.apple.privatecloudcomputed(networkserviceproxy、swtransparencyd 同样处理)恢复过(#93)

Sandbox: privatecloudcomputed deny ... AppleKeyStoreUserClient / AKS Locked 只能作旁证:成功的 PCC 请求也可能伴随同类记录。不要删除证明池,对中继交付超时删库既不对因,还可能让冷启动更慢。

原理

  • 资格门的根因:MGGetStringAnswer("RegionCode") == "CH" 时 Apple 智能被关闭。
  • 该值实时来自 IORegistry IOPlatformExpertDevice 的 region-info 属性("CH/A"),不是任何 plist 缓存。macOS 27 的 eligibilityd 基于 SwiftData 实时重算,旧的改 plist / 锁 uchg 方法全部失效。
  • 本 kext 匹配 IOPlatformExpertDevice,在 start() 里执行 setProperty("region-info", "LL/A") 和 setProperty("country-of-origin", "USA")。全系统进程从源头读到美版,资格、模型下发、前端 UI 都随之生效,无需逐进程注入。

文件

路径 作用
install.sh 一键安装 / 升级 / 卸载 / 体检 / 诊断脚本
pcc-diagnose.sh PCC / 隐私中继 / 证明节点只读分类器,不输出请求内容
tests/test-pcc-diagnose.sh PCC 分类器离线夹具测试
perapp-zh/ 逐 App 汉化,全局保持英文保资格,见 perapp-zh/README.md
RegionSpoof.kext/ 已编译好的 kext(arm64e,ad-hoc 签名)
src/RegionSpoof.cpp kext 源码(IOService,改 region-info)
src/kmod_info.c kext 入口声明,提供链接必需的 _kmod_info 符号
src/Info.plist kext 的 Info.plist(IOKitPersonalities 匹配 IOPlatformExpertDevice)
com.local.regionkext.plist LaunchDaemon,开机自动加载 kext 并刷新 AI 守护进程
region-kext-load.sh LaunchDaemon 调用的加载脚本,日志在 /var/log/region-kext.log
BUILD.md 完整编译 / 链接命令

已知边界

  • 安全策略:本 kext 是 ad-hoc 签名,必须关闭 kext 签名检查并允许第三方 kext,本地启动策略最终 都是 Permissive,iPhone / iPad App 因此无法在这台 Mac 上打开(#111)。
  • PCC 云端还依赖中继令牌、内联证明和 Apple 服务端状态,本项目只负责资格门。boot-args 为空也 不能证明 PCC 一定可用。
  • 新 Siri 等候名单由 Apple 服务端分批下发,与本地改区域无关。
  • 新 Siri 的语言白名单目前只有英文(en-*),系统语言设为中文会直接掉新 Siri;要中文界面用 perapp-zh/,别改全局语言。
  • ChatGPT 扩展的地区判断由 OpenAI 一侧决定,和 Apple 智能资格是两回事,本项目处理不了。社区 经验是 ChatGPT 流量走支持地区的节点、用 TUN 模式或更换网络后有人恢复 (#97、#108、#115)。写作工具在空白内容上调用 ChatGPT 会让 App 崩溃,是系统 bug(#112)。

许可证

本项目基于 Apache License 2.0 发布。

View on GitHub

Recent activity

commits and pull requests

Recent open issues

view all

Code frequency

additions and deletions
+965-965Week of 2026-06-07: +764 linesWeek of 2026-06-07: -7 linesWeek of 2026-06-14: +0 linesWeek of 2026-06-14: -0 linesWeek of 2026-06-21: +0 linesWeek of 2026-06-21: -0 linesWeek of 2026-06-28: +0 linesWeek of 2026-06-28: -0 linesWeek of 2026-07-05: +0 linesWeek of 2026-07-05: -0 linesWeek of 2026-07-12: +0 linesWeek of 2026-07-12: -0 linesWeek of 2026-07-19: +0 linesWeek of 2026-07-19: -0 linesWeek of 2026-07-26: +0 linesWeek of 2026-07-26: -0 linesWeek of 2026-08-02: +0 linesWeek of 2026-08-02: -0 linesWeek of 2026-08-09: +0 linesWeek of 2026-08-09: -0 linesWeek of 2026-08-16: +0 linesWeek of 2026-08-16: -0 linesWeek of 2026-08-23: +0 linesWeek of 2026-08-23: -0 linesWeek of 2026-08-30: +0 linesWeek of 2026-08-30: -0 linesWeek of 2026-09-06: +965 linesWeek of 2026-09-06: -144 linesWeek of 2026-09-13: +0 linesWeek of 2026-09-13: -0 linesWeek of 2026-09-20: +0 linesWeek of 2026-09-20: -0 linesWeek of 2026-09-27: +0 linesWeek of 2026-09-27: -0 linesWeek of 2026-10-04: +0 linesWeek of 2026-10-04: -0 linesWeek of 2026-10-11: +429 linesWeek of 2026-10-11: -193 linesWeek of 2026-10-18: +219 linesWeek of 2026-10-18: -13 linesWeek of 2026-10-25: +0 linesWeek of 2026-10-25: -0 linesWeek of 2026-11-01: +0 linesWeek of 2026-11-01: -0 linesWeek of 2026-11-08: +393 linesWeek of 2026-11-08: -57 linesWeek of 2026-11-15: +0 linesWeek of 2026-11-15: -0 linesJun 7, 2026Nov 15, 2026
+2.8K lines added, -414 removed over the last year.

Commits per week

last 52 weeks
30Week of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 0 commitsWeek of 2026-03-01: 0 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 0 commitsWeek of 2026-03-22: 0 commitsWeek of 2026-03-29: 0 commitsWeek of 2026-04-05: 0 commitsWeek of 2026-04-12: 0 commitsWeek of 2026-04-19: 0 commitsWeek of 2026-04-26: 0 commitsWeek of 2026-05-03: 0 commitsWeek of 2026-05-10: 0 commitsWeek of 2026-05-17: 0 commitsWeek of 2026-05-24: 0 commitsWeek of 2026-05-31: 0 commitsWeek of 2026-06-07: 3 commitsWeek of 2026-06-14: 0 commitsWeek of 2026-06-21: 0 commitsWeek of 2026-06-28: 0 commitsWeek of 2026-07-05: 0 commitsWeek of 2026-07-12: 0 commitsWeek of 2026-07-19: 0 commitsWeek of 2026-07-26: 0 commitsWeek of 2026-08-02: 0 commitsWeek of 2026-08-09: 0 commitsWeek of 2026-08-16: 0 commitsWeek of 2026-08-23: 0 commitsWeek of 2026-08-30: 0 commitsWeek of 2026-09-06: 1 commitsWeek of 2026-09-13: 0 commitsWeek of 2026-09-20: 0 commitsWeek of 2026-09-27: 0 commitsWeek of 2026-10-04: 0 commitsWeek of 2026-10-11: 1 commitsWeek of 2026-10-18: 1 commitsWeek of 2026-10-25: 0 commitsWeek of 2026-11-01: 0 commitsWeek of 2026-11-08: 3 commitsWeek of 2026-11-15: 0 commitsNov 23, 2025Nov 15, 2026
9 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 0 commitsSun 1:00 — 0 commitsSun 2:00 — 0 commitsSun 3:00 — 0 commitsSun 4:00 — 0 commitsSun 5:00 — 0 commitsSun 6:00 — 0 commitsSun 7:00 — 0 commitsSun 8:00 — 0 commitsSun 9:00 — 0 commitsSun 10:00 — 0 commitsSun 11:00 — 0 commitsSun 12:00 — 0 commitsSun 13:00 — 0 commitsSun 14:00 — 0 commitsSun 15:00 — 0 commitsSun 16:00 — 0 commitsSun 17:00 — 0 commitsSun 18:00 — 0 commitsSun 19:00 — 0 commitsSun 20:00 — 0 commitsSun 21:00 — 0 commitsSun 22:00 — 1 commitsSun 23:00 — 0 commitsMon 0:00 — 0 commitsMon 1:00 — 0 commitsMon 2:00 — 0 commitsMon 3:00 — 0 commitsMon 4:00 — 0 commitsMon 5:00 — 0 commitsMon 6:00 — 0 commitsMon 7:00 — 0 commitsMon 8:00 — 0 commitsMon 9:00 — 0 commitsMon 10:00 — 0 commitsMon 11:00 — 0 commitsMon 12:00 — 0 commitsMon 13:00 — 0 commitsMon 14:00 — 0 commitsMon 15:00 — 0 commitsMon 16:00 — 0 commitsMon 17:00 — 0 commitsMon 18:00 — 0 commitsMon 19:00 — 0 commitsMon 20:00 — 0 commitsMon 21:00 — 0 commitsMon 22:00 — 0 commitsMon 23:00 — 0 commitsTue 0:00 — 0 commitsTue 1:00 — 0 commitsTue 2:00 — 0 commitsTue 3:00 — 0 commitsTue 4:00 — 0 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 0 commitsTue 8:00 — 0 commitsTue 9:00 — 0 commitsTue 10:00 — 0 commitsTue 11:00 — 0 commitsTue 12:00 — 0 commitsTue 13:00 — 0 commitsTue 14:00 — 0 commitsTue 15:00 — 0 commitsTue 16:00 — 0 commitsTue 17:00 — 0 commitsTue 18:00 — 0 commitsTue 19:00 — 0 commitsTue 20:00 — 0 commitsTue 21:00 — 0 commitsTue 22:00 — 0 commitsTue 23:00 — 0 commitsWed 0:00 — 0 commitsWed 1:00 — 0 commitsWed 2:00 — 0 commitsWed 3:00 — 0 commitsWed 4:00 — 0 commitsWed 5:00 — 0 commitsWed 6:00 — 0 commitsWed 7:00 — 0 commitsWed 8:00 — 0 commitsWed 9:00 — 0 commitsWed 10:00 — 0 commitsWed 11:00 — 0 commitsWed 12:00 — 0 commitsWed 13:00 — 0 commitsWed 14:00 — 0 commitsWed 15:00 — 1 commitsWed 16:00 — 1 commitsWed 17:00 — 0 commitsWed 18:00 — 0 commitsWed 19:00 — 0 commitsWed 20:00 — 0 commitsWed 21:00 — 0 commitsWed 22:00 — 1 commitsWed 23:00 — 0 commitsThu 0:00 — 0 commitsThu 1:00 — 0 commitsThu 2:00 — 0 commitsThu 3:00 — 0 commitsThu 4:00 — 0 commitsThu 5:00 — 0 commitsThu 6:00 — 0 commitsThu 7:00 — 0 commitsThu 8:00 — 0 commitsThu 9:00 — 0 commitsThu 10:00 — 0 commitsThu 11:00 — 0 commitsThu 12:00 — 0 commitsThu 13:00 — 0 commitsThu 14:00 — 0 commitsThu 15:00 — 0 commitsThu 16:00 — 0 commitsThu 17:00 — 0 commitsThu 18:00 — 0 commitsThu 19:00 — 0 commitsThu 20:00 — 0 commitsThu 21:00 — 1 commitsThu 22:00 — 0 commitsThu 23:00 — 0 commitsFri 0:00 — 0 commitsFri 1:00 — 2 commitsFri 2:00 — 0 commitsFri 3:00 — 0 commitsFri 4:00 — 0 commitsFri 5:00 — 0 commitsFri 6:00 — 0 commitsFri 7:00 — 0 commitsFri 8:00 — 0 commitsFri 9:00 — 0 commitsFri 10:00 — 0 commitsFri 11:00 — 0 commitsFri 12:00 — 0 commitsFri 13:00 — 0 commitsFri 14:00 — 0 commitsFri 15:00 — 0 commitsFri 16:00 — 0 commitsFri 17:00 — 0 commitsFri 18:00 — 0 commitsFri 19:00 — 1 commitsFri 20:00 — 0 commitsFri 21:00 — 0 commitsFri 22:00 — 0 commitsFri 23:00 — 0 commitsSat 0:00 — 0 commitsSat 1:00 — 0 commitsSat 2:00 — 0 commitsSat 3:00 — 0 commitsSat 4:00 — 0 commitsSat 5:00 — 0 commitsSat 6:00 — 0 commitsSat 7:00 — 0 commitsSat 8:00 — 0 commitsSat 9:00 — 0 commitsSat 10:00 — 0 commitsSat 11:00 — 0 commitsSat 12:00 — 0 commitsSat 13:00 — 0 commitsSat 14:00 — 0 commitsSat 15:00 — 0 commitsSat 16:00 — 1 commitsSat 17:00 — 0 commitsSat 18:00 — 0 commitsSat 19:00 — 0 commitsSat 20:00 — 0 commitsSat 21:00 — 0 commitsSat 22:00 — 0 commitsSat 23:00 — 0 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits9 (90%)
Community commits1 (10%)

10 commits in total over the last year.

DateListRankStars gained
Jun 13, 2026daily#24+30
  • mattpocock/skills

    Skills for Real Engineers. Straight from my .agents directory.

    329K stars · Shell

  • obra/superpowers

    An agentic skills framework & software development methodology that works.

    322.9K stars · Shell

  • msitarzewski/agency-agents

    A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.

    169.6K stars · Shell

  • nvm-sh/nvm

    Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions.

    96.3K stars · Shell

  • tw93/Mole

    🐹 Open-source Mac and PC cleaner. Keep your machine clean, light, and running like new. Fast CLI, plus native Mac and Windows apps.

    75.7K stars · Shell

  • obsidianmd/obsidian-skills

    Agent skills for Obsidian. Teach your agent to use Obsidian CLI and open formats including Markdown, Bases, JSON Canvas.

    53.2K stars · Shell