mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-12-02 12:54:18 +01:00
Update restore.sh
This commit is contained in:
parent
dec59be30e
commit
736e605342
30
restore.sh
30
restore.sh
@ -3513,34 +3513,26 @@ ipsw_prepare_custom() {
|
|||||||
elif [[ $device_type == "iPhone1,1" && $ipsw_hacktivate == 1 ]]; then
|
elif [[ $device_type == "iPhone1,1" && $ipsw_hacktivate == 1 ]]; then
|
||||||
sha1E="f642829875ce632cd071e62169a1acbdcffcf0c8"
|
sha1E="f642829875ce632cd071e62169a1acbdcffcf0c8"
|
||||||
ipsw_url="https://github.com/LukeZGD/Legacy-iOS-Kit-Keys/releases/download/jailbreak/iPhone1.1_3.1.3_7E18_Custom_Hacktivate.ipsw"
|
ipsw_url="https://github.com/LukeZGD/Legacy-iOS-Kit-Keys/releases/download/jailbreak/iPhone1.1_3.1.3_7E18_Custom_Hacktivate.ipsw"
|
||||||
ipsw_sha1="f642829875ce632cd071e62169a1acbdcffcf0c8"
|
|
||||||
elif [[ $device_type == "iPhone1,1" ]]; then
|
elif [[ $device_type == "iPhone1,1" ]]; then
|
||||||
sha1E="7b3dd17c48c139dc827696284736d3c37d8fb7ac"
|
sha1E="7b3dd17c48c139dc827696284736d3c37d8fb7ac"
|
||||||
ipsw_url="https://github.com/LukeZGD/Legacy-iOS-Kit-Keys/releases/download/jailbreak/iPhone1.1_3.1.3_7E18_Custom.ipsw"
|
ipsw_url="https://github.com/LukeZGD/Legacy-iOS-Kit-Keys/releases/download/jailbreak/iPhone1.1_3.1.3_7E18_Custom.ipsw"
|
||||||
ipsw_sha1="7b3dd17c48c139dc827696284736d3c37d8fb7ac"
|
|
||||||
elif [[ $device_type == "iPod1,1" ]]; then
|
elif [[ $device_type == "iPod1,1" ]]; then
|
||||||
sha1E="f76cd3d4deaf82587dc758c6fbe724c31c9b6de2"
|
sha1E="f76cd3d4deaf82587dc758c6fbe724c31c9b6de2"
|
||||||
ipsw_url="https://github.com/LukeZGD/Legacy-iOS-Kit-Keys/releases/download/jailbreak/iPod1.1_3.1.3_7E18_Custom.ipsw"
|
ipsw_url="https://github.com/LukeZGD/Legacy-iOS-Kit-Keys/releases/download/jailbreak/iPod1.1_3.1.3_7E18_Custom.ipsw"
|
||||||
ipsw_sha1="f76cd3d4deaf82587dc758c6fbe724c31c9b6de2"
|
|
||||||
fi
|
fi
|
||||||
if [[ $device_type == "iPhone1,2" && -e "$ipsw_custom.ipsw" ]]; then
|
if [[ $device_type == "iPhone1,2" && -e "$ipsw_custom.ipsw" ]]; then
|
||||||
log "Checking RestoreRamdisk hash of custom IPSW"
|
log "Checking RestoreRamdisk hash of custom IPSW"
|
||||||
unzip -o -j "$ipsw_custom.ipsw" $rname
|
unzip -o -j "$ipsw_custom.ipsw" $rname
|
||||||
local sha1L="$($sha1sum $rname | awk '{print $1}')"
|
sha1L="$($sha1sum $rname | awk '{print $1}')"
|
||||||
if [[ $sha1L == "$sha1E" ]]; then
|
|
||||||
log "Found existing Custom IPSW. Skipping IPSW creation."
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
log "RestoreRamdisk does not match. Expected $sha1E, got $sha1L"
|
|
||||||
elif [[ -e "$ipsw_custom.ipsw" ]]; then
|
elif [[ -e "$ipsw_custom.ipsw" ]]; then
|
||||||
log "Getting SHA1 hash for $ipsw_custom.ipsw..."
|
log "Getting SHA1 hash for $ipsw_custom.ipsw..."
|
||||||
sha1E=$($sha1sum "$ipsw_custom.ipsw" | awk '{print $1}')
|
sha1L=$($sha1sum "$ipsw_custom.ipsw" | awk '{print $1}')
|
||||||
if [[ $sha1E == "$ipsw_sha1" ]]; then
|
fi
|
||||||
log "Found existing Custom IPSW. Skipping IPSW creation."
|
if [[ $sha1L == "$sha1E" ]]; then
|
||||||
return
|
log "Found existing Custom IPSW. Skipping IPSW creation."
|
||||||
else
|
return
|
||||||
log "Verifying IPSW failed. Expected $sha1E, got $sha1L"
|
else
|
||||||
fi
|
log "Verifying IPSW failed. Expected $sha1E, got $sha1L"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "Deleting custom IPSW if it exists"
|
log "Deleting custom IPSW if it exists"
|
||||||
@ -3550,10 +3542,10 @@ ipsw_prepare_custom() {
|
|||||||
log "Downloading IPSW: $ipsw_url"
|
log "Downloading IPSW: $ipsw_url"
|
||||||
curl -L "$ipsw_url" -o temp.ipsw
|
curl -L "$ipsw_url" -o temp.ipsw
|
||||||
log "Getting SHA1 hash for IPSW..."
|
log "Getting SHA1 hash for IPSW..."
|
||||||
local ipsw_sha1l=$($sha1sum temp.ipsw | awk '{print $1}')
|
sha1L=$($sha1sum temp.ipsw | awk '{print $1}')
|
||||||
if [[ $ipsw_sha1l != "$ipsw_sha1" ]]; then
|
if [[ $sha1L != "$sha1E" ]]; then
|
||||||
error "Verifying IPSW failed. The IPSW may be corrupted or incomplete. Please run the script again" \
|
error "Verifying IPSW failed. The IPSW may be corrupted or incomplete. Please run the script again" \
|
||||||
"* SHA1sum mismatch. Expected $ipsw_sha1, got $ipsw_sha1l"
|
"* SHA1sum mismatch. Expected $sha1E, got $sha1L"
|
||||||
fi
|
fi
|
||||||
mv temp.ipsw "$ipsw_custom.ipsw"
|
mv temp.ipsw "$ipsw_custom.ipsw"
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user