summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-09-13 13:44:24 +0200
committerGravatar Nikias Bassen2023-09-13 13:44:24 +0200
commit7943b63d3884b58169251926de03197bd510afe9 (patch)
treebb84d67162f4e181d9db3fb42ed104f7ca5c8032
parent4191036d58175a873c464d966d8c9e0aa1ec3494 (diff)
downloadidevicerestore-7943b63d3884b58169251926de03197bd510afe9.tar.gz
idevicerestore-7943b63d3884b58169251926de03197bd510afe9.tar.bz2
normal: Don't do unpair before entering recovery mode, remove pairing record afterwards instead
-rw-r--r--src/normal.c10
1 files changed, 4 insertions, 6 deletions
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 <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#include <libimobiledevice/preboard.h>
+#include <usbmuxd.h>
#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;
}