mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-27 10:24:16 +01:00
Attempt fix 3GS bootrom detection
This commit is contained in:
parent
854c5af1c5
commit
bba456bc25
40
restore.sh
40
restore.sh
@ -497,27 +497,6 @@ device_manufacturing() {
|
||||
return
|
||||
fi
|
||||
if [[ $device_type == "iPhone2,1" && $device_mode != "DFU" ]]; then
|
||||
if (( device_serial >= 946 )) || (( device_serial < 900 )); then
|
||||
device_newbr=1
|
||||
elif (( device_serial >= 940 )); then
|
||||
device_newbr=2 # gray area
|
||||
else
|
||||
device_newbr=0
|
||||
fi
|
||||
elif [[ $device_type == "iPod2,1" && $device_mode == "Recovery" ]]; then
|
||||
device_newbr=2
|
||||
return
|
||||
fi
|
||||
if [[ $device_newbr == 1 ]]; then
|
||||
print "* This $device_type is a new bootrom model"
|
||||
elif [[ $device_newbr == 2 ]]; then
|
||||
print "* This $device_type bootrom model cannot be determined. Enter DFU mode to get bootrom model"
|
||||
elif [[ $device_newbr == 0 ]]; then
|
||||
print "* This $device_type is an old bootrom model"
|
||||
fi
|
||||
if [[ $device_type == "iPhone2,1" && $device_mode == "DFU" ]]; then
|
||||
print "* Cannot check for manufacturing date in DFU mode"
|
||||
elif [[ $device_type == "iPhone2,1" && $device_mode != "DFU" ]]; then
|
||||
local week=$(echo "$device_serial" | cut -c 2-)
|
||||
local year=$(echo "$device_serial" | cut -c 1)
|
||||
case $year in
|
||||
@ -526,6 +505,25 @@ device_manufacturing() {
|
||||
1 ) year="2011";;
|
||||
2 ) year="2012";;
|
||||
esac
|
||||
if [[ $year != "2009" ]] || (( week >= 46 )); then
|
||||
device_newbr=1
|
||||
elif [[ $year == "2009" ]] && (( week >= 40 )); then
|
||||
device_newbr=2 # gray area
|
||||
else
|
||||
device_newbr=0
|
||||
fi
|
||||
elif [[ $device_type == "iPod2,1" && $device_mode == "Recovery" ]]; then
|
||||
device_newbr=2
|
||||
return
|
||||
fi
|
||||
case $device_newbr in
|
||||
0 ) print "* This $device_type is an old bootrom model";;
|
||||
1 ) print "* This $device_type is a new bootrom model";;
|
||||
2 ) print "* This $device_type bootrom model cannot be determined. Enter DFU mode to get bootrom model";;
|
||||
esac
|
||||
if [[ $device_type == "iPhone2,1" && $device_mode == "DFU" ]]; then
|
||||
print "* Cannot check for manufacturing date in DFU mode"
|
||||
elif [[ $device_type == "iPhone2,1" ]]; then
|
||||
print "* Manufactured in Week $week $year"
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user