From 5c4680dcdcb751ab3d8185f2cf7dc5900037574d Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Wed, 25 Sep 2019 19:24:32 +0200 Subject: normal: Unpair device before entering recovery mode --- src/normal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/normal.c b/src/normal.c index 0f64108..58d907c 100644 --- a/src/normal.c +++ b/src/normal.c @@ -218,6 +218,12 @@ 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_SUCCESS) { error("ERROR: Unable to place device in recovery mode\n"); -- cgit v1.1-32-gdbae