@@ -2609,10 +2609,11 @@ ipsw_preference_set() {
26092609 case $device_target_vers in
26102610 9.3.[4321] | 9.3 | 9.[210]* | [8765]* | 4.[32]* ) ipsw_canjailbreak=1;;
26112611 3* )
2612- case $device_proc in
2613- 1 ) ipsw_canjailbreak=1;;
2614- * ) ipsw_nojailbreak_message;;
2615- esac
2612+ if [[ $device_proc == 1 || $ipsw_24o == 1 ]]; then
2613+ ipsw_canjailbreak=1
2614+ else
2615+ ipsw_nojailbreak_message
2616+ fi
26162617 ;;
26172618 esac
26182619
@@ -2736,8 +2737,8 @@ ipsw_preference_set() {
27362737
27372738 if [[ $device_proc == 1 && $device_type != " iPhone1,2" ]]; then
27382739 ipsw_canmemory=
2739- elif [[ $device_type == " iPod4,1" && $device_target_vers == " 7.1.2 " ]] ||
2740- [[ $device_type == " iPod3,1" && $device_target_vers == " 6.0 " ]]; then
2740+ elif [[ $device_type == " iPod4,1" && $device_target_vers == " 7." * ]] ||
2741+ [[ $device_type == " iPod3,1" && $device_target_vers == " 6." * ]]; then
27412742 ipsw_canmemory=
27422743 elif [[ $device_target_powder == 1 || $device_target_tethered == 1 ||
27432744 $ipsw_jailbreak == 1 || $ipsw_gasgauge_patch == 1 || $ipsw_nskip == 1 ||
@@ -3086,7 +3087,7 @@ ipsw_prepare_jailbreak() {
30863087 JBFiles[1]=$jelbrek /greenpois0n/${device_type} _${device_target_build} .tar
30873088 fi
30883089 ;;
3089- 3.1* )
3090+ 3.1* | 4.0 * )
30903091 if [[ $device_type == " iPhone1,2" || $device_type == " iPhone2,1" || $ipsw_24o == 1 ]]; then
30913092 JBFiles[1]=
30923093 fi
@@ -5288,7 +5289,7 @@ ipsw_prepare_custom() {
52885289 ipsw_prepare_jailbreak old
52895290
52905291 mv " $ipsw_custom .ipsw" temp.ipsw
5291- if [[ $ipsw_24o == 1 ]]; then # old bootrom ipod2,1 3.1.3
5292+ if [[ $ipsw_24o == 1 ]] && [[ $device_target_vers == " 3.1 " * || $device_target_vers == " 4.0 " * ]] ; then # old bootrom ipod2,1
52925293 ipsw_prepare_patchcomp LLB
52935294 mv temp.ipsw " $ipsw_custom .ipsw"
52945295 return
@@ -5446,7 +5447,7 @@ restore_idevicerestore() {
54465447 log " Sending iBEC..."
54475448 $irecovery -f " $ipsw_custom /Firmware/dfu/iBEC.${device_model} ap.RELEASE.dfu"
54485449 device_find_mode Recovery
5449- elif [[ $device_type == " iPod3,1" && $device_target_vers == " 6.0 " ]]; then
5450+ elif [[ $device_type == " iPod3,1" && $device_target_vers == " 6." * ]]; then
54505451 rm -rf shsh
54515452 idevicerestore2=
54525453 [[ $platform == " linux" ]] && idevicerestore2=" sudo "
@@ -5773,8 +5774,8 @@ restore_deviceprepare() {
57735774 ;;
57745775
57755776 4 )
5776- if [[ $device_type == " iPod4,1" && $device_target_vers == " 7.1.2 " ]] ||
5777- [[ $device_type == " iPod3,1" && $device_target_vers == " 6.0 " ]]; then
5777+ if [[ $device_type == " iPod4,1" && $device_target_vers == " 7." * ]] ||
5778+ [[ $device_type == " iPod3,1" && $device_target_vers == " 6." * ]]; then
57785779 shsh_save version $device_latest_vers
57795780 case $device_type in
57805781 iPod4,1 ) device_buttons;;
@@ -5843,8 +5844,8 @@ restore_prepare() {
58435844 ;;
58445845
58455846 4 )
5846- if [[ $device_type == " iPod4,1" && $device_target_vers == " 7.1.2 " ]] ||
5847- [[ $device_type == " iPod3,1" && $device_target_vers == " 6.0 " ]]; then
5847+ if [[ $device_type == " iPod4,1" && $device_target_vers == " 7." * ]] ||
5848+ [[ $device_type == " iPod3,1" && $device_target_vers == " 6." * ]]; then
58485849 restore_idevicerestore special
58495850 elif [[ $device_target_tethered == 1 || $device_target_other == 1 ]] ||
58505851 [[ $device_target_vers == " 4.1" && $ipsw_jailbreak == 1 ]]; then
@@ -6022,9 +6023,9 @@ ipsw_prepare() {
60226023 ;;
60236024
60246025 4 )
6025- if [[ $device_type == " iPod4,1" && $device_target_vers == " 7.1.2 " ]]; then
6026+ if [[ $device_type == " iPod4,1" && $device_target_vers == " 7." * ]]; then
60266027 ipsw_prepare_ios7touch4
6027- elif [[ $device_type == " iPod3,1" && $device_target_vers == " 6.0 " ]]; then
6028+ elif [[ $device_type == " iPod3,1" && $device_target_vers == " 6." * ]]; then
60286029 ipsw_prepare_ios6touch3
60296030 elif [[ $device_target_tethered == 1 ]]; then
60306031 ipsw_prepare_tethered
@@ -8297,7 +8298,11 @@ menu_restore() {
82978298 iPod3,1 )
82988299 menu_items+=(" iOS 4.1" );;
82998300 iPhone1,2 | iPod2,1 )
8300- menu_items+=(" 4.1" " 3.1.3" );;
8301+ menu_items+=(" 4.1" " 3.1.3" )
8302+ if [[ $device_type == " iPod2,1" && $device_newbr != 1 && $device_mode != " none" ]]; then
8303+ menu_items+=(" More versions" )
8304+ fi
8305+ ;;
83018306 esac
83028307 case $device_type in
83038308 iPhone3,[13] | iPad1,1 | iPod3,1 )
@@ -8425,21 +8430,29 @@ menu_restore_more() {
84258430 local back
84268431
84278432 while [[ -z " $mode " && -z " $back " ]]; do
8428- menu_items+=(" 6.1.3" " 6.1.2" " 6.1" " 6.0.1" " 6.0" " 5.1" " 5.0.1" " 5.0" )
8429- menu_items+=(" 4.3.4" " 4.3.3" " 4.3.2" " 4.3.1" " 4.3" " 4.2.1" )
8430- menu_items+=(" 4.0.2" " 4.0.1" " 4.0" " 3.1.2" " 3.1" " 3.0.1" " 3.0" )
8433+ menu_items=()
8434+ case $device_type in
8435+ iPhone2,1 )
8436+ menu_items+=(" 6.1.3" " 6.1.2" " 6.1" " 6.0.1" " 6.0" " 5.1" " 5.0.1" " 5.0" )
8437+ menu_items+=(" 4.3.4" " 4.3.3" " 4.3.2" " 4.3.1" " 4.3" " 4.2.1" )
8438+ menu_items+=(" 4.0.2" " 4.0.1" " 4.0" " 3.1.2" " 3.1" " 3.0.1" " 3.0" )
8439+ ;;
8440+ iPod2,1 ) menu_items+=(" 4.0.2" " 4.0" " 3.1.2" " 3.1.1" );;
8441+ esac
84318442 menu_items+=(" Go Back" )
84328443 menu_print_info
84338444 if [[ $1 == " ipsw" ]]; then
84348445 print " > Main Menu > Misc Utilities > Create Custom IPSW"
84358446 else
84368447 print " > Main Menu > Restore/Downgrade"
84378448 fi
8438- warn " 3.1.x versions listed here might not restore properly"
8439- if [[ $device_newbr != 0 && $device_mode != " none" ]]; then
8440- print " * 3.0.x versions are not restorable on new bootrom devices"
8441- menu_items=(" ${menu_items[@]:: ${# menu_items[@]} -3} " )
8442- menu_items+=(" Go Back" )
8449+ if [[ $device_type == " iPhone2,1" ]]; then
8450+ warn " 3.1.x versions listed here might not restore properly"
8451+ if [[ $device_newbr != 0 && $device_mode != " none" ]]; then
8452+ print " * 3.0.x versions are not restorable on new bootrom devices"
8453+ menu_items=(" ${menu_items[@]:: ${# menu_items[@]} -3} " )
8454+ menu_items+=(" Go Back" )
8455+ fi
84438456 echo
84448457 fi
84458458 input " Select an option:"
@@ -8563,11 +8576,10 @@ menu_ipsw() {
85638576 if [[ $device_type == " iPhone2,1" && $1 != " 4.1" ]]; then
85648577 ipsw_cancustomlogo=1
85658578 fi
8566- if [[ $device_type == " iPod2,1" && $device_newbr == 0 && $1 == " 3.1.3" ]]; then
8579+ if [[ $device_type == " iPod2,1" && $device_newbr == 0 ]] &&
8580+ [[ $1 == " 4.0" * || $1 == " 3.1" * ]]; then
85678581 ipsw_cancustomlogo=1
8568- if [[ $ipsw_jailbreak == 1 ]]; then
8569- ipsw_24o=1
8570- fi
8582+ ipsw_24o=1
85718583 fi
85728584 ;;
85738585 esac
0 commit comments