Skip to content

Commit

Permalink
skip first flag in menu
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeZGD committed Jul 17, 2024
1 parent 2d93432 commit dc9c84d
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3566,6 +3566,10 @@ ipsw_prepare_ios4multipart() {
zip -r0 ../../$ipsw_custom_part2.ipsw *
popd >/dev/null

if [[ $ipsw_skip_first == 1 ]]; then
return
fi

# ------ part 2 (nor flash) ends here. start creating part 1 ipsw ------
case $device_target_vers in
4.2* ) ipsw_prepare_32bit $iboot;;
Expand Down Expand Up @@ -7360,9 +7364,10 @@ menu_flags() {
menu_items+=("Enable skip-ibss flag")
fi
menu_items+=("Enable jailbreak flag")
if [[ $device_proc != 6 ]]; then
menu_items+=("Enable gasgauge-patch flag")
fi
case $device_type in
iPhone4,1 ) menu_items+=("Enable gasgauge-patch flag");;
iPhone3,[13] | iPad1,1 | iPod3,1 ) menu_items+=("Enable skip-first flag");;
esac
menu_items+=("Go Back")
menu_print_info
print " > Main Menu > Other Utilities > Enable Flags"
Expand Down Expand Up @@ -7434,6 +7439,17 @@ menu_flags() {
back=1
fi
;;
"Enable skip-first flag" )
warn "This will enable the --skip-first flag."
print "* This will skip first restore and flash NOR IPSW only for powdersn0w 4.2.1 and lower."
print "* Do not enable this if you do not know what you are doing."
local opt
read -p "$(input 'Do you want to enable the skip-ibss flag? (y/N): ')" opt
if [[ $opt == 'y' || $opt == 'Y' ]]; then
ipsw_skip_first=1
back=1
fi
;;
"Go Back" ) back=1;;
esac
done
Expand Down

0 comments on commit dc9c84d

Please sign in to comment.