mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
Compare commits
58
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0404c0f362 | ||
|
|
f795cbd777 | ||
|
|
24e0904f5e | ||
|
|
57c5d7eaa3 | ||
|
|
eb5e7060cc | ||
|
|
28a434084c | ||
|
|
7f55babab1 | ||
|
|
ab94104366 | ||
|
|
95c7d1c47a | ||
|
|
d9dfefadcb | ||
|
|
ff94a8281d | ||
|
|
9eba8965fc | ||
|
|
bb46df31e6 | ||
|
|
fdc554b3c2 | ||
|
|
f1377618b8 | ||
|
|
1670c26313 | ||
|
|
3a404501f7 | ||
|
|
2fbb899c60 | ||
|
|
4a262e1ea4 | ||
|
|
868869deab | ||
|
|
7d3f40d89b | ||
|
|
4b53afc973 | ||
|
|
a31f283c9b | ||
|
|
8d401680dd | ||
|
|
df636c1db9 | ||
|
|
efc8cd6513 | ||
|
|
f5c4b338f2 | ||
|
|
3d2d380820 | ||
|
|
a099e321c0 | ||
|
|
34bc646439 | ||
|
|
147134b495 | ||
|
|
7ddf02e0b9 | ||
|
|
aa91582aba | ||
|
|
39a5ad981c | ||
|
|
59aabaad08 | ||
|
|
106e2214b5 | ||
|
|
3022c6a447 | ||
|
|
a4eacb75c0 | ||
|
|
05ca13d925 | ||
|
|
c01b426a87 | ||
|
|
3a2ff433ed | ||
|
|
0122e6c603 | ||
|
|
cc151e727e | ||
|
|
76b2695e9d | ||
|
|
1e72458985 | ||
|
|
ba2a4dee25 | ||
|
|
f8319e44f1 | ||
|
|
ff581a41e9 | ||
|
|
b4bd41de60 | ||
|
|
0b5b54521f | ||
|
|
17f28f3f0a | ||
|
|
8ef0035dc0 | ||
|
|
34edfd649b | ||
|
|
671e2346ae | ||
|
|
464c832883 | ||
|
|
0e9cd5e1f6 | ||
|
|
08fbb60538 | ||
|
|
8787616ae0 |
No files matched your search
@@ -1,6 +1,6 @@
|
||||
name: No Template
|
||||
description: Create a standard issue, no template involved.
|
||||
labels: [palera1n]
|
||||
labels: [palera1n help]
|
||||
body:
|
||||
- type: textarea
|
||||
id: description
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: Feature Request
|
||||
description: Request a feature in palera1n!
|
||||
labels: [enhancement, palera1n]
|
||||
labels: [enhancement]
|
||||
body:
|
||||
- type: textarea
|
||||
id: feature-request
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
name: Create Issue
|
||||
description: Ask help for palera1n regarding support or generally how it works!
|
||||
labels: [palera1n]
|
||||
assignees:
|
||||
- ssalggnikool
|
||||
- asdfugil
|
||||
labels: [palera1n help]
|
||||
body:
|
||||
- type: input
|
||||
id: device
|
||||
|
||||
+146
-145
@@ -72,13 +72,15 @@ jobs:
|
||||
gnu_triple: aarch64-apple-darwin
|
||||
os: iphoneos
|
||||
minos: 7.0
|
||||
runs-on: macos-12
|
||||
runs-on: macos-15
|
||||
env:
|
||||
MBEDTLS_VERSION: 3.5.2
|
||||
READLINE_VERSION: 8.2
|
||||
SLANG_VERSION: 2.3.3
|
||||
NEWT_VERSION: 0.52.23
|
||||
POPT_VERSION: 1.19
|
||||
LIBIMOBILEDEVICE_COMMIT: ed0d66d0341562731bb19928dfe48155509fa7a7
|
||||
LIBIRECOVERY_COMMIT: 7ce02c347b7c26e59498e6af31c9da51018d0fa1
|
||||
LIBIMOBILEDEVICE_GLUE_COMMIT: 362f7848ac89b74d9dd113b38b51ecb601f76094
|
||||
LIBPLIST_COMMIT: 2117b8fdb6b4096455bd2041a63e59a028120136
|
||||
LIBUSBMUXD_COMMIT: a7f0543fb1ecb20ac7121c0fd77297200e0e43fc
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -89,7 +91,7 @@ jobs:
|
||||
- name: Install dependencies (packages)
|
||||
run: |
|
||||
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*
|
||||
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
|
||||
@@ -98,29 +100,9 @@ jobs:
|
||||
run: |
|
||||
echo "SDK=$(xcrun -sdk ${{ matrix.os }} --show-sdk-path)" >> $GITHUB_ENV
|
||||
|
||||
- name: Download dependencies (source code)
|
||||
run: |
|
||||
curl -LOOOOOO \
|
||||
https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${{ env.MBEDTLS_VERSION }}.tar.gz \
|
||||
https://mirror-hk.koddos.net/gnu/readline/readline-${{ env.READLINE_VERSION }}.tar.gz \
|
||||
https://www.jedsoft.org/releases/slang/slang-${{ env.SLANG_VERSION }}.tar.bz2 \
|
||||
https://releases.pagure.org/newt/newt-${{ env.NEWT_VERSION }}.tar.gz \
|
||||
https://github.com/rpm-software-management/popt/archive/refs/tags/popt-${{ env.POPT_VERSION }}-release.tar.gz
|
||||
|
||||
tar -xf v${{ env.MBEDTLS_VERSION }}.tar.gz
|
||||
tar -xf readline-${{ env.READLINE_VERSION }}.tar.gz
|
||||
tar -xjf slang-${{ env.SLANG_VERSION }}.tar.bz2
|
||||
tar -xf newt-${{ env.NEWT_VERSION }}.tar.gz
|
||||
tar -xf popt-${{ env.POPT_VERSION }}-release.tar.gz
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libplist
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libimobiledevice-glue
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libirecovery
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libusbmuxd
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libimobiledevice
|
||||
|
||||
- name: Select correct Xcode
|
||||
run: |
|
||||
sudo xcode-select -s /Applications/Xcode_14.2.app
|
||||
sudo xcode-select -s /Applications/Xcode_16.2.app
|
||||
|
||||
- name: Setup environment
|
||||
run: |
|
||||
@@ -132,16 +114,14 @@ jobs:
|
||||
echo "CC=$(xcrun --find cc)" >> $GITHUB_ENV
|
||||
echo "CXX=$(xcrun --find c++)" >> $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" >> $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" >> $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" >> $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 -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 -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 "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 "CPPFLAGS_FOR_BUILD=-arch $(uname -m) -isysroot $(xcrun -sdk macosx --show-sdk-path) -Wno-error-implicit-function-declaration -Os" >> $GITHUB_ENV
|
||||
echo "LDFLAGS_FOR_BUILD=-Wl,-dead_strip" >> $GITHUB_ENV
|
||||
mkdir -p $(pwd)/sysroot/usr/local/lib
|
||||
ln -sf $(pwd)/sysroot/usr/local/lib{,64}
|
||||
|
||||
- name: Prepare iPhoneOS environment
|
||||
if: matrix.os == 'iphoneos'
|
||||
@@ -182,7 +162,59 @@ jobs:
|
||||
gsed -E /'__API_UNAVAILABLE'/d < ${TARGET_SYSROOT}/usr/include/pthread.h > sysroot/usr/local/include/pthread.h
|
||||
gsed -i -E s/'__API_UNAVAILABLE\(.*\)'// sysroot/usr/local/include/IOKit/IOKitLib.h
|
||||
|
||||
- name: Check dependencies cache
|
||||
run: |
|
||||
echo "target: ${{ matrix.os }}-${{ matrix.arch }}" > cache.txt
|
||||
echo "mbedtls ${{ env.MBEDTLS_VERSION }}" >> cache.txt
|
||||
echo "readline: ${{ env.READLINE_VERSION }}" >> cache.txt
|
||||
echo "libimobiledevice: ${{ env.LIBIMOBILEDEVICE_COMMIT }}" >> cache.txt
|
||||
echo "libirecovery: ${{ env.LIBIRECOVERY_COMMIT }}" >> cache.txt
|
||||
echo "libimobiledevice-glue: ${{ env.LIBIMOBILEDEVICE_GLUE_COMMIT }}" >> cache.txt
|
||||
echo "libplist: ${{ env.LIBPLIST_COMMIT }}" >> cache.txt
|
||||
echo "libusbmuxd: ${{ env.LIBUSBMUXD_COMMIT }}" >> cache.txt
|
||||
echo "cc: $($(xcrun --find cc) --version)" >> cache.txt
|
||||
echo "CACHE_TXT_CHECKSUM=sysroot-$(shasum -a 512 cache.txt | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
|
||||
- name: Download cached sysroot
|
||||
id: sysroot_cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: sysroot-${{ env.CACHE_TXT_CHECKSUM }}.txz
|
||||
key: sysroot-${{ env.CACHE_TXT_CHECKSUM }}
|
||||
|
||||
- name: Extract cached sysroot
|
||||
if: steps.sysroot_cache.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
xz -dcT0 sysroot-${{ env.CACHE_TXT_CHECKSUM }}.txz | tar -x
|
||||
|
||||
- name: Setup sysroot
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
mkdir -p $(pwd)/sysroot/usr/local/lib
|
||||
ln -sf $(pwd)/sysroot/usr/local/lib{,64}
|
||||
|
||||
- name: Download dependencies (source code)
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
curl -LOOOOOO \
|
||||
https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${{ env.MBEDTLS_VERSION }}.tar.gz \
|
||||
https://mirror-hk.koddos.net/gnu/readline/readline-${{ env.READLINE_VERSION }}.tar.gz
|
||||
|
||||
tar -xf v${{ env.MBEDTLS_VERSION }}.tar.gz
|
||||
tar -xf readline-${{ env.READLINE_VERSION }}.tar.gz
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libplist
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libimobiledevice-glue
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libirecovery
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libusbmuxd
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libimobiledevice
|
||||
cd libplist && git fetch origin ${{ env.LIBPLIST_COMMIT }} && git reset --hard ${{ env.LIBPLIST_COMMIT }} && cd ..
|
||||
cd libirecovery && git fetch origin ${{ env.LIBIRECOVERY_COMMIT }} && git reset --hard ${{ env.LIBIRECOVERY_COMMIT }} && cd ..
|
||||
cd libimobiledevice-glue && git fetch origin ${{ env.LIBIMOBILEDEVICE_GLUE_COMMIT }} && git reset --hard ${{ env.LIBIMOBILEDEVICE_GLUE_COMMIT }} && cd ..
|
||||
cd libimobiledevice && git fetch origin ${{ env.LIBIMOBILEDEVICE_COMMIT }} && git reset --hard ${{ env.LIBIMOBILEDEVICE_COMMIT }} && cd ..
|
||||
cd libusbmuxd && git fetch origin ${{ env.LIBUSBMUXD_COMMIT }} && git reset --hard ${{ env.LIBUSBMUXD_COMMIT }} && cd ..
|
||||
|
||||
- name: Build Mbed TLS
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd mbedtls-${{ env.MBEDTLS_VERSION }}
|
||||
cat ../patches/mbedtls/0001-Allow-empty-x509-cert-issuer.patch | patch -sN -d . -p1
|
||||
@@ -207,6 +239,7 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build readline
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd readline-${{ env.READLINE_VERSION }}
|
||||
CC=clang CXX=clang++ ./configure ${{ env.CONFIGURE_ARGS }} ac_cv_type_sig_atomic_t=no
|
||||
@@ -214,52 +247,8 @@ jobs:
|
||||
gmake -j$(sysctl -n hw.ncpu) install DESTDIR=${{ env.DESTDIR }}
|
||||
cd ..
|
||||
|
||||
- name: Build S-Lang
|
||||
run: |
|
||||
cd slang-${{ env.SLANG_VERSION }}
|
||||
./configure \
|
||||
${{ env.CONFIGURE_ARGS }} \
|
||||
--without-x \
|
||||
--without-pcre \
|
||||
--without-onig \
|
||||
--without-z \
|
||||
--without-png \
|
||||
--without-iconv
|
||||
gmake -j$(sysctl -n hw.ncpu) static
|
||||
gmake -j$(sysctl -n hw.ncpu) install-static DESTDIR=${{ env.DESTDIR }}
|
||||
cd ..
|
||||
|
||||
- name: Build popt
|
||||
run: |
|
||||
cd popt-popt-${{ env.POPT_VERSION }}-release
|
||||
autoreconf -fiv
|
||||
./configure \
|
||||
${{ env.CONFIGURE_ARGS }} \
|
||||
--without-libiconv-prefix \
|
||||
--without-libintl-prefix \
|
||||
--disable-nls \
|
||||
--disable-werror
|
||||
gmake -j$(sysctl -n hw.ncpu)
|
||||
gmake -j$(sysctl -n hw.ncpu) install DESTDIR=${{ env.DESTDIR }}
|
||||
cd ..
|
||||
|
||||
- name: Build newt
|
||||
run: |
|
||||
cd newt-${{ env.NEWT_VERSION }}
|
||||
./configure \
|
||||
${{ env.CONFIGURE_ARGS }} \
|
||||
--with-readline=gnu \
|
||||
--without-python \
|
||||
--without-tcl \
|
||||
--disable-nls
|
||||
gmake -j$(sysctl -n hw.ncpu) libnewt.a
|
||||
mkdir -p ${{ env.DESTDIR }}/usr/local/{lib/pkgconfig,include}
|
||||
install -m644 libnewt.pc ${{ env.DESTDIR }}/usr/local/lib/pkgconfig
|
||||
install -m644 libnewt.a ${{ env.DESTDIR }}/usr/local/lib
|
||||
install -m644 newt.h ${{ env.DESTDIR }}/usr/local/include
|
||||
cd ..
|
||||
|
||||
- name: Build libplist
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd libplist
|
||||
autoreconf -fiv
|
||||
@@ -269,6 +258,7 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build libimobiledevice-glue
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd libimobiledevice-glue
|
||||
autoreconf -fiv
|
||||
@@ -278,6 +268,7 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build libirecovery
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
sudo cp -a sysroot/usr/local/* /usr/local
|
||||
cd libirecovery
|
||||
@@ -293,6 +284,7 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build libusbmuxd
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd libusbmuxd
|
||||
autoreconf -fiv
|
||||
@@ -302,10 +294,11 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build libimobiledevice
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd libimobiledevice
|
||||
autoreconf -fiv
|
||||
./configure ${{ env.CONFIGURE_ARGS }} --with-mbedtls --enable-debug
|
||||
./configure ${{ env.CONFIGURE_ARGS }} --with-mbedtls --disable-debug --disable-wireless-pairing
|
||||
echo -e 'all:\ninstall:' > tools/Makefile
|
||||
gmake -j$(sysctl -n hw.ncpu)
|
||||
gmake -j$(sysctl -n hw.ncpu) install DESTDIR=${{ env.DESTDIR }}
|
||||
@@ -316,15 +309,15 @@ jobs:
|
||||
cp -a sysroot/${{ env.PREFIX }}/{include,lib} dep_root
|
||||
find dep_root -name '*.dylib' -delete
|
||||
find dep_root -name '*.la' -delete
|
||||
gmake -j$(sysctl -n hw.ncpu) TUI=1
|
||||
gmake -j$(sysctl -n hw.ncpu) ROOTFUL=1
|
||||
cp src/palera1n palera1n-${{ matrix.os }}-${{ matrix.arch }}
|
||||
dsymutil palera1n-${{ matrix.os }}-${{ matrix.arch }}
|
||||
strip palera1n-${{ matrix.os }}-${{ matrix.arch }}
|
||||
|
||||
- name: Build palera1n (Development)
|
||||
run: |
|
||||
CC="${{ matrix.triple }}-gcc" gmake -j$(sysctl -n hw.ncpu) clean
|
||||
CC="${{ matrix.triple }}-gcc" gmake -j$(sysctl -n hw.ncpu) DEV_BUILD=1 TUI=1 ROOTFUL=1
|
||||
gmake -j$(sysctl -n hw.ncpu) clean
|
||||
gmake -j$(sysctl -n hw.ncpu) DEV_BUILD=1 TUI=1 ROOTFUL=1
|
||||
cp src/palera1n palera1n-${{ matrix.os }}-${{ matrix.arch }}.development
|
||||
|
||||
- name: Prepare artifact
|
||||
@@ -378,7 +371,12 @@ jobs:
|
||||
name: palera1n-${{ matrix.os }}-${{ matrix.arch }}.dSYM
|
||||
path: palera1n-${{ matrix.os }}-${{ matrix.arch }}.dSYM
|
||||
retention-days: 1
|
||||
|
||||
|
||||
- name: Generate cached sysroot archive
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
tar -c sysroot | xz -zce9T 0 > sysroot-${{ env.CACHE_TXT_CHECKSUM }}.txz
|
||||
|
||||
darwin-dist:
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
runs-on: macos-latest
|
||||
@@ -532,12 +530,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MBEDTLS_VERSION: 3.5.2
|
||||
LIBUSB_VERSION: 1.0.26
|
||||
LIBUSB_VERSION: 1.0.27
|
||||
READLINE_VERSION: 8.2
|
||||
SLANG_VERSION: 2.3.3
|
||||
NEWT_VERSION: 0.52.23
|
||||
GPM_VERSION: 1.20.7
|
||||
POPT_VERSION: 1.19
|
||||
LIBIMOBILEDEVICE_COMMIT: ed0d66d0341562731bb19928dfe48155509fa7a7
|
||||
LIBIRECOVERY_COMMIT: 7ce02c347b7c26e59498e6af31c9da51018d0fa1
|
||||
LIBIMOBILEDEVICE_GLUE_COMMIT: 362f7848ac89b74d9dd113b38b51ecb601f76094
|
||||
USBMUXD_COMMIT: bc0b91ca856811f4393318dc83db6dc3c1ac326d
|
||||
LIBPLIST_COMMIT: 2117b8fdb6b4096455bd2041a63e59a028120136
|
||||
LIBUSBMUXD_COMMIT: a7f0543fb1ecb20ac7121c0fd77297200e0e43fc
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -592,43 +593,75 @@ jobs:
|
||||
;;
|
||||
esac
|
||||
echo "PKG_CONFIG_PATH=$(pwd)/sysroot/usr/local/lib/pkgconfig" >> $GITHUB_ENV
|
||||
echo "CFLAGS=-g -fdata-sections -ffunction-sections -I$(pwd)/sysroot/usr/local/include -L$(pwd)/sysroot/usr/local/lib" >> $GITHUB_ENV
|
||||
echo "CXXFLAGS=-g -fdata-sections -ffunction-sections -I$(pwd)/sysroot/usr/local/include -L$(pwd)/sysroot/usr/local/lib" >> $GITHUB_ENV
|
||||
echo "CFLAGS=-g -fdata-sections -ffunction-sections -I$(pwd)/sysroot/usr/local/include -L$(pwd)/sysroot/usr/local/lib -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
||||
echo "CXXFLAGS=-g -fdata-sections -ffunction-sections -I$(pwd)/sysroot/usr/local/include -L$(pwd)/sysroot/usr/local/lib -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
||||
echo "LDFLAGS=-g -Wl,--gc-sections -fdata-sections -ffunction-sections -I$(pwd)/sysroot/usr/local/include -L$(pwd)/sysroot/usr/local/lib" >> $GITHUB_ENV
|
||||
echo "INSTALL=$(command -v install) --strip-program=${{ matrix.triple }}-strip" >> $GITHUB_ENV
|
||||
echo "DESTDIR=$(pwd)/sysroot" >> $GITHUB_ENV
|
||||
echo "PREFIX=/usr/local" >> $GITHUB_ENV
|
||||
echo "CONFIGURE_ARGS=--build=x86_64-linux-gnu --host=${{ matrix.triple }} --prefix=/usr/local --disable-shared --enable-static" >> $GITHUB_ENV
|
||||
echo "CROSS_COMPILE=${{ matrix.triple }}-" >> $GITHUB_ENV
|
||||
|
||||
- name: Check dependencies cache
|
||||
run: |
|
||||
echo "target: ${{ matrix.triple }}" > cache.txt
|
||||
echo "mbedtls ${{ env.MBEDTLS_VERSION }}" >> cache.txt
|
||||
echo "readline: ${{ env.READLINE_VERSION }}" >> cache.txt
|
||||
echo "libimobiledevice: ${{ env.LIBIMOBILEDEVICE_COMMIT }}" >> cache.txt
|
||||
echo "libirecovery: ${{ env.LIBIRECOVERY_COMMIT }}" >> cache.txt
|
||||
echo "libimobiledevice-glue: ${{ env.LIBIMOBILEDEVICE_GLUE_COMMIT }}" >> cache.txt
|
||||
echo "libplist: ${{ env.LIBPLIST_COMMIT }}" >> cache.txt
|
||||
echo "libusbmuxd: ${{ env.LIBUSBMUXD_COMMIT }}" >> cache.txt
|
||||
echo "usbmuxd: ${{ env.USBMUXD_COMMIT }}" >> cache.txt
|
||||
echo "cc: $(${{ env.CROSS_COMPILE }}gcc --version)" >> cache.txt
|
||||
echo "CACHE_TXT_CHECKSUM=sysroot-$(sha512sum cache.txt | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
|
||||
- name: Download cached sysroot
|
||||
id: sysroot_cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: sysroot-${{ env.CACHE_TXT_CHECKSUM }}.txz
|
||||
key: sysroot-${{ env.CACHE_TXT_CHECKSUM }}
|
||||
|
||||
- name: Extract cached sysroot
|
||||
if: steps.sysroot_cache.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
xz -dcT0 sysroot-${{ env.CACHE_TXT_CHECKSUM }}.txz | tar -x
|
||||
|
||||
- name: Setup sysroot
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
mkdir -p $(pwd)/sysroot/usr/local/lib
|
||||
ln -sf $(pwd)/sysroot/usr/local/lib{,64}
|
||||
|
||||
- name: Download dependencies (source code)
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
curl -LOOOOOOO \
|
||||
https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${{ env.MBEDTLS_VERSION }}.tar.gz \
|
||||
https://github.com/libusb/libusb/releases/download/v${{ env.LIBUSB_VERSION }}/libusb-${{ env.LIBUSB_VERSION }}.tar.bz2 \
|
||||
https://mirror-hk.koddos.net/gnu/readline/readline-${{ env.READLINE_VERSION }}.tar.gz \
|
||||
https://www.jedsoft.org/releases/slang/slang-${{ env.SLANG_VERSION }}.tar.bz2 \
|
||||
https://releases.pagure.org/newt/newt-${{ env.NEWT_VERSION }}.tar.gz \
|
||||
https://github.com/telmich/gpm/archive/refs/tags/${{ env.GPM_VERSION }}.tar.gz \
|
||||
https://github.com/rpm-software-management/popt/archive/refs/tags/popt-${{ env.POPT_VERSION }}-release.tar.gz
|
||||
https://github.com/telmich/gpm/archive/refs/tags/${{ env.GPM_VERSION }}.tar.gz
|
||||
|
||||
tar -xf v${{ env.MBEDTLS_VERSION }}.tar.gz
|
||||
tar -xjf libusb-${{ env.LIBUSB_VERSION }}.tar.bz2
|
||||
tar -xf readline-${{ env.READLINE_VERSION }}.tar.gz
|
||||
tar -xjf slang-${{ env.SLANG_VERSION }}.tar.bz2
|
||||
tar -xf newt-${{ env.NEWT_VERSION }}.tar.gz
|
||||
tar -xf ${{ env.GPM_VERSION }}.tar.gz
|
||||
tar -xf popt-${{ env.POPT_VERSION }}-release.tar.gz
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libplist
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libimobiledevice-glue
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libirecovery
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libusbmuxd
|
||||
git clone --depth=1 https://github.com/libimobiledevice/libimobiledevice
|
||||
git clone --depth=1 https://github.com/libimobiledevice/usbmuxd
|
||||
cd libplist && git fetch origin ${{ env.LIBPLIST_COMMIT }} && git reset --hard ${{ env.LIBPLIST_COMMIT }} && cd ..
|
||||
cd libirecovery && git fetch origin ${{ env.LIBIRECOVERY_COMMIT }} && git reset --hard ${{ env.LIBIRECOVERY_COMMIT }} && cd ..
|
||||
cd libimobiledevice-glue && git fetch origin ${{ env.LIBIMOBILEDEVICE_GLUE_COMMIT }} && git reset --hard ${{ env.LIBIMOBILEDEVICE_GLUE_COMMIT }} && cd ..
|
||||
cd usbmuxd && git fetch origin ${{ env.USBMUXD_COMMIT }} && git reset --hard ${{ env.USBMUXD_COMMIT }} && cd ..
|
||||
cd libimobiledevice && git fetch origin ${{ env.LIBIMOBILEDEVICE_COMMIT }} && git reset --hard ${{ env.LIBIMOBILEDEVICE_COMMIT }} && cd ..
|
||||
cd libusbmuxd && git fetch origin ${{ env.LIBUSBMUXD_COMMIT }} && git reset --hard ${{ env.LIBUSBMUXD_COMMIT }} && cd ..
|
||||
|
||||
- name: Build Mbed TLS
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd mbedtls-${{ env.MBEDTLS_VERSION }}
|
||||
cat ../patches/mbedtls/0001-Allow-empty-x509-cert-issuer.patch | patch -sN -d . -p1
|
||||
@@ -653,6 +686,7 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build libusb
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd libusb-${{ env.LIBUSB_VERSION }}
|
||||
./configure ${{ env.CONFIGURE_ARGS }} --disable-udev
|
||||
@@ -661,6 +695,7 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build readline
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd readline-${{ env.READLINE_VERSION }}
|
||||
./configure ${{ env.CONFIGURE_ARGS }}
|
||||
@@ -668,22 +703,8 @@ jobs:
|
||||
make -j$(nproc) install DESTDIR=${{ env.DESTDIR }}
|
||||
cd ..
|
||||
|
||||
- name: Build S-Lang
|
||||
run: |
|
||||
cd slang-${{ env.SLANG_VERSION }}
|
||||
./configure \
|
||||
${{ env.CONFIGURE_ARGS }} \
|
||||
--without-x \
|
||||
--without-pcre \
|
||||
--without-onig \
|
||||
--without-z \
|
||||
--without-png \
|
||||
--without-iconv
|
||||
gmake -j$(sysctl -n hw.ncpu) static
|
||||
gmake -j$(sysctl -n hw.ncpu) install-static DESTDIR=${{ env.DESTDIR }}
|
||||
cd ..
|
||||
|
||||
- name: Build GPM
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd gpm-${{ env.GPM_VERSION }}
|
||||
cat ../patches/gpm/*.patch | patch -sN -d . -p1
|
||||
@@ -694,38 +715,8 @@ jobs:
|
||||
gmake -j$(sysctl -n hw.ncpu) install DESTDIR=${{ env.DESTDIR }}
|
||||
cd ..
|
||||
|
||||
- name: Build popt
|
||||
run: |
|
||||
cd popt-popt-${{ env.POPT_VERSION }}-release
|
||||
autoreconf -fiv
|
||||
./configure \
|
||||
${{ env.CONFIGURE_ARGS }} \
|
||||
--without-libiconv-prefix \
|
||||
--without-libintl-prefix \
|
||||
--disable-nls \
|
||||
--disable-werror
|
||||
gmake -j$(sysctl -n hw.ncpu)
|
||||
gmake -j$(sysctl -n hw.ncpu) install DESTDIR=${{ env.DESTDIR }}
|
||||
cd ..
|
||||
|
||||
- name: Build newt
|
||||
run: |
|
||||
cd newt-${{ env.NEWT_VERSION }}
|
||||
./configure \
|
||||
${{ env.CONFIGURE_ARGS }} \
|
||||
--with-readline=gnu \
|
||||
--without-python \
|
||||
--without-tcl \
|
||||
--disable-nls \
|
||||
--with-gpm-support
|
||||
gmake -j$(sysctl -n hw.ncpu) libnewt.a
|
||||
mkdir -p ${{ env.DESTDIR }}/usr/local/{lib/pkgconfig,include}
|
||||
install -m644 libnewt.pc ${{ env.DESTDIR }}/usr/local/lib/pkgconfig
|
||||
install -m644 libnewt.a ${{ env.DESTDIR }}/usr/local/lib
|
||||
install -m644 newt.h ${{ env.DESTDIR }}/usr/local/include
|
||||
cd ..
|
||||
|
||||
- name: Build libplist
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd libplist
|
||||
autoreconf -fiv
|
||||
@@ -735,6 +726,7 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build libimobiledevice-glue
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd libimobiledevice-glue
|
||||
autoreconf -fiv
|
||||
@@ -744,6 +736,7 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build libirecovery (sorta)
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
sudo mv /usr/local /usr/local.bak
|
||||
sudo ln -s ${{ env.DESTDIR }}${{ env.PREFIX }} /usr/local
|
||||
@@ -757,6 +750,7 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build libusbmuxd
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd libusbmuxd
|
||||
autoreconf -fiv
|
||||
@@ -766,10 +760,11 @@ jobs:
|
||||
cd ..
|
||||
|
||||
- name: Build libimobiledevice
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd libimobiledevice
|
||||
autoreconf -fiv
|
||||
./configure ${{ env.CONFIGURE_ARGS }} --with-mbedtls --enable-debug
|
||||
./configure ${{ env.CONFIGURE_ARGS }} --with-mbedtls --disable-debug --disable-wireless-pairing
|
||||
echo -e 'all:\ninstall:' > tools/Makefile
|
||||
make -j$(nproc)
|
||||
make -j$(nproc) install DESTDIR=${{ env.DESTDIR }}
|
||||
@@ -778,6 +773,7 @@ jobs:
|
||||
sudo mv /usr/local.bak /usr/local
|
||||
|
||||
- name: Build usbmuxd
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd usbmuxd
|
||||
autoreconf -fiv
|
||||
@@ -798,7 +794,7 @@ jobs:
|
||||
cp -a ${{ env.DESTDIR }}/${{ env.PREFIX }}/{include,lib} dep_root
|
||||
find dep_root -name '*.so' -delete
|
||||
find dep_root -name '*.la' -delete
|
||||
CC="${{ matrix.triple }}-gcc" make -j$(nproc) TUI=1
|
||||
CC="${{ matrix.triple }}-gcc" make -j$(nproc) ROOTFUL=1
|
||||
cp src/palera1n palera1n.release
|
||||
|
||||
- name: Seperate debug symbols
|
||||
@@ -807,11 +803,11 @@ jobs:
|
||||
${{ matrix.triple }}-strip --strip-debug --strip-unneeded palera1n.release
|
||||
${{ matrix.triple }}-objcopy --add-gnu-debuglink=palera1n.debug palera1n.release
|
||||
chmod -x palera1n.debug
|
||||
|
||||
|
||||
- name: Build palera1n (Development)
|
||||
run: |
|
||||
CC="${{ matrix.triple }}-gcc" make -j$(nproc) clean
|
||||
CC="${{ matrix.triple }}-gcc" make -j$(nproc) DEV_BUILD=1 TUI=1 ROOTFUL=1
|
||||
CC="${{ matrix.triple }}-gcc" make -j$(nproc) DEV_BUILD=1 ROOTFUL=1
|
||||
cp src/palera1n palera1n.development
|
||||
|
||||
- name: Prepare artifact
|
||||
@@ -836,7 +832,7 @@ jobs:
|
||||
|
||||
sed 's|@DEB_ARCH@|${{ env.ARCH_NAME }}|g' -i stage/DEBIAN/control
|
||||
sed "s|@DEB_VERSION@|$version|g" -i stage/DEBIAN/control
|
||||
|
||||
|
||||
install -Dm644 ready/binaries/palera1n-${{ env.CHECKRA1N_NAME }} stage/usr/bin/palera1n
|
||||
gzip -c9 docs/palera1n.1 > stage/usr/share/man/man1/palera1n.1.gz
|
||||
chmod 755 stage/usr/bin/palera1n
|
||||
@@ -876,6 +872,11 @@ jobs:
|
||||
localDir: 'usbmuxd-static/'
|
||||
remoteDir: "/palera1n/artifacts/usbmuxd-static"
|
||||
|
||||
- name: Generate cached sysroot archive
|
||||
if: steps.sysroot_cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
tar -c sysroot | xz -zce9T 0 > sysroot-${{ env.CACHE_TXT_CHECKSUM }}.txz
|
||||
|
||||
finish-build:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
|
||||
@@ -4,6 +4,7 @@ dep_root/**
|
||||
!contrib/.keep
|
||||
contrib/
|
||||
*.o
|
||||
dep_root*.tgz
|
||||
.vscode
|
||||
checkra1n*
|
||||
payload.c
|
||||
|
||||
@@ -3,7 +3,7 @@ DEP = $(SRC)/dep_root
|
||||
STRIP = strip
|
||||
CC ?= cc
|
||||
CFLAGS += -isystem $(DEP)/include -I$(SRC)/include -I$(SRC) -D_XOPEN_SOURCE=500
|
||||
CFLAGS += -Wall -Wextra -Wno-unused-parameter -DPALERAIN_VERSION=\"2.0\" -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
|
||||
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
|
||||
@@ -27,11 +27,11 @@ endif
|
||||
LIBS += $(DEP)/lib/libmbedtls.a $(DEP)/lib/libmbedcrypto.a $(DEP)/lib/libmbedx509.a $(DEP)/lib/libreadline.a
|
||||
|
||||
ifeq ($(TUI),1)
|
||||
LIBS += $(DEP)/lib/libnewt.a $(DEP)/lib/libpopt.a $(DEP)/lib/libslang.a
|
||||
ifeq ($(TARGET_OS),Linux)
|
||||
LIBS += $(DEP)/lib/libgpm.a
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(DEV_BUILD),1)
|
||||
CFLAGS += -O0 -g -DDEV_BUILD -fno-omit-frame-pointer
|
||||
ifeq ($(ASAN),1)
|
||||
@@ -59,15 +59,12 @@ ifneq ($(BAKERAIN_DEVELOPE_R),)
|
||||
CFLAGS += -DBAKERAIN_DEVELOPE_R="\"$(BAKERAIN_DEVELOPE_R)\""
|
||||
endif
|
||||
|
||||
BUILD_DATE := $(shell LANG=C date)
|
||||
BUILD_NUMBER := $(shell git rev-list --count HEAD)
|
||||
BUILD_TAG := $(shell git describe --dirty --tags --abbrev=7)
|
||||
BUILD_WHOAMI := $(shell whoami)
|
||||
BUILD_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
||||
BUILD_COMMIT := $(shell git rev-parse HEAD)
|
||||
|
||||
CFLAGS += -DBUILD_STYLE="\"$(BUILD_STYLE)\"" -DBUILD_DATE="\"$(BUILD_DATE)\""
|
||||
CFLAGS += -DBUILD_WHOAMI="\"$(BUILD_WHOAMI)\"" -DBUILD_TAG="\"$(BUILD_TAG)\""
|
||||
CFLAGS += -DBUILD_STYLE="\"$(BUILD_STYLE)\"" -DBUILD_TAG="\"$(BUILD_TAG)\""
|
||||
CFLAGS += -DBUILD_NUMBER="\"$(BUILD_NUMBER)\"" -DBUILD_BRANCH="\"$(BUILD_BRANCH)\""
|
||||
CFLAGS += -DBUILD_COMMIT="\"$(BUILD_COMMIT)\""
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@ Jailbreak for A8 through A11, T2 devices, on iOS/iPadOS/tvOS 15.0, bridgeOS 5.0
|
||||
|
||||
## Device Support
|
||||
|
||||
> [!NOTE]
|
||||
> Apple TV & iBridge support are not currently in the beta releases of palera1n, ETA s0n
|
||||
|
||||
<!--- Mobile --->
|
||||
|
||||
| iPhone(s) | iPad(s) | iPod(s) | Apple TV(s) |
|
||||
@@ -30,6 +27,8 @@ Jailbreak for A8 through A11, T2 devices, on iOS/iPadOS/tvOS 15.0, bridgeOS 5.0
|
||||
| iPhone 8 | iPad Pro (12.9") (1st generation) | | |
|
||||
| iPhone 8 Plus | iPad Pro (10.5") | | |
|
||||
| iPhone X | iPad Pro (12.9") (2nd generation) | | |
|
||||
| | iPad Air 2 | | |
|
||||
|
||||
|
||||
> Note that on `A11` (iPhone X, 8, 8 Plus), **you must disable your passcode while in the jailbroken state** (on iOS 16, you need to **reset your device** before proceeding with palera1n).
|
||||
|
||||
@@ -76,21 +75,59 @@ Jailbreak for A8 through A11, T2 devices, on iOS/iPadOS/tvOS 15.0, bridgeOS 5.0
|
||||
|
||||
> USB-C port on Apple Silicon Macs *may* require manual unplugging and replugging of the lightning cable after checkm8 exploit. This problem may be solved by connecting via USB hub, though extensions can vary.
|
||||
|
||||
## Usage
|
||||
```
|
||||
Usage: palera1n [-DEhpvVdsSLRnPI] [-e boot arguments] [-k Pongo image] [-o overlay file] [-r ramdisk file] [-K KPF file] [-i checkra1n file]
|
||||
|
||||
--version Print version
|
||||
--force-revert Remove jailbreak
|
||||
-d, --demote Demote
|
||||
-D, --dfuhelper Exit after entering DFU
|
||||
-e, --boot-args <boot arguments> XNU boot arguments
|
||||
-E, --enter-recovery Enter recovery mode
|
||||
-h, --help Show this help
|
||||
-i, --override-checkra1n <file> Override checkra1n
|
||||
-k, --override-pongo <file> Override Pongo image
|
||||
-K, --override-kpf <file> Override kernel patchfinder
|
||||
-L, --jbinit-log-to-file Make jbinit log to /cores/jbinit.log (can be read from sandbox while jailbroken)
|
||||
-n, --exit-recovery Exit recovery mode
|
||||
-I, --device-info Print info about the connected device
|
||||
-o, --override-overlay <file> Override overlay
|
||||
-p, --pongo-shell Boots to PongoOS shell
|
||||
-P, --pongo-full Boots to a PongoOS shell with default images already uploaded
|
||||
-r, --override-ramdisk <file> Override ramdisk
|
||||
-R, --reboot-device Reboot connected device in normal mode
|
||||
-s, --safe-mode Enter safe mode
|
||||
-S, --no-colors Disable colors on the command line
|
||||
-v, --debug-logging Enable debug logging
|
||||
This option can be repeated for extra verbosity.
|
||||
-V, --verbose-boot Verbose boot
|
||||
|
||||
Environmental variables:
|
||||
TMPDIR temporary diretory (path the built-in checkra1n will be extracted to)
|
||||
```
|
||||
|
||||
## Installing
|
||||
Visit https://palera.in
|
||||
|
||||
## Disclaimers
|
||||
We are **NOT** responsible for any data loss, or the result of a device being bricked. When using palera1n, the user should accept responsibility if anything happens to their device during the process.
|
||||
- If your device is stuck in recovery, please run futurerestore `--exit-recovery`, or use `irecovery -n`.
|
||||
- If your device is stuck in recovery, please run futurerestore `--exit-recovery`, or use `irecovery -n`, or `palera1n -n`.
|
||||
- If you're unable to get out of recovery via these methods please restore with iTunes or Finder.
|
||||
- palera1n **will not work** in VirtualBox, VMware or any virtual machine that doesn't support PCI passthrough.
|
||||
|
||||
## Troubleshooting
|
||||
Make sure you're following the guides provided [here](https://palera.in), also when asking for support make sure you provide full details on your device, such as:
|
||||
- iPhone/iPad/iPod
|
||||
- iPhone/iPad/iPod/Apple TV
|
||||
- iOS Version
|
||||
- Passcode enabled?
|
||||
- Verbose from palera1n (specifying `-Vv` within palera1n)
|
||||
- Panic logs, if panicked then send latest `panic-full` log from your device.
|
||||
|
||||
Create an issue here: https://github.com/palera1n/palera1n/issues/new/choose
|
||||
|
||||
## Credits
|
||||
|
||||
[All credits for palera1n can be found here](https://palera.in/)
|
||||
|
||||
If proper credit isn't shown please message us or create an issue.
|
||||
+25
-29
@@ -2,11 +2,11 @@
|
||||
.\" Copyright (c) 2024 Nick Chan
|
||||
.\" SPDX-License-Identifier: MIT
|
||||
.\"
|
||||
.Dd "30 March 2024"
|
||||
.Dd "23 December 2024"
|
||||
.Dt palera1n 1
|
||||
.Sh NAME
|
||||
.Nm palera1n
|
||||
.Nd arm64 iOS/iPadOS/tvOS 15.0-17.5, bridgeOS 5.0-8.3 jailbreaking tool
|
||||
.Nd arm64 iOS/iPadOS/tvOS 15.0-18.3, bridgeOS 5.0-9.3 jailbreaking tool
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl cCdDEfhIlLnpRsSTvV
|
||||
@@ -20,19 +20,21 @@
|
||||
.Op Fl -force-revert
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
jailbreaks an iOS/iPadOS/tvOS 15.0-17.5, bridgeOS 6.0-8.3 device with an arm64 (arm64e excluded) on iOS 15.0-17.5,
|
||||
jailbreaks an arm64 (arm64e excluded) iOS/iPadOS/tvOS 15.0-18.2, bridgeOS 5.0-9.2 device,
|
||||
utilizing the
|
||||
.Em checkm8
|
||||
bootROM exploit.
|
||||
.Pp
|
||||
.Nm
|
||||
provides rootful and rootless jailbreak modes.
|
||||
On iOS/iPadOS,
|
||||
On iOS/iPadOS 15.0 and later and on tvOS 18.2 or later,
|
||||
.Nm
|
||||
is able to jailbreak the device in fakefs-rootful mode, where /
|
||||
is writable, as well as rootless mode, where / cannot be written to.
|
||||
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
|
||||
Due to the nature of the
|
||||
.Em checkm8
|
||||
@@ -57,7 +59,7 @@ In the remainder of this document, the term "iOS" and "iPadOS" will be used inte
|
||||
as the difference is negligible as far as the jailbreak is concerened.
|
||||
.Pp
|
||||
.Sh SUPPORTED DEVICES
|
||||
As described above, arm64 iOS 15.0-17.5 devices are supported, here is an explicit
|
||||
As described above, arm64 iOS 15.0-18.0 devices are supported, here is an explicit
|
||||
list of supported devicecs:
|
||||
|
||||
.Bl -tag -compact
|
||||
@@ -101,9 +103,7 @@ list of supported devicecs:
|
||||
.It Apple T2 MacBookPro15,3
|
||||
.It Apple T2 MacBookAir8,1
|
||||
.It Apple T2 MacBookPro15,4
|
||||
.It iBridge2,11 (Unknown Mac)
|
||||
.It Apple T2 MacBookAir8,2
|
||||
.It iBridge2,13 (Unknown Mac)
|
||||
.It Apple T2 MacBookPro16,1
|
||||
.It Apple T2 MacBookAir9,1
|
||||
.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
|
||||
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 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
|
||||
When used with
|
||||
.Fl f , -fakefs ,
|
||||
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
|
||||
This option is not currently supported and is a no-operation in this version of
|
||||
.Nm
|
||||
@@ -155,18 +157,13 @@ Set the effective production fuse to 0, so as to enable hardware debugging featu
|
||||
Execute the DFU helper to guide the user into putting the device into DFU mode
|
||||
then exit.
|
||||
.It Fl e , -boot-args Ar boot arguments
|
||||
Specify custom XNU kernel command line. The
|
||||
.Em rootdev=md0
|
||||
argument is used by
|
||||
.Nm
|
||||
and cannot be overriden. Additionally, the
|
||||
Specify custom XNU kernel command line. Additionally, the
|
||||
.Em wdt=-1
|
||||
argument is used during fakefs setup.
|
||||
.It Fl E , -enter-recovery
|
||||
Exit after entering recovery mode.
|
||||
.It Fl f , -fakefs
|
||||
Proceed in rootful mode. This applies to both full, partial fakefs, as well as realfs.
|
||||
This option is not supported on iOS/iPadOS 17.
|
||||
Proceed in rootful mode. Despite its name, this applies to both full, partial fakefs, as well as realfs, and it still applies even when trying to force revert.
|
||||
.It Fl h , -help
|
||||
Prints help text.
|
||||
.It Fl i , -checkra1n-file Ar checkra1n file
|
||||
@@ -184,10 +181,6 @@ command. If in doubt, use
|
||||
iOS15 branch or your own fork of it.
|
||||
.It Fl l , -rootless
|
||||
Proceed in rootless mode. This option is only supported on iOS/iPadOS.
|
||||
.It Fl L , -jbinit-log-to-file
|
||||
This option is not currently supported and is a no-operation in this version of
|
||||
.Nm
|
||||
\[char46]
|
||||
.It Fl n , -exit-recovery
|
||||
Exit recovery mode and exit.
|
||||
.It Fl o , -override-overlay Ar overlay file
|
||||
@@ -242,13 +235,13 @@ is extracted and executed here. When not set, /tmp is used.
|
||||
.Sh EXAMPLES
|
||||
To (re-)jailbreak in rootless mode:
|
||||
.Pp
|
||||
.Dl "palera1n"
|
||||
.Dl "palera1n -l"
|
||||
.Pp
|
||||
To setup fakefs for rootful mode:
|
||||
.Pp
|
||||
.Dl "palera1n -fc"
|
||||
.Pp
|
||||
After the device has rebooted, follow the following example.
|
||||
After the device has rebooted into recovery mode, follow the following example.
|
||||
.Pp
|
||||
To re-jailbreak in rootful mode:
|
||||
.Pp
|
||||
@@ -305,7 +298,7 @@ option might cause some versions for tvOS to crash and not boot.
|
||||
Offical Apple USB-C cables as well as some other USB-C cables cannot be used to enter DFU mode.
|
||||
USB-A cable with male USB-C to female USB-A adapter works fine.
|
||||
.Sh POST INSTALLATION (iOS/iPadOS)
|
||||
The palera1n loader app will take up to 30 seconds to appear on the homescreen after the
|
||||
The palera1n loader app will take up to 1 minute to appear on the homescreen after the
|
||||
device has booted. If it does not appear, you can try using the shortcut:
|
||||
.Pp
|
||||
.Lk https://www.icloud.com/shortcuts/8cd5f489c8854ee0ab9ee38f2e62f87d
|
||||
@@ -333,7 +326,7 @@ loader app to install additional jailbreak files.
|
||||
|
||||
.Bl -tag -width "/var/jb/Library/LaunchDaemons"
|
||||
.It Pa /cores
|
||||
The location of the temporary filesystem where jailbreak files are stash during boot.
|
||||
The location of the temporary filesystem where jailbreak files are stashed during boot.
|
||||
.It Pa /Library/LaunchDaemons
|
||||
The directory where jailbreak-specific
|
||||
.Xr launchd.plist 5
|
||||
@@ -353,14 +346,17 @@ has been mounted.
|
||||
.El
|
||||
.Sh BUGS
|
||||
.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
|
||||
.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
|
||||
The exploit may also work less reliably on some hosts, like AMD desktops, or some MediaTek devices.
|
||||
.Pp
|
||||
The device may randomly crash and reboot due to launchd using too much memory.
|
||||
.Pp
|
||||
The built-in SSH server might be not accessible with password after bootstrapping rootful,
|
||||
since the bootstrap uses a custom crypt() function that is not supported
|
||||
by the built-in SSH server.
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ usb_ret_t USBBulkUpload(usb_device_handle_t handle, void *data, uint32_t len);
|
||||
#endif
|
||||
|
||||
#ifndef PALERAIN_VERSION
|
||||
#define PALERAIN_VERSION "2.0"
|
||||
#define PALERAIN_VERSION "2.1"
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ BUILD_OPTIONS += TUI
|
||||
CFLAGS += -DTUI
|
||||
endif
|
||||
|
||||
CHECKRA1N_VERSION ?= 0.1337.2
|
||||
CHECKRA1N_VERSION ?= 0.1337.3
|
||||
LIPO = lipo
|
||||
LDID = ldid
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#define U stderr,
|
||||
#define B "#\n# palera1n: " BUILD_TAG " \n#\n"
|
||||
#define L "# ======== Made by =======\n"
|
||||
#define E "# Made by: Nick Chan, " THE_PLUSH ", Samara, Mineek, staturnz, " BAKERAIN_DEVELOPE_R ", " NEKO_DEVELOPE_R " \n"
|
||||
#define E "# Made by: Nick Chan, " THE_PLUSH ", Khcrysalis, Mineek, staturnz, " BAKERAIN_DEVELOPE_R ", " NEKO_DEVELOPE_R " \n"
|
||||
#define M "# ======== Thanks to =======\n"
|
||||
#define A "# Thanks to: llsc12, Nebula, Lrdsnow, nikias (libimobiledevice),\n"
|
||||
#define K "# checkra1n team (Siguza, axi0mx, littlelailo et al.),\n"
|
||||
|
||||
+22
-14
@@ -67,13 +67,30 @@ int connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
LOG(LOG_ERROR, "Unable to get device information");
|
||||
return 0;
|
||||
}
|
||||
if (strncmp(dev.CPUArchitecture, "arm64", strlen("arm64"))) {
|
||||
if (strcmp(dev.CPUArchitecture, "arm64")) {
|
||||
devinfo_free(&dev);
|
||||
LOG(LOG_WARNING, "Ignoring non-arm64 device...");
|
||||
LOG(LOG_WARNING, "palera1n doesn't and never will work on A12+ (arm64e)");
|
||||
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))
|
||||
LOG(LOG_VERBOSE2, "Product %s requires passcode to be disabled", dev.productType);
|
||||
unsigned char passcode_state = 0;
|
||||
@@ -91,19 +108,10 @@ int connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
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) {
|
||||
/* (LOG_VERBOSE - 3) or below*/
|
||||
LOG(LOG_INFO, "Telling device with udid %s to enter recovery mode immediately", usbmuxd_device->udid);
|
||||
|
||||
+40
-49
@@ -40,10 +40,6 @@ int exec_checkra1n(void) {
|
||||
LOG(LOG_INFO, "About to execute checkra1n");
|
||||
int fd_checkra1n, fd_pongo, ret;
|
||||
char* checkra1n_path = NULL;
|
||||
if (ext_checkra1n != NULL) {
|
||||
checkra1n_path = ext_checkra1n;
|
||||
goto checkra1n_exec;
|
||||
}
|
||||
#ifndef NO_CUSTOM_PONGO
|
||||
if (pongo_path == NULL) {
|
||||
pongo_path = malloc(strlen(tmpdir) + 20);
|
||||
@@ -69,36 +65,40 @@ int exec_checkra1n(void) {
|
||||
}
|
||||
} else external_pongo = true;
|
||||
#endif
|
||||
checkra1n_path = malloc(strlen(tmpdir) + 20);
|
||||
if (checkra1n_path == NULL) {
|
||||
LOG(LOG_FATAL, "memory allocation failed\n");
|
||||
return -1;
|
||||
}
|
||||
snprintf(checkra1n_path, strlen(tmpdir) + 20, "%s/checkra1n.XXXXXX", tmpdir);
|
||||
fd_checkra1n = mkstemp(checkra1n_path);
|
||||
if (fd_checkra1n == -1) {
|
||||
LOG(LOG_FATAL, "Cannot open temporary file %s: %d (%s)", checkra1n_path, errno, strerror(errno));
|
||||
free(checkra1n_path);
|
||||
checkra1n_path = NULL;
|
||||
return -1;
|
||||
}
|
||||
ssize_t didWrite_checkra1n = write(fd_checkra1n, checkra1n, checkra1n_len);
|
||||
if (didWrite_checkra1n != (ssize_t)checkra1n_len) {
|
||||
LOG(LOG_FATAL, "Size written to %s does not match expected: %zd != %" PRIu32 ": %d (%s)", checkra1n_path, didWrite_checkra1n, checkra1n_len, errno, strerror(errno));
|
||||
if (ext_checkra1n != NULL) {
|
||||
checkra1n_path = ext_checkra1n;
|
||||
} else {
|
||||
checkra1n_path = malloc(strlen(tmpdir) + 20);
|
||||
if (checkra1n_path == NULL) {
|
||||
LOG(LOG_FATAL, "memory allocation failed\n");
|
||||
return -1;
|
||||
}
|
||||
snprintf(checkra1n_path, strlen(tmpdir) + 20, "%s/checkra1n.XXXXXX", tmpdir);
|
||||
fd_checkra1n = mkstemp(checkra1n_path);
|
||||
if (fd_checkra1n == -1) {
|
||||
LOG(LOG_FATAL, "Cannot open temporary file %s: %d (%s)", checkra1n_path, errno, strerror(errno));
|
||||
free(checkra1n_path);
|
||||
checkra1n_path = NULL;
|
||||
return -1;
|
||||
}
|
||||
ssize_t didWrite_checkra1n = write(fd_checkra1n, checkra1n, checkra1n_len);
|
||||
if (didWrite_checkra1n != (ssize_t)checkra1n_len) {
|
||||
LOG(LOG_FATAL, "Size written to %s does not match expected: %zd != %" PRIu32 ": %d (%s)", checkra1n_path, didWrite_checkra1n, checkra1n_len, errno, strerror(errno));
|
||||
close(fd_checkra1n);
|
||||
unlink(checkra1n_path);
|
||||
free(checkra1n_path);
|
||||
checkra1n_path = NULL;
|
||||
return -1;
|
||||
}
|
||||
close(fd_checkra1n);
|
||||
unlink(checkra1n_path);
|
||||
free(checkra1n_path);
|
||||
checkra1n_path = NULL;
|
||||
return -1;
|
||||
}
|
||||
close(fd_checkra1n);
|
||||
ret = chmod(checkra1n_path, 0700);
|
||||
if (ret) {
|
||||
LOG(LOG_FATAL, "Cannot chmod %s: %d (%s)", checkra1n_path, errno, strerror(errno));
|
||||
unlink(checkra1n_path);
|
||||
free(checkra1n_path);
|
||||
checkra1n_path = NULL;
|
||||
return -1;
|
||||
ret = chmod(checkra1n_path, 0700);
|
||||
if (ret) {
|
||||
LOG(LOG_FATAL, "Cannot chmod %s: %d (%s)", checkra1n_path, errno, strerror(errno));
|
||||
unlink(checkra1n_path);
|
||||
free(checkra1n_path);
|
||||
checkra1n_path = NULL;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#if defined(__APPLE__) && defined(__arm64__) && (TARGET_OS_IPHONE || defined(FORCE_HELPER))
|
||||
char* libcheckra1nhelper_dylib_path = NULL;
|
||||
@@ -146,7 +146,6 @@ setenv_ra1n:
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
checkra1n_exec: {};
|
||||
char args[0x10] = "-E";
|
||||
if ((palerain_flags & palerain_option_demote)) strncat(args, "d", 0xf);
|
||||
if (!(palerain_flags & palerain_option_checkrain_is_clone)) {
|
||||
@@ -168,21 +167,13 @@ checkra1n_exec: {};
|
||||
posix_spawn_file_actions_addopen(&action, 2, "/dev/null", O_WRONLY, 0);
|
||||
}
|
||||
#endif
|
||||
if (pongo_path != NULL) {
|
||||
ret = posix_spawn(&pid, checkra1n_path, &action, NULL, (char* []){
|
||||
checkra1n_path,
|
||||
args,
|
||||
"-k",
|
||||
pongo_path,
|
||||
NULL
|
||||
}, environ);
|
||||
} else {
|
||||
ret = posix_spawn(&pid, checkra1n_path, &action, NULL, (char* []){
|
||||
checkra1n_path,
|
||||
args,
|
||||
NULL
|
||||
}, environ);
|
||||
}
|
||||
ret = posix_spawn(&pid, checkra1n_path, &action, NULL, (char* []){
|
||||
checkra1n_path,
|
||||
args,
|
||||
"-k",
|
||||
pongo_path,
|
||||
NULL
|
||||
}, environ);
|
||||
posix_spawn_file_actions_destroy(&action);
|
||||
if (ret) {
|
||||
LOG(LOG_FATAL, "Cannot posix spawn %s: %d (%s)", checkra1n_path, errno, strerror(errno));
|
||||
|
||||
@@ -148,6 +148,8 @@ int palera1n(int argc, char *argv[], char *envp[]) {
|
||||
palerain_option_device_info)
|
||||
) || device_has_booted)
|
||||
goto normal_exit;
|
||||
pthread_cancel(pongo_thread);
|
||||
pthread_join(pongo_thread, NULL);
|
||||
if (exec_checkra1n()) goto cleanup;
|
||||
|
||||
if ((palerain_flags & (palerain_option_pongo_exit | palerain_option_demote)))
|
||||
|
||||
+4
-17
@@ -19,7 +19,6 @@
|
||||
#endif
|
||||
|
||||
uint64_t* palerain_flags_p = &palerain_flags;
|
||||
static bool force_use_verbose_boot = false;
|
||||
char* gOverrideLibcheckra1nHelper = NULL;
|
||||
|
||||
static struct option longopts[] = {
|
||||
@@ -57,8 +56,8 @@ static struct option longopts[] = {
|
||||
#endif
|
||||
#ifdef TUI
|
||||
{"tui", no_argument, NULL, 't'},
|
||||
{"cli", no_argument, NULL, palerain_option_case_cli},
|
||||
#endif
|
||||
{"cli", no_argument, NULL, palerain_option_case_cli},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
@@ -78,7 +77,7 @@ static int usage(int e, char* prog_name)
|
||||
#endif
|
||||
"] [-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"
|
||||
"iOS/iPadOS/tvOS 15.0-17.5, bridgeOS 5.0-8.3 arm64 jailbreaking tool\n\n"
|
||||
"iOS/iPadOS/tvOS 15.0-18.3, bridgeOS 5.0-9.3 arm64 jailbreaking tool\n\n"
|
||||
"\t--version\t\t\t\tPrint version\n"
|
||||
"\t--force-revert\t\t\t\tRemove jailbreak\n"
|
||||
#ifdef DEV_BUILD
|
||||
@@ -148,11 +147,9 @@ int optparse(int argc, char* argv[]) {
|
||||
case 'B':
|
||||
palerain_flags |= palerain_option_setup_partial_root;
|
||||
palerain_flags |= palerain_option_setup_rootful;
|
||||
palerain_flags |= palerain_option_verbose_boot;
|
||||
break;
|
||||
case 'c':
|
||||
palerain_flags |= palerain_option_setup_rootful;
|
||||
palerain_flags |= palerain_option_verbose_boot;
|
||||
break;
|
||||
case 'C':
|
||||
palerain_flags |= palerain_option_clean_fakefs;
|
||||
@@ -175,16 +172,12 @@ int optparse(int argc, char* argv[]) {
|
||||
break;
|
||||
case 'V':
|
||||
palerain_flags |= palerain_option_verbose_boot;
|
||||
force_use_verbose_boot = true;
|
||||
#ifdef TUI
|
||||
tui_options_verbose_boot = true;
|
||||
#endif
|
||||
break;
|
||||
case 'e':
|
||||
if (strstr(optarg, "rootdev=") != NULL) {
|
||||
LOG(LOG_FATAL, "The boot arg rootdev= is already used by palera1n and cannot be overriden");
|
||||
return -1;
|
||||
} else if (strlen(optarg) > (sizeof(xargs_cmd) - 0x20)) {
|
||||
if (strlen(optarg) > (sizeof(xargs_cmd) - 0x20)) {
|
||||
LOG(LOG_FATAL, "Boot arguments too long");
|
||||
return -1;
|
||||
}
|
||||
@@ -313,10 +306,10 @@ int optparse(int argc, char* argv[]) {
|
||||
case 't':
|
||||
palerain_flags |= palerain_option_tui;
|
||||
break;
|
||||
#endif
|
||||
case palerain_option_case_cli:
|
||||
palerain_flags |= palerain_option_cli;
|
||||
break;
|
||||
#endif
|
||||
#ifdef DEV_BUILD
|
||||
case '1':
|
||||
palerain_flags |= palerain_option_test1;
|
||||
@@ -351,10 +344,8 @@ int optparse(int argc, char* argv[]) {
|
||||
printf(
|
||||
"palera1n " PALERAIN_VERSION "\n"
|
||||
BUILD_COMMIT " " BUILD_NUMBER " (" BUILD_BRANCH ")\n\n"
|
||||
"Build date: " BUILD_DATE "\n"
|
||||
"Build style: " BUILD_STYLE "\n"
|
||||
"Build tag: " BUILD_TAG "\n"
|
||||
"Built by: " BUILD_WHOAMI "\n"
|
||||
#ifdef USE_LIBUSB
|
||||
"USB backend: libusb\n"
|
||||
#else
|
||||
@@ -369,10 +360,6 @@ int optparse(int argc, char* argv[]) {
|
||||
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))) {
|
||||
LOG(LOG_FATAL, "cannot specify both --tui and --cli");
|
||||
return -1;
|
||||
|
||||
+5
-2
@@ -42,6 +42,9 @@ void *pongo_usb_callback(stuff_t *arg) {
|
||||
}
|
||||
#endif
|
||||
LOG(LOG_INFO, "Found PongoOS USB Device");
|
||||
if (palerain_flags & palerain_option_pongo_exit)
|
||||
goto done;
|
||||
|
||||
usb_device_handle_t handle = arg->handle;
|
||||
#ifdef TUI
|
||||
if (tui_is_jailbreaking) {
|
||||
@@ -114,10 +117,10 @@ void *pongo_usb_callback(stuff_t *arg) {
|
||||
#ifdef ROOTFUL
|
||||
if ((palerain_flags & palerain_option_setup_partial_root)) {
|
||||
LOG(LOG_INFO, "Please wait up to 5 minutes for the bindfs to be created.");
|
||||
LOG(LOG_INFO, "Once the device boots up to iOS, run again without the -B (Create BindFS) option to jailbreak.");
|
||||
LOG(LOG_INFO, "Once the device reboots into recovery mode, run again without the -B (Create BindFS) option to jailbreak.");
|
||||
} else if ((palerain_flags & palerain_option_setup_rootful)) {
|
||||
LOG(LOG_INFO, "Please wait up to 10 minutes for the fakefs to be created.");
|
||||
LOG(LOG_INFO, "Once the device boots up to iOS, run again without the -c (Create FakeFS) option to jailbreak.");
|
||||
LOG(LOG_INFO, "Once the device reboots into recovery mode, run again without the -c (Create FakeFS) option to jailbreak.");
|
||||
}
|
||||
#endif
|
||||
if (dfuhelper_thr_running) {
|
||||
|
||||
+12
-4
@@ -86,7 +86,7 @@ void tui_screen_main_redraw(void) {
|
||||
PRINTATT(3, 2, "Welcome to palera1n!");
|
||||
|
||||
SETCOLOR(FG_WHITE, BG_BLACK);
|
||||
PRINTATT(3, 9, "Made by: Nick Chan, Ploosh, Samara, Mineek");
|
||||
PRINTATT(3, 9, "Made by: Nick Chan, Ploosh, Khcrysalis, Mineek");
|
||||
PRINTATT(3, 10, "staturnz, kok3shidoll, ");
|
||||
if ((tui_mouse_y == tui_y_offset + 9 && tui_mouse_x >= tui_x_offset + 25 && tui_mouse_x <= tui_x_offset + 25 + 8) || easter_egg) {
|
||||
SETCOLORA(FG_BRIGHT_WHITE, BG_BLACK, BOLD);
|
||||
@@ -136,11 +136,19 @@ void tui_screen_main_redraw(void) {
|
||||
printf("Sorry, %s (iOS %s) is not supported.", tui_connected_devices->display_name, tui_connected_devices->version);
|
||||
ecid_y = 6;
|
||||
tui_can_start = false;
|
||||
} else if (tui_compare_versions(tui_connected_devices->version, "15.0") < 0 || tui_compare_versions(tui_connected_devices->version, "17.3.1") > 0) {
|
||||
} else if (tui_compare_versions(tui_connected_devices->version, "15.0") < 0) {
|
||||
printf("Sorry, %s is supported, but iOS", tui_connected_devices->display_name);
|
||||
MOVETOT(3, 6);
|
||||
printf("%s is not.", tui_connected_devices->version);
|
||||
PRINTATT(3, 7, "Supported versions are 15.0 - 17.3.1.");
|
||||
PRINTATT(3, 7, "Supported versions are 15.0+");
|
||||
ecid_y = 8;
|
||||
tui_can_start = false;
|
||||
} else if (tui_connected_devices->requires_passcode_disabled) {
|
||||
printf("Sorry, this devices passcode must be disabled on %s.", tui_connected_devices->version);
|
||||
MOVETOT(3, 6);
|
||||
printf("On 16.0+, you must reset the phone to factory settings");
|
||||
MOVETOT(3, 7);
|
||||
printf("and not have a passcode enabled ever since last restore.");
|
||||
ecid_y = 8;
|
||||
tui_can_start = false;
|
||||
} else {
|
||||
@@ -163,7 +171,7 @@ void tui_screen_main_redraw(void) {
|
||||
} else {
|
||||
PRINTATT(3, 6, "Press (E) to show ECID.");
|
||||
}
|
||||
PRINTATT(3, 7, "NOTE: Ensure installed iOS is in range 15.0 - 17.3.1!");
|
||||
PRINTATT(3, 7, "NOTE: Ensure installed iOS is in range 15.0+");
|
||||
tui_can_start = true;
|
||||
} else if (tui_connected_devices->mode == TUI_DEVICE_MODE_DFU) {
|
||||
MOVETOT(3, 5);
|
||||
|
||||
+39
-44
@@ -47,37 +47,34 @@ void tui_screen_options_nav(void) {
|
||||
extern bool easter_egg;
|
||||
|
||||
void tui_screen_options_options(void) {
|
||||
SETCOLOR(FG_WHITE, BG_BLACK);
|
||||
SETCOLOR( FG_BRIGHT_BLACK, BG_BLACK);
|
||||
MOVETOT(3, 8);
|
||||
printf("[%c] %sAllow untested iOS/iPadOS versions" COLOR(FG_WHITE, BG_BLACK),
|
||||
tui_options_allow_untested ? 'x' : ' ',
|
||||
tui_options_nav_selection == 1 ? COLOR(FG_BLACK, BG_BRIGHT_WHITE) : (
|
||||
(
|
||||
tui_mouse_x >= tui_x_offset + 6 && tui_mouse_x <= tui_x_offset + 6 + 34
|
||||
) && (tui_mouse_y == tui_y_offset + 7) ? COLOR(FG_BLACK, BG_WHITE) : ""
|
||||
));
|
||||
tui_options_allow_untested ? ' ' : ' ',
|
||||
COLOR(FG_BLACK, FG_BRIGHT_BLACK));
|
||||
SETCOLOR(FG_WHITE, BG_BLACK);
|
||||
MOVETOT(3, 9);
|
||||
printf("[%c] %sSafe Mode " COLOR(FG_WHITE, BG_BLACK),
|
||||
tui_options_safe_mode ? 'x' : ' ',
|
||||
tui_options_nav_selection == 2 ? COLOR(FG_BLACK, BG_BRIGHT_WHITE) : (
|
||||
tui_options_nav_selection == 1 ? COLOR(FG_BLACK, BG_BRIGHT_WHITE) : (
|
||||
(
|
||||
tui_mouse_x >= tui_x_offset + 6 && tui_mouse_x <= tui_x_offset + 6 + 34
|
||||
tui_mouse_x >= tui_x_offset + 5 && tui_mouse_x <= tui_x_offset + 5 + 34
|
||||
) && (tui_mouse_y == tui_y_offset + 8) ? COLOR(FG_BLACK, BG_WHITE) : ""
|
||||
));
|
||||
MOVETOT(3, 10);
|
||||
printf("[%c] %sVerbose Boot " COLOR(FG_WHITE, BG_BLACK),
|
||||
tui_options_verbose_boot ? 'x' : ' ',
|
||||
tui_options_nav_selection == 3 ? COLOR(FG_BLACK, BG_BRIGHT_WHITE) : (
|
||||
tui_options_nav_selection == 2 ? COLOR(FG_BLACK, BG_BRIGHT_WHITE) : (
|
||||
(
|
||||
tui_mouse_x >= tui_x_offset + 6 && tui_mouse_x <= tui_x_offset + 6 + 34
|
||||
tui_mouse_x >= tui_x_offset + 5 && tui_mouse_x <= tui_x_offset + 5 + 34
|
||||
) && (tui_mouse_y == tui_y_offset + 9) ? COLOR(FG_BLACK, BG_WHITE) : ""
|
||||
));
|
||||
MOVETOT(3, 11);
|
||||
printf("[%c] %sForce Revert " COLOR(FG_WHITE, BG_BLACK),
|
||||
tui_options_force_revert ? 'x' : ' ',
|
||||
tui_options_nav_selection == 4 ? COLOR(FG_BLACK, BG_BRIGHT_WHITE) : (
|
||||
tui_options_nav_selection == 3 ? COLOR(FG_BLACK, BG_BRIGHT_WHITE) : (
|
||||
(
|
||||
tui_mouse_x >= tui_x_offset + 6 && tui_mouse_x <= tui_x_offset + 6 + 34
|
||||
tui_mouse_x >= tui_x_offset + 5 && tui_mouse_x <= tui_x_offset + 5 + 34
|
||||
) && (tui_mouse_y == tui_y_offset + 10) ? COLOR(FG_BLACK, BG_WHITE) : ""
|
||||
));
|
||||
if (supports_bright_colors) {
|
||||
@@ -89,9 +86,9 @@ void tui_screen_options_options(void) {
|
||||
SETCOLOR(FG_WHITE, BG_BLACK);
|
||||
MOVETOT(7, 15);
|
||||
printf("%sBoot Arguments: " COLOR(FG_WHITE, BG_BLACK),
|
||||
tui_options_nav_selection == 5 ? COLOR(FG_BLACK, BG_BRIGHT_WHITE) : (
|
||||
tui_options_nav_selection == 4 ? COLOR(FG_BLACK, BG_BRIGHT_WHITE) : (
|
||||
(
|
||||
tui_mouse_x >= tui_x_offset + 6 && tui_mouse_x <= tui_x_offset + 6 + 34
|
||||
tui_mouse_x >= tui_x_offset + 5 && tui_mouse_x <= tui_x_offset + 5 + 34
|
||||
) && (
|
||||
tui_mouse_y == tui_y_offset + 14 || tui_mouse_y == tui_y_offset + 15
|
||||
) ? COLOR(FG_BLACK, BG_WHITE) : ""
|
||||
@@ -102,9 +99,9 @@ void tui_screen_options_options(void) {
|
||||
MOVETOT(3, 17);
|
||||
printf("[%c] %s%s " COLOR(FG_WHITE, BG_BLACK),
|
||||
tui_options_flower_chain ? 'x' : ' ',
|
||||
tui_options_nav_selection == 6 ? COLOR(FG_BLACK, BG_BRIGHT_WHITE) : (
|
||||
tui_options_nav_selection == 5 ? COLOR(FG_BLACK, BG_BRIGHT_WHITE) : (
|
||||
(
|
||||
tui_mouse_x >= tui_x_offset + 6 && tui_mouse_x <= tui_x_offset + 6 + 34
|
||||
tui_mouse_x >= tui_x_offset + 5 && tui_mouse_x <= tui_x_offset + 5 + 34
|
||||
) && (tui_mouse_y == tui_y_offset + 16) ? COLOR(FG_BLACK, BG_WHITE) : ""
|
||||
), easter_egg ? "Neko Chain " : "Flower Chain");
|
||||
|
||||
@@ -174,7 +171,7 @@ tui_screen_t tui_screen_options(void) {
|
||||
case TUI_INPUT_DOWN:
|
||||
case TUI_INPUT_TAB:
|
||||
if (tui_options_is_editing_boot_args) break;
|
||||
if (++tui_options_nav_selection > 6) tui_options_nav_selection = 0;
|
||||
if (++tui_options_nav_selection > 5) tui_options_nav_selection = 0;
|
||||
tui_screen_options_nav();
|
||||
tui_screen_options_options();
|
||||
fflush(stdout);
|
||||
@@ -182,7 +179,7 @@ tui_screen_t tui_screen_options(void) {
|
||||
case TUI_INPUT_UP:
|
||||
case TUI_INPUT_TAB_BACK:
|
||||
if (tui_options_is_editing_boot_args) break;
|
||||
if (--tui_options_nav_selection < 0) tui_options_nav_selection = 6;
|
||||
if (--tui_options_nav_selection < 0) tui_options_nav_selection = 5;
|
||||
tui_screen_options_nav();
|
||||
tui_screen_options_options();
|
||||
fflush(stdout);
|
||||
@@ -200,23 +197,23 @@ tui_screen_t tui_screen_options(void) {
|
||||
switch(tui_options_nav_selection) {
|
||||
case 0:
|
||||
return MAIN_SCREEN;
|
||||
// case 1:
|
||||
// tui_options_allow_untested = !tui_options_allow_untested;
|
||||
// break;
|
||||
case 1:
|
||||
tui_options_allow_untested = !tui_options_allow_untested;
|
||||
break;
|
||||
case 2:
|
||||
tui_options_safe_mode = !tui_options_safe_mode;
|
||||
break;
|
||||
case 3:
|
||||
case 2:
|
||||
tui_options_verbose_boot = !tui_options_verbose_boot;
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
tui_options_force_revert = !tui_options_force_revert;
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
tui_options_is_editing_boot_args = !tui_options_is_editing_boot_args;
|
||||
tui_options_boot_args_cursor = tui_options_is_editing_boot_args ? strlen(tui_options_boot_args) : 0;
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
tui_options_flower_chain = !tui_options_flower_chain;
|
||||
break;
|
||||
}
|
||||
@@ -240,8 +237,8 @@ tui_screen_t tui_screen_options(void) {
|
||||
|
||||
#define MOUSEDOWN_HANDLER(y, val) \
|
||||
if (tui_mouse_y == tui_y_offset + y && \
|
||||
tui_mouse_x >= tui_x_offset + 6 - 4 && \
|
||||
tui_mouse_x <= tui_x_offset + 6 + 34) { \
|
||||
tui_mouse_x >= tui_x_offset + 5 - 4 && \
|
||||
tui_mouse_x <= tui_x_offset + 5 + 34) { \
|
||||
tui_options_nav_selection = val; \
|
||||
tui_options_nav_mouse_select = val; \
|
||||
tui_screen_options_nav(); \
|
||||
@@ -250,15 +247,14 @@ tui_screen_t tui_screen_options(void) {
|
||||
}
|
||||
|
||||
if (!tui_options_is_editing_boot_args) {
|
||||
MOUSEDOWN_HANDLER(7, 1);
|
||||
MOUSEDOWN_HANDLER(8, 2);
|
||||
MOUSEDOWN_HANDLER(9, 3);
|
||||
MOUSEDOWN_HANDLER(10, 4);
|
||||
MOUSEDOWN_HANDLER(16, 6);
|
||||
MOUSEDOWN_HANDLER(8, 1);
|
||||
MOUSEDOWN_HANDLER(9, 2);
|
||||
MOUSEDOWN_HANDLER(10, 3);
|
||||
MOUSEDOWN_HANDLER(16, 5);
|
||||
}
|
||||
|
||||
MOUSEDOWN_HANDLER(14, 5);
|
||||
MOUSEDOWN_HANDLER(15, 5);
|
||||
MOUSEDOWN_HANDLER(14, 4);
|
||||
MOUSEDOWN_HANDLER(15, 4);
|
||||
|
||||
#undef MOUSEDOWN_HANDLER
|
||||
break;
|
||||
@@ -272,8 +268,8 @@ tui_screen_t tui_screen_options(void) {
|
||||
|
||||
#define MOUSEUP_HANDLER(y, val, option, e) \
|
||||
if (tui_mouse_y == tui_y_offset + y && \
|
||||
tui_mouse_x >= tui_x_offset + 6 - 4 && \
|
||||
tui_mouse_x <= tui_x_offset + 6 + 34 && \
|
||||
tui_mouse_x >= tui_x_offset + 5 - 4 && \
|
||||
tui_mouse_x <= tui_x_offset + 5 + 34 && \
|
||||
tui_options_nav_mouse_select == val) { \
|
||||
tui_options_##option = !tui_options_##option; \
|
||||
e \
|
||||
@@ -283,18 +279,17 @@ tui_screen_t tui_screen_options(void) {
|
||||
}
|
||||
|
||||
if (!tui_options_is_editing_boot_args) {
|
||||
MOUSEUP_HANDLER(7, 1, allow_untested, );
|
||||
MOUSEUP_HANDLER(8, 2, safe_mode, );
|
||||
MOUSEUP_HANDLER(9, 3, verbose_boot, );
|
||||
MOUSEUP_HANDLER(10, 4, force_revert, );
|
||||
MOUSEUP_HANDLER(16, 6, flower_chain, );
|
||||
MOUSEUP_HANDLER(8, 1, safe_mode, );
|
||||
MOUSEUP_HANDLER(9, 2, verbose_boot, );
|
||||
MOUSEUP_HANDLER(10, 3, force_revert, );
|
||||
MOUSEUP_HANDLER(16, 5, flower_chain, );
|
||||
}
|
||||
|
||||
#define BOOTARGS_HANDLER \
|
||||
tui_options_boot_args_cursor = tui_options_is_editing_boot_args ? strlen(tui_options_boot_args) : 0;
|
||||
|
||||
MOUSEUP_HANDLER(14, 5, is_editing_boot_args, BOOTARGS_HANDLER);
|
||||
MOUSEUP_HANDLER(15, 5, is_editing_boot_args, BOOTARGS_HANDLER);
|
||||
MOUSEUP_HANDLER(14, 4, is_editing_boot_args, BOOTARGS_HANDLER);
|
||||
MOUSEUP_HANDLER(15, 4, is_editing_boot_args, BOOTARGS_HANDLER);
|
||||
#undef MOUSEUP_HANDLER
|
||||
tui_options_nav_mouse_select = -1;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user