dfuhelper: check if device is already in DFU mode (#348)

If the user runs it manually, or in some cases while running the script,
the device may be already in DFU, so don't wait around in that case.
This commit is contained in:
alexia authored and GitHub committed 2023-02-05 14:41:47 -05:00
1 parent 7e1c40b6cc
commit b4fd3f4ae5
1 file changed
+5
+5
View File
@@ -268,6 +268,11 @@ _wait() {
dfuhelper_first_try=true
_dfuhelper() {
if [ "$(get_device_mode)" = "dfu" ]; then
echo "[*] Device is already in DFU"
return
fi
local step_one;
deviceid=$( [ -z "$deviceid" ] && _info normal ProductType || echo $deviceid )
if [[ "$1" = 0x801* && "$deviceid" != *"iPad"* ]]; then