From 5d9bd621eb60cab5303b72b4b35388fb515ffa87 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 6 Sep 2025 00:38:21 +0200 Subject: 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. --- src/idevicerestore.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/idevicerestore.c') 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; } -- cgit v1.1-32-gdbae