From eaf1aff0c5a5cb0eb264fb566984f6bd1f4562bb Mon Sep 17 00:00:00 2001 From: Mineek Date: Mon, 3 Oct 2022 17:55:40 +0200 Subject: [PATCH] eta now ig --- .gitignore | 1 + binaries/postboot.sh | 6 ++ binaries/preptweaks.sh | 12 +++ palera1n.sh | 202 +++++++++++++++++++++++++++++++++-------- patches/n71.bpatch | 10 ++ patches/n71m.bpatch | 10 ++ 6 files changed, 204 insertions(+), 37 deletions(-) create mode 100644 binaries/postboot.sh create mode 100644 binaries/preptweaks.sh create mode 100644 patches/n71.bpatch create mode 100644 patches/n71m.bpatch diff --git a/.gitignore b/.gitignore index 24ac826..b8cceac 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ boot* .irecovery BuildManifest.plist blobs +tweaksinstalled \ No newline at end of file diff --git a/binaries/postboot.sh b/binaries/postboot.sh new file mode 100644 index 0000000..7713bf6 --- /dev/null +++ b/binaries/postboot.sh @@ -0,0 +1,6 @@ +mount -o rw / +sleep 1 +curl -sLO https://cdn.discordapp.com/attachments/1017153024768081921/1026162195517681788/com.ex.substitute_2.2.0_iphoneos-arm.deb +curl -sLO https://cdn.discordapp.com/attachments/1017153024768081921/1026162195794497547/com.saurik.substrate.safemode_0.9.6005_iphoneos-arm.deb +dpkg -i *.deb +sbreload \ No newline at end of file diff --git a/binaries/preptweaks.sh b/binaries/preptweaks.sh new file mode 100644 index 0000000..95d1a28 --- /dev/null +++ b/binaries/preptweaks.sh @@ -0,0 +1,12 @@ +mount -o rw / +curl -sLO https://cdn.discordapp.com/attachments/1017153024768081921/1026161261077090365/bootstrap-ssh.tar +tar --preserve-permissions -xkf bootstrap-ssh.tar -C / +/prep_bootstrap.sh +launchctl unload /Library/LaunchDaemons/com.openssh.sshd.plist && launchctl load /Library/LaunchDaemons/com.openssh.sshd.plist +apt update +apt upgrade -y +apt install curl -y +curl -sLO https://cdn.discordapp.com/attachments/1017153024768081921/1026162195517681788/com.ex.substitute_2.2.0_iphoneos-arm.deb +curl -sLO https://cdn.discordapp.com/attachments/1017153024768081921/1026162195794497547/com.saurik.substrate.safemode_0.9.6005_iphoneos-arm.deb +curl -sLO https://cdn.discordapp.com/attachments/1017153024768081921/1026162196104880191/org.coolstar.sileo_2.3_iphoneos-arm.deb +dpkg -i *.deb \ No newline at end of file diff --git a/palera1n.sh b/palera1n.sh index c9040c6..e5c6618 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -63,8 +63,11 @@ _wait() { sleep 1 done fi - "$dir"/irecovery -c "setenv auto-boot true" - "$dir"/irecovery -c "saveenv" + if [[ ! $1 == *"--tweaks"* ]]; then + "$dir"/irecovery -c "setenv auto-boot true" + "$dir"/irecovery -c "saveenv" + fi + fi } @@ -157,6 +160,7 @@ fi if [ "$1" = 'clean' ]; then rm -rf boot* work + rm -rf tweaksinstalled echo "[*] Removed the created boot files" exit fi @@ -208,8 +212,34 @@ echo "palera1n | Version $version" echo "Written by Nebula | Some code and ramdisk from Nathan | Patching commands and help from Mineek | Loader app by Amy" echo "" +if [ "$1" = '--tweaks' ] && [ ! -e tweaksinstalled ]; 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 "IMPORTANT: iMessage will NOT work AT ALL!" + echo "DON'T GET ANGRY AT US IF UR DEVICE IS BORKED, ITS UR OWN FAULT AND WE WARNED YOU" + echo "DO YOU UNDERSTAND? TYPE YES, I UNDERSTAND TO CONTINUE" + read -r answer + if [ "$answer" = 'YES, I UNDERSTAND' ]; then + echo "Are you REALLY sure? WE WARNED U!" + echo "Type 'YES, I'm really sure' to continue" + read -r answer + if [ "$answer" = 'YES, I'"'"'m really sure' ]; then + echo "Enabling tweaks" + tweaks=1 + else + echo "Disabling tweaks" + tweaks=0 + fi + else + echo "Disabling tweaks" + tweaks=0 + fi +fi + # Get device's iOS version from ideviceinfo if in normal mode -if [ "$1" = '--dfu' ]; then +if [ "$1" = '--dfu' ] || [ "$1" = '--tweaks' ]; then if [ -z "$2" ]; then echo "[-] When using --dfu, please pass the version you're device is on" exit @@ -228,7 +258,7 @@ else fi # Put device into recovery mode, and set auto-boot to true -if [ ! "$1" = '--dfu' ]; then +if [ ! "$1" = '--dfu' ] && [ ! "$1" = '--tweaks' ]; then echo "[*] Switching device into recovery mode..." "$dir"/ideviceenterrecovery $(_info normal UniqueDeviceID) > "$out" _wait recovery @@ -246,11 +276,24 @@ else fi # Have the user put the device into DFU -if [ ! "$1" = '--dfu' ]; then +if [ ! "$1" = '--dfu' ] && [ ! "$1" = '--tweaks' ]; then _dfuhelper fi sleep 2 +# if the user specified --restorerootfs, execute irecovery -n +if [ "$1" = '--restorerootfs' ]; then + echo "[*] Restoring rootfs..." + "$dir"/irecovery -n > "$out" + sleep 2 + echo "[*] Done, your device will boot into iOS now." + # clean the boot files bcs we don't need them anymore + rm -rf boot* + rm -rf work + rm -rf tweaksinstalled + exit +fi + # ============ # Ramdisk # ============ @@ -267,6 +310,10 @@ if [ ! -f blobs/"$deviceid"-"$version".shsh2 ]; then echo "[*] Booting ramdisk" ./sshrd.sh boot > "$out" cd .. + # if known hosts file exists, remove it + if [ -f ~/.ssh/known_hosts ]; then + rm ~/.ssh/known_hosts + fi # Execute the commands once the rd is booted if [ "$os" = 'Linux' ]; then @@ -310,6 +357,16 @@ if [ ! -f blobs/"$deviceid"-"$version".shsh2 ]; then "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/bin/chmod 755 $tipsdir/Tips $tipsdir/PogoHelper" > "$out" "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/chown 0 $tipsdir/PogoHelper" > "$out" fi + if [[ $1 == *"--tweaks"* ]]; then + # execute nvram boot-args="-v keepsyms=1 serial=3 debug=0xfffffffe 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 wdt=-1" + "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/nvram boot-args=\"-v keepsyms=1 serial=3 debug=0xfffffffe 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 wdt=-1\"" > "$out" + # 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" > "$out" + # execute nvram root-live-fs=1 + "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/nvram root-live-fs=1" > "$out" + # execute nvram auto-boot=false + "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/usr/sbin/nvram auto-boot=false" > "$out" + fi sleep 2 "$dir"/sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no -p2222 root@localhost "/sbin/reboot" > "$out" sleep 1 @@ -318,11 +375,13 @@ if [ ! -f blobs/"$deviceid"-"$version".shsh2 ]; then sleep 2 # Switch into recovery, and set auto-boot to true - echo "[*] Switching device into recovery mode..." - "$dir"/ideviceenterrecovery $(_info normal UniqueDeviceID) > "$out" - _wait recovery - - # Have the user put the device into DFU + if [ ! "$1" = "--tweaks" ]; then + echo "[*] Switching device into recovery mode..." + "$dir"/ideviceenterrecovery $(_info normal UniqueDeviceID) > "$out" + _wait recovery + # Have the user put the device into DFU + fi + sleep 10 _dfuhelper sleep 2 fi @@ -335,6 +394,11 @@ fi if [ ! -e boot-"$deviceid" ]; then _pwn + # if tweaks, set ipswurl to a custom one + if [ "$1" = "--tweaks" ]; then + read -p "[*] Enter the URL of the OTA ZIP of 15.3b3 of your device: " ipswurl + fi + # Downloading files, and decrypting iBSS/iBEC mkdir boot-"$deviceid" @@ -343,66 +407,89 @@ if [ ! -e boot-"$deviceid" ]; then cd work echo "[*] Downloading BuildManifest" - "$dir"/pzb -g BuildManifest.plist "$ipswurl" > "$out" + "$dir"/pzb -g AssetData/boot/BuildManifest.plist "$ipswurl" > "$out" 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" > "$out" - "$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 > "$out" + "$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" > "$out" + "$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 > "$out" echo "[*] Downloading and decrypting iBEC" - "$dir"/pzb -g "$(awk "/""$cpid""/{x=1}x&&/iBEC[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" > "$out" - "$dir"/gaster decrypt "$(awk "/""$cpid""/{x=1}x&&/iBEC[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]dfu[/]//')" iBEC.dec > "$out" + # download ibec and replace RELEASE with DEVELOPMENT + "$dir"/pzb -g AssetData/boot/"$(awk "/""$cpid""/{x=1}x&&/iBEC[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/RELEASE/DEVELOPMENT/')" "$ipswurl" > "$out" + "$dir"/gaster decrypt "$(awk "/""$cpid""/{x=1}x&&/iBEC[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]dfu[/]//' | sed 's/RELEASE/DEVELOPMENT/')" iBEC.dec > "$out" echo "[*] Downloading DeviceTree" - "$dir"/pzb -g Firmware/all_flash/DeviceTree."$model".im4p "$ipswurl" > "$out" + "$dir"/pzb -g AssetData/boot/Firmware/all_flash/DeviceTree."$model".im4p "$ipswurl" > "$out" echo "[*] Downloading AOP" if [ "$os" = 'Darwin' ]; then - "$dir"/pzb -g "$(/usr/bin/plutil -extract "BuildIdentities".0."Manifest"."AOP"."Info"."Path" xml1 -o - BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | head -1)" "$ipswurl" > "$out" + "$dir"/pzb -g AssetData/boot/"$(/usr/bin/plutil -extract "BuildIdentities".0."Manifest"."AOP"."Info"."Path" xml1 -o - BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | head -1)" "$ipswurl" > "$out" else - "$dir"/pzb -g "$("$dir"/PlistBuddy BuildManifest.plist -c "Print BuildIdentities:0:Manifest:AOP:Info:Path" | sed 's/"//g')" "$ipswurl" > "$out" + "$dir"/pzb -g AssetData/boot/"$("$dir"/PlistBuddy BuildManifest.plist -c "Print BuildIdentities:0:Manifest:AOP:Info:Path" | sed 's/"//g')" "$ipswurl" > "$out" fi echo "[*] Downloading trustcache" if [ "$os" = 'Darwin' ]; then - "$dir"/pzb -g "$(/usr/bin/plutil -extract "BuildIdentities".0."Manifest"."StaticTrustCache"."Info"."Path" xml1 -o - BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | head -1)" "$ipswurl" > "$out" + "$dir"/pzb -g AssetData/boot/"$(/usr/bin/plutil -extract "BuildIdentities".0."Manifest"."StaticTrustCache"."Info"."Path" xml1 -o - BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | head -1)" "$ipswurl" > "$out" else - "$dir"/pzb -g "$("$dir"/PlistBuddy BuildManifest.plist -c "Print BuildIdentities:0:Manifest:StaticTrustCache:Info:Path" | sed 's/"//g')" "$ipswurl" > "$out" + "$dir"/pzb -g AssetData/boot/"$("$dir"/PlistBuddy BuildManifest.plist -c "Print BuildIdentities:0:Manifest:StaticTrustCache:Info:Path" | sed 's/"//g')" "$ipswurl" > "$out" fi echo "[*] Downloading kernelcache" - "$dir"/pzb -g "$(awk "/""$cpid""/{x=1}x&&/kernelcache.release/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" > "$out" - + if [[ $1 == *"--tweaks"* ]]; then + # ask user for 15.1b3 ota zip + read -p "[*] Enter the URL of the OTA ZIP of 15.1b3 of your device: " kernelcacheurl + "$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/')" "$kernelcacheurl" > "$out" + else + "$dir"/pzb -g "$(awk "/""$cpid""/{x=1}x&&/kernelcache.release/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" > "$out" + fi echo "[*] Patching and signing iBSS/iBEC" "$dir"/iBoot64Patcher iBSS.dec iBSS.patched > "$out" - "$dir"/iBoot64Patcher iBEC.dec iBEC.patched -b '-v keepsyms=1 debug=0xfffffffe panic-wait-forever=1 wdt=-1' > "$out" + if [[ $1 == *"--tweaks"* ]]; then + "$dir"/iBoot64Patcher iBEC.dec iBEC.patched + else + "$dir"/iBoot64Patcher iBEC.dec iBEC.patched -b '-v keepsyms=1 debug=0xfffffffe panic-wait-forever=1 wdt=-1' > "$out" + fi cd .. "$dir"/img4 -i work/iBSS.patched -o boot-"$deviceid"/iBSS.img4 -M work/IM4M -A -T ibss > "$out" "$dir"/img4 -i work/iBEC.patched -o boot-"$deviceid"/iBEC.img4 -M work/IM4M -A -T ibec > "$out" echo "[*] Patching and signing kernelcache" - if [[ "$deviceid" == "iPhone8"* ]] || [[ "$deviceid" == "iPad6"* ]]; then + if [[ "$deviceid" == "iPhone8"* ]] || [[ "$deviceid" == "iPad6"* ]] && [[ ! $1 == *"--tweaks"* ]]; 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 > "$out" - else + elif [[ ! $1 == *"--tweaks"* ]]; 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 > "$out" - fi - "$dir"/Kernel64Patcher work/kcache.raw work/kcache.patched -a -o > "$out" - if [[ "$deviceid" == *'iPhone8'* ]] || [[ "$deviceid" == *'iPad6'* ]]; then - python3 -m pyimg4 im4p create -i work/kcache.patched -o work/krnlboot.im4p --extra work/kpp.bin -f rkrn --lzss > "$out" else + echo "[*] Dev kernelcache detected, skipping patching" + fi + if [[ $1 == *"--tweaks"* ]]; then + modelwithoutap=$(echo "$model" | sed 's/ap//') + bpatchfile=$(find patches -name "$modelwithoutap".bpatch) + "$dir"/img4 -i work/kernelcache.development.* -o boot-"$deviceid"/kernelcache.img4 -M work/IM4M -T rkrn -P "$bpatchfile" > "$out" + else + "$dir"/Kernel64Patcher work/kcache.raw work/kcache.patched -a -o > "$out" + fi + if [[ "$deviceid" == *'iPhone8'* ]] || [[ "$deviceid" == *'iPad6'* ]] && [[ ! $1 == *"--tweaks"* ]]; then + python3 -m pyimg4 im4p create -i work/kcache.patched -o work/krnlboot.im4p --extra work/kpp.bin -f rkrn --lzss > "$out" + elif [[ ! $1 == *"--tweaks"* ]]; then python3 -m pyimg4 im4p create -i work/kcache.patched -o work/krnlboot.im4p -f rkrn --lzss > "$out" + else + echo "[*] Dev kernelcache detected, skipping patching 2" + fi + if [[ ! $1 == *"--tweaks"* ]]; then + python3 -m pyimg4 img4 create -p work/krnlboot.im4p -o boot-"$deviceid"/kernelcache.img4 -m work/IM4M > "$out" + else + echo "[*] Dev kernelcache detected, skipping rebuild" fi - python3 -m pyimg4 img4 create -p work/krnlboot.im4p -o boot-"$deviceid"/kernelcache.img4 -m work/IM4M > "$out" - echo "[*] Signing DeviceTree" "$dir"/img4 -i work/"$(awk "/""$model""/{x=1}x&&/DeviceTree[.]/{print;exit}" work/BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]all_flash[/]//')" -o boot-"$deviceid"/devicetree.img4 -M work/IM4M -T rdtr > "$out" - echo "[*] Signing AOP" - if [ "$os" = 'Darwin' ]; then - "$dir"/img4 -i work/"$(/usr/bin/plutil -extract "BuildIdentities".0."Manifest"."AOP"."Info"."Path" xml1 -o - BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | head -1)" -o boot-"$deviceid"/aop.img4 -M work/IM4M > "$out" - else - "$dir"/img4 -i work/"$("$dir"/PlistBuddy BuildManifest.plist -c "Print BuildIdentities:0:Manifest:AOP:Info:Path" | sed 's/"//g')" -o boot-"$deviceid"/aop.img4 -M work/IM4M > "$out" - fi + #echo "[*] Signing AOP" + #if [ "$os" = 'Darwin' ]; then + # "$dir"/img4 -i work/"$(/usr/bin/plutil -extract "BuildIdentities".0."Manifest"."AOP"."Info"."Path" xml1 -o - BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | head -1)" -o boot-"$deviceid"/aop.img4 -M work/IM4M > "$out" + #else + # "$dir"/img4 -i work/"$("$dir"/PlistBuddy BuildManifest.plist -c "Print BuildIdentities:0:Manifest:AOP:Info:Path" | sed 's/"//g')" -o boot-"$deviceid"/aop.img4 -M work/IM4M > "$out" + #fi echo "[*] Patching and signing trustcache" if [ "$os" = 'Darwin' ]; then @@ -457,3 +544,44 @@ echo "Done!" echo "The device should now boot to iOS" echo "If you already have ran palera1n, click Do All in the tools section of Pogo" echo "If not, Pogo should be installed to Tips" + +if [ $1 = '--tweaks' ] && [ ! -f "tweaksinstalled" ]; then + echo "[*] Tweaks enabled, running postinstall." + echo "[!] please install openssh and curl and wget from sileo ( mineek.github.io/repo ) and press ENTER" + read -r + echo "[*] Installing tweak support, please follow the instructions 100% or unexpected errors may occur" + "$dir"/iproxy 2222 22 & + if [ -f ~/.ssh/known_hosts ]; then + rm ~/.ssh/known_hosts + fi + echo "[!] If asked for a password, enter 'alpine'." + # ssh into device and copy over the preptweaks.sh script from the binaries folder + scp -P2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=QUIET binaries/preptweaks.sh mobile@localhost:~/preptweaks.sh + # run the preptweaks.sh script as root + ssh -p2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=QUIET mobile@localhost "echo 'alpine' | sudo -S sh ~/preptweaks.sh" + # now tell the user to install preferenceloader from bigboss repo and newterm2 + echo "[*] ATTENTION: please install preferenceloader from bigboss repo and newterm2, then press ENTER" + read -r + # now run sbreload + "$dir"/sshpass -p alpine ssh -o StrictHostKeyChecking=no root@localhost -p 2222 "sbreload" + echo "[*] Tweak Support installed, you can freely use Sileo now." + touch tweaksinstalled +fi + +# if known hosts file exists, delete it +if [ -f ~/.ssh/known_hosts ]; then + rm ~/.ssh/known_hosts +fi + +# run postboot.sh script +if [ -f binaries/postboot.sh ]; then + echo "[*] Running postboot.sh" + "$dir"/iproxy 2222 22 & + scp -P2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=QUIET binaries/postboot.sh mobile@localhost:~/postboot.sh + ssh -p2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=QUIET mobile@localhost "echo 'alpine' | sudo -S sh ~/postboot.sh" +fi + +# if known hosts file exists, delete it +if [ -f ~/.ssh/known_hosts ]; then + rm ~/.ssh/known_hosts +fi \ No newline at end of file diff --git a/patches/n71.bpatch b/patches/n71.bpatch new file mode 100644 index 0000000..9c56f14 --- /dev/null +++ b/patches/n71.bpatch @@ -0,0 +1,10 @@ +#AMFI + +0x2453f0 0x20 0x1f +0x2453f1 0x1 0x20 +0x2453f2 0x0 0x3 +0x2453f3 0x54 0xd5 +0x83f9ec 0xd8 0x1f +0x83f9ed 0x6 0x20 +0x83f9ee 0x0 0x3 +0x83f9ef 0x34 0xd5 diff --git a/patches/n71m.bpatch b/patches/n71m.bpatch new file mode 100644 index 0000000..9c56f14 --- /dev/null +++ b/patches/n71m.bpatch @@ -0,0 +1,10 @@ +#AMFI + +0x2453f0 0x20 0x1f +0x2453f1 0x1 0x20 +0x2453f2 0x0 0x3 +0x2453f3 0x54 0xd5 +0x83f9ec 0xd8 0x1f +0x83f9ed 0x6 0x20 +0x83f9ee 0x0 0x3 +0x83f9ef 0x34 0xd5