From 7943b63d3884b58169251926de03197bd510afe9 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Wed, 13 Sep 2023 13:44:24 +0200 Subject: normal: Don't do unpair before entering recovery mode, remove pairing record afterwards instead --- src/normal.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/normal.c b/src/normal.c index 7f570da..b7f9f9d 100644 --- a/src/normal.c +++ b/src/normal.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "common.h" #include "normal.h" @@ -233,12 +234,6 @@ int normal_enter_recovery(struct idevicerestore_client_t* client) return -1; } - /* unpair the device */ - lockdown_error = lockdownd_unpair(lockdown, NULL); - if (lockdown_error != LOCKDOWN_E_SUCCESS) { - error("WARNING: Could not unpair device\n"); - } - lockdown_error = lockdownd_enter_recovery(lockdown); if (lockdown_error == LOCKDOWN_E_SESSION_INACTIVE) { lockdownd_client_free(lockdown); @@ -285,6 +280,9 @@ int normal_enter_recovery(struct idevicerestore_client_t* client) return -1; } + /* remove pair record for given device */ + usbmuxd_delete_pair_record(client->udid); + return 0; } -- cgit v1.1-32-gdbae