Kianuni/Erosion-CN
About
iOS / iPadOS toolbox for configuring Apple Intelligence, eSIM, and MobileGestalt on mainland-China devices (bilingual Chinese/English · bootloop-safe, security-hardened edition)
Web & App DevelopmentMeasured star growth
- in 24h
- +17
- in 7 days
- +298
- in 15 days
- +620
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README_EN.md
OriginalErosion-CN (Bilingual Edition)
An iOS / iPadOS System Customization, Cross-Container & Bootloop-Hardened MobileGestalt Research Toolkit powered by worse_query
Supports iOS / iPadOS 27.0 – 27.2.1 & 27.3 beta 1 (Full Support) and iOS / iPadOS 26.x (Partial Support).
简体中文文档 · English · AppleFlow Routing & Config Doctor · AppleLens macOS Inspector · Lokey Offline Native Keyboard
[!WARNING] Important Version Notice (2026-11-17): Apple has patched
worse_queryiniOS / iPadOS 27.3 beta 2(24C5049d) — updating breaksMobileGestaltaccess and resets existing tweaks. Maximum supported version is27.3 beta 1. Stay oniOS 27.2.1(best feature compatibility) and disable automatic updates.
Overview
Not just a translation — Erosion-CN is a bootloop-safe, zero-hardcoded-offset, bilingual (English / 简体中文) hardened edition of jailbreakdotparty/Erosion built for all regions & devices.
While it began as a Simplified Chinese fork, it has evolved into an engineering-first overhaul with persistent in-place writes, runtime libMobileGestalt.dylib slot resolution, and dual-vault factory backups. Starting with v0.9.0, a single IPA ships with full English + Simplified Chinese support:
- Automatically matches your device's system language out of the box (English for all non-Chinese system locales, Simplified Chinese for
zh*). - Includes an instant Language Switcher in Settings → App Language (
Follow System/English/简体中文).
⌨️ Also by Kianuni: Lokey — Air-gapped, physically zero-network iOS Chinese keyboard (26-key Full Pinyin with phrase swipe, native 2-row 9-key T9 & Xiaohe/Ziranma/Microsoft Shuangpin) with 1:1 native ergonomics (App Store · Audit Repo · 554k Frost Pack).
📜 Full version history: CHANGELOG.md · Releases
📖 Independent Architecture Deep-Dive (zh-Hans, with SVG diagrams): Fromworse_queryEscape toMobileGestaltRuntime Reconstruction: Inside Erosion-CN's Bootloop-Safe In-Place Write & Dual-Vault Architecture
Key Improvements Over Upstream
Persistent In-Place MobileGestalt Writes & Bootloop Hardening
- Replaces temp-file swaps (
replaceItemAt) with a zero-byte-window in-place write protocol (pwriteat offset0+ tailftruncate+fcntl(fd, F_FULLFSYNC)), preserving original inode and_mobilegestaltownership so tweaks survive reboots without reverting. - Avoids injecting non-cached keys (such as
RegionInfoon iOS 27) that trigger boot-time cache invalidation, and strips brick-prone toggles (regex-sliced iPadOS mode on iPhone, fake retail supervision). - Pre-Apply Diff Preview + Post-Write Readback Verification: Previews every key/hex change before writing, saves a
PreApplyGestalt.plistsnapshot, and automatically rolls back on any readback mismatch.
- Replaces temp-file swaps (
Lossless CoreFoundation Plist Serialization (No Camera Black Screen)
- Preserves exact
CFBoolean(<true/>/<false/>) and floating-pointCFNumber(1.0,2.0,5.0camera zoom factors) types viaCFBooleanGetTypeID()andCFNumberIsFloatType(), passing unmodified entries through losslessly.
- Preserves exact
Zero-Hardcoded Runtime
libMobileGestalt.dylibBinaryCacheDataEngine- Dynamically scans loaded
libMobileGestalt.dylibquery descriptors in memory to resolve exactCacheUUID, slot count, and booleanCacheDataslot offsets for your exact device and iOS build. - Promotes Dynamic Island, Always-On Display, Liquid Glass Low-Power Rendering, 80% Charge Limit, Boot Chime, Crash Detection, PWM Dimming, Camera Control, Action Button, Tap to Wake, Stage Manager, Audio Mix, Spatial Audio, Responsive Shutter, Hypertension Notifications, and 14 experimental hardware capability slots to dual
CacheData + CacheExtrawrites with native hardware anti-downgrade locks. - Live
MGCopyAnswerInspector (MGInspectorView): Compares factory backup values, stagedCacheData / CacheExtravalues, and liveMGCopyAnsweranswers side by side across all720+dynamic slots.
- Dynamically scans loaded
Dual-Vault Factory Backup & One-Tap Factory Restore
- Mirrors your clean
OriginalGestalt.plist+SHA-256digest into both app storage and a persistent shared system vault so your clean factory backup survives app uninstalls/reinstalls. - One-Tap Factory Restore verifies
SHA-256,CacheVersion,CacheUUID,CacheDatabyte length, and kernelProductType, restoring factory state and cleaning up Lock Screen footnote, asset tag, fake supervision leftovers, and keypad caches in one step.
- Mirrors your clean
CSStore2Millisecond Container Mapper & Cross-Container Modules (v0.8.x – v0.9.0)CSStore2(bdsl) Fast Container Engine: Parses LaunchServices.csstoredatabases (with iOS 26.3.x bookmark TLV fallback and boundedpathleakfallback for high-inode devices) to map all app, plugin, and App Group containers in milliseconds.- App & Game Save Manager (
AppDataBackupView): Back up, export, and restoreDocuments+Library/Preferences.ziparchives across app reinstalls (auto-resolving new container UUIDs), or jump straight into the lossless Plist/Text editor. - Container Cache Cleaner (
CacheCleanerView): Rank and cleanLibrary/Cachesandtmpacross app containers while protecting user documents and databases. - Battery Health & Thermal Telemetry (
PowerTelemetryView): Zero-lock APFSclonefile()snapshot reader forCurrentPowerlog.PLSQL(RawMaxCapacity, cycle count, real-time wattage, cell temperature, thermal throttling history). - Crash & Jetsam Analyzer (
CrashDiagnosticsView): Inspect and cleanosanalytics.ipscrash, Jetsam (298), and watchdog (210) reports. - App Group Hub & Safari Bookmarks Exporter (
AppGroupHubView): Export Safari bookmarks (HTML / JSON) and generate Surge.sgmodule/ Stash.stoverriderouting rules. - Voice Memos & Call Recording Extractor (
VoiceMemosAIView): Batch-export lossless.m4arecordings titled viaCloudRecordings.dband inspect on-device AI/speech model caches.
v1.0.0 – v1.0.3— APFS Swap Vault, Wi-Fi File Sharing, Splash Ad Blocker Pro, File Manager Pro & OS Sentinel- APFS
clonefile()Zero-Space App Swap Vault & Interactive Guide (APFSStagingVault/APFSVaultGuideSheet): Kernel CoWclonefile()snapshot staging forDocuments,Library/Application Support, andLibrary/Preferenceswith 5-layer foolproofing — (1)embedded.mobileprovision< 24h/ expired cert gate, (2) 10s active SQLite WAL lock check, (3) copy-never-moveclonefile()with WeChat 32-hex MD5 account detection, (4)manifest.jsonitem-count integrity verification, and (5) atomic.erosion_pre_restore_bakswap & rollback + cross-BundleID.plistadaptation + vault retention + persistent Home banner warning against uninstalling Erosion + built-in step-by-step guide. - Wi-Fi HTTP File Sharing (
WiFiShareServer/WiFiShareSheet):NWListenerHTTP server with random 6-digit PIN Basic Auth (accepts blank or case-insensitive'erosion'username), dark-mode Web UI, 64 KB chunked downloads, folder.zipdownloads (2 GB cap), 64 KB chunked.partuploads with non-destructive auto-renaming, Safari/macOS Local Network tips, and automatic stop on dismiss/background. - Splash Ad Cache Blocker Pro (
AdCacheBlockerView/AdCustomWatchStore): Scans both app containers andShared/AppGroupcontainers for ad SDK caches (KSAdSDK,BUAdSDK,GDTMobSDK,TADCache,SplashAd, etc.) and standalone ad config files (splash_ad.json/.plist), adds anti-recreate0444.erosion_adlocksentinel locks inside0555folders, inline file preview, custom watch-list rules (via+or File Browser long-press), and clear boundary guidance recommending proxy ad-block pairing. - Folder Search, Top 100 Largest Files, Recent & Go to Path (
FolderAnalysisSheet/FMNavigationStore): Cancellable recursive subfolder search (500-match cap), fastfstatatTop 100 largest files ranking, 15 recent non-root folders, and clipboard-aware/var/Go to Path. - POSIX Permission Editor (
InfoViewer): Safechmodtoggles (0555/0444read-only,0755/0644read-write, customr/w/xbits withlstatverification) strictly restricted to non-root user app & App Group data subpaths (mobileowner only;SystemGroup/Bundle/Daemon/Systemblocked). - Fast Cache Cleaner & Selection Menu (
CacheCleanerView):.userInitiatedscan queue, per-scandeniedContainerscache, POSIXopendir/readdir/fstatatsize counting, live progress + Stop button, andSelect All/Invert/Select Nonemenu (including hidden entries). iOS 27.3 beta 2+Patched Sentinel &27.3 beta 1Notice (DeviceInfoHelpers/ContentView/GestaltView): Accurately distinguishes27.3 beta 1(24C503*) from27.3 beta 2+(24C504*+ /26.7.3+), displays non-blocking Home &worse_queryerror warnings without force-exiting the app, and shows a read-onlyeligibilitydCN policy notice on27.3 beta 1.
- APFS
Compatibility
[!IMPORTANT] Always create a full computer backup before modifying system files. Use at your own risk on devices you own.
- iOS / iPadOS 27.0 – 27.2.1 & 27.3 beta 1: Full support (including
MobileGestaltread/write andCacheDataslot unlocks).- ⚠️ iOS 27.3 beta 1 limitation on China (
CH/A) hardware: writes and most features work, but generative cloud features (High-Quality Clean Up / Extend / Reframe, CameraSIRI) are blocked locally (log:Eligibility returned no CN region policy on a CH region code device) and cannot be bypassed via MobileGestalt. Stay on / return to iOS 27.2.x if you need them. See FAQ #2.
- ⚠️ iOS 27.3 beta 1 limitation on China (
- iOS / iPadOS 26.0 – 26.7.2: Partial support (PosterBoard wallpapers, Keypad themes, Lock Screen footnote, container browser, and read-only diagnostics; iOS 26 sandbox blocks writing to
com.apple.MobileGestalt.plist).
Installation & Sideloading
[!WARNING] Erosion requires at least one valid
App Groupentitlement injected by your signing tool. Sign and install using SideStore, AltStore, Feather, Sideloadly, Impactor, iLoader, or a paid Apple Developer certificate with an App Group enabled.
Option A: Subscribe to Official Auto-Updating Source (Recommended)
Tap any button below on your iOS/iPadOS device to add the official source (auto-synced on every GitHub Release, with declared App Group entitlement and SHA-256 checksums):
Or copy and add the source URL manually (compatible with SideStore, AltStore, Feather, LiveContainer, and ESign):
https://raw.githubusercontent.com/Kianuni/Erosion-CN/main/apps.json
Option B: Manual IPA Sideloading
- Download the latest
Erosion_v1.0.3_Bilingual.ipafrom Releases. - Sideload with any signing tool that preserves/injects an
App Groupentitlement (check the Home log on first launch to confirm(wq) Active App Group:is non-empty). - If your device is not already in English, Erosion will automatically switch to English; you can also toggle languages manually at any time under Settings (gear icon) → App Language.
Troubleshooting & FAQ
1. Apply fails with worse_query error (result: -1)
- Your sideloading tool stripped the
App Groupentitlement ((wq) Active App Group:on the Home log is empty). Re-sign and install using SideStore, AltStore, Feather, Sideloadly, Impactor, or iLoader with App Group entitlements enabled.
2. Fast Clean Up works, why do High-Quality Clean Up, Extend, Reframe, or Camera SIRI fail?
If it fails instantly in 0ms (no loading spinner):
- On all native Apple Intelligence iPhones (
iPhone 15 Proand newer), factoryCacheDatarequiresPersonal Translator(slot#266) =trueandAudio Intelligence(slot#178) =false. Earlier versions (v0.8.3 – v0.8.5) could flip#266tofalse, causingGenerativeModels / ModelCatalogto abort locally in 0ms. - Fix: Update to
v0.9.1+→ open Tweaks → MobileGestalt → tap One-Click Setup / Repair → Apply → power off and cold-reboot.
- On all native Apple Intelligence iPhones (
If it fails on
iOS 27.0 – 27.2.1(PrivateCloudComputeError Code=32033/QUIC-BLOCK/Code=1009):- Cause 1 — Incomplete PCC routing (
Code=32033): Generic AI rule lists typically cover onlyapple-relay.*while omitting Apple's blind-signature token issuers and generative gateways (*.issuer.apple.com,ropes.apple.com,mask-api.icloud.com,mask.icloud.com,mask-h2.icloud.com,*.app.apple.com), letting catch-allApple_All/GEOSITE,applerules leak them overDIRECTand triggering an immediate32033rejection. - Cause 2 — Blocked UDP 443 (
QUIC-BLOCK): PCC OHTTP relies on UDP 443 (QUIC). Ensure UDP is open on your US proxy server firewall and not blocked by QUIC reject rules. - One-Stop Fix via AppleFlow: Install the complete zero-MitM module or rule-set from AppleFlow Web Studio (supports Surge, Loon, Shadowrocket, Stash, Mihomo/OpenClash, Quantumult X, Sing-box + local Config Doctor), tap Update External Resources in your proxy client, and reboot your iPhone once to clear
privatecloudcomputed's cached32033 / 1009backoff state. - ⚠️ Rate-limit cooldown note (
Code=1009):- Local cached cooldown (
retry-afterinprivatecloudcomputed): cleared by rebooting once. - Server-side quota (
Code=1009 "Rate limited"after reboot): wait a few hours up to ~24 hours without spamming retries. Fast (on-device) Clean Up is unaffected.
- Local cached cooldown (
- Cause 1 — Incomplete PCC routing (
iOS 27.3 beta on China (
CH/A) hardware: all slots correct, network fine, still fails:- iOS 27.3 beta 1 added a China-specific AI policy branch. If Photos' local eligibility check (
GenerativeFunctionsFoundation) detectsCHhardware from any source, it looks up a "CN region policy" that Apple hasn't published yet, so the request is blocked before any network traffic. Log signature:Eligibility returned no CN region policy on a CH region code device. The check does not read MobileGestalt's cachedRegionCode(it triggers even when the Inspector showsLL), so MobileGestalt edits cannot bypass it. Do not inject uncached keys, which triggers a cache reset at boot. Confirmed in #13, #22, #28. - Fix: return to iOS 27.2.x if Apple still signs it (27.2.1 has no such check). Run One-Tap Factory Restore (or Clean Cache Rebuild) and back up to a computer first; a 27.3 backup cannot be restored onto 27.2.1. Or stay on 27.3 beta and wait for Apple to change it. Siri chat, Writing Tools, and Camera Control Visual Intelligence (OpenAI / Google) are unaffected.
- iOS 27.3 beta 1 added a China-specific AI policy branch. If Photos' local eligibility check (
How to tell them apart: on a Mac, reproduce the error once, run
sudo log collect --device --last 5m --output ~/Desktop/pcc.logarchive, thenlog show ~/Desktop/pcc.logarchive --style compact --predicate 'process == "privatecloudcomputed" OR process == "modelmanagerd" OR process == "Photos"' | grep -E "1009|Rate limited|region policy|InferenceError".1009means rate limit;no CN region policymeans the 27.3 beta check. Or connect your iPhone over USB to AppleLens to translate32033 / 1009 / 27.3 policylogs automatically withoutsudo.
3. About shows LL/A, why haven't Apple Intelligence, Siri, or Add eSIM appeared yet?
- Cold Reboot required: Binary
CacheDatachanges (green-tea = false) require a full manual power-off and reboot (Respring is not enough). Verify in Live Inspector thatgreen-tealive value isfalse (Bool). - System Region & Geo-Eligibility: Change Settings → General → Language & Region → Region away from
China mainland(e.g.TaiwanorUnited States) and routegspe1-ssl.ls.apple.comthrough a US proxy soeligibilitydrefreshes. For ready-to-use zero-MitM routing modules, rule-sets, and a local Config Doctor, see companion project AppleFlow (Web Studio). - Use a non-China App Store account: On Mainland China devices, Apple Intelligence eligibility also depends on the Apple Account country. If Settings → [your name] → Media & Purchases is still a China mainland account, the Apple Intelligence menu may not appear or finish activating. Switch Media & Purchases to an overseas account (your iCloud account can stay as-is). Thanks to @Chinsin in #20.
Add eSIMon MainlandiPhone 18 Pro / Pro Max(A3715/A3718): Eject the dual physical SIM tray first and cold-reboot with an empty SIM tray so baseband exposesAdd eSIM; once your overseas eSIM is provisioned, re-insert your physical SIM.
4. Important Safety Reminder Before iOS Updates / Downgrades
worse_querycurrently supports iOS 27.0 – 27.2.1 and 27.3 beta 1 only — disable automatic iOS updates.- Always run One-Tap Factory Restore (or Clean Cache Rebuild) inside Erosion before flashing, restoring, or downgrading iOS.
Ecosystem
Erosion-CN (Device Enablement), AppleFlow (Zero-MitM Routing), and AppleLens (macOS Observability & USB Diagnostics) form an integrated open-source stack for Apple Intelligence — alongside our other Apple privacy & customization tools:
[1. Erosion-CN] Device Enablement ──▶ [2. AppleFlow] Zero-MitM Routing ──▶ [3. AppleLens] macOS Observability · Probe · Report Lens
| Project | Description | Highlights |
|---|---|---|
| AppleFlow | Zero-MitM routing for Apple Intelligence, PCC, and Siri, paired with a local Web Config Doctor & Probe | Surge / Loon / Shadowrocket / Stash / Mihomo / QX / Sing-box |
| AppleLens | Zero-MitM, read-only native macOS Tri-State AI Radar, USB iPhone log translator, 4-lane routing/QUIC probe & Apple_Intelligence_Report.json viewer |
macOS 14.0+ App / CLI / USB iPhone Diagnostics |
| WQGuard | 100% read-only iOS sandbox escape scanner, sideloaded IPA auditor & firmware CVE guard | iOS / iPadOS 26.2+ – 27.x security auditing |
| Camlo | Bring your iPhone lock screen to life: computer-free slide-to-unlock animations, glasses-free 3D & live wallpapers | iOS / iPadOS 26 – 27 lock screen customization |
| Lokey | Physically zero-network iOS Chinese keyboard (26-key Full Pinyin with phrase swipe, native 2-row 9-key T9 & Xiaohe/Ziranma/Microsoft Shuangpin) with 1:1 native feel & zero-copy .lokeypack mounting (App Store · Lokey-Audit · lokey-frost-pack) |
Everyday offline iOS Pinyin, T9 & Shuangpin typing |
| Enkard | Purely offline, zero-cloud encrypted iPhone card vault bound to Apple Secure Enclave hardware | Bank-grade local storage for sensitive cards & credentials |
Credits & License
- Upstream project: jailbreakdotparty/Erosion (
lunginspector,forcequit,0xjohnny,Skadz,rooootdev,neonmodder123) - Exploit: forcequitOS/worse_query
- GPLv3 Credits & References: kolbicz / WQFiles (
.csstorecontainer graph research, GPLv3), yangokok886 / WCMigrate (APFSclonefile()app data staging/migration ideas, GPLv3),huamidev (GestaltX),KirbySD,PoomSmart (MGKeys) - Licensed under GPLv3.
Star History
Explore related projects
Loading…