diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common.h | 3 | ||||
-rw-r--r-- | src/recovery.c | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h index 6e1441a..1949a8c 100644 --- a/src/common.h +++ b/src/common.h @@ -134,7 +134,8 @@ struct idevicerestore_client_t { uint64_t ecid; unsigned char* nonce; int nonce_size; - const char* uuid; + char* uuid; + char* srnm; const char* ipsw; const char* filesystem; struct dfu_client_t* dfu; diff --git a/src/recovery.c b/src/recovery.c index 279fe50..41ed4fb 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -83,6 +83,16 @@ int recovery_client_new(struct idevicerestore_client_t* client) { debug("Retrying connection...\n"); } + if (client->srnm == NULL) { + char snbuf[256]; + snbuf[0] = '\0'; + irecv_get_srnm(recovery, snbuf); + if (snbuf[0] != '\0') { + client->srnm = strdup(snbuf); + info("INFO: device serial number is %s\n", client->srnm); + } + } + irecv_event_subscribe(recovery, IRECV_PROGRESS, &recovery_progress_callback, NULL); client->recovery->client = recovery; return 0; |