mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0926171d35 | ||
|
|
030c65622e | ||
|
|
092c2949cf | ||
|
|
e585d1f7c3 | ||
|
|
b951f8d882 | ||
|
|
66f4d290ca | ||
|
|
24e0904f5e | ||
|
|
57c5d7eaa3 | ||
|
|
eb5e7060cc | ||
|
|
28a434084c | ||
|
|
7f55babab1 | ||
|
|
ab94104366 |
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
name: No Template
|
name: No Template
|
||||||
description: Create a standard issue, no template involved.
|
description: Create a standard issue, no template involved.
|
||||||
labels: [palera1n]
|
labels: [palera1n help]
|
||||||
body:
|
body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: description
|
id: description
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: Feature Request
|
name: Feature Request
|
||||||
description: Request a feature in palera1n!
|
description: Request a feature in palera1n!
|
||||||
labels: [enhancement, palera1n]
|
labels: [enhancement]
|
||||||
body:
|
body:
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: feature-request
|
id: feature-request
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
name: Create Issue
|
name: Create Issue
|
||||||
description: Ask help for palera1n regarding support or generally how it works!
|
description: Ask help for palera1n regarding support or generally how it works!
|
||||||
labels: [palera1n]
|
labels: [palera1n help]
|
||||||
assignees:
|
|
||||||
- khcrysalis
|
|
||||||
- elliessurviving
|
|
||||||
- hg13bs
|
|
||||||
- afastaudir8
|
|
||||||
body:
|
body:
|
||||||
- type: input
|
- type: input
|
||||||
id: device
|
id: device
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ jobs:
|
|||||||
gnu_triple: aarch64-apple-darwin
|
gnu_triple: aarch64-apple-darwin
|
||||||
os: iphoneos
|
os: iphoneos
|
||||||
minos: 7.0
|
minos: 7.0
|
||||||
runs-on: macos-12
|
runs-on: macos-15
|
||||||
env:
|
env:
|
||||||
MBEDTLS_VERSION: 3.5.2
|
MBEDTLS_VERSION: 3.5.2
|
||||||
READLINE_VERSION: 8.2
|
READLINE_VERSION: 8.2
|
||||||
@@ -91,7 +91,7 @@ jobs:
|
|||||||
- name: Install dependencies (packages)
|
- name: Install dependencies (packages)
|
||||||
run: |
|
run: |
|
||||||
sudo /usr/local/bin/pip3 install jsonschema jinja2
|
sudo /usr/local/bin/pip3 install jsonschema jinja2
|
||||||
brew install make autoconf automake pkg-config gnu-sed gettext
|
brew install make autoconf automake pkg-config gnu-sed gettext libtool
|
||||||
sudo rm -rf /usr/local/Frameworks/Python*
|
sudo rm -rf /usr/local/Frameworks/Python*
|
||||||
curl -LO https://github.com/ProcursusTeam/ldid/releases/download/v2.1.5-procursus7/ldid_macosx_x86_64
|
curl -LO https://github.com/ProcursusTeam/ldid/releases/download/v2.1.5-procursus7/ldid_macosx_x86_64
|
||||||
sudo install -m755 ldid_macosx_x86_64 /usr/local/bin/ldid
|
sudo install -m755 ldid_macosx_x86_64 /usr/local/bin/ldid
|
||||||
@@ -102,7 +102,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Select correct Xcode
|
- name: Select correct Xcode
|
||||||
run: |
|
run: |
|
||||||
sudo xcode-select -s /Applications/Xcode_14.2.app
|
sudo xcode-select -s /Applications/Xcode_16.2.app
|
||||||
|
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
run: |
|
run: |
|
||||||
@@ -114,9 +114,9 @@ jobs:
|
|||||||
echo "CC=$(xcrun --find cc)" >> $GITHUB_ENV
|
echo "CC=$(xcrun --find cc)" >> $GITHUB_ENV
|
||||||
echo "CXX=$(xcrun --find c++)" >> $GITHUB_ENV
|
echo "CXX=$(xcrun --find c++)" >> $GITHUB_ENV
|
||||||
echo "CPP=$(xcrun --find cc) -E" >> $GITHUB_ENV
|
echo "CPP=$(xcrun --find cc) -E" >> $GITHUB_ENV
|
||||||
echo "CFLAGS=-g -Os -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isysroot ${{ env.SDK }} -isystem $(pwd)/sysroot/usr/local/include -Os -g -flto=full -Wl,-object_path_lto,lto.o -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
echo "CFLAGS=-g -Os -isystem ${{ env.SDK }}/usr/include/c++/v1 -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isysroot ${{ env.SDK }} -isystem $(pwd)/sysroot/usr/local/include -Os -g -flto=full -Wl,-object_path_lto,lto.o -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
||||||
echo "CPPFLAGS=-g -Os -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isysroot ${{ env.SDK }} -isystem $(pwd)/sysroot/usr/local/include -Wno-error-implicit-function-declaration -Os -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
echo "CPPFLAGS=-g -Os -isystem ${{ env.SDK }}/usr/include/c++/v1 -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isysroot ${{ env.SDK }} -isystem $(pwd)/sysroot/usr/local/include -Wno-error-implicit-function-declaration -Os -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
||||||
echo "CXXFLAGS=-stdlib=libc++ -g -Os -isysroot ${{ env.SDK }} -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isystem $(pwd)/sysroot/usr/local/include -Os -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
echo "CXXFLAGS=-stdlib=libc++ -g -Os -isystem$(TARGET_SYSROOT)/usr/include/c++/v1 -isysroot ${{ env.SDK }} -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isystem $(pwd)/sysroot/usr/local/include -Os -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
||||||
echo "LDFLAGS=-g -Wl,-dead_strip -arch ${{ matrix.arch }} -isysroot ${{ env.SDK }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -L$(pwd)/sysroot/usr/local/lib" >> $GITHUB_ENV
|
echo "LDFLAGS=-g -Wl,-dead_strip -arch ${{ matrix.arch }} -isysroot ${{ env.SDK }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -L$(pwd)/sysroot/usr/local/lib" >> $GITHUB_ENV
|
||||||
echo "CFLAGS_FOR_BUILD=-arch $(uname -m) -isysroot $(xcrun -sdk macosx --show-sdk-path) -Os" >> $GITHUB_ENV
|
echo "CFLAGS_FOR_BUILD=-arch $(uname -m) -isysroot $(xcrun -sdk macosx --show-sdk-path) -Os" >> $GITHUB_ENV
|
||||||
echo "CXXFLAGS_FOR_BUILD=-stdlib=libc++ -arch $(uname -m) -isysroot $(xcrun -sdk macosx --show-sdk-path) -Os" >> $GITHUB_ENV
|
echo "CXXFLAGS_FOR_BUILD=-stdlib=libc++ -arch $(uname -m) -isysroot $(xcrun -sdk macosx --show-sdk-path) -Os" >> $GITHUB_ENV
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ DEP = $(SRC)/dep_root
|
|||||||
STRIP = strip
|
STRIP = strip
|
||||||
CC ?= cc
|
CC ?= cc
|
||||||
CFLAGS += -isystem $(DEP)/include -I$(SRC)/include -I$(SRC) -D_XOPEN_SOURCE=500
|
CFLAGS += -isystem $(DEP)/include -I$(SRC)/include -I$(SRC) -D_XOPEN_SOURCE=500
|
||||||
CFLAGS += -Wall -Wextra -Wno-unused-parameter -DPALERAIN_VERSION=\"2.0.2\" -DHAVE_LIBIMOBILEDEVICE
|
CFLAGS += -Wall -Wextra -Wno-unused-parameter -DPALERAIN_VERSION=\"2.1\" -DHAVE_LIBIMOBILEDEVICE
|
||||||
CFLAGS += -Wno-unused-variable -I$(SRC)/src -std=c99 -pedantic-errors -D_C99_SOURCE -D_POSIX_C_SOURCE=200112L
|
CFLAGS += -Wno-unused-variable -I$(SRC)/src -std=c99 -pedantic-errors -D_C99_SOURCE -D_POSIX_C_SOURCE=200112L
|
||||||
LIBS += $(DEP)/lib/libimobiledevice-1.0.a $(DEP)/lib/libirecovery-1.0.a $(DEP)/lib/libusbmuxd-2.0.a
|
LIBS += $(DEP)/lib/libimobiledevice-1.0.a $(DEP)/lib/libirecovery-1.0.a $(DEP)/lib/libusbmuxd-2.0.a
|
||||||
LIBS += $(DEP)/lib/libimobiledevice-glue-1.0.a $(DEP)/lib/libplist-2.0.a -pthread -lm
|
LIBS += $(DEP)/lib/libimobiledevice-glue-1.0.a $(DEP)/lib/libplist-2.0.a -pthread -lm
|
||||||
|
|||||||
+18
-11
@@ -2,11 +2,11 @@
|
|||||||
.\" Copyright (c) 2024 Nick Chan
|
.\" Copyright (c) 2024 Nick Chan
|
||||||
.\" SPDX-License-Identifier: MIT
|
.\" SPDX-License-Identifier: MIT
|
||||||
.\"
|
.\"
|
||||||
.Dd "24 July 2024"
|
.Dd "23 December 2024"
|
||||||
.Dt palera1n 1
|
.Dt palera1n 1
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm palera1n
|
.Nm palera1n
|
||||||
.Nd arm64 iOS/iPadOS/tvOS 15.0-18.1, bridgeOS 5.0-9.1 jailbreaking tool
|
.Nd arm64 iOS/iPadOS/tvOS 15.0-18.3, bridgeOS 5.0-9.3 jailbreaking tool
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl cCdDEfhIlLnpRsSTvV
|
.Op Fl cCdDEfhIlLnpRsSTvV
|
||||||
@@ -20,19 +20,21 @@
|
|||||||
.Op Fl -force-revert
|
.Op Fl -force-revert
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
.Nm
|
.Nm
|
||||||
jailbreaks an arm64 (arm64e excluded) iOS/iPadOS/tvOS 15.0-18.0, bridgeOS 5.0-9.0 device,
|
jailbreaks an arm64 (arm64e excluded) iOS/iPadOS/tvOS 15.0-18.2, bridgeOS 5.0-9.2 device,
|
||||||
utilizing the
|
utilizing the
|
||||||
.Em checkm8
|
.Em checkm8
|
||||||
bootROM exploit.
|
bootROM exploit.
|
||||||
.Pp
|
.Pp
|
||||||
.Nm
|
.Nm
|
||||||
provides rootful and rootless jailbreak modes.
|
provides rootful and rootless jailbreak modes.
|
||||||
On iOS/iPadOS,
|
On iOS/iPadOS 15.0 and later and on tvOS 18.2 or later,
|
||||||
.Nm
|
.Nm
|
||||||
is able to jailbreak the device in fakefs-rootful mode, where /
|
is able to jailbreak the device in fakefs-rootful mode, where /
|
||||||
is writable, as well as rootless mode, where / cannot be written to.
|
is writable, as well as rootless mode, where / cannot be written to.
|
||||||
On tvOS and bridgeOS,
|
On tvOS and bridgeOS,
|
||||||
only rootful is supported, and it uses the actual filesystem instead of a fakefs.
|
only rootful is supported. On versions where fakefs-rootful is not
|
||||||
|
applicable, palera1n modifies the actual root filesystem instead
|
||||||
|
of making a fakefs
|
||||||
.Pp
|
.Pp
|
||||||
Due to the nature of the
|
Due to the nature of the
|
||||||
.Em checkm8
|
.Em checkm8
|
||||||
@@ -101,9 +103,7 @@ list of supported devicecs:
|
|||||||
.It Apple T2 MacBookPro15,3
|
.It Apple T2 MacBookPro15,3
|
||||||
.It Apple T2 MacBookAir8,1
|
.It Apple T2 MacBookAir8,1
|
||||||
.It Apple T2 MacBookPro15,4
|
.It Apple T2 MacBookPro15,4
|
||||||
.It iBridge2,11 (Unknown Mac)
|
|
||||||
.It Apple T2 MacBookAir8,2
|
.It Apple T2 MacBookAir8,2
|
||||||
.It iBridge2,13 (Unknown Mac)
|
|
||||||
.It Apple T2 MacBookPro16,1
|
.It Apple T2 MacBookPro16,1
|
||||||
.It Apple T2 MacBookAir9,1
|
.It Apple T2 MacBookAir9,1
|
||||||
.It Apple T2 MacBookPro16,2
|
.It Apple T2 MacBookPro16,2
|
||||||
@@ -139,12 +139,14 @@ Like
|
|||||||
but the size of the created fakefs is smaller at the expense of having unwritable
|
but the size of the created fakefs is smaller at the expense of having unwritable
|
||||||
parts in rarely-written paths. When jailbreaking 16 GB devices, this option must be used
|
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.
|
when setting up fakefs for rootful, as they do not have enough storage for full fakefs.
|
||||||
This flag is only supported on iOS/iPadOS.
|
This flag is supported on iOS/iPadOS 15.0 or later and tvOS 18.2 or later, as they
|
||||||
|
require fakefs for rootful.
|
||||||
.It Fl c , -setup-fakefs
|
.It Fl c , -setup-fakefs
|
||||||
When used with
|
When used with
|
||||||
.Fl f , -fakefs ,
|
.Fl f , -fakefs ,
|
||||||
creates the new APFS volume required for rootful. Will fail if one already exists.
|
creates the new APFS volume required for rootful. Will fail if one already exists.
|
||||||
This flag is only supported on iOS/iPadOS.
|
This flag is supported on iOS/iPadOS 15.0 or later and tvOS 18.2 or later, as they
|
||||||
|
require fakefs for rootful.
|
||||||
.It Fl C , -clean-fakefs
|
.It Fl C , -clean-fakefs
|
||||||
This option is not currently supported and is a no-operation in this version of
|
This option is not currently supported and is a no-operation in this version of
|
||||||
.Nm
|
.Nm
|
||||||
@@ -344,9 +346,14 @@ has been mounted.
|
|||||||
.El
|
.El
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
.Nm
|
.Nm
|
||||||
may crash if the machine it is running on:
|
may crash if the machine it is running on has non-compliant USB devices plugged in.
|
||||||
.Pp
|
.Pp
|
||||||
.Dl "- Has non-compliant USB devices plugged in"
|
.Nm
|
||||||
|
will fail to initialize on Linux when there are no USB devices plugged in.
|
||||||
|
Usually this is not a problem on PCs since the built-in root hubs are also
|
||||||
|
USB devices. However, on platforms such as Apple Silicon Macs in Linux, since
|
||||||
|
there are no built-in USB hubs, at least one USB device needs to be manually
|
||||||
|
plugged in for palera1n to be initialized.
|
||||||
.Pp
|
.Pp
|
||||||
The exploit may also work less reliably on some hosts, like AMD desktops, or some MediaTek devices.
|
The exploit may also work less reliably on some hosts, like AMD desktops, or some MediaTek devices.
|
||||||
.Pp
|
.Pp
|
||||||
|
|||||||
+1
-1
@@ -72,7 +72,7 @@ usb_ret_t USBBulkUpload(usb_device_handle_t handle, void *data, uint32_t len);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PALERAIN_VERSION
|
#ifndef PALERAIN_VERSION
|
||||||
#define PALERAIN_VERSION "2.0.2"
|
#define PALERAIN_VERSION "2.1"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
|||||||
+21
-13
@@ -73,7 +73,24 @@ int connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
|||||||
LOG(LOG_WARNING, "palera1n doesn't and never will work on A12+ (arm64e)");
|
LOG(LOG_WARNING, "palera1n doesn't and never will work on A12+ (arm64e)");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!strncmp(dev.productType, "iPhone10,", strlen("iPhone10,"))) {
|
|
||||||
|
if ((palerain_flags & palerain_option_device_info)) {
|
||||||
|
printf("Mode: normal\n");
|
||||||
|
printf("ProductType: %s\n", dev.productType);
|
||||||
|
printf("Architecture: %s\n", dev.CPUArchitecture);
|
||||||
|
printf("Version: %s\n", dev.productVersion);
|
||||||
|
printf("DisplayName: %s\n", dev.displayName);
|
||||||
|
|
||||||
|
device_has_booted = true;
|
||||||
|
set_spin(0);
|
||||||
|
unsubscribe_cmd();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For Booting Linux etc */
|
||||||
|
if (!getenv("PALERA1N_BYPASS_PASSCODE_CHECK") &&
|
||||||
|
!strncmp(dev.productType, "iPhone10,", strlen("iPhone10,")
|
||||||
|
)) {
|
||||||
if (!(palerain_flags & palerain_option_device_info))
|
if (!(palerain_flags & palerain_option_device_info))
|
||||||
LOG(LOG_VERBOSE2, "Product %s requires passcode to be disabled", dev.productType);
|
LOG(LOG_VERBOSE2, "Product %s requires passcode to be disabled", dev.productType);
|
||||||
unsigned char passcode_state = 0;
|
unsigned char passcode_state = 0;
|
||||||
@@ -91,19 +108,10 @@ int connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getenv("PALERA1N_BYPASS_PASSCODE_CHECK"))
|
||||||
|
LOG(LOG_WARNING, "Bypassed passcode check");
|
||||||
|
|
||||||
if ((palerain_flags & palerain_option_device_info)) {
|
|
||||||
printf("Mode: normal\n");
|
|
||||||
printf("ProductType: %s\n", dev.productType);
|
|
||||||
printf("Architecture: %s\n", dev.CPUArchitecture);
|
|
||||||
printf("Version: %s\n", dev.productVersion);
|
|
||||||
printf("DisplayName: %s\n", dev.displayName);
|
|
||||||
|
|
||||||
device_has_booted = true;
|
|
||||||
set_spin(0);
|
|
||||||
unsubscribe_cmd();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (verbose > 1) {
|
if (verbose > 1) {
|
||||||
/* (LOG_VERBOSE - 3) or below*/
|
/* (LOG_VERBOSE - 3) or below*/
|
||||||
LOG(LOG_INFO, "Telling device with udid %s to enter recovery mode immediately", usbmuxd_device->udid);
|
LOG(LOG_INFO, "Telling device with udid %s to enter recovery mode immediately", usbmuxd_device->udid);
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint64_t* palerain_flags_p = &palerain_flags;
|
uint64_t* palerain_flags_p = &palerain_flags;
|
||||||
static bool force_use_verbose_boot = false;
|
|
||||||
char* gOverrideLibcheckra1nHelper = NULL;
|
char* gOverrideLibcheckra1nHelper = NULL;
|
||||||
|
|
||||||
static struct option longopts[] = {
|
static struct option longopts[] = {
|
||||||
@@ -148,11 +147,9 @@ int optparse(int argc, char* argv[]) {
|
|||||||
case 'B':
|
case 'B':
|
||||||
palerain_flags |= palerain_option_setup_partial_root;
|
palerain_flags |= palerain_option_setup_partial_root;
|
||||||
palerain_flags |= palerain_option_setup_rootful;
|
palerain_flags |= palerain_option_setup_rootful;
|
||||||
palerain_flags |= palerain_option_verbose_boot;
|
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
palerain_flags |= palerain_option_setup_rootful;
|
palerain_flags |= palerain_option_setup_rootful;
|
||||||
palerain_flags |= palerain_option_verbose_boot;
|
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
palerain_flags |= palerain_option_clean_fakefs;
|
palerain_flags |= palerain_option_clean_fakefs;
|
||||||
@@ -175,7 +172,6 @@ int optparse(int argc, char* argv[]) {
|
|||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
palerain_flags |= palerain_option_verbose_boot;
|
palerain_flags |= palerain_option_verbose_boot;
|
||||||
force_use_verbose_boot = true;
|
|
||||||
#ifdef TUI
|
#ifdef TUI
|
||||||
tui_options_verbose_boot = true;
|
tui_options_verbose_boot = true;
|
||||||
#endif
|
#endif
|
||||||
@@ -364,10 +360,6 @@ int optparse(int argc, char* argv[]) {
|
|||||||
LOG(LOG_WARNING, "telnetd is enabled, this is a security hole");
|
LOG(LOG_WARNING, "telnetd is enabled, this is a security hole");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strstr(xargs_cmd, "serial=") != NULL) && !force_use_verbose_boot && (palerain_flags & palerain_option_setup_rootful)) {
|
|
||||||
palerain_flags &= ~palerain_option_verbose_boot;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((palerain_flags & (palerain_option_tui)) && (palerain_flags & (palerain_option_cli))) {
|
if ((palerain_flags & (palerain_option_tui)) && (palerain_flags & (palerain_option_cli))) {
|
||||||
LOG(LOG_FATAL, "cannot specify both --tui and --cli");
|
LOG(LOG_FATAL, "cannot specify both --tui and --cli");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in new issue
Block a user