@@ -2424,12 +2424,12 @@ ipsw_preference_set() {
24242424 # it should be in system, but restore puts it in data instead due to it being in var.
24252425 # for some reason though, it does it correctly on 4.x for 3gs and touch 2, so its enabled for those.
24262426 # it also does it correctly on 3.1.3-4.x for s5l8900 devices, so its also enabled there.
2427- # for 3.x 3gs, kernel is patched so its also enabled there .
2427+ # for 3.x 3gs, and old br 3.1.3 touch 2, kernel is patched so its also enabled for those .
24282428 case $device_target_vers in
24292429 9.3.[4321] | 9.3 | 9.[210]* | [8765]* | 4.[32]* ) ipsw_canjailbreak=1;;
24302430 3.1.3 )
24312431 case $device_type in
2432- iPhone1* | iPod1 ,1 | iPhone2,1 ) ipsw_canjailbreak=1;;
2432+ iPhone1* | iPod[12] ,1 | iPhone2,1 ) ipsw_canjailbreak=1;;
24332433 * ) ipsw_nojailbreak_message;;
24342434 esac
24352435 ;;
@@ -2439,6 +2439,11 @@ ipsw_preference_set() {
24392439 case $device_target_vers in
24402440 4* ) ipsw_canjailbreak=1;;
24412441 esac
2442+ if [[ $device_type == " iPod2,1" && $device_newbr != 0 && $device_target_vers == " 3.1.3" ]]; then
2443+ warn " New bootrom detected. Disabling jailbreak option"
2444+ ipsw_canjailbreak=
2445+ ipsw_nojailbreak_message
2446+ fi
24422447 else
24432448 case $device_target_vers in
24442449 4.[10]* ) ipsw_nojailbreak_message;;
@@ -3539,14 +3544,9 @@ ipsw_prepare_bundle() {
35393544 fi
35403545 ipsw_prepare_keys RestoreRamdisk $1
35413546 if [[ $1 == " old" ]]; then
3542- if [[ $device_type == " iPod2,1" ]]; then
3543- case $device_target_vers in
3544- 4.2.1 | 4.1 | 3.1.3 ) : ;;
3545- * )
3546- ipsw_prepare_keys iBoot $1
3547- ipsw_prepare_keys KernelCache $1
3548- ;;
3549- esac
3547+ if [[ $device_type == " iPod2,1" && $device_newbr == 0 && $device_target_vers == " 3.1.3" ]]; then
3548+ ipsw_prepare_keys iBoot $1
3549+ ipsw_prepare_keys KernelCache $1
35503550 elif [[ $device_proc == 1 ]]; then
35513551 ipsw_prepare_keys KernelCache $1
35523552 ipsw_prepare_keys WTF2 $1
@@ -4833,40 +4833,40 @@ ipsw_prepare_custom() {
48334833 ipsw_prepare_jailbreak old
48344834
48354835 mv " $ipsw_custom .ipsw" temp.ipsw
4836- if [[ $device_type == " iPod2,1" ]]; then
4837- case $device_target_vers in
4838- 4.2.1 | 4.1 | 3.1.3 ) : ;;
4839- * ) ipsw_prepare_patchcomp LLB;;
4840- esac
4841- else # 3GS
4842- case $device_target_vers in
4843- 6.1.6 | 4.1 ) : ;;
4844- 3.0* )
4845- ipsw_prepare_patchcomp LLB
4846- log " Patch Kernelcache"
4847- unzip -o -j " $ipsw_path .ipsw" kernelcache.release.s5l8920x
4848- mv kernelcache.release.s5l8920x kernelcache.orig
4849- $bspatch kernelcache.orig kernelcache.release.s5l8920x ../resources/firmware/FirmwareBundles/Down_iPhone2,1_${device_target_vers} _${device_target_build} .bundle/kernelcache.release.patch
4850- zip -r0 temp.ipsw kernelcache.release.s5l8920x
4851- ;;
4852- * )
4853- ipsw_prepare_patchcomp LLB
4854- local ExtraArgs3=" $device_bootargs_default "
4855- if [[ $ipsw_verbose == 1 ]]; then
4856- ExtraArgs3=" pio-error=0 -v"
4857- fi
4858- if [[ $device_target_vers == " 3" * ]]; then
4859- ExtraArgs3+=" amfi=0xff cs_enforcement_disable=1"
4860- fi
4861- local path=" Firmware/all_flash/all_flash.${device_model} ap.production"
4862- local name=" iBoot.${device_model} ap.RELEASE.img3"
4863- patch_iboot -b " $ExtraArgs3 "
4864- mkdir -p $path
4865- mv $name $path /$name
4866- zip -r0 temp.ipsw $path /$name
4867- ;;
4868- esac
4836+ if [[ $device_type == " iPod2,1" && $device_newbr == 0 && $device_target_vers == " 3.1.3" ]]; then
4837+ ipsw_prepare_patchcomp LLB
4838+ mv temp.ipsw " $ipsw_custom .ipsw"
4839+ return
48694840 fi
4841+
4842+ # 3GS
4843+ case $device_target_vers in
4844+ 6.1.6 | 4.1 ) : ;;
4845+ 3.0* )
4846+ ipsw_prepare_patchcomp LLB
4847+ log " Patch Kernelcache"
4848+ unzip -o -j " $ipsw_path .ipsw" kernelcache.release.s5l8920x
4849+ mv kernelcache.release.s5l8920x kernelcache.orig
4850+ $bspatch kernelcache.orig kernelcache.release.s5l8920x ../resources/firmware/FirmwareBundles/Down_iPhone2,1_${device_target_vers} _${device_target_build} .bundle/kernelcache.release.patch
4851+ zip -r0 temp.ipsw kernelcache.release.s5l8920x
4852+ ;;
4853+ * )
4854+ ipsw_prepare_patchcomp LLB
4855+ local ExtraArgs3=" $device_bootargs_default "
4856+ if [[ $ipsw_verbose == 1 ]]; then
4857+ ExtraArgs3=" pio-error=0 -v"
4858+ fi
4859+ if [[ $device_target_vers == " 3" * ]]; then
4860+ ExtraArgs3+=" amfi=0xff cs_enforcement_disable=1"
4861+ fi
4862+ local path=" Firmware/all_flash/all_flash.${device_model} ap.production"
4863+ local name=" iBoot.${device_model} ap.RELEASE.img3"
4864+ patch_iboot -b " $ExtraArgs3 "
4865+ mkdir -p $path
4866+ mv $name $path /$name
4867+ zip -r0 temp.ipsw $path /$name
4868+ ;;
4869+ esac
48704870 mv temp.ipsw " $ipsw_custom .ipsw"
48714871}
48724872
@@ -7587,7 +7587,8 @@ menu_ipsw() {
75877587 if [[ $device_target_vers != " 3.0" * ]]; then
75887588 ipsw_canhacktivate=1
75897589 fi
7590- if [[ $device_type == " iPhone2,1" && $1 != " 4.1" ]]; then
7590+ if [[ $device_type == " iPhone2,1" && $1 != " 4.1" ]] ||
7591+ [[ $device_type == " iPod2,1" && $device_newbr == 0 && $1 == " 3.1.3" ]]; then
75917592 ipsw_cancustomlogo=1
75927593 fi
75937594 ;;
@@ -8029,6 +8030,9 @@ ipsw_custom_set() {
80298030 ipsw_customlogo2=1
80308031 fi
80318032 fi
8033+ if [[ $device_type == " iPod2,1" && $device_newbr == 0 && $device_target_vers == " 3.1.3" ]]; then
8034+ ipsw_custom+=" O"
8035+ fi
80328036 if [[ $device_target_powder == 1 ]]; then
80338037 ipsw_custom+=" P"
80348038 if [[ $device_base_vers == " 7.0" * ]]; then
0 commit comments