mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2025-01-12 08:19:13 +01:00
Some updates to menu and ramdisk
- get url from ipsw.me api for ramdisk build url as fallback - add device_get_info in while loop - show "create ipsw" option without selecting shsh blobs (except for ios 4 dra)
This commit is contained in:
parent
8a2ac1e935
commit
accadccd28
24
restore.sh
24
restore.sh
@ -2226,6 +2226,7 @@ device_ramdisk4() {
|
|||||||
local iv
|
local iv
|
||||||
local key
|
local key
|
||||||
local path
|
local path
|
||||||
|
local url
|
||||||
|
|
||||||
case $device_type in
|
case $device_type in
|
||||||
iPhone5,3 ) device_target_build="11B511";;
|
iPhone5,3 ) device_target_build="11B511";;
|
||||||
@ -2236,6 +2237,11 @@ device_ramdisk4() {
|
|||||||
device_target_build=$device_ramdisk_build
|
device_target_build=$device_ramdisk_build
|
||||||
fi
|
fi
|
||||||
device_fw_key_check
|
device_fw_key_check
|
||||||
|
url=$(cat "$device_fw_dir/$device_target_build/url" 2>/dev/null)
|
||||||
|
if [[ -z $url ]]; then
|
||||||
|
log "Getting URL for $device_type-$build"
|
||||||
|
url=$(curl https://api.ipsw.me/v2.1/$device_type/$device_target_build/url)
|
||||||
|
fi
|
||||||
mkdir ../saved/$device_type/ramdisk 2>/dev/null
|
mkdir ../saved/$device_type/ramdisk 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')
|
||||||
@ -2251,7 +2257,7 @@ device_ramdisk4() {
|
|||||||
if [[ -e ../saved/$device_type/ramdisk/$name ]]; then
|
if [[ -e ../saved/$device_type/ramdisk/$name ]]; then
|
||||||
cp ../saved/$device_type/ramdisk/$name .
|
cp ../saved/$device_type/ramdisk/$name .
|
||||||
else
|
else
|
||||||
"$dir/partialzip" $(cat "$device_fw_dir/$device_target_build/url") "${path}$name" "$name"
|
"$dir/partialzip" "$url" "${path}$name" "$name"
|
||||||
cp $name ../saved/$device_type/ramdisk/
|
cp $name ../saved/$device_type/ramdisk/
|
||||||
fi
|
fi
|
||||||
mv $name $getcomp.orig
|
mv $name $getcomp.orig
|
||||||
@ -2291,9 +2297,7 @@ device_ramdisk4() {
|
|||||||
$irecovery -c ramdisk
|
$irecovery -c ramdisk
|
||||||
$irecovery -f ../saved/$device_type/ramdisk/Kernelcache.dec
|
$irecovery -f ../saved/$device_type/ramdisk/Kernelcache.dec
|
||||||
$irecovery -c bootx
|
$irecovery -c bootx
|
||||||
sleep 10
|
sleep 20
|
||||||
print "* Unplug and replug your device"
|
|
||||||
sleep 10
|
|
||||||
|
|
||||||
if [[ $1 == "nvram" ]]; then
|
if [[ $1 == "nvram" ]]; then
|
||||||
log "Running iproxy for SSH..."
|
log "Running iproxy for SSH..."
|
||||||
@ -2680,11 +2684,12 @@ menu_ipsw() {
|
|||||||
echo
|
echo
|
||||||
if [[ -n $shsh_path ]]; then
|
if [[ -n $shsh_path ]]; then
|
||||||
print "* Selected Base $text2 SHSH: $shsh_path"
|
print "* Selected Base $text2 SHSH: $shsh_path"
|
||||||
else
|
elif [[ $2 != "ipsw" ]]; then
|
||||||
print "* Select Base $text2 SHSH to continue"
|
print "* Select Base $text2 SHSH to continue"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n $ipsw_path && -n $ipsw_base_path && -n $shsh_path ]]; then
|
if [[ -n $ipsw_path && -n $ipsw_base_path && -n $shsh_path ]] ||
|
||||||
|
[[ -n $ipsw_path && -n $ipsw_base_path && $device_target_vers != "4"* && $2 == "ipsw" ]]; then
|
||||||
menu_items+=("$start")
|
menu_items+=("$start")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2700,10 +2705,11 @@ menu_ipsw() {
|
|||||||
echo
|
echo
|
||||||
if [[ -n $shsh_path ]]; then
|
if [[ -n $shsh_path ]]; then
|
||||||
print "* Selected Target SHSH: $shsh_path"
|
print "* Selected Target SHSH: $shsh_path"
|
||||||
else
|
elif [[ $2 != "ipsw" ]]; then
|
||||||
print "* Select Target SHSH to continue"
|
print "* Select Target SHSH to continue"
|
||||||
fi
|
fi
|
||||||
if [[ -n $ipsw_path && -n $shsh_path ]]; then
|
if [[ -n $ipsw_path && -n $shsh_path ]] ||
|
||||||
|
[[ -n $ipsw_path && $2 == "ipsw" ]]; then
|
||||||
menu_items+=("$start")
|
menu_items+=("$start")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2952,10 +2958,10 @@ main() {
|
|||||||
install_depends
|
install_depends
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
while [[ $mode != "exit" ]]; do
|
||||||
device_get_info
|
device_get_info
|
||||||
mkdir -p ../saved/baseband ../saved/$device_type ../saved/shsh
|
mkdir -p ../saved/baseband ../saved/$device_type ../saved/shsh
|
||||||
|
|
||||||
while [[ $mode != "exit" ]]; do
|
|
||||||
mode=
|
mode=
|
||||||
if [[ -z $mode ]]; then
|
if [[ -z $mode ]]; then
|
||||||
menu_main
|
menu_main
|
||||||
|
Loading…
x
Reference in New Issue
Block a user