@@ -4670,9 +4670,9 @@ ipsw_prepare_multipatch() {
46704670 " $dir /hfsplus" RestoreRamdisk.dec chmod 755 usr/sbin/asr
46714671 fi
46724672
4673- if [[ $device_target_vers == " 3.2 " * ]]; then
4674- log " 3.2 options.plist"
4675- cp ../resources/firmware/src/target/k48 /options.plist $options_plist
4673+ if [[ $device_target_vers == " 3." * ]]; then
4674+ log " 3.x options.plist"
4675+ cp ../resources/firmware/src/target/${device_model} /options.plist $options_plist
46764676 else
46774677 log " Extract options.plist from $device_target_vers IPSW"
46784678 " $dir /hfsplus" ramdisk2.dec extract usr/local/share/restore/$options_plist
@@ -5449,6 +5449,14 @@ restore_idevicerestore() {
54495449 log " Sending iBEC..."
54505450 $irecovery -f " $ipsw_custom /Firmware/dfu/iBEC.${device_model} ap.RELEASE.dfu"
54515451 device_find_mode Recovery
5452+ elif [[ $device_type == " iPod3,1" && $device_target_vers == " 6.0" ]]; then
5453+ rm -rf shsh
5454+ idevicerestore2=
5455+ [[ $platform == " linux" ]] && idevicerestore2=" sudo "
5456+ idevicerestore2+=" ../saved/SundanceInH2A_$platform /executables/"
5457+ [[ $platform == " linux" ]] && idevicerestore2+=" $( uname -m) /"
5458+ idevicerestore2+=" idevicerestore"
5459+ ExtraArgs=" -ey"
54525460 fi
54535461 if [[ $debug_mode == 1 ]]; then
54545462 ExtraArgs+=" d"
@@ -5771,7 +5779,10 @@ restore_deviceprepare() {
57715779 if [[ $device_type == " iPod4,1" && $device_target_vers == " 7.1.2" ]] ||
57725780 [[ $device_type == " iPod3,1" && $device_target_vers == " 6.0" ]]; then
57735781 shsh_save version $device_latest_vers
5774- device_buttons
5782+ case $device_type in
5783+ iPod4,1 ) device_buttons;;
5784+ iPod3,1 ) device_enter_mode pwnDFU;;
5785+ esac
57755786 elif [[ $device_target_tethered == 1 ]]; then
57765787 shsh_save version $device_latest_vers
57775788 device_enter_mode pwnDFU
@@ -7007,12 +7018,17 @@ device_ramdisk_setnvram() {
70077018
70087019device_ramdisk_ios3exploit () {
70097020 log " iOS 3.x detected, running exploit commands"
7010- local offset=
" $( $ssh -p $ssh_port [email protected] " echo -e 'p\nq\n' | fdisk -e /dev/rdisk0" | grep AF | head -1) " 7021+ local fdisk_out=
" $( $ssh -p $ssh_port [email protected] " fdisk /dev/rdisk0" ) " 7022+ echo " $fdisk_out "
7023+ local offset=" $( echo " $fdisk_out " | grep AF | head -1) "
70117024 offset=" ${offset##* -} "
70127025 offset=" $( echo ${offset% ]* } | tr -d ' ' ) "
7013- offset=$(( offset+ 64 ))
7026+ offset=$(( offset+ 63 ))
7027+ local sector_size=" $( echo " $fdisk_out " | grep " Sector size" | awk ' {print $3}' ) "
7028+ local partition_size=$(( 65536 / sector_size))
70147029 log " Got offset $offset "
7015- $ssh -p
$ssh_port [email protected] " echo -e 'e 3\nAF\n\n${offset} \n8\nw\ny\nq\n' | fdisk -e /dev/rdisk0" 7030+ log " Got sector size $sector_size . Partition size will be $partition_size "
7031+ $ssh -p
$ssh_port [email protected] " echo -e 'e 3\nAF\n\n${offset} \n${partition_size} \nw\ny\nq\n' | fdisk -e /dev/rdisk0" 70167032 echo
70177033 log " Writing exploit ramdisk"
70187034 $scp -P
$ssh_port ../resources/firmware/src/target/
$device_model /9B206/exploit
[email protected] :/
@@ -10069,7 +10085,7 @@ device_jailbreak_gilbert() {
1006910085 mv freeze.tar payload/common/Cydia.tar
1007010086 log " Running g1lbertJB..."
1007110087 " ../../$dir /gilbertjb"
10072- rm payload/common/Cydia.tar
10088+ rm -rf payload/common/Cydia.tar private var
1007310089 popd > /dev/null
1007410090}
1007510091
0 commit comments