diff options
author | 2025-09-06 00:38:21 +0200 | |
---|---|---|
committer | 2025-09-06 00:38:21 +0200 | |
commit | 5d9bd621eb60cab5303b72b4b35388fb515ffa87 (patch) | |
tree | bdad491ef8090a8409e4a136203108aa4f369885 /src | |
parent | 75fb578c161aea212f6a09714be02ba013a015fb (diff) | |
download | idevicerestore-5d9bd621eb60cab5303b72b4b35388fb515ffa87.tar.gz idevicerestore-5d9bd621eb60cab5303b72b4b35388fb515ffa87.tar.bz2 |
Print message about USB port for macOS restores in case Port DFU fails
Depending on the model, a specific USB Port has to be used for a restore.
When using a different one, Port DFU fails to switch to DFU mode. We use
this fact to print a message with an official link that shows the correct
USB port to use for the restore.
Diffstat (limited to 'src')
-rw-r--r-- | src/idevicerestore.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c index 1465f87..9c41423 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -755,6 +755,7 @@ int idevicerestore_start(struct idevicerestore_client_t* client) plist_dict_copy_item(parameters, build_identity, "USBPortController1,SecurityDomain", NULL); plist_dict_set_item(parameters, "USBPortController1,SecurityMode", plist_new_bool(1)); plist_dict_set_item(parameters, "USBPortController1,ProductionMode", plist_new_bool(1)); + int is_mac = plist_access_path(build_identity, 2, "Info", "MacOSVariant") != NULL; plist_t usbf = plist_access_path(build_identity, 2, "Manifest", "USBPortController1,USBFirmware"); if (!usbf) { plist_free(parameters); @@ -839,6 +840,9 @@ int idevicerestore_start(struct idevicerestore_client_t* client) mutex_unlock(&client->device_event_mutex); if (!(client->flags & FLAG_QUIT)) { logger(LL_ERROR, "Device did not reconnect in DFU mode. Port DFU failed.\n"); + if (is_mac) { + logger(LL_ERROR, "Make sure to use the correct USB port for this model, see https://support.apple.com/120694\n"); + } } return -2; } |