diff options
author | boxingsquirrel | 2011-04-30 17:31:01 -0400 |
---|---|---|
committer | boxingsquirrel | 2011-04-30 17:31:01 -0400 |
commit | 1c851c273dece4d1a6efa5a6e093557bd0e862c1 (patch) | |
tree | 36462c25af32a6bf2070a6a1fe510beed0a8efd2 /src/recovery.c | |
parent | fde808212e85de310cb404ac2e577da17f8382c2 (diff) | |
download | idevicerestore-1c851c273dece4d1a6efa5a6e093557bd0e862c1.tar.gz idevicerestore-1c851c273dece4d1a6efa5a6e093557bd0e862c1.tar.bz2 |
Working with iOS versions up to 4.3.2; plus all currently released devices
Diffstat (limited to 'src/recovery.c')
-rw-r--r-- | src/recovery.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/recovery.c b/src/recovery.c index 40b207e..0642028 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -108,7 +108,9 @@ int recovery_check_mode() { irecv_client_t recovery = NULL; irecv_error_t recovery_error = IRECV_E_SUCCESS; - recovery_error = irecv_open(&recovery); + irecv_init(); + recovery_error=irecv_open(&recovery); + if (recovery_error != IRECV_E_SUCCESS) { return -1; } @@ -120,13 +122,15 @@ int recovery_check_mode() { irecv_close(recovery); recovery = NULL; + return 0; } static int recovery_enable_autoboot(struct idevicerestore_client_t* client) { irecv_error_t recovery_error = IRECV_E_SUCCESS; - recovery_error = irecv_setenv(client->recovery->client, "auto-boot", "true"); + //recovery_error = irecv_setenv(client->recovery->client, "auto-boot", "true"); + recovery_error = irecv_send_command(client->recovery->client, "setenv auto-boot true"); if (recovery_error != IRECV_E_SUCCESS) { error("ERROR: Unable to set auto-boot environmental variable\n"); return -1; @@ -236,7 +240,8 @@ int recovery_send_component(struct idevicerestore_client_t* client, plist_t buil info("Sending %s (%d bytes)...\n", component, size); - error = irecv_send_buffer(client->recovery->client, data, size); + // FIXME: Did I do this right???? + error = irecv_send_buffer(client->recovery->client, data, size, 0); free(path); if (error != IRECV_E_SUCCESS) { error("ERROR: Unable to send %s component: %s\n", component, irecv_strerror(error)); |