Skip to content

Filesystem Patches

Visual Ehrmanntraut edited this page Jun 11, 2025 · 11 revisions

Caution

macOS host or VM required for the following commands. Linux/Windows 3rd party APFS drivers not tested, feel free to do so.

Attaching the Disk

hdiutil attach -imagekey diskimage-class=CRawDiskImage -blocksize 4096 nvme.1

Enabling Write Access

sudo diskutil enableownership /Volumes/System
sudo mount -urw /Volumes/System

Patching the Dyld Shared Cache

Copy the original dyld into the same directory as the PatchDYLD.fish (for fish shell) or PatchDYLD.sh (for other shells):

cp /Volumes/System/System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e dyld_shared_cache_arm64e.orig

Patch script:

Run like so:

sudo chmod +x ./PatchDYLD.fish && sudo ./PatchDYLD.fish # fish shell
sudo chmod +x ./PatchDYLD.sh && sudo ./PatchDYLD.sh # other shells

Disabling the Problematic Launch Services

You must currently disable the following launch services from the launch service cache: com.apple.voicemail.vmd, com.apple.CommCenter, com.apple.locationd.

Backup the original service cache:

cp /Volumes/System/System/Library/xpc/launchd.plist launchd.plist

Convert the service cache to a readable plist:

sudo plutil -convert xml1 /Volumes/System/System/Library/xpc/launchd.plist

Edit the service cache:

sudo nano /Volumes/System/System/Library/xpc/launchd.plist

Find each service and add the following:

<key>Disabled</key>
<true/>

Like in the following image: image

Eject the disk:

diskutil eject /Volumes/System

And you're done. Note that you are now unable to boot without the launchd_unsecure_cache=1 boot arg until you restore the original service cache back.

Now, start the emulator once again and wait until data migration completes. You will see the setup screen. Enjoy!

Clone this wiki locally