Update some things

- Bring back iBEC bsdiff patches for blob dumping
- also, install corona/rocky on a5 only
This commit is contained in:
LukeZGD 2023-09-16 21:28:32 +08:00
parent a962c6ddda
commit dd4b495673
25 changed files with 45 additions and 24 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
d294f3d2db8193033fa28de98347bb728d1a5e7a

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1474,10 +1474,22 @@ patch_ibec() {
# creates file pwnediBEC to be sent to device for blob dumping # creates file pwnediBEC to be sent to device for blob dumping
local build_id local build_id
case $device_type in case $device_type in
iPad1,1 | iPod3,1 ) build_id="9B206";; iPad1,1 | iPod3,1 )
iPhone2,1 | iPod4,1 ) build_id="10B500";; build_id="9B206";;
iPhone3,[123] ) build_id="11D257";; iPhone2,1 | iPod4,1 )
* ) build_id="12H321";; build_id="10B500";;
iPad2,[145] | iPad3,[346] | iPhone4,1 | iPhone5,[12] | iPod5,1 )
build_id="10B329";;
iPad2,2 | iPhone3,[123] )
build_id="11D257";;
iPad2,[367] | iPad3,[25] )
build_id="12H321";;
iPad3,1 )
build_id="10B146";;
iPhone5,3 )
build_id="11B511";;
iPhone5,4 )
build_id="11B651";;
esac esac
if [[ -n $device_ramdisk_build ]]; then if [[ -n $device_ramdisk_build ]]; then
build_id="$device_ramdisk_build" build_id="$device_ramdisk_build"
@ -1494,8 +1506,11 @@ patch_ibec() {
log "Decrypting iBEC..." log "Decrypting iBEC..."
mv iBEC $name.orig mv iBEC $name.orig
"$dir/xpwntool" $name.orig $name.dec -iv $iv -k $key "$dir/xpwntool" $name.orig $name.dec -iv $iv -k $key
log "Patching iBEC..." if [[ $build_id == "9B206" || $build_id == "10B500" || -n $device_ramdisk_build ]]; then
"$dir/iBoot32Patcher" $name.dec $name.patched --rsa --debug --ticket -b "rd=md0 -v amfi=0xff cs_enforcement_disable=1" -c "go" $address "$dir/iBoot32Patcher" $name.dec $name.patched --rsa --debug --ticket -b "rd=md0 -v amfi=0xff cs_enforcement_disable=1" -c "go" $address
else
$bspatch $name.dec $name.patched "../resources/patch/$download_targetfile.patch"
fi
"$dir/xpwntool" $name.patched pwnediBEC.dfu -t $name.orig "$dir/xpwntool" $name.patched pwnediBEC.dfu -t $name.orig
rm $name.dec $name.orig $name.patched rm $name.dec $name.orig $name.patched
cp pwnediBEC.dfu ../saved/$device_type/ cp pwnediBEC.dfu ../saved/$device_type/
@ -2155,6 +2170,7 @@ ipsw_prepare_32bit() {
for i in {0..2}; do for i in {0..2}; do
JBFiles[i]=$jelbrek/${JBFiles[$i]} JBFiles[i]=$jelbrek/${JBFiles[$i]}
done done
if [[ $device_proc == 5 ]]; then
case $device_target_vers in case $device_target_vers in
5.1.1 ) JBFiles+=("$jelbrek/rockyracoon.tar");; 5.1.1 ) JBFiles+=("$jelbrek/rockyracoon.tar");;
5.0.1 ) JBFiles+=("$jelbrek/corona.tar");; 5.0.1 ) JBFiles+=("$jelbrek/corona.tar");;
@ -2164,6 +2180,7 @@ ipsw_prepare_32bit() {
fi fi
;; ;;
esac esac
fi
if [[ $device_target_vers == "5"* ]]; then if [[ $device_target_vers == "5"* ]]; then
JBFiles+=("$jelbrek/cydiasubstrate.tar") JBFiles+=("$jelbrek/cydiasubstrate.tar")
fi fi
@ -2445,8 +2462,6 @@ ipsw_prepare_custom() {
"4.1" ) "$dir/hfsplus" out.dmg untar $jelbrek/greenpois0n/${device_type}_${device_target_build}.tar;; "4.1" ) "$dir/hfsplus" out.dmg untar $jelbrek/greenpois0n/${device_type}_${device_target_build}.tar;;
esac esac
case $device_target_vers in case $device_target_vers in
"5.1.1" ) "$dir/hfsplus" out.dmg untar $jelbrek/rockyracoon.tar;;
"5.0.1" ) "$dir/hfsplus" out.dmg untar $jelbrek/corona.tar;;
"4"* | "3.1.3" ) "4"* | "3.1.3" )
"$dir/hfsplus" out.dmg rm private/etc/fstab "$dir/hfsplus" out.dmg rm private/etc/fstab
"$dir/hfsplus" out.dmg add $jelbrek/fstab_old private/etc/fstab "$dir/hfsplus" out.dmg add $jelbrek/fstab_old private/etc/fstab
@ -3326,6 +3341,7 @@ device_ramdisk() {
5* ) untether="tar-${device_model}_$build.tar";; 5* ) untether="tar-${device_model}_$build.tar";;
4.2.1 ) $ssh -p 2222 root@127.0.0.1 "[[ ! -e /mnt1/sbin/punchd ]] && mv /mnt1/sbin/launchd /mnt1/sbin/punchd";; 4.2.1 ) $ssh -p 2222 root@127.0.0.1 "[[ ! -e /mnt1/sbin/punchd ]] && mv /mnt1/sbin/launchd /mnt1/sbin/punchd";;
esac esac
if [[ $device_proc == 5 ]]; then
case $vers in case $vers in
5.1.1 ) device_ramdisktar rockyracoon.tar;; 5.1.1 ) device_ramdisktar rockyracoon.tar;;
5.0.1 ) device_ramdisktar corona.tar;; 5.0.1 ) device_ramdisktar corona.tar;;
@ -3334,6 +3350,9 @@ device_ramdisk() {
device_ramdisktar corona.tar device_ramdisktar corona.tar
fi fi
;; ;;
esac
fi
case $vers in
4.2.1 | 4.1 | 4.0* | 3* ) 4.2.1 | 4.1 | 4.0* | 3* )
untether="${device_type}_${build}.tar" untether="${device_type}_${build}.tar"
if [[ $device_type == "iPod2,1" ]]; then if [[ $device_type == "iPod2,1" ]]; then