Skip to content
Projects

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 Development

How these counts are measured

Measured 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

Original

App Icon

Erosion-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

GitHub Releases IPA Downloads GitHub Stars Official AltSource AltGallery Upstream Repo License

    


[!WARNING] Important Version Notice (2026-11-17): Apple has patched worse_query in iOS / iPadOS 27.3 beta 2 (24C5049d) — updating breaks MobileGestalt access and resets existing tweaks. Maximum supported version is 27.3 beta 1. Stay on iOS 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): From worse_query Escape to MobileGestalt Runtime Reconstruction: Inside Erosion-CN's Bootloop-Safe In-Place Write & Dual-Vault Architecture


Key Improvements Over Upstream

  1. Persistent In-Place MobileGestalt Writes & Bootloop Hardening

    • Replaces temp-file swaps (replaceItemAt) with a zero-byte-window in-place write protocol (pwrite at offset 0 + tail ftruncate + fcntl(fd, F_FULLFSYNC)), preserving original inode and _mobilegestalt ownership so tweaks survive reboots without reverting.
    • Avoids injecting non-cached keys (such as RegionInfo on 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.plist snapshot, and automatically rolls back on any readback mismatch.
  2. Lossless CoreFoundation Plist Serialization (No Camera Black Screen)

    • Preserves exact CFBoolean (<true/> / <false/>) and floating-point CFNumber (1.0, 2.0, 5.0 camera zoom factors) types via CFBooleanGetTypeID() and CFNumberIsFloatType(), passing unmodified entries through losslessly.
  3. Zero-Hardcoded Runtime libMobileGestalt.dylib Binary CacheData Engine

    • Dynamically scans loaded libMobileGestalt.dylib query descriptors in memory to resolve exact CacheUUID, slot count, and boolean CacheData slot 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 + CacheExtra writes with native hardware anti-downgrade locks.
    • Live MGCopyAnswer Inspector (MGInspectorView): Compares factory backup values, staged CacheData / CacheExtra values, and live MGCopyAnswer answers side by side across all 720+ dynamic slots.
  4. Dual-Vault Factory Backup & One-Tap Factory Restore

    • Mirrors your clean OriginalGestalt.plist + SHA-256 digest 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, CacheData byte length, and kernel ProductType, restoring factory state and cleaning up Lock Screen footnote, asset tag, fake supervision leftovers, and keypad caches in one step.
  5. CSStore2 Millisecond Container Mapper & Cross-Container Modules (v0.8.x – v0.9.0)

    • CSStore2 (bdsl) Fast Container Engine: Parses LaunchServices .csstore databases (with iOS 26.3.x bookmark TLV fallback and bounded pathleak fallback for high-inode devices) to map all app, plugin, and App Group containers in milliseconds.
    • App & Game Save Manager (AppDataBackupView): Back up, export, and restore Documents + Library/Preferences .zip archives across app reinstalls (auto-resolving new container UUIDs), or jump straight into the lossless Plist/Text editor.
    • Container Cache Cleaner (CacheCleanerView): Rank and clean Library/Caches and tmp across app containers while protecting user documents and databases.
    • Battery Health & Thermal Telemetry (PowerTelemetryView): Zero-lock APFS clonefile() snapshot reader for CurrentPowerlog.PLSQL (RawMaxCapacity, cycle count, real-time wattage, cell temperature, thermal throttling history).
    • Crash & Jetsam Analyzer (CrashDiagnosticsView): Inspect and clean osanalytics .ips crash, Jetsam (298), and watchdog (210) reports.
    • App Group Hub & Safari Bookmarks Exporter (AppGroupHubView): Export Safari bookmarks (HTML / JSON) and generate Surge .sgmodule / Stash .stoverride routing rules.
    • Voice Memos & Call Recording Extractor (VoiceMemosAIView): Batch-export lossless .m4a recordings titled via CloudRecordings.db and inspect on-device AI/speech model caches.
  6. 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 CoW clonefile() snapshot staging for Documents, Library/Application Support, and Library/Preferences with 5-layer foolproofing — (1) embedded.mobileprovision < 24h / expired cert gate, (2) 10s active SQLite WAL lock check, (3) copy-never-move clonefile() with WeChat 32-hex MD5 account detection, (4) manifest.json item-count integrity verification, and (5) atomic .erosion_pre_restore_bak swap & rollback + cross-BundleID .plist adaptation + vault retention + persistent Home banner warning against uninstalling Erosion + built-in step-by-step guide.
    • Wi-Fi HTTP File Sharing (WiFiShareServer / WiFiShareSheet): NWListener HTTP server with random 6-digit PIN Basic Auth (accepts blank or case-insensitive 'erosion' username), dark-mode Web UI, 64 KB chunked downloads, folder .zip downloads (2 GB cap), 64 KB chunked .part uploads 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 and Shared/AppGroup containers for ad SDK caches (KSAdSDK, BUAdSDK, GDTMobSDK, TADCache, SplashAd, etc.) and standalone ad config files (splash_ad.json/.plist), adds anti-recreate 0444 .erosion_adlock sentinel locks inside 0555 folders, 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), fast fstatat Top 100 largest files ranking, 15 recent non-root folders, and clipboard-aware /var/ Go to Path.
    • POSIX Permission Editor (InfoViewer): Safe chmod toggles (0555/0444 read-only, 0755/0644 read-write, custom r/w/x bits with lstat verification) strictly restricted to non-root user app & App Group data subpaths (mobile owner only; SystemGroup/Bundle/Daemon/System blocked).
    • Fast Cache Cleaner & Selection Menu (CacheCleanerView): .userInitiated scan queue, per-scan deniedContainers cache, POSIX opendir/readdir/fstatat size counting, live progress + Stop button, and Select All / Invert / Select None menu (including hidden entries).
    • iOS 27.3 beta 2+ Patched Sentinel & 27.3 beta 1 Notice (DeviceInfoHelpers / ContentView / GestaltView): Accurately distinguishes 27.3 beta 1 (24C503*) from 27.3 beta 2+ (24C504*+ / 26.7.3+), displays non-blocking Home & worse_query error warnings without force-exiting the app, and shows a read-only eligibilityd CN policy notice on 27.3 beta 1.

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 MobileGestalt read/write and CacheData slot 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, Camera SIRI) 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 / 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 Group entitlement 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):

Add to SideStore Add to AltStore Add to Feather More Clients

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

  1. Download the latest Erosion_v1.0.3_Bilingual.ipa from Releases.
  2. Sideload with any signing tool that preserves/injects an App Group entitlement (check the Home log on first launch to confirm (wq) Active App Group: is non-empty).
  3. 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 Group entitlement ((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 Pro and newer), factory CacheData requires Personal Translator (slot #266) = true and Audio Intelligence (slot #178) = false. Earlier versions (v0.8.3 – v0.8.5) could flip #266 to false, causing GenerativeModels / ModelCatalog to abort locally in 0ms.
    • Fix: Update to v0.9.1+ → open Tweaks → MobileGestalt → tap One-Click Setup / Repair → Apply → power off and cold-reboot.
  • 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 only apple-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-all Apple_All / GEOSITE,apple rules leak them over DIRECT and triggering an immediate 32033 rejection.
    • 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 cached 32033 / 1009 backoff state.
    • ⚠️ Rate-limit cooldown note (Code=1009):
      1. Local cached cooldown (retry-after in privatecloudcomputed): cleared by rebooting once.
      2. 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.
  • 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) detects CH hardware 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 cached RegionCode (it triggers even when the Inspector shows LL), 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.
  • How to tell them apart: on a Mac, reproduce the error once, run sudo log collect --device --last 5m --output ~/Desktop/pcc.logarchive, then log show ~/Desktop/pcc.logarchive --style compact --predicate 'process == "privatecloudcomputed" OR process == "modelmanagerd" OR process == "Photos"' | grep -E "1009|Rate limited|region policy|InferenceError". 1009 means rate limit; no CN region policy means the 27.3 beta check. Or connect your iPhone over USB to AppleLens to translate 32033 / 1009 / 27.3 policy logs automatically without sudo.

3. About shows LL/A, why haven't Apple Intelligence, Siri, or Add eSIM appeared yet?

  1. Cold Reboot required: Binary CacheData changes (green-tea = false) require a full manual power-off and reboot (Respring is not enough). Verify in Live Inspector that green-tea live value is false (Bool).
  2. System Region & Geo-Eligibility: Change Settings → General → Language & Region → Region away from China mainland (e.g. Taiwan or United States) and route gspe1-ssl.ls.apple.com through a US proxy so eligibilityd refreshes. For ready-to-use zero-MitM routing modules, rule-sets, and a local Config Doctor, see companion project AppleFlow (Web Studio).
  3. 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.
  4. Add eSIM on Mainland iPhone 18 Pro / Pro Max (A3715 / A3718): Eject the dual physical SIM tray first and cold-reboot with an empty SIM tray so baseband exposes Add eSIM; once your overseas eSIM is provisioned, re-insert your physical SIM.

4. Important Safety Reminder Before iOS Updates / Downgrades

  • worse_query currently 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


Star History

Explore related projects

Loading…