mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2025-06-03 04:34:57 +02:00
More 3GS fixes
This commit is contained in:
parent
ae185857fa
commit
647b1b36f4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
resources/firmware/iPhone2,1/8F190/url
Normal file
1
resources/firmware/iPhone2,1/8F190/url
Normal file
@ -0,0 +1 @@
|
|||||||
|
http://appldnld.apple.com/iPhone4/041-0328.20110311.Lkhy6/iPhone2,1_4.3_8F190_Restore.ipsw
|
1
resources/firmware/iPhone2,1/8G4/url
Normal file
1
resources/firmware/iPhone2,1/8G4/url
Normal file
@ -0,0 +1 @@
|
|||||||
|
http://appldnld.apple.com/iPhone4/041-0549.20110325.ZxP8u/iPhone2,1_4.3.1_8G4_Restore.ipsw
|
1
resources/firmware/iPhone2,1/8H7/url
Normal file
1
resources/firmware/iPhone2,1/8H7/url
Normal file
@ -0,0 +1 @@
|
|||||||
|
http://appldnld.apple.com/iPhone4/041-0660.20110414.Gwed5/iPhone2,1_4.3.2_8H7_Restore.ipsw
|
1
resources/firmware/iPhone2,1/8K2/url
Normal file
1
resources/firmware/iPhone2,1/8K2/url
Normal file
@ -0,0 +1 @@
|
|||||||
|
http://appldnld.apple.com/iPhone4/041-1921.20110715.ItuLh/iPhone2,1_4.3.4_8K2_Restore.ipsw
|
1
resources/firmware/iPhone2,1/8L1/index.html
vendored
Normal file
1
resources/firmware/iPhone2,1/8L1/index.html
vendored
Normal file
File diff suppressed because one or more lines are too long
1
resources/firmware/iPhone2,1/8L1/sha1sum
Normal file
1
resources/firmware/iPhone2,1/8L1/sha1sum
Normal file
@ -0,0 +1 @@
|
|||||||
|
80119c009590066dc093ccaeafc9056c05fb73ff
|
67
restore.sh
67
restore.sh
@ -1544,11 +1544,10 @@ device_fw_key_check() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
download_comp() {
|
ipsw_get_url() {
|
||||||
# usage: download_comp [build_id] [comp]
|
|
||||||
local build_id="$1"
|
local build_id="$1"
|
||||||
local comp="$2"
|
local url="$(cat "$device_fw_dir/$build_id/url" 2>/dev/null)"
|
||||||
local url="$(cat "$device_fw_dir/$build_id/url")"
|
ipsw_url=
|
||||||
if [[ $(echo "$url" | grep -c '<') != 0 ]]; then
|
if [[ $(echo "$url" | grep -c '<') != 0 ]]; then
|
||||||
rm "$device_fw_dir/$build_id/url"
|
rm "$device_fw_dir/$build_id/url"
|
||||||
url=
|
url=
|
||||||
@ -1562,6 +1561,14 @@ download_comp() {
|
|||||||
mkdir $device_fw_dir/$build_id 2>/dev/null
|
mkdir $device_fw_dir/$build_id 2>/dev/null
|
||||||
echo "$url" > $device_fw_dir/$build_id/url
|
echo "$url" > $device_fw_dir/$build_id/url
|
||||||
fi
|
fi
|
||||||
|
ipsw_url="$url"
|
||||||
|
}
|
||||||
|
|
||||||
|
download_comp() {
|
||||||
|
# usage: download_comp [build_id] [comp]
|
||||||
|
local build_id="$1"
|
||||||
|
local comp="$2"
|
||||||
|
ipsw_get_url $build_id
|
||||||
download_targetfile="$comp.$device_model"
|
download_targetfile="$comp.$device_model"
|
||||||
if [[ $build_id != "12"* ]]; then
|
if [[ $build_id != "12"* ]]; then
|
||||||
download_targetfile+="ap"
|
download_targetfile+="ap"
|
||||||
@ -1572,7 +1579,7 @@ download_comp() {
|
|||||||
cp "../saved/$device_type/${comp}_$build_id.dfu" ${comp}
|
cp "../saved/$device_type/${comp}_$build_id.dfu" ${comp}
|
||||||
else
|
else
|
||||||
log "Downloading ${comp}..."
|
log "Downloading ${comp}..."
|
||||||
"$dir/pzb" -g "Firmware/dfu/$download_targetfile.dfu" -o ${comp} "$url"
|
"$dir/pzb" -g "Firmware/dfu/$download_targetfile.dfu" -o ${comp} "$ipsw_url"
|
||||||
cp ${comp} "../saved/$device_type/${comp}_$build_id.dfu"
|
cp ${comp} "../saved/$device_type/${comp}_$build_id.dfu"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -1835,11 +1842,12 @@ ipsw_download() {
|
|||||||
local version="$device_target_vers"
|
local version="$device_target_vers"
|
||||||
local build_id="$device_target_build"
|
local build_id="$device_target_build"
|
||||||
local ipsw_dl="$1"
|
local ipsw_dl="$1"
|
||||||
|
ipsw_get_url $build_id
|
||||||
if [[ ! -e "$ipsw_dl.ipsw" ]]; then
|
if [[ ! -e "$ipsw_dl.ipsw" ]]; then
|
||||||
print "* The script will now proceed to download iOS $version IPSW."
|
print "* The script will now proceed to download iOS $version IPSW."
|
||||||
print "* If you want to download it yourself, here is the link: $(cat $device_fw_dir/$build_id/url)"
|
print "* If you want to download it yourself, here is the link: $ipsw_url"
|
||||||
log "Downloading IPSW... (Press Ctrl+C to cancel)"
|
log "Downloading IPSW... (Press Ctrl+C to cancel)"
|
||||||
curl -L "$(cat $device_fw_dir/$build_id/url)" -o temp.ipsw
|
curl -L "$ipsw_url" -o temp.ipsw
|
||||||
mv temp.ipsw "$ipsw_dl.ipsw"
|
mv temp.ipsw "$ipsw_dl.ipsw"
|
||||||
fi
|
fi
|
||||||
ipsw_verify "$ipsw_dl" "$build_id"
|
ipsw_verify "$ipsw_dl" "$build_id"
|
||||||
@ -2383,7 +2391,10 @@ ipsw_prepare_bundle() {
|
|||||||
[457]* ) ipsw_prepare_keys RestoreKernelCache $1;;
|
[457]* ) ipsw_prepare_keys RestoreKernelCache $1;;
|
||||||
* ) ipsw_prepare_keys KernelCache $1;;
|
* ) ipsw_prepare_keys KernelCache $1;;
|
||||||
esac
|
esac
|
||||||
elif [[ $1 == "old" ]]; then
|
else
|
||||||
|
ipsw_prepare_keys RestoreKernelCache $1
|
||||||
|
fi
|
||||||
|
if [[ $1 == "old" ]]; then
|
||||||
if [[ $device_type == "iPod2,1" ]]; then
|
if [[ $device_type == "iPod2,1" ]]; then
|
||||||
case $device_target_vers in
|
case $device_target_vers in
|
||||||
4.2.1 | 4.1 | 3.1.3 ) :;;
|
4.2.1 | 4.1 | 3.1.3 ) :;;
|
||||||
@ -2406,8 +2417,6 @@ ipsw_prepare_bundle() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
ipsw_prepare_keys RestoreKernelCache $1
|
|
||||||
fi
|
fi
|
||||||
echo "</dict>" >> $NewPlist
|
echo "</dict>" >> $NewPlist
|
||||||
fi
|
fi
|
||||||
@ -3701,20 +3710,7 @@ device_ramdisk64() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
device_fw_key_check
|
device_fw_key_check
|
||||||
url=$(cat "$device_fw_dir/$build_id/url" 2>/dev/null)
|
ipsw_get_url $build_id
|
||||||
if [[ $(echo "$url" | grep -c '<') != 0 ]]; then
|
|
||||||
rm "$device_fw_dir/$build_id/url"
|
|
||||||
url=
|
|
||||||
fi
|
|
||||||
if [[ -z $url ]]; then
|
|
||||||
log "Getting URL for $device_type-$build_id"
|
|
||||||
url="$(curl "https://api.ipsw.me/v4/ipsw/$device_type/$build_id" | $jq -j ".url")"
|
|
||||||
if [[ $(echo "$url" | grep -c '<') != 0 ]]; then
|
|
||||||
url="$(curl "https://api.ipsw.me/v4/device/$device_type?type=ipsw" | $jq -j ".firmwares[] | select(.buildid == \"$build_id\") | .url")"
|
|
||||||
fi
|
|
||||||
mkdir $device_fw_dir/$build_id 2>/dev/null
|
|
||||||
echo "$url" > $device_fw_dir/$build_id/url
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir $ramdisk_path 2>/dev/null
|
mkdir $ramdisk_path 2>/dev/null
|
||||||
for getcomp in "${comps[@]}"; do
|
for getcomp in "${comps[@]}"; do
|
||||||
@ -3748,7 +3744,7 @@ device_ramdisk64() {
|
|||||||
if [[ -e $ramdisk_path/$name ]]; then
|
if [[ -e $ramdisk_path/$name ]]; then
|
||||||
cp $ramdisk_path/$name .
|
cp $ramdisk_path/$name .
|
||||||
else
|
else
|
||||||
"$dir/pzb" -g "${path}$name" -o "$name" "$url"
|
"$dir/pzb" -g "${path}$name" -o "$name" "$ipsw_url"
|
||||||
cp $name $ramdisk_path/
|
cp $name $ramdisk_path/
|
||||||
fi
|
fi
|
||||||
mv $name $getcomp.orig
|
mv $name $getcomp.orig
|
||||||
@ -3839,20 +3835,7 @@ device_ramdisk() {
|
|||||||
build_id=$device_target_build
|
build_id=$device_target_build
|
||||||
ramdisk_path="../saved/$device_type/ramdisk_$build_id"
|
ramdisk_path="../saved/$device_type/ramdisk_$build_id"
|
||||||
device_fw_key_check
|
device_fw_key_check
|
||||||
url=$(cat "$device_fw_dir/$build_id/url" 2>/dev/null)
|
ipsw_get_url $build_id
|
||||||
if [[ $(echo "$url" | grep -c '<') != 0 ]]; then
|
|
||||||
rm "$device_fw_dir/$build_id/url"
|
|
||||||
url=
|
|
||||||
fi
|
|
||||||
if [[ -z $url ]]; then
|
|
||||||
log "Getting URL for $device_type-$build_id"
|
|
||||||
url="$(curl "https://api.ipsw.me/v4/ipsw/$device_type/$build_id" | $jq -j ".url")"
|
|
||||||
if [[ $(echo "$url" | grep -c '<') != 0 ]]; then
|
|
||||||
url="$(curl "https://api.ipsw.me/v4/device/$device_type?type=ipsw" | $jq -j ".firmwares[] | select(.buildid == \"$build_id\") | .url")"
|
|
||||||
fi
|
|
||||||
mkdir $device_fw_dir/$build_id 2>/dev/null
|
|
||||||
echo "$url" > $device_fw_dir/$build_id/url
|
|
||||||
fi
|
|
||||||
mkdir $ramdisk_path 2>/dev/null
|
mkdir $ramdisk_path 2>/dev/null
|
||||||
for getcomp in "${comps[@]}"; do
|
for getcomp in "${comps[@]}"; do
|
||||||
name=$(echo $device_fw_key | $jq -j '.keys[] | select(.image | startswith("'$getcomp'")) | .filename')
|
name=$(echo $device_fw_key | $jq -j '.keys[] | select(.image | startswith("'$getcomp'")) | .filename')
|
||||||
@ -3892,7 +3875,7 @@ device_ramdisk() {
|
|||||||
if [[ -e $ramdisk_path/$name ]]; then
|
if [[ -e $ramdisk_path/$name ]]; then
|
||||||
cp $ramdisk_path/$name .
|
cp $ramdisk_path/$name .
|
||||||
else
|
else
|
||||||
"$dir/pzb" -g "${path}$name" -o "$name" "$url"
|
"$dir/pzb" -g "${path}$name" -o "$name" "$ipsw_url"
|
||||||
cp $name $ramdisk_path/
|
cp $name $ramdisk_path/
|
||||||
fi
|
fi
|
||||||
mv $name $getcomp.orig
|
mv $name $getcomp.orig
|
||||||
@ -4701,7 +4684,7 @@ menu_restore_more() {
|
|||||||
case $device_type in
|
case $device_type in
|
||||||
iPhone2,1 )
|
iPhone2,1 )
|
||||||
menu_items+=("6.1.3" "6.1.2" "6.1" "6.0.1" "6.0" "5.1" "5.0.1" "5.0")
|
menu_items+=("6.1.3" "6.1.2" "6.1" "6.0.1" "6.0" "5.1" "5.0.1" "5.0")
|
||||||
#menu_items+=("4.3.5" "4.3.4" "4.3.2" "4.3.1" "4.3")
|
menu_items+=("4.3.5" "4.3.4" "4.3.2" "4.3.1" "4.3")
|
||||||
menu_items+=("4.2.1" "4.0.2" "4.0.1" "4.0" "3.1.2" "3.1" "3.0")
|
menu_items+=("4.2.1" "4.0.2" "4.0.1" "4.0" "3.1.2" "3.1" "3.0")
|
||||||
;;
|
;;
|
||||||
iPod2,1 ) menu_items+=("4.0.2" "4.0");;
|
iPod2,1 ) menu_items+=("4.0.2" "4.0");;
|
||||||
@ -5474,7 +5457,7 @@ device_activate() {
|
|||||||
if (( device_proc <= 4 )) && [[ $device_type == "iPhone"* ]]; then
|
if (( device_proc <= 4 )) && [[ $device_type == "iPhone"* ]]; then
|
||||||
print "* For iPhone 4 and older devices, make sure to have a valid SIM card."
|
print "* For iPhone 4 and older devices, make sure to have a valid SIM card."
|
||||||
if [[ $device_type == "iPhone1"* || $device_type == "iPhone2,1" ]]; then
|
if [[ $device_type == "iPhone1"* || $device_type == "iPhone2,1" ]]; then
|
||||||
print "* For hacktivation, go to Restore/Downgrade instead."
|
print "* For hacktivation, go to \"Restore/Downgrade\" or \"Hacktivate Device\" instead."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
$ideviceactivation activate
|
$ideviceactivation activate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user