mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-12-29 17:51:48 +01:00
More fixes
This commit is contained in:
parent
ee263637e0
commit
eeae47b1a7
24
restore.sh
24
restore.sh
@ -963,6 +963,7 @@ device_get_info() {
|
|||||||
[[ -z $device_type ]] && device_type=$($ideviceinfo -k ProductType)
|
[[ -z $device_type ]] && device_type=$($ideviceinfo -k ProductType)
|
||||||
device_ecid=$($ideviceinfo -s -k UniqueChipID)
|
device_ecid=$($ideviceinfo -s -k UniqueChipID)
|
||||||
fi
|
fi
|
||||||
|
if [[ $main_argmode != "device_enter_ramdisk"* ]]; then
|
||||||
device_model=$($ideviceinfo -s -k HardwareModel)
|
device_model=$($ideviceinfo -s -k HardwareModel)
|
||||||
device_vers=$($ideviceinfo -s -k ProductVersion)
|
device_vers=$($ideviceinfo -s -k ProductVersion)
|
||||||
device_det=$(echo "$device_vers" | cut -c 1)
|
device_det=$(echo "$device_vers" | cut -c 1)
|
||||||
@ -976,6 +977,7 @@ device_get_info() {
|
|||||||
device_serial="$($ideviceinfo -k SerialNumber | cut -c 3- | cut -c -3)"
|
device_serial="$($ideviceinfo -k SerialNumber | cut -c 3- | cut -c -3)"
|
||||||
fi
|
fi
|
||||||
device_unactivated=$($ideviceactivation state | grep -c "Unactivated")
|
device_unactivated=$($ideviceactivation state | grep -c "Unactivated")
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -1268,7 +1270,7 @@ device_find_mode() {
|
|||||||
while (( i < timeout )); do
|
while (( i < timeout )); do
|
||||||
if [[ $mode == "Restore" ]]; then
|
if [[ $mode == "Restore" ]]; then
|
||||||
if [[ $platform == "macos" ]]; then
|
if [[ $platform == "macos" ]]; then
|
||||||
opt="$(system_profiler SPUSBDataType 2> /dev/null | grep -B1 'Vendor ID: 0x05ac' | grep 'Product ID:' | cut -dx -f2 | cut -d' ' -f1 | tail -r)"
|
opt="$(system_profiler SPUSBDataType 2> /dev/null | grep -B1 'Vendor ID: 0x05ac' | grep 'Product ID:' | cut -dx -f2 | cut -d' ' -f1 | tail -r | head -n 1)"
|
||||||
elif [[ $platform == "linux" ]]; then
|
elif [[ $platform == "linux" ]]; then
|
||||||
opt="$(lsusb | cut -d' ' -f6 | grep '05ac:' | cut -d: -f2)"
|
opt="$(lsusb | cut -d' ' -f6 | grep '05ac:' | cut -d: -f2)"
|
||||||
fi
|
fi
|
||||||
@ -2289,11 +2291,19 @@ ipsw_preference_set() {
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case $device_type in
|
||||||
|
iPad[23],[23] | "$device_disable_bbupdate" ) ipsw_nskip=1;;
|
||||||
|
esac
|
||||||
|
if [[ $device_target_vers == "4.2"* || $device_target_vers == "4.3"* || $ipsw_gasgauge_patch == 1 ]] ||
|
||||||
|
[[ $platform == "macos" && $platform_arch == "arm64" ]]; then
|
||||||
|
ipsw_nskip=1
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $device_target_powder == 1 ]]; then
|
if [[ $device_target_powder == 1 ]]; then
|
||||||
case $device_target_vers in
|
case $device_target_vers in
|
||||||
[98]* ) ipsw_canjailbreak=1;;
|
[98]* ) ipsw_canjailbreak=1;;
|
||||||
esac
|
esac
|
||||||
elif [[ $device_target_other == 1 && $ipsw_canjailbreak != 1 ]]; then
|
elif [[ $device_target_other == 1 && $ipsw_canjailbreak != 1 && $ipsw_nskip != 1 ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2364,14 +2374,6 @@ ipsw_preference_set() {
|
|||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $device_type in
|
|
||||||
iPad[23],[23] | "$device_disable_bbupdate" ) ipsw_nskip=1;;
|
|
||||||
esac
|
|
||||||
if [[ $device_target_vers == "4.2"* || $device_target_vers == "4.3"* || $ipsw_gasgauge_patch == 1 ]] ||
|
|
||||||
[[ $platform == "macos" && $platform_arch == "arm64" ]]; then
|
|
||||||
ipsw_nskip=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $device_type in
|
case $device_type in
|
||||||
iPhone2,1 | iPod2,1 ) ipsw_canmemory=1;;
|
iPhone2,1 | iPod2,1 ) ipsw_canmemory=1;;
|
||||||
iPad[23],[23] ) ipsw_canmemory=1;;
|
iPad[23],[23] ) ipsw_canmemory=1;;
|
||||||
@ -6638,7 +6640,7 @@ menu_datamanage() {
|
|||||||
menu_items+=("Backup" "Restore")
|
menu_items+=("Backup" "Restore")
|
||||||
fi
|
fi
|
||||||
if [[ -z $ifuse ]]; then
|
if [[ -z $ifuse ]]; then
|
||||||
warn "ifuse not installed. Mount Device options are not available. Install ifuse in Homebrew/MacPorts or your package manager to fix this"
|
warn "ifuse not installed. Mount Device options are not available. Install ifuse from your package manager to fix this"
|
||||||
else
|
else
|
||||||
menu_items+=("Mount Device" "Mount Device (Raw File System)" "Unmount Device")
|
menu_items+=("Mount Device" "Mount Device (Raw File System)" "Unmount Device")
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user