summaryrefslogtreecommitdiffstats
path: root/src/dfu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dfu.c')
-rw-r--r--src/dfu.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/dfu.c b/src/dfu.c
index c580c72..3bdd419 100644
--- a/src/dfu.c
+++ b/src/dfu.c
@@ -253,6 +253,25 @@ int dfu_get_cpid(struct idevicerestore_client_t* client, unsigned int* cpid) {
return 0;
}
+int dfu_get_ecid(struct idevicerestore_client_t* client, uint64_t* ecid) {
+ irecv_error_t recovery_error = IRECV_E_SUCCESS;
+
+ if(client->dfu == NULL) {
+ if (dfu_client_new(client) < 0) {
+ return -1;
+ }
+ }
+
+ const struct irecv_device_info *device_info = irecv_get_device_info(client->dfu->client);
+ if (!device_info) {
+ return -1;
+ }
+
+ *ecid = device_info->ecid;
+
+ return 0;
+}
+
int dfu_is_image4_supported(struct idevicerestore_client_t* client)
{
if(client->dfu == NULL) {