fix for dualra1n-loader installation

This commit is contained in:
edwin 2023-10-01 10:26:40 -04:00
parent dbe306f42f
commit f03e2e5a42
9 changed files with 80 additions and 60 deletions

View file

@ -296,6 +296,45 @@ _dfuhelper() {
fi
}
_do_localboot() {
ask
while true; do
read -r answer
case "$(echo "$answer" | tr '[:upper:]' '[:lower:]')" in
yes)
echo "[*] You answered YES. so Activating the iBoot localboot path..."
echo '[*] Patching the kernel to krnl'
if [[ "$deviceid" == *'iPhone8'* ]] || [[ "$deviceid" == *'iPad6'* ]] || [[ "$deviceid" == *'iPad5'* ]]; then
python3 -m pyimg4 im4p create -i work/$(if [ "$taurine" = "1" ]; then echo "kcache.patched"; else echo "kcache.patchedB"; fi) -o work/krnl.im4p -f krnl --extra work/kpp.bin --lzss >/dev/null
else
python3 -m pyimg4 im4p create -i work/$(if [ "$taurine" = "1" ]; then echo "kcache.patched"; else echo "kcache.patchedB"; fi) -o work/krnl.im4p -f krnl --lzss >/dev/null
fi
python3 -m pyimg4 img4 create -p work/krnl.im4p -o work/kernelcachd -m work/IM4M >/dev/null
remote_cp work/kernelcachd root@localhost:/mnt6/"$active"/System/Library/Caches/com.apple.kernelcaches/ >/dev/null
if [ "$os" = 'Linux' ]; then
sed -i 's/\/\kernelcache/\/\kernelcachd/g' work/iBEC.dec
else
LC_ALL=C sed -i.bak -e 's/s\/\kernelcache/s\/\kernelcachd/g' work/iBEC.dec
fi
"$dir"/iBoot64Patcher work/iBEC.dec work/iBEC.patched -b "-v wdt=-1 debug=0x2014e `if [ "$cpid" = '0x8960' ] || [ "$cpid" = '0x7000' ] || [ "$cpid" = '0x7001' ]; then echo "-restore"; fi`" -n -l >/dev/null
"$dir"/img4 -i work/iBEC.patched -o work/iBEC.img4 -M work/IM4M -A -T "$(if [[ "$cpid" == *"0x801"* ]]; then echo "ibss"; else echo "ibec"; fi)" >/dev/null
cp -v work/iBEC.img4 "boot/${deviceid}"
break
;;
no)
echo "You answered NO. so Not activating the iBoot localboot path."
break
;;
*)
echo "Invalid answer."
usage
;;
esac
done
}
usage() {
echo "Please answer with YES or NO (case-insensitive)."
}
@ -767,24 +806,26 @@ if [ true ]; then
python3 -m pyimg4 im4p extract -i work/kernelcache -o work/kcache.raw >/dev/null
fi
remote_cp work/kcache.raw root@localhost:/mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.raw >/dev/null
remote_cp boot/"${deviceid}"/kernelcache.img4 "root@localhost:/mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kernelcache" >/dev/null
"$dir"/Kernel64Patcher work/kcache.raw work/kcache.patched -e $(if [[ ! "$version" = "15."* ]]; then echo "-b"; else echo "-b15 -r"; fi) $(if [ ! "$taurine" = "1" ]; then echo "-l"; fi) >/dev/null
remote_cp work/kcache.patched root@localhost:/mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.patched >/dev/null
#remote_cp boot/"${deviceid}"/kernelcache.img4 "root@localhost:/mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kernelcache" >/dev/null
remote_cp binaries/Kernel15Patcher.ios root@localhost:/mnt1/private/var/root/Kernel15Patcher.ios >/dev/null
remote_cmd "/usr/sbin/chown 0 /mnt1/private/var/root/Kernel15Patcher.ios"
remote_cmd "/bin/chmod 755 /mnt1/private/var/root/Kernel15Patcher.ios"
sleep 1
if [ ! $(remote_cmd "/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 2>/dev/null") ]; then
if [ ! $(remote_cmd "/mnt1/private/var/root/Kernel15Patcher.ios /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.patched /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.patchedB 2>/dev/null") ]; then
echo "you have the kernelpath already installed "
fi
sleep 2
remote_cp root@localhost:/mnt6/"$active"/System/Library/Caches/com.apple.kernelcaches/kcache.patched work/ # that will return the kernelpatcher in order to be patched again and boot with it
"$dir"/Kernel64Patcher work/kcache.patched work/kcache.patchedB -e $(if [[ ! "$version" = "15."* ]]; then echo "-b"; else echo "-b15 -r"; fi) $(if [ ! "$taurine" = "1" ]; then echo "-l"; fi) >/dev/null
remote_cp root@localhost:/mnt6/"$active"/System/Library/Caches/com.apple.kernelcaches/kcache.patchedB work/ # that will return the kernelpatcher in order to be patched again and boot with it
if [[ "$deviceid" == *'iPhone8'* ]] || [[ "$deviceid" == *'iPad6'* ]] || [[ "$deviceid" == *'iPad5'* ]]; then
python3 -m pyimg4 im4p create -i work/kcache.patchedB -o work/kcache.im4p -f rknl --extra work/kpp.bin --lzss >/dev/null
python3 -m pyimg4 im4p create -i "work/$(if [ "$taurine" = "1" ]; then echo "kcache.patched"; else echo "kcache.patchedB"; fi)" -o work/kcache.im4p -f rknl --extra work/kpp.bin --lzss >/dev/null
else
python3 -m pyimg4 im4p create -i work/kcache.patchedB -o work/kcache.im4p -f rknl --lzss >/dev/null
python3 -m pyimg4 im4p create -i "work/$(if [ "$taurine" = "1" ]; then echo "kcache.patched"; else echo "kcache.patchedB"; fi)" -o work/kcache.im4p -f rknl --lzss >/dev/null
fi
remote_cmd "rm -f /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.raw /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.patched /mnt6/$active/System/Library/Caches/com.apple.kernelcaches/kcache.im4p"
@ -800,7 +841,7 @@ if [ true ]; then
unzip other/dualra1n-loader.ipa -d other/
mkdir -p other/Payload/Applications/
mv -nv other/Payload/dualra1n-loader.app other/Payload/Applications/
remote_cp other/Payload/Applications/ root@localhost:/mnt1/Applications
remote_cp other/Payload/ root@localhost:/mnt1/
echo "[*] Saving snapshot"
if [ ! "$(remote_cmd "/usr/bin/snaputil -c orig-fs /mnt1")" ]; then
@ -819,6 +860,8 @@ if [ true ]; then
if [ "$taurine" = 1 ]; then
echo "installing taurine"
remote_cp other/taurine/* root@localhost:/mnt1/
echo "[*] Taurine sucessfully copied"
_do_localboot
echo "[*] Finished, now your downgrade is jailbroken, you can boot it"
remote_cmd "/sbin/reboot"
exit;
@ -842,45 +885,7 @@ if [ true ]; then
remote_cmd "rm /mnt1/jbin/binpack/binpack.tar"
remote_cmd "/usr/sbin/nvram auto-boot=true"
echo "[*] Finished of jailbreaking"
ask
while true; do
read -r answer
case "$(echo "$answer" | tr '[:upper:]' '[:lower:]')" in
yes)
echo "[*] You answered YES. so Activating the iBoot localboot path..."
echo '[*] Patching the kernel to krnl'
if [[ "$deviceid" == *'iPhone8'* ]] || [[ "$deviceid" == *'iPad6'* ]] || [[ "$deviceid" == *'iPad5'* ]]; then
python3 -m pyimg4 im4p create -i work/kcache.patchedB -o work/krnl.im4p -f krnl --extra work/kpp.bin --lzss >/dev/null
else
python3 -m pyimg4 im4p create -i work/kcache.patchedB -o work/krnl.im4p -f krnl --lzss >/dev/null
fi
python3 -m pyimg4 img4 create -p work/krnl.im4p -o work/kernelcachd -m work/IM4M >/dev/null
remote_cp work/kernelcachd root@localhost:/mnt6/"$active"/System/Library/Caches/com.apple.kernelcaches/ >/dev/null
if [ "$os" = 'Linux' ]; then
sed -i 's/\/\kernelcache/\/\kernelcachd/g' work/iBEC.dec
else
LC_ALL=C sed -i.bak -e 's/s\/\kernelcache/s\/\kernelcachd/g' work/iBEC.dec
fi
"$dir"/iBoot64Patcher work/iBEC.dec work/iBEC.patched -b "-v wdt=-1 debug=0x2014e `if [ "$cpid" = '0x8960' ] || [ "$cpid" = '0x7000' ] || [ "$cpid" = '0x7001' ]; then echo "-restore"; fi`" -n -l >/dev/null
"$dir"/img4 -i work/iBEC.patched -o work/iBEC.img4 -M work/IM4M -A -T "$(if [[ "$cpid" == *"0x801"* ]]; then echo "ibss"; else echo "ibec"; fi)" >/dev/null
cp -v work/iBEC.img4 "boot/${deviceid}"
break
;;
no)
echo "You answered NO. so Not activating the iBoot localboot path."
break
;;
*)
echo "Invalid answer."
usage
;;
esac
done
_do_localboot
echo "[*] DONE ... now reboot and boot again"
remote_cmd "/sbin/reboot"
exit;

View file

@ -14,7 +14,7 @@
</data>
<key>Assets.car</key>
<data>
ofgS+mzZOF1wGSC2FQ5l55t/LA8=
bXDbAeetZA/Y7De+N+wsak26mtw=
</data>
<key>Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key>
<data>
@ -34,15 +34,15 @@
</data>
<key>Info.plist</key>
<data>
eiDKe/D56un3zKhXp5SWKeutX08=
VgEA7vuKIoOkYkPb1kmre27zZUk=
</data>
<key>Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib</key>
<data>
ImV7XKTuTuuV6klwGLp+Mj9Xq9s=
kSWFEuGorMdBAOBexXoMyUukLAA=
</data>
<key>Main.storyboardc/DKI-Yp-loo-view-cPN-qX-cZW.nib</key>
<data>
M6GOu7LeSuY/ER6L38vSYFgCgUw=
CSJi64jwIUVX0OEntgwRd5B/WwQ=
</data>
<key>Main.storyboardc/Info.plist</key>
<data>
@ -62,12 +62,16 @@
</data>
<key>basebinaries.tar</key>
<data>
KJf7T46HZ+IyKHtg4fNSk7WKMfc=
ExBQ7905hQq27b1OmZtQYb10SUA=
</data>
<key>bootstrap.tar.gz</key>
<data>
rt9rjkuiQu3ovT9WyegG6Z9/ytw=
</data>
<key>ctbypass.gz</key>
<data>
JdQt3oVn0+ahtpB//zvjuxhaQoQ=
</data>
<key>essential_0-4_iphoneos-arm.deb</key>
<data>
1y7jqfU13qKUqU89y/9D46NdAX0=
@ -117,11 +121,11 @@
<dict>
<key>hash</key>
<data>
ofgS+mzZOF1wGSC2FQ5l55t/LA8=
bXDbAeetZA/Y7De+N+wsak26mtw=
</data>
<key>hash2</key>
<data>
qcG05RgfuPUIxZSr+s93OIPoDq2Z5/s+jJvd74Fpoe4=
Fg+jTlHFEyBWz8JQ15mDPZ566+4+xCB5G/jh721SwQg=
</data>
</dict>
<key>Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key>
@ -172,22 +176,22 @@
<dict>
<key>hash</key>
<data>
ImV7XKTuTuuV6klwGLp+Mj9Xq9s=
kSWFEuGorMdBAOBexXoMyUukLAA=
</data>
<key>hash2</key>
<data>
flB+gYCk4uXa2Ql9ot54QIOU4/siSnHvcj0cNRQiXzk=
8gMBiRwfwaaCjixBxHpksVY+4VUml5gaXlGJYdRlZD8=
</data>
</dict>
<key>Main.storyboardc/DKI-Yp-loo-view-cPN-qX-cZW.nib</key>
<dict>
<key>hash</key>
<data>
M6GOu7LeSuY/ER6L38vSYFgCgUw=
CSJi64jwIUVX0OEntgwRd5B/WwQ=
</data>
<key>hash2</key>
<data>
50zbkPXpRw51MqtsqNcP0+k4Pc+OtaR5yAHtevRDSkk=
XZCnoxbK69pg1k+8mjeqecZYO3HlsHatLJZfHDbnvxg=
</data>
</dict>
<key>Main.storyboardc/Info.plist</key>
@ -227,11 +231,11 @@
<dict>
<key>hash</key>
<data>
KJf7T46HZ+IyKHtg4fNSk7WKMfc=
ExBQ7905hQq27b1OmZtQYb10SUA=
</data>
<key>hash2</key>
<data>
rZ/bEJqkZvuoeNLKN0CdxjPoEykk1fSvY3ajl+VTdsA=
CJLChPH47C+kyRUvM0WdOj890GPH9KOi6tDcZ5SWc90=
</data>
</dict>
<key>bootstrap.tar.gz</key>
@ -245,6 +249,17 @@
oPDjxT618z33oRg9OzyDpiDLrILb//b8JERKt0c8Kbw=
</data>
</dict>
<key>ctbypass.gz</key>
<dict>
<key>hash</key>
<data>
JdQt3oVn0+ahtpB//zvjuxhaQoQ=
</data>
<key>hash2</key>
<data>
Xjb0unJ9d55XZiu3iii2FmlDbQD/67ZfEs6u02uWtgk=
</data>
</dict>
<key>essential_0-4_iphoneos-arm.deb</key>
<dict>
<key>hash</key>

Binary file not shown.