diff --git a/README.md b/README.md index 1281f26..8e3d879 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ It boots the device with AMFI patches. Eventually, I want it to automatically in **NOTE**: Linux and libimobiledevice don't play well together, and macOS is recommended for this script. If you only have access to a Linux machine, give it a try as it might still work. -**WARNING**: As of now, this is pretty unstable (atleast just on A11). On my A11 device, it has the deep sleep bug while booted with palera1n, and will kernel panic, or just not wake up until force rebooted, about a minute after being in sleep mode. +**WARNING**: As of now, this is pretty unstable (atleast just on A11). On my A11 device, it has the deep sleep bug while booted with palera1n, and will kernel panic, or just not wake up until force rebooted, about a minute after being in sleep mode. Patching AMFI also seems to log you out of iCloud? **WARNING 2**: I am NOT responsible for any data loss. While nothing should happen, jailbreaking has risks in itself. If your device is stuck in recovery, please run `futurerestore --exit-recovery`, or use irecovery. diff --git a/palera1n.sh b/palera1n.sh index 84269d4..b03f61f 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -143,7 +143,7 @@ if [ ! "$2" = '--dfu' ]; then step 3 "Get ready" step 4 "Hold volume down + side button" & sleep 3 - irecovery -c reset + $dir/irecovery -c "reset" step 1 "Keep holding" step 10 'Release side button, but keep holding volume down' sleep 1 @@ -224,13 +224,17 @@ if [ ! -e boot ]; then #fi echo "[*] Patching and converting kernelcache" - #$dir/img4 -i work/"$(awk "/""$model""/{x=1}x&&/kernelcache.release/{print;exit}" work/BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" -o work/kcache.raw > /dev/null - #$dir/Kernel64Patcher work/kcache.raw work/kcache.patched -a -o > /dev/null - #python3 kerneldiff.py work/kcache.raw work/kcache.patched work/kc.bpatch > /dev/null - #$dir/img4 -i work/"$(awk "/""$model""/{x=1}x&&/kernelcache.release/{print;exit}" work/BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" -o boot/kernelcache.img4 -M work/IM4M -T rkrn -P work/kc.bpatch `if [ "$os" = 'Linux' ]; then echo "-J"; fi` > /dev/null - python3 -m pyimg4 im4p extract -i work/"$(awk "/""$model""/{x=1}x&&/kernelcache.release/{print;exit}" work/BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" -o work/kcache.raw `if [ "$deviceid" == *'iPhone8'* ]; then echo "--extra kpp.bin"; fi` > /dev/null + if [[ "$deviceid" == *'iPhone8'* ]]; then + python3 -m pyimg4 im4p extract -i work/"$(awk "/""$model""/{x=1}x&&/kernelcache.release/{print;exit}" work/BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" -o work/kcache.raw --extra work/kpp.bin > /dev/null + else + python3 -m pyimg4 im4p extract -i work/"$(awk "/""$model""/{x=1}x&&/kernelcache.release/{print;exit}" work/BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" -o work/kcache.raw > /dev/null + fi $dir/Kernel64Patcher work/kcache.raw work/kcache.patched -a -o > /dev/null - python3 -m pyimg4 im4p create -i work/kcache.patched -o work/krnlboot.im4p `if [ "$deviceid" == *'iPhone8'* ]; then echo "--extra kpp.bin"; fi` -f rkrn --lzss > /dev/null + if [[ "$deviceid" == *'iPhone8'* ]]; then + python3 -m pyimg4 im4p create -i work/kcache.patched -o work/krnlboot.im4p --extra work/kpp.bin -f rkrn --lzss > /dev/null + else + python3 -m pyimg4 im4p create -i work/kcache.patched -o work/krnlboot.im4p -f rkrn --lzss > /dev/null + fi python3 -m pyimg4 img4 create -p work/krnlboot.im4p -o boot/kernelcache.img4 -m work/IM4M > /dev/null echo "[*] Converting DeviceTree" @@ -257,8 +261,11 @@ if [ ! -e boot ]; then fi echo "[*] Booting device" -$dir/gaster reset > /dev/null -sleep 1 +sleep 2 +if [[ ! "$deviceid" == *'iPhone8'* ]]; then + $dir/irecovery -f boot/iBSS.img4 + sleep 2 +fi $dir/irecovery -f boot/iBSS.img4 sleep 3 #if [[ "$@" == *"install"* ]]; then