2023-02-06 15:20:50 +08:00
|
|
|
.\"-
|
|
|
|
.\" Copyright (c) 2023 Nick Chan
|
|
|
|
.\" SPDX-License-Identifier: MIT
|
|
|
|
.\"
|
2023-03-21 00:10:34 +08:00
|
|
|
.Dd "20 March 2023"
|
2023-02-06 15:20:50 +08:00
|
|
|
.Dt palera1n 1
|
|
|
|
.Sh NAME
|
|
|
|
.Nm palera1n
|
2023-04-18 19:21:46 +08:00
|
|
|
.Nd iOS 15.0-16.4.1 arm64 iOS/iPadOS jailbreaking tool
|
2023-02-06 15:20:50 +08:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2023-03-22 12:10:19 +08:00
|
|
|
.Op Fl cCdDEfhIlLnpRsSvV
|
2023-02-06 15:20:50 +08:00
|
|
|
.Op Fl e Ar Boot arguments
|
|
|
|
.Op Fl k Ar Pongo image
|
|
|
|
.Op Fl o Ar overlay file
|
|
|
|
.Op Fl r Ar ramdisk file
|
|
|
|
.Op Fl K Ar KPF file
|
2023-02-09 09:21:37 +08:00
|
|
|
.Op Fl i Ar checkra1n file
|
2023-03-29 18:52:02 +08:00
|
|
|
.Op Fl -version
|
|
|
|
.Op Fl -force-revert
|
2023-02-06 15:20:50 +08:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2023-04-18 19:21:46 +08:00
|
|
|
jailbreaks any iOS/iPadOS device with an arm64 (arm64e excluded) on iOS 15.0-16.4.1,
|
2023-02-06 15:20:50 +08:00
|
|
|
utilizing the
|
|
|
|
.Em checkm8
|
|
|
|
bootROM exploit.
|
2023-02-07 00:05:22 +08:00
|
|
|
.Pp
|
2023-02-06 15:20:50 +08:00
|
|
|
.Nm
|
|
|
|
is able to jailbreak the device in fakefs-rootful mode, where /
|
|
|
|
is writable, as well as rootless mode, where / cannot be written to.
|
2023-02-07 00:05:22 +08:00
|
|
|
.Pp
|
2023-02-06 15:20:50 +08:00
|
|
|
Due to the nature of the
|
|
|
|
.Em checkm8
|
|
|
|
exploit,
|
|
|
|
.Nm
|
2023-02-07 00:05:22 +08:00
|
|
|
is semi-tethered. That is, you must run the
|
2023-02-06 15:20:50 +08:00
|
|
|
.Nm
|
|
|
|
tool after the device reboot in order to enter the jailbroken state.
|
|
|
|
However, it is not required for the device to boot.
|
2023-02-07 00:00:10 +08:00
|
|
|
.Pp
|
|
|
|
On A11 devices, that is, iPhone 8, iPhone 8 Plus and iPhone X, the passcode cannot
|
|
|
|
be used.
|
|
|
|
.Pp
|
|
|
|
On iOS 15, the passcode must be off while jailbroken.
|
|
|
|
.Pp
|
|
|
|
On iOS 16, the passcode must be off since restore, and
|
|
|
|
.Sy Reset All Contents and Settings
|
|
|
|
from settings app counts as a restore.
|
|
|
|
A backup may be used in this case.
|
|
|
|
.Pp
|
2023-03-20 23:47:21 +08:00
|
|
|
In the remainder of this document, the term "iOS" and "iPadOS" will be used interchangably
|
|
|
|
as the difference is negligible as far as the jailbreak is concerened.
|
|
|
|
.Pp
|
2023-02-06 15:20:50 +08:00
|
|
|
.Sh SUPPORTED DEVICES
|
2023-04-18 19:21:46 +08:00
|
|
|
As described above, arm64 iOS 15.0-16.4.1 devices are supported, here is an explicit
|
2023-02-06 15:20:50 +08:00
|
|
|
list of supported devicecs:
|
|
|
|
|
|
|
|
.Bl -tag -compact
|
|
|
|
.It iPhone 6s
|
|
|
|
.It iPhone 6s Plus
|
|
|
|
.It iPhone SE (2016)
|
|
|
|
.It iPhone 7
|
|
|
|
.It iPhone 7 Plus
|
|
|
|
.It iPhone 8
|
|
|
|
.It iPhone 8 Plus
|
|
|
|
.It iPhone X
|
|
|
|
.El
|
|
|
|
|
|
|
|
.Bl -tag -compact
|
|
|
|
.It iPad mini 4
|
|
|
|
.It iPad Air 2
|
|
|
|
.It iPad (5th generation)
|
|
|
|
.It iPad (6th generation)
|
|
|
|
.It iPad (7th generation)
|
|
|
|
.It iPad Pro (9.7")
|
|
|
|
.It iPad Pro (12.9") (1st generation)
|
|
|
|
.It iPad Pro (10.5")
|
|
|
|
.It iPad Pro (12.9") (2nd generation)
|
|
|
|
.El
|
|
|
|
|
|
|
|
.Bl -tag -compact
|
|
|
|
.It iPod Touch (7th generation)
|
|
|
|
.El
|
|
|
|
|
2023-02-06 07:55:43 -05:00
|
|
|
Support for other arm64 Darwin devices, including Apple TV, HomePod and iBridge
|
2023-02-06 20:50:28 +08:00
|
|
|
on Darwin 21 and above could be added, but they are currently unsupported.
|
2023-02-06 15:20:50 +08:00
|
|
|
|
2023-02-06 07:55:43 -05:00
|
|
|
arm64e devices will NEVER be supported.
|
2023-02-06 15:20:50 +08:00
|
|
|
|
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width -indent
|
|
|
|
.It Fl -version
|
|
|
|
Prints the program version and exit.
|
|
|
|
.It Fl -force-revert
|
|
|
|
Remove the jailbreak while keeping user data. Some jailbreak files may remain
|
|
|
|
after running this command. Additionally, jailbreak apps will remain on the
|
|
|
|
home screen on for a while even when the files are deleted as the icon cache
|
|
|
|
still has their icons. When used with
|
|
|
|
.Fl f , -fakefs ,
|
|
|
|
this will actually boot the device in rootless mode then delete the jailbreak
|
2023-02-06 17:30:20 +08:00
|
|
|
files. As a result, using the loader app to install the jailbreak environment
|
|
|
|
is not supported when this option is used together with
|
|
|
|
.Fl f , -fakefs
|
|
|
|
\[char46]
|
2023-02-13 02:22:12 +08:00
|
|
|
.It Fl B , -setup-fakefs-partial
|
|
|
|
Like
|
|
|
|
.Fl c , -setup-fakefs
|
|
|
|
but the size of the created fakefs is smaller at the expense of having unwritable
|
2023-03-20 23:47:21 +08:00
|
|
|
parts in rarely-written paths. When jailbreaking 16 GB devices, this option must be used
|
|
|
|
when setting up fakefs for rootful, as they do not have enough storage for full fakefs.
|
|
|
|
This option currently does not work on iOS 16.
|
2023-02-06 15:20:50 +08:00
|
|
|
.It Fl c , -setup-fakefs
|
|
|
|
When used with
|
|
|
|
.Fl f , -fakefs ,
|
2023-03-20 23:47:21 +08:00
|
|
|
creates the new APFS volume required for rootful. Will fail if one already exists.
|
2023-02-06 15:20:50 +08:00
|
|
|
.It Fl d , -demote
|
|
|
|
Set the effective production fuse to 0, so as to enable hardware debugging features.
|
2023-02-14 21:54:51 +01:00
|
|
|
.It Fl D , -dfuhelper
|
2023-02-06 15:20:50 +08:00
|
|
|
Execute the DFU helper to guide the user into putting the device into DFU mode
|
|
|
|
then exit.
|
2023-02-06 16:28:09 +08:00
|
|
|
.It Fl e , -boot-args Ar boot arguments
|
2023-02-06 15:20:50 +08:00
|
|
|
Specify custom XNU kernel command line. The
|
|
|
|
.Em rootdev=md0
|
|
|
|
argument is used by
|
|
|
|
.Nm
|
|
|
|
and cannot be overriden. Additionally, the
|
|
|
|
.Em wdt=-1
|
|
|
|
argument is used during fakefs setup.
|
2023-02-10 18:08:29 +08:00
|
|
|
.It Fl E , -enter-recovery
|
2023-02-14 21:05:13 -05:00
|
|
|
Exit after entering recovery mode.
|
2023-02-06 15:20:50 +08:00
|
|
|
.It Fl f , -fakefs
|
2023-03-20 23:47:21 +08:00
|
|
|
Proceed in rootful mode. This applies to both full fakefs and partial fakefs.
|
2023-02-06 15:20:50 +08:00
|
|
|
.It Fl h , -help
|
|
|
|
Prints help text.
|
2023-02-09 09:21:37 +08:00
|
|
|
.It Fl i , -checkra1n-file Ar checkra1n file
|
|
|
|
Specify the path to a custom checkra1n file.
|
2023-02-06 16:28:09 +08:00
|
|
|
.It Fl k , -override-pongo Ar pongo file
|
2023-02-06 15:20:50 +08:00
|
|
|
Override PongoOS image. The raw image, named
|
|
|
|
.Em Pongo.bin
|
|
|
|
when built, should be used. PongoOS 2.6.0 or later is required.
|
2023-02-06 16:28:09 +08:00
|
|
|
.It Fl K , -override-kpf Ar KPF file
|
2023-02-06 15:20:50 +08:00
|
|
|
Override the kernel patchfinder PongoOS module. The module is required to support setting
|
|
|
|
root filesystem in paleinfo with
|
|
|
|
.Em rootfs
|
2023-02-06 07:58:45 -05:00
|
|
|
command. If in doubt, use
|
2023-02-06 15:20:50 +08:00
|
|
|
.Sy https://github.com/guacaplushy/PongoOS
|
|
|
|
iOS15 branch or your own fork of it.
|
|
|
|
.It Fl l , -rootless
|
2023-03-20 23:47:21 +08:00
|
|
|
Proceed in rootless mode, this is the default when neither
|
2023-02-06 15:20:50 +08:00
|
|
|
.Fl l , -rootless
|
|
|
|
and
|
|
|
|
.Fl f , -fakefs
|
|
|
|
is specified.
|
|
|
|
.Fl L , -jbinit-log-to-file
|
|
|
|
Makes jbinit log to
|
|
|
|
.Em /cores/jbinit.log
|
|
|
|
This file may be viewed from sandboxed applications while jailbroken.
|
2023-02-10 18:08:29 +08:00
|
|
|
.It Fl n , -exit-recovery
|
|
|
|
Exit recovery mode and exit.
|
2023-02-06 16:13:51 +08:00
|
|
|
.It Fl o , -override-overlay Ar overlay file
|
2023-02-06 15:20:50 +08:00
|
|
|
Specify the path to a custom overlay file, which is then mounted onto /cores/binpack
|
|
|
|
during boot, if the default ramdisk is used. The default ramdisk expects the overlay
|
|
|
|
to contain a folder named
|
|
|
|
.Em Applications
|
|
|
|
at the root of it, as well as a dmg named
|
|
|
|
.Em loader.dmg
|
|
|
|
at the root of it. Otherwise, the device will not boot. It is also expected that it
|
|
|
|
contains a shell, a ssh server, and various command line utilities.
|
|
|
|
.It Fl p , -pongo-shell
|
|
|
|
Exit after booting into a clean PongoOS shell
|
|
|
|
.It Fl P , -pongo-full
|
|
|
|
Like
|
|
|
|
.Fl p , -pongo-shell
|
2023-02-07 09:12:34 +08:00
|
|
|
but default images and options have been uploaded and applied respectively.
|
2023-02-06 16:28:09 +08:00
|
|
|
.It Fl r , -override-ramdisk Ar ramdisk file
|
2023-02-06 15:20:50 +08:00
|
|
|
Override the ramdisk. At a very minimum, it should contain a
|
|
|
|
.Em /sbin/launchd
|
|
|
|
as well as a fake dyld
|
|
|
|
.Em /usr/lib/dyld
|
|
|
|
where the logic is expected to be in.
|
2023-02-10 18:08:29 +08:00
|
|
|
.It Fl R , -reboot-device
|
|
|
|
Reboot device in normal mode and exit.
|
2023-02-06 15:20:50 +08:00
|
|
|
.It Fl s , -safe-mode
|
|
|
|
Enter safe mode. An alert will be displayed. Jailbreak daemons nor early boot executable files
|
|
|
|
specified (see
|
|
|
|
.Sy FILES
|
|
|
|
section below) will be executed. The loader app and the built in SSH server can still be used,
|
2023-02-06 07:55:43 -05:00
|
|
|
as well as any jailbreak-specific apps you have installed.
|
2023-03-15 16:43:25 +08:00
|
|
|
.It Fl S , -no-colors
|
|
|
|
Disable colors on the command line. External programs like checkra1n clones may still output colors.
|
2023-02-06 15:20:50 +08:00
|
|
|
.It Fl v , -debug-logging
|
|
|
|
Enable debug logging. The option may be repeated for extra verbosity.
|
|
|
|
.It Fl V , -verbose-boot
|
2023-02-06 15:34:18 +08:00
|
|
|
Boots the device in verbose mode, allowing boot logs to be seen.
|
2023-02-14 21:05:13 -05:00
|
|
|
.It Fl I , -device-info
|
|
|
|
Prints info about device and exits.
|
2023-02-06 15:20:50 +08:00
|
|
|
.El
|
|
|
|
.Sh ENVIRONMENTAL VARIABLES
|
|
|
|
.Bl -tag -width -indent
|
2023-03-21 00:10:34 +08:00
|
|
|
.It Ev TMPDIR
|
2023-02-06 15:20:50 +08:00
|
|
|
This environmental variable should contain the a directory for temporary
|
|
|
|
files. Without the
|
2023-02-10 18:08:29 +08:00
|
|
|
.Fl i , -override-checkra1n
|
2023-02-06 15:20:50 +08:00
|
|
|
option, files must be executable from it as the built-in checkra1n file
|
|
|
|
is extracted and executed here. When not set, /tmp is used.
|
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
|
|
|
To (re-)jailbreak in rootless mode:
|
|
|
|
.Pp
|
|
|
|
.Dl "palera1n"
|
|
|
|
.Pp
|
|
|
|
To setup fakefs for rootful mode:
|
|
|
|
.Pp
|
|
|
|
.Dl "palera1n -fc"
|
2023-02-25 03:54:27 +08:00
|
|
|
.Pp
|
2023-02-06 07:55:43 -05:00
|
|
|
After the device has rebooted, follow the following example.
|
2023-02-06 15:20:50 +08:00
|
|
|
.Pp
|
2023-02-06 15:22:18 +08:00
|
|
|
To re-jailbreak in rootful mode:
|
2023-02-06 15:20:50 +08:00
|
|
|
.Pp
|
|
|
|
.Dl "palera1n -f"
|
|
|
|
.Pp
|
|
|
|
To remove the jailbreak in rootful mode:
|
|
|
|
.Pp
|
|
|
|
.Dl "palera1n --force-revert -f"
|
|
|
|
.Pp
|
|
|
|
To remove the jailbreak in rootless mode:
|
|
|
|
.Pp
|
|
|
|
.Dl "palera1n --force-revert"
|
|
|
|
.Pp
|
|
|
|
To verbose boot in rootful mode:
|
|
|
|
.Pp
|
|
|
|
.Dl "palera1n -Vf"
|
|
|
|
.Pp
|
2023-02-14 07:30:39 +08:00
|
|
|
To create a partial fakefs with bind mounts:
|
|
|
|
.Pp
|
|
|
|
.Dl "palera1n -Bf"
|
|
|
|
.Pp
|
2023-02-10 18:08:29 +08:00
|
|
|
To exit recovery mode:
|
|
|
|
.Pp
|
|
|
|
.Dl "palera1n -n"
|
|
|
|
.Pp
|
2023-02-06 15:20:50 +08:00
|
|
|
.Sh CAVEATS
|
|
|
|
.Pp
|
|
|
|
.Em -v
|
2023-03-20 23:47:21 +08:00
|
|
|
is not a real XNU boot argument. It is interpreted by iBoot. However, since XNU
|
2023-02-06 15:20:50 +08:00
|
|
|
boot arguments are set in PongoOS, which is ran after iBoot has ran, it does nothing.
|
|
|
|
To verbose boot, use the
|
|
|
|
.Fl V , -verbose-boot
|
|
|
|
option when jailbreaking.
|
|
|
|
.Pp
|
|
|
|
Fakefs takes up around 5-10 GB of storage, and take up to 10 minutes to setup.
|
|
|
|
.Pp
|
|
|
|
iOS 15.0 requires DER entitlements, and iOS 15.1 requires hash agility in code signatures.
|
2023-02-06 08:04:05 -05:00
|
|
|
As a result, binaries with the old code signature format need to be resigned with a recent
|
2023-02-06 15:20:50 +08:00
|
|
|
version of the Procursus fork of
|
|
|
|
.Xr ldid 1
|
|
|
|
before they can be ran on a device jailbroken with
|
|
|
|
.Nm
|
2023-02-06 17:30:20 +08:00
|
|
|
\[char46]
|
2023-03-20 23:47:21 +08:00
|
|
|
.Pp
|
|
|
|
When using rootful mode, the
|
|
|
|
.Fl f , -fakefs
|
|
|
|
flag must be specified at all times. It does not matter whether you want to create fakefs,
|
|
|
|
create partial fakefs, rejailbreak or remove jailbreak.
|
|
|
|
.Sh POST INSTALLATION
|
2023-02-06 15:20:50 +08:00
|
|
|
The palera1n loader app will take up to 30 seconds to appear on the homescreen after the
|
|
|
|
device has booted. If it does not appear, you can try using the shortcut:
|
|
|
|
.Pp
|
2023-03-21 00:10:34 +08:00
|
|
|
.Lk https://www.icloud.com/shortcuts/8cd5f489c8854ee0ab9ee38f2e62f87d
|
2023-02-06 15:20:50 +08:00
|
|
|
.Pp
|
|
|
|
to open it. After opening the loader app, press install to install a bootstrap as well as
|
|
|
|
the
|
|
|
|
.Em Sileo
|
|
|
|
package manager.
|
|
|
|
You can install other package managers from settings of the loader app.
|
|
|
|
.Sh FILES
|
2023-02-06 15:22:18 +08:00
|
|
|
During the jailbreak process, a temporary filesystem is mounted on /cores as a place
|
2023-02-06 15:20:50 +08:00
|
|
|
to stash jailbreak files needed during the boot process. No files are ever written
|
|
|
|
onto the actual disk if you do not use the SSH server to write files or using the
|
2023-02-06 15:22:18 +08:00
|
|
|
loader app to install additional jailbreak files.
|
2023-02-06 15:20:50 +08:00
|
|
|
|
|
|
|
.Bl -tag -width "/var/jb/Library/LaunchDaemons"
|
|
|
|
.It Pa /cores
|
2023-02-06 16:08:14 +08:00
|
|
|
The location of the temporary filesystem where jailbreak files are stash during boot.
|
2023-02-06 15:20:50 +08:00
|
|
|
.It Pa /cores/jbinit.log
|
|
|
|
When
|
|
|
|
.Fl L
|
|
|
|
is used, the log file of jbinit.
|
|
|
|
.It Pa /Library/LaunchDaemons
|
|
|
|
The directory where jailbreak-specific
|
|
|
|
.Xr launchd.plist 5
|
|
|
|
property list files should be placed on rootful.
|
|
|
|
.It Pa /var/jb/Library/LaunchDaemons
|
|
|
|
The directory where jailbreak-specific
|
|
|
|
.Xr launchd.plist 5
|
|
|
|
property list files should be placed on rootless.
|
|
|
|
.It Pa /etc/rc.d
|
|
|
|
The directory where executable filse that needs to be executed during boot, before
|
|
|
|
daemons are launched, are placed rootful. They are executed after all filesystems
|
|
|
|
has been mounted.
|
|
|
|
.It Pa /var/jb/etc/rc.d
|
|
|
|
The directory where executable files that needs to be executed during boot, before
|
|
|
|
daemons are launched, are placed on rootless. They are executed after all filesystems
|
|
|
|
has been mounted.
|
|
|
|
.El
|
2023-02-06 18:55:37 +08:00
|
|
|
.Sh BUGS
|
|
|
|
.Nm
|
|
|
|
may crash if the machine it is running on:
|
|
|
|
.Pp
|
|
|
|
.Dl "- Has non-compliant USB devices plugged in"
|
2023-02-25 03:54:27 +08:00
|
|
|
.Pp
|
|
|
|
The exploit may also work less reliably on some hosts, like AMD desktops, or some MediaTek devices.
|
2023-03-20 23:47:21 +08:00
|
|
|
.Pp
|
2023-04-25 00:11:18 +08:00
|
|
|
The device may randomly crash and reboot due to launchd exiting with code 7.
|
2023-02-06 15:20:50 +08:00
|
|
|
.Sh NOTES
|
|
|
|
.Nm
|
|
|
|
injects a dylib into launchd to allow the
|
|
|
|
.Sy launchctl runstats
|
|
|
|
command to be used on the device.
|
2023-03-20 23:47:21 +08:00
|
|
|
.Sh DEPRECATED AND REMOVED FUNCTIONALITY
|
|
|
|
There was an option in
|
|
|
|
.Nm
|
|
|
|
to force create the fakefs even when one already exists (which would overwrite
|
|
|
|
the existing fakefs), by setting the palerain_option_setup_rootful_forced flag
|
|
|
|
in palera1n flags. This option was removed because using
|
|
|
|
.Fl -force-revert
|
|
|
|
and
|
|
|
|
.Fl c
|
|
|
|
at the same time has exactly the same effect.
|
2023-02-06 15:20:50 +08:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr launchd 8
|
|
|
|
.Xr launchd.plist 5
|
|
|
|
.Xr ldid 1
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
jailbreak was first written by Nebula and Mineek on September 26, 2022, as a shell
|
|
|
|
script. Tweak support with DEVELOPMENT kernels are added on October 2, 2022. RELEASE
|
2023-02-06 15:34:18 +08:00
|
|
|
kernel support is added on November 14, 2022. iOS 16 Support is added on
|
2023-02-06 15:20:50 +08:00
|
|
|
December 13, 2022. Later, the first attempt to rewrite palera1n into C begins on January
|
|
|
|
01 2023. The
|
|
|
|
.Nm
|
|
|
|
utility described here is the second attempt, which first started on January 16, 2023,
|
2023-02-06 07:55:43 -05:00
|
|
|
using checkra1n 1337 and the plush KPF.
|