Erosion-CN Edits the File That Tells iOS What Your iPhone Is

A sideloaded toolkit built on a sandbox escape, wrapped in backups and read-back verification, aimed at Chinese users unlocking region-locked features.

9 min read • View on GitHub • More from Kianuni

An oversized identity document lies open on a flat surface, its fields filled with abstract machine-readable codes instead of a portrait. A magnifying glass hovers over one field while a hand holds a pen ready to strike through a value, and small feature icons (a camera, a chat bubble, a SIM card) cluster at the edges. The scene illustrates MobileGestalt, the cached manifest iOS consults to decide what a device is allowed to do.
MobileGestalt is an identity card for the device. Erosion-CN is a pen poised over one of its fields.
Key Takeaways

The File That Decides What Your iPhone Is

Ask an iPhone whether it can place a FaceTime Audio call, run Apple Intelligence, or handle an eSIM a certain way, and it does not reason about the answer. It looks it up.

The lookup target is MobileGestalt, a cached property list that acts as a manifest of what a device is and what it is allowed to do. Hardware identifiers, capability flags, feature switches. When a system service asks can this device do X, MobileGestalt holds the reply.

That is why it is a target. Region-locked features sit behind that reply. Change the cache and you change the answer. Apple Intelligence eligibility, FaceTime Audio availability, eSIM behavior: each is a flag in the same file.

Erosion-CN is a sideloaded iOS and iPadOS toolkit whose centerpiece is editing that file. It also does general system work (a plist-aware file browser, app data backup, cache cleaning, cross-container access, wallpaper and diagnostic tools), but MobileGestalt is the reason it exists.

The project calls itself 防白苹果, anti-brick. 白苹果, or white Apple, is the Chinese term for a phone frozen on the white boot logo, and it is the failure everyone in this space fears. Erosion-CN's identity is built around not causing it.

Built on a Sandbox Escape

The lineage is stated without flinching. Erosion-CN is a fork of jailbreakdotparty/Erosion, which its README says is based on forcequitOS/worse_query, a sandbox-escape proof of concept by Taj C, who goes by forcequit.

The folder holding the sensitive code is named Exploits/. One file header reads "Made Worse by Skadz."

worse_query is what gets the app out of its sandbox and lets it touch files it otherwise could not reach. The core dlopens libsystem_containermanager.dylib and resolves roughly ten private container_query_* symbols, verifying that every one is present before continuing. If any is missing, the call returns its own error code rather than failing silently.

Sit with the paradox for a second. The tool that reaches deepest into the system is the one that markets itself as the careful version. Any MobileGestalt tweaker can edit the cache. Erosion-CN's pitch is that it is the one that will not brick your phone while doing it.

The Seatbelt

If the app is built on an escape, why trust it? The rest of this fork spends its engineering budget answering that question.

Upstream Erosion writes the modified cache. Erosion-CN changes how the write happens and wraps a recovery spine around it. Four mechanisms do most of the work.

The app also shows a diff before anything is applied. You see the old value and the proposed value side by side, and you approve the change. Nothing is written blind.

The write pipeline is the safety claim made visible: read the cache, preview the change, back it up, flush to physical media, verify the bytes, then let iOS re-read the result.

None of this makes the underlying technique safe. It makes the tool honest about what it is doing and gives the user a way back. That is a different claim, and a more defensible one.

The Trick: Reading Its Own Signature

To do any of this, the app first has to know which App Group it is allowed to use. An App Group is a shared container that lets an app and its extensions pass data. Get it wrong and nothing works.

The obvious answer is to read your own entitlements at runtime. Erosion-CN tries that first, calling SecTaskCreateFromSelf and SecTaskCopyValueForEntitlement for the com.apple.security.application-groups key. If that resolves, the app is done.

It often does not resolve. Re-signing tools like SideStore, AltStore, and Feather rewrite bundle IDs and entitlements when they install an app. The running process may not see the same entitlements the file on disk carries.

So the app falls back to reading itself off disk. It parses the embedded code-signature blob out of its own Mach-O executable, searching for the superblob magic 0xfade0cc0 and the entitlements magic 0xfade7171, then deserializing the entitlements plist. Every read is bounds-checked first, and multi-byte fields are read as big-endian. For Swift, this is unusually careful binary parsing.

From there it builds an ordered list of candidate groups: the bundle-derived one first, then a hardcoded default, then any group.-prefixed entry it finds. It returns the first candidate the file manager can actually resolve to a container. A tool that inspects the system also has to inspect itself, because the act of installing it may have changed what it is.

A close-up of two hands. One presses a wax seal onto the corner of a folded document while the other holds open a reference book of circular seal impressions, comparing the fresh seal against the samples. A stack of identically sealed documents rests at the edge of the frame. The scene illustrates the app reading its own code signature to confirm its identity after a re-signing tool may have rewritten it.
The app reads its own code signature off disk, because the tool that installed it may have re-stamped its identity.

The Honest Limits

The reach has an expiry date. Erosion-CN depends on an unpatched sandbox-escape vulnerability, so its usefulness is tied to specific OS versions. The app checks isSupported() at launch, and on an unsupported build it shows an alert stating the vulnerability has been patched and offers to exit.

That is a rare thing: a tool that tells you when it can no longer work instead of pretending.

There are limits it cannot engineer around, too. Editing MobileGestalt changes cached values, but not every region policy is a cached value. The README says some China-region Apple Intelligence eligibility checks in iOS 27.3 beta cannot be bypassed by editing MobileGestalt at all.

Issue #28 shows the pattern in practice. A user, mediacvg, on a China-region iPhone running iOS 27.3 beta 1, asked whether the call-recording announcement sound could be silenced and reported errors in certain Photos AI functions. The maintainer did not overpromise. He pointed to a different open-source tool, AirBeep, that handles the recording sound.

你好!已有其他开源方案,请参考:https://github.com/LinkPass888/AirBeep

Kianuni, Maintainer, Erosion-CN · Erosion-CN issue #28

Roughly: "Hello! There is already another open-source option, please refer to: AirBeep." The reporter came back with a caveat.

感谢回复,我曾经试过,不支持ios27.3.

mediacvg, Issue reporter · Erosion-CN issue #28

Roughly: "Thanks for the reply. I tried it before, it does not support iOS 27.3." That exchange is the honest shape of the project. The tool is powerful, the maintainer knows its edges, and when a request falls outside them he says so and points elsewhere.

The Fork Landscape

Erosion-CN did not appear in a vacuum. It sits in a small ecosystem of MobileGestalt and system-configuration tools, each occupying a different role.

ProjectRole in the ecosystemWhat it doesRelationship to Erosion-CN
Erosion-CNThe subjectMobileGestalt and system-config toolkit with a bilingual UI, safety workflow, and China-region feature controlsThis project
ErosionUpstream baseThe architectural foundation Erosion-CN forkedDirect parent
GestaltXCited design influenceDynamic descriptor parsing, diff preview, App Group detectionInspiration, independently maintained
MGKeysReference resourceMaps MobileGestalt keys to valuesConsulted for key mappings, not a competing app
worse_queryLower-level componentThe sandbox-escape technique underneathDependency, not a competitor
AirBeepNeighboring utilityChanges or suppresses the call-recording announcement soundSeparate tool, recommended in issue #28

Erosion-CN's niche is the bundle: a Chinese-language interface, a safety workflow that upstream does not emphasize, and controls aimed at China-region device restrictions. Star counts and OS support are snapshots, not live facts, so check the repository before relying on any number.