Compare commits

..
7 Commits
13 changed files with 54 additions and 57 deletions

No files matched your search

+1 -1
View File
@@ -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 help] labels: [palera1n]
body: body:
- type: textarea - type: textarea
id: description id: description
+1 -1
View File
@@ -1,6 +1,6 @@
name: Feature Request name: Feature Request
description: Request a feature in palera1n! description: Request a feature in palera1n!
labels: [enhancement] labels: [enhancement, palera1n]
body: body:
- type: textarea - type: textarea
id: feature-request id: feature-request
+7 -1
View File
@@ -1,6 +1,12 @@
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 help] labels: [palera1n]
assignees:
- khcrysalis
- asdfugil
- elliessurviving
- hg13bs
- afastaudir8
body: body:
- type: input - type: input
id: device id: device
+6 -6
View File
@@ -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-15 runs-on: macos-12
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 libtool brew install make autoconf automake pkg-config gnu-sed gettext
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_16.2.app sudo xcode-select -s /Applications/Xcode_14.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 -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 "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 "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 "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 "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 "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 "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
+1 -1
View File
@@ -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.1\" -DHAVE_LIBIMOBILEDEVICE CFLAGS += -Wall -Wextra -Wno-unused-parameter -DPALERAIN_VERSION=\"2.0.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
+3
View File
@@ -15,6 +15,9 @@ Jailbreak for A8 through A11, T2 devices, on iOS/iPadOS/tvOS 15.0, bridgeOS 5.0
## Device Support ## Device Support
> [!NOTE]
> Apple TV & iBridge support are not currently in the beta releases of palera1n, ETA s0n
<!--- Mobile ---> <!--- Mobile --->
| iPhone(s) | iPad(s) | iPod(s) | Apple TV(s) | | iPhone(s) | iPad(s) | iPod(s) | Apple TV(s) |
+11 -18
View File
@@ -2,11 +2,11 @@
.\" Copyright (c) 2024 Nick Chan .\" Copyright (c) 2024 Nick Chan
.\" SPDX-License-Identifier: MIT .\" SPDX-License-Identifier: MIT
.\" .\"
.Dd "23 December 2024" .Dd "24 July 2024"
.Dt palera1n 1 .Dt palera1n 1
.Sh NAME .Sh NAME
.Nm palera1n .Nm palera1n
.Nd arm64 iOS/iPadOS/tvOS 15.0-18.3, bridgeOS 5.0-9.3 jailbreaking tool .Nd arm64 iOS/iPadOS/tvOS 15.0-18.0, bridgeOS 5.0-9.0 jailbreaking tool
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl cCdDEfhIlLnpRsSTvV .Op Fl cCdDEfhIlLnpRsSTvV
@@ -20,21 +20,19 @@
.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.2, bridgeOS 5.0-9.2 device, jailbreaks an arm64 (arm64e excluded) iOS/iPadOS/tvOS 15.0-18.0, bridgeOS 5.0-9.0 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 15.0 and later and on tvOS 18.2 or later, On iOS/iPadOS,
.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. On versions where fakefs-rootful is not only rootful is supported, and it uses the actual filesystem instead of a fakefs.
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
@@ -103,7 +101,9 @@ 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,14 +139,12 @@ 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 supported on iOS/iPadOS 15.0 or later and tvOS 18.2 or later, as they This flag is only supported on iOS/iPadOS.
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 supported on iOS/iPadOS 15.0 or later and tvOS 18.2 or later, as they This flag is only supported on iOS/iPadOS.
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
@@ -346,14 +344,9 @@ has been mounted.
.El .El
.Sh BUGS .Sh BUGS
.Nm .Nm
may crash if the machine it is running on has non-compliant USB devices plugged in. may crash if the machine it is running on:
.Pp .Pp
.Nm .Dl "- Has non-compliant USB devices plugged in"
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
View File
@@ -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.1" #define PALERAIN_VERSION "2.0.1"
#endif #endif
#if defined(__APPLE__) #if defined(__APPLE__)
+1 -1
View File
@@ -68,7 +68,7 @@ BUILD_OPTIONS += TUI
CFLAGS += -DTUI CFLAGS += -DTUI
endif endif
CHECKRA1N_VERSION ?= 0.1337.3 CHECKRA1N_VERSION ?= 0.1337.2
LIPO = lipo LIPO = lipo
LDID = ldid LDID = ldid
+13 -21
View File
@@ -67,30 +67,13 @@ int connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
LOG(LOG_ERROR, "Unable to get device information"); LOG(LOG_ERROR, "Unable to get device information");
return 0; return 0;
} }
if (strcmp(dev.CPUArchitecture, "arm64")) { if (strncmp(dev.CPUArchitecture, "arm64", strlen("arm64"))) {
devinfo_free(&dev); devinfo_free(&dev);
LOG(LOG_WARNING, "Ignoring non-arm64 device..."); LOG(LOG_WARNING, "Ignoring non-arm64 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;
@@ -109,9 +92,18 @@ int connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
} }
} }
if (getenv("PALERA1N_BYPASS_PASSCODE_CHECK")) if ((palerain_flags & palerain_option_device_info)) {
LOG(LOG_WARNING, "Bypassed passcode check"); 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);
-2
View File
@@ -148,8 +148,6 @@ int palera1n(int argc, char *argv[], char *envp[]) {
palerain_option_device_info) palerain_option_device_info)
) || device_has_booted) ) || device_has_booted)
goto normal_exit; goto normal_exit;
pthread_cancel(pongo_thread);
pthread_join(pongo_thread, NULL);
if (exec_checkra1n()) goto cleanup; if (exec_checkra1n()) goto cleanup;
if ((palerain_flags & (palerain_option_pongo_exit | palerain_option_demote))) if ((palerain_flags & (palerain_option_pongo_exit | palerain_option_demote)))
+9 -1
View File
@@ -19,6 +19,7 @@
#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[] = {
@@ -77,7 +78,7 @@ static int usage(int e, char* prog_name)
#endif #endif
"] [-e boot arguments] [-k Pongo image] [-o overlay file] [-r ramdisk file] [-K KPF file] [-i checkra1n file]\n" "] [-e boot arguments] [-k Pongo image] [-o overlay file] [-r ramdisk file] [-K KPF file] [-i checkra1n file]\n"
"Copyright (C) 2024, palera1n team, All Rights Reserved.\n\n" "Copyright (C) 2024, palera1n team, All Rights Reserved.\n\n"
"iOS/iPadOS/tvOS 15.0-18.1, bridgeOS 5.0-9.1 arm64 jailbreaking tool\n\n" "iOS/iPadOS/tvOS 15.0-18.0, bridgeOS 5.0-9.0 arm64 jailbreaking tool\n\n"
"\t--version\t\t\t\tPrint version\n" "\t--version\t\t\t\tPrint version\n"
"\t--force-revert\t\t\t\tRemove jailbreak\n" "\t--force-revert\t\t\t\tRemove jailbreak\n"
#ifdef DEV_BUILD #ifdef DEV_BUILD
@@ -147,9 +148,11 @@ 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;
@@ -172,6 +175,7 @@ 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
@@ -360,6 +364,10 @@ 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;
-3
View File
@@ -42,9 +42,6 @@ void *pongo_usb_callback(stuff_t *arg) {
} }
#endif #endif
LOG(LOG_INFO, "Found PongoOS USB Device"); LOG(LOG_INFO, "Found PongoOS USB Device");
if (palerain_flags & palerain_option_pongo_exit)
goto done;
usb_device_handle_t handle = arg->handle; usb_device_handle_t handle = arg->handle;
#ifdef TUI #ifdef TUI
if (tui_is_jailbreaking) { if (tui_is_jailbreaking) {