@@ -963,19 +963,21 @@ device_get_info() {
963963 [[ -z $device_type ]] && device_type=$( $ideviceinfo -k ProductType)
964964 device_ecid=$( $ideviceinfo -s -k UniqueChipID)
965965 fi
966- device_model=$( $ideviceinfo -s -k HardwareModel)
967- device_vers=$( $ideviceinfo -s -k ProductVersion)
968- device_det=$( echo " $device_vers " | cut -c 1)
969- device_det2=$( echo " $device_vers " | cut -c -2)
970- device_build=$( $ideviceinfo -s -k BuildVersion)
971- device_udid=$( $ideviceinfo -s -k UniqueDeviceID)
972- [[ -z $device_udid ]] && device_udid=$( $ideviceinfo -k UniqueDeviceID)
973- if [[ $device_type == " iPod2,1" ]]; then
974- device_newbr=" $( $ideviceinfo -k ModelNumber | grep -c ' C' ) "
975- elif [[ $device_type == " iPhone2,1" ]]; then
976- device_serial=" $( $ideviceinfo -k SerialNumber | cut -c 3- | cut -c -3) "
966+ if [[ $main_argmode != " device_enter_ramdisk" * ]]; then
967+ device_model=$( $ideviceinfo -s -k HardwareModel)
968+ device_vers=$( $ideviceinfo -s -k ProductVersion)
969+ device_det=$( echo " $device_vers " | cut -c 1)
970+ device_det2=$( echo " $device_vers " | cut -c -2)
971+ device_build=$( $ideviceinfo -s -k BuildVersion)
972+ device_udid=$( $ideviceinfo -s -k UniqueDeviceID)
973+ [[ -z $device_udid ]] && device_udid=$( $ideviceinfo -k UniqueDeviceID)
974+ if [[ $device_type == " iPod2,1" ]]; then
975+ device_newbr=" $( $ideviceinfo -k ModelNumber | grep -c ' C' ) "
976+ elif [[ $device_type == " iPhone2,1" ]]; then
977+ device_serial=" $( $ideviceinfo -k SerialNumber | cut -c 3- | cut -c -3) "
978+ fi
979+ device_unactivated=$( $ideviceactivation state | grep -c " Unactivated" )
977980 fi
978- device_unactivated=$( $ideviceactivation state | grep -c " Unactivated" )
979981 ;;
980982 esac
981983
@@ -1268,7 +1270,7 @@ device_find_mode() {
12681270 while (( i < timeout )) ; do
12691271 if [[ $mode == " Restore" ]]; then
12701272 if [[ $platform == " macos" ]]; then
1271- opt=" $( system_profiler SPUSBDataType 2> /dev/null | grep -B1 ' Vendor ID: 0x05ac' | grep ' Product ID:' | cut -dx -f2 | cut -d' ' -f1 | tail -r) "
1273+ 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 ) "
12721274 elif [[ $platform == " linux" ]]; then
12731275 opt=" $( lsusb | cut -d' ' -f6 | grep ' 05ac:' | cut -d: -f2) "
12741276 fi
@@ -2289,11 +2291,19 @@ ipsw_preference_set() {
22892291 esac
22902292 fi
22912293
2294+ case $device_type in
2295+ iPad[23],[23] | " $device_disable_bbupdate " ) ipsw_nskip=1;;
2296+ esac
2297+ if [[ $device_target_vers == " 4.2" * || $device_target_vers == " 4.3" * || $ipsw_gasgauge_patch == 1 ]] ||
2298+ [[ $platform == " macos" && $platform_arch == " arm64" ]]; then
2299+ ipsw_nskip=1
2300+ fi
2301+
22922302 if [[ $device_target_powder == 1 ]]; then
22932303 case $device_target_vers in
22942304 [98]* ) ipsw_canjailbreak=1;;
22952305 esac
2296- elif [[ $device_target_other == 1 && $ipsw_canjailbreak != 1 ]]; then
2306+ elif [[ $device_target_other == 1 && $ipsw_canjailbreak != 1 && $ipsw_nskip != 1 ]]; then
22972307 return
22982308 fi
22992309
@@ -2364,14 +2374,6 @@ ipsw_preference_set() {
23642374 echo
23652375 fi
23662376
2367- case $device_type in
2368- iPad[23],[23] | " $device_disable_bbupdate " ) ipsw_nskip=1;;
2369- esac
2370- if [[ $device_target_vers == " 4.2" * || $device_target_vers == " 4.3" * || $ipsw_gasgauge_patch == 1 ]] ||
2371- [[ $platform == " macos" && $platform_arch == " arm64" ]]; then
2372- ipsw_nskip=1
2373- fi
2374-
23752377 case $device_type in
23762378 iPhone2,1 | iPod2,1 ) ipsw_canmemory=1;;
23772379 iPad[23],[23] ) ipsw_canmemory=1;;
@@ -6638,7 +6640,7 @@ menu_datamanage() {
66386640 menu_items+=(" Backup" " Restore" )
66396641 fi
66406642 if [[ -z $ifuse ]]; then
6641- warn " ifuse not installed. Mount Device options are not available. Install ifuse in Homebrew/MacPorts or your package manager to fix this"
6643+ warn " ifuse not installed. Mount Device options are not available. Install ifuse from your package manager to fix this"
66426644 else
66436645 menu_items+=(" Mount Device" " Mount Device (Raw File System)" " Unmount Device" )
66446646 fi
0 commit comments