diff --git a/binaries/Darwin/Kernel64Patcher b/binaries/Darwin/Kernel64Patcher old mode 100755 new mode 100644 index de3bcdc..560e523 Binary files a/binaries/Darwin/Kernel64Patcher and b/binaries/Darwin/Kernel64Patcher differ diff --git a/binaries/Kernel15Patcher.ios b/binaries/Kernel15Patcher.ios new file mode 100644 index 0000000..7bcee0d Binary files /dev/null and b/binaries/Kernel15Patcher.ios differ diff --git a/binaries/Linux/Kernel64Patcher b/binaries/Linux/Kernel64Patcher old mode 100755 new mode 100644 index 6a37938..dc86b5d Binary files a/binaries/Linux/Kernel64Patcher and b/binaries/Linux/Kernel64Patcher differ diff --git a/binaries/postboot.sh b/binaries/postboot.sh deleted file mode 100644 index 3ed8db4..0000000 --- a/binaries/postboot.sh +++ /dev/null @@ -1,8 +0,0 @@ -mount -uw / -mount -uw /private/preboot -sleep 1 -nvram auto-boot=false -launchctl bootstrap system /Library/LaunchDaemons -/etc/rc.d/* -sleep 1 -/usr/bin/launchctl reboot userspace diff --git a/binaries/postbootnosub.sh b/binaries/postbootnosub.sh deleted file mode 100644 index 86c0e0e..0000000 --- a/binaries/postbootnosub.sh +++ /dev/null @@ -1,6 +0,0 @@ -mount -uw / -mount -uw /private/preboot -sleep 1 -nvram auto-boot=false -launchctl bootstrap system /Library/LaunchDaemons -sbreload diff --git a/binaries/preptweaks.sh b/binaries/preptweaks.sh deleted file mode 100644 index 08efbe5..0000000 --- a/binaries/preptweaks.sh +++ /dev/null @@ -1,30 +0,0 @@ -mount -uw / -mount -uw /private/preboot -nvram auto-boot=false -mkdir /work -cd /work -echo "Downloading bootstrap" -curl -sLO https://cdn.discordapp.com/attachments/1017153024768081921/1026161261077090365/bootstrap-ssh.tar -echo "Downloading libswift" -curl -sLO https://github.com/coolstar/Odyssey-bootstrap/raw/master/org.swift.libswift_5.0-electra2_iphoneos-arm.deb -echo "Downloading Substitute" -curl -sLO https://cdn.discordapp.com/attachments/688126487588634630/1026673680387936256/com.ex.substitute_2.3.1_iphoneos-arm.deb -echo "Downloading Substrate Safe mode" -curl -sLO https://apt.bingner.com/debs/1443.00/com.saurik.substrate.safemode_0.9.6005_iphoneos-arm.deb -echo "Downloading launch daemon starter" -curl -sLO https://cdn.discordapp.com/attachments/882340710295142480/1033959464023380018/com.nathan.daemons_0.0.1_iphoneos-arm.deb -echo "Bootstrapping" -tar -xpf bootstrap-ssh.tar -C / --overwrite -/prep_bootstrap.sh -launchctl unload /Library/LaunchDaemons/com.openssh.sshd.plist & launchctl load /Library/LaunchDaemons/com.openssh.sshd.plist -launchctl bootstrap system /Library/LaunchDaemons -uicache -u /var/jb/Applications/Sileo.app -rm -rf /var/jb -rm -rf /private/preboot/$(cat /private/preboot/active)/procursus -apt update -apt upgrade -y -echo "Installing Sileo" -apt install org.coolstar.sileo -dpkg -i *.deb -cd .. -rm -rf /work diff --git a/palera1n.sh b/palera1n.sh index d88e94b..d76535f 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -267,11 +267,11 @@ if [ "$1" = '--tweaks' ]; then _check_dfu fi -if [ "$1" = '--tweaks' ] && [ ! -e ".tweaksinstalled" ] && [ ! -e ".disclaimeragree" ]; then +if [ "$1" = '--tweaks' ] && [ ! -e ".tweaksinstalled" ] && [ ! -e ".disclaimeragree" ] && [[ ! "$@" == *"--semi-tethered"* ]]; then echo "!!! WARNING WARNING WARNING !!!" echo "This flag will add tweak support BUT WILL BE TETHERED." echo "THIS ALSO MEANS THAT YOU'LL NEED A PC EVERY TIME TO BOOT." - echo "THIS ONLY WORKS ON 15.0-15.3.1" + echo "THIS ONLY WORKS ON 15.0-15.7.1" echo "DO NOT GET ANGRY AT US IF UR DEVICE IS BORKED, IT'S YOUR OWN FAULT AND WE WARNED YOU" echo "DO YOU UNDERSTAND? TYPE 'Yes, do as I say' TO CONTINUE" read -r answer @@ -405,23 +405,14 @@ if [ ! -f blobs/"$deviceid"-"$version".shsh2 ]; then fi if [[ $1 == *"--tweaks"* ]]; then - # execute nvram boot-args="-v keepsyms=1 debug=0x2014e launchd_unsecure_cache=1 launchd_missing_exec_no_panic=1 amfi=0xff amfi_allow_any_signature=1 amfi_get_out_of_my_way=1 amfi_allow_research=1 amfi_unrestrict_task_for_pid=1 amfi_unrestricted_local_signing=1 cs_enforcement_disable=1 pmap_cs_allow_modified_code_pages=1 pmap_cs_enforce_coretrust=0 pmap_cs_unrestrict_pmap_cs_disable=1 -unsafe_kernel_text dtrace_dof_mode=1 panic-wait-forever=1 -panic_notify cs_debug=1 PE_i_can_has_debugger=1" - # "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/nvram boot-args=\"-v keepsyms=1 debug=0x2014e launchd_unsecure_cache=1 launchd_missing_exec_no_panic=1 amfi=0xff amfi_allow_any_signature=1 amfi_get_out_of_my_way=1 amfi_allow_research=1 amfi_unrestrict_task_for_pid=1 amfi_unrestricted_local_signing=1 cs_enforcement_disable=1 pmap_cs_allow_modified_code_pages=1 pmap_cs_enforce_coretrust=0 pmap_cs_unrestrict_pmap_cs_disable=1 -unsafe_kernel_text dtrace_dof_mode=1 panic-wait-forever=1 -panic_notify cs_debug=1 PE_i_can_has_debugger=1\"" - # execute nvram allow-root-hash-mismatch=1 - "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/nvram allow-root-hash-mismatch=1" - # execute nvram root-live-fs=1 - "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/nvram root-live-fs=1" - # execute nvram auto-boot=false - if [[ ! "$@" == *"--semi-tethered"* ]]; then + #"$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/nvram allow-root-hash-mismatch=1" + #"$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/nvram root-live-fs=1" + if [[ "$@" == *"--semi-tethered"* ]]; then + "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/nvram auto-boot=true" + else "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/nvram auto-boot=false" fi - - cd work - echo "[*] Downloading BuildManifest" - ipswurl=$(_beta_url) - "$dir"/pzb -g AssetData/boot/BuildManifest.plist "$ipswurl" - echo "[*] Getting apticket.der from device" has_active=$("$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "ls /mnt6/active" 2> /dev/null) if [ ! "$has_active" = "/mnt6/active" ]; then echo "[!] Active file does not exist! Please use SSH to create it" @@ -431,19 +422,21 @@ if [ ! -f blobs/"$deviceid"-"$version".shsh2 ]; then exit fi active=$("$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "cat /mnt6/active" 2> /dev/null) - "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "cat /mnt6/$active/System/Library/Caches/apticket.der" > apticket.der - echo "[*] Downloading kernelcache" - "$dir"/pzb -g AssetData/boot/"$(awk "/""$cpid""/{x=1}x&&/kernelcache.release/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/release/development/')" "$ipswurl" + "$dir"/sshpass -p 'alpine' scp -o StrictHostKeyChecking=no -P2222 binaries/Kernel15Patcher.ios root@localhost:/mnt1/private/var/root/Kernel15Patcher.ios + "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/chown 0 /mnt1/private/var/root/Kernel15Patcher.ios" + "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/bin/chmod 755 /mnt1/private/var/root/Kernel15Patcher.ios" - echo "[*] Patching kernelcache" - cd .. - modelwithoutap=$(echo "$model" | sed 's/ap//') - bpatchfile=$(find patches -name "$modelwithoutap".bpatch) - "$dir"/img4 -i work/kernelcache.development.* -o work/kernelcache -M work/apticket.der -P "$bpatchfile" `if [ "$os" = 'Linux' ]; then echo "-J"; fi` - - echo "[*] Placing patched kernelcache" - cat work/kernelcache | "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "cat > /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kernelcachd" + # lets actually patch the kernel + echo "[*] Patching the kernel" + "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "cp /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kernelcache /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kernelcache.bak" + "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "img4 -i /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kernelcache -o /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.raw" + "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/mnt1/private/var/root/Kernel15Patcher.ios /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.raw /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.patched" + "$dir"/sshpass -p 'alpine' scp -o StrictHostKeyChecking=no -P2222 root@localhost:/mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.patched work/ + "$dir"/Kernel64Patcher work/kcache.patched work/kcache.patched2 -o -e -u + "$dir"/sshpass -p 'alpine' scp -o StrictHostKeyChecking=no -P2222 work/kcache.patched2 root@localhost:/mnt6/$active/System/Library/Caches/com.apple.kernelcaches/ + "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "img4 -i /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.patched2 -o /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kernelcachd -M /mnt6/$active/System/Library/Caches/apticket.der -J" + "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "rm /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.raw /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.patched" rm -rf work mkdir work @@ -521,11 +514,6 @@ if [ ! -f boot-"$deviceid"/.fsboot ]; then fi if [ ! -f boot-"$deviceid"/ibot.img4 ]; then - # if tweaks, set ipswurl to a custom one - if [ "$1" = "--tweaks" ]; then - ipswurl=$(_beta_url) - fi - # Downloading files, and decrypting iBSS/iBEC rm -rf boot-"$deviceid" mkdir boot-"$deviceid" @@ -534,39 +522,21 @@ if [ ! -f boot-"$deviceid"/ibot.img4 ]; then "$dir"/img4tool -e -s $(pwd)/blobs/"$deviceid"-"$version".shsh2 -m work/IM4M cd work - if [[ $1 == *"--tweaks"* ]]; then - echo "[*] Downloading BuildManifest" - "$dir"/pzb -g AssetData/boot/BuildManifest.plist "$ipswurl" + echo "[*] Downloading BuildManifest" + "$dir"/pzb -g BuildManifest.plist "$ipswurl" - echo "[*] Downloading and decrypting iBSS" - "$dir"/pzb -g AssetData/boot/"$(awk "/""$cpid""/{x=1}x&&/iBSS[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/RELEASE/DEVELOPMENT/')" "$ipswurl" - "$dir"/gaster decrypt "$(awk "/""$cpid""/{x=1}x&&/iBSS[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]dfu[/]//' | sed 's/RELEASE/DEVELOPMENT/')" iBSS.dec + echo "[*] Downloading and decrypting iBSS" + "$dir"/pzb -g "$(awk "/""$cpid""/{x=1}x&&/iBSS[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" + "$dir"/gaster decrypt "$(awk "/""$cpid""/{x=1}x&&/iBSS[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]dfu[/]//')" iBSS.dec - echo "[*] Downloading and decrypting iBoot" - # download iboot and replace RELEASE with DEVELOPMENT - "$dir"/pzb -g AssetData/boot/"$(awk "/""$cpid""/{x=1}x&&/iBoot[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/RELEASE/DEVELOPMENT/')" "$ipswurl" - "$dir"/gaster decrypt "$(awk "/""$cpid""/{x=1}x&&/iBoot[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]all_flash[/]//' | sed 's/RELEASE/DEVELOPMENT/')" ibot.dec - else - echo "[*] Downloading BuildManifest" - "$dir"/pzb -g BuildManifest.plist "$ipswurl" - - echo "[*] Downloading and decrypting iBSS" - "$dir"/pzb -g "$(awk "/""$cpid""/{x=1}x&&/iBSS[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" - "$dir"/gaster decrypt "$(awk "/""$cpid""/{x=1}x&&/iBSS[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]dfu[/]//')" iBSS.dec - - echo "[*] Downloading and decrypting iBoot" - "$dir"/pzb -g "$(awk "/""$cpid""/{x=1}x&&/iBoot[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" - "$dir"/gaster decrypt "$(awk "/""$cpid""/{x=1}x&&/iBoot[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]all_flash[/]//')" ibot.dec - fi + echo "[*] Downloading and decrypting iBoot" + "$dir"/pzb -g "$(awk "/""$cpid""/{x=1}x&&/iBoot[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" + "$dir"/gaster decrypt "$(awk "/""$cpid""/{x=1}x&&/iBoot[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]all_flash[/]//')" ibot.dec echo "[*] Patching and signing iBSS/iBoot" "$dir"/iBoot64Patcher iBSS.dec iBSS.patched - if [[ $1 == *"--tweaks"* ]]; then - if [[ "$@" == *"--semi-tethered"* ]]; then - "$dir"/iBoot64Patcherfsboot ibot.dec ibot.patched -b '-v keepsyms=1 debug=0x2014e rd=disk0s1s8 launchd_unsecure_cache=1 launchd_missing_exec_no_panic=1 amfi=0xff amfi_allow_any_signature=1 amfi_get_out_of_my_way=1 amfi_allow_research=1 amfi_unrestrict_task_for_pid=1 amfi_unrestricted_local_signing=1 cs_enforcement_disable=1 pmap_cs_allow_modified_code_pages=1 pmap_cs_enforce_coretrust=0 pmap_cs_unrestrict_pmap_cs_disable=1 -unsafe_kernel_text dtrace_dof_mode=1 -panic_notify cs_debug=1 PE_i_can_has_debugger=1' - else - "$dir"/iBoot64Patcherfsboot ibot.dec ibot.patched -b '-v keepsyms=1 debug=0x2014e launchd_unsecure_cache=1 launchd_missing_exec_no_panic=1 amfi=0xff amfi_allow_any_signature=1 amfi_get_out_of_my_way=1 amfi_allow_research=1 amfi_unrestrict_task_for_pid=1 amfi_unrestricted_local_signing=1 cs_enforcement_disable=1 pmap_cs_allow_modified_code_pages=1 pmap_cs_enforce_coretrust=0 pmap_cs_unrestrict_pmap_cs_disable=1 -unsafe_kernel_text dtrace_dof_mode=1 -panic_notify cs_debug=1 PE_i_can_has_debugger=1' - fi + if [[ "$@" == *"--semi-tethered"* ]]; then + "$dir"/iBoot64Patcherfsboot ibot.dec ibot.patched -b '-v keepsyms=1 debug=0x2014e rd=disk0s1s8' else "$dir"/iBoot64Patcherfsboot ibot.dec ibot.patched -b '-v keepsyms=1 debug=0x2014e' fi diff --git a/ramdisk b/ramdisk index f955e4f..86c4285 160000 --- a/ramdisk +++ b/ramdisk @@ -1 +1 @@ -Subproject commit f955e4fab81457f5cd730e1a972e5482328a1a41 +Subproject commit 86c42852c2a5add3bfedca1e66a77ce973ff4784