Skip to content

Commit 0994e19

Browse files
committed
find recovery/dfu instead of just recovery, only if timeout is 50
1 parent c022af0 commit 0994e19

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

restore.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ device_find_mode() {
14031403
if [[ $platform == "linux" ]]; then
14041404
device_in=$(lsusb | grep -c "05ac:$usb")
14051405
fi
1406-
if [[ $mode == "Recovery" && $device_proc != 1 ]]; then
1406+
if [[ $mode == "Recovery" && $timeout == 50 ]]; then # find recovery/dfu instead of just recovery, only if timeout is 50
14071407
mode2="$($irecovery -q 2>/dev/null | grep -w "MODE" | cut -c 7-)"
14081408
if [[ -n $mode2 ]]; then
14091409
device_in=1
@@ -1658,7 +1658,7 @@ device_enter_mode() {
16581658
fi
16591659
fi
16601660
log "Entering recovery mode..."
1661-
print "* If the device does not enter recovery mode automatically, press Ctrl+C to cancel and try putting the device in DFU/Recovery mode manually"
1661+
print "* If the device does not enter recovery mode automatically, try putting the device in Recovery/DFU mode manually. You may also press Ctrl+C to cancel"
16621662
"$dir/ideviceenterrecovery" "$device_udid" >/dev/null
16631663
device_find_mode Recovery 50
16641664
fi

0 commit comments

Comments
 (0)