Skip to content

Commit

Permalink
normal: Don't do unpair before entering recovery mode, remove pairing…
Browse files Browse the repository at this point in the history
… record afterwards instead
  • Loading branch information
nikias committed Sep 13, 2023
1 parent 4191036 commit 7943b63
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/normal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 7943b63

Please sign in to comment.