After you're done partitioning, now its time to remove files and also include our needed files.

Enable a ssh session after reboot, and then we're going to enter these commands.

This depends on your main iOS. If pre-iOS 9 follow this.

Make sure you replace "bsize" with your devices blocksize

mount_hfs /dev/disk0s1s3 /mnt1

/sbin/newfs_hfs -s -v Data -J -P -b bsize -n a=bsize,c=bsize,e=bsize /dev/disk0s1s4

mount_hfs /dev/disk0s1s4 /mnt2

mv -v /mnt1/private/var/* /mnt2

rm -rf /mnt2/log/asl/SweepStore

rm -rf /mnt2/mobile/Library/PreinstalledAssets/*

rm -rf /mnt2/mobile/Library/Preferences/.GlobalPreferences.plist

rm -rf /mnt2/mobile/.forward

umount /mnt2

That's pretty much all of the removing of files, for now...
Now, we're going to remount the secondary filesystem as r/w

nano /mnt1/private/etc/fstab

Change the values to "disk0s1s3" and "disk0s1s4."
Then, remove nosuid and nodev.

Note: This will depend on your main iOS

If your main iOS is 7.1.2 or lower, follow this guide, otherwise scroll
down a bit to find another way to make sure fixkeybag gets executed.
Make sure you still use the commands above for post-iOS 9, except the
"new_hfs" part since we remove "-P" parameter.

cp -av /usr/share/dualbootstuff/fixkeybag_legacy /mnt1

mv -v /mnt1/fixkeybag_legacy /mnt1/fixkeybag

Now, to finish it off, this will also depend on what device you have.
If your device is an iPhone 4S or anything around that timeline, we need
to pack the baseband into the second os.

Note: each device has a different path for this so just replace the path with a path like: Trek, Mav, etc.

cd /usr/local/standalone/firmware/Baseband/Mav5/

mkdir -p /mnt1/usr/local/standalone/firmware/Baseband/Mav5

zip -r0 /mnt1/usr/local/standalone/firmware/Baseband/Mav5/Mav5-personalized.zip *

Post-iOS 9 Commands

/sbin/newfs_hfs -s -v Data -J -b bsize -n a=bsize,c=bsize,e=bsize /dev/disk0s1s4

NoMoreSIGABRT disk0s1s4

Fixkeybag post-iOS 7.1.2

Since for pre-iOS 8, we use launchd to "untether" or just basically make sure that fixkeybag is being executed
during the boot. If you're running any version above iOS 7.1.2, Apple has mitigated this, so we need to make it
execute from another way. Enter the commands below to fix this problem.

cp -av /usr/share/dualbootstuff/fixkeybag /mnt1

mv -v /mnt1/usr/libexec/keybagd /mnt1/usr/libexec/keybagd_bak

mv -v /mnt1/fixkeybag /mnt1/usr/libexec/keybagd

Fixkeybag iOS 10.x

iOS 10.x has extra protections, these commands will fix that.

mv -v /mnt1/usr/libexec/keybagd /mnt1/usr/libexec/com.apple.keybagd

ldid -S /mnt1/usr/libexec/com.apple.keybagd

mv -v /mnt1/usr/libexec/com.apple.keybagd /mnt1/usr/libexec/keybagd

Time to finish up things!

Return to the main page