summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/recovery.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/recovery.c b/src/recovery.c
index 3833b2a..54ea14f 100644
--- a/src/recovery.c
+++ b/src/recovery.c
@@ -338,8 +338,10 @@ int recovery_send_kernelcache(struct idevicerestore_client_t* client, plist_t bu
const char* component = "RestoreKernelCache";
irecv_error_t recovery_error = IRECV_E_SUCCESS;
- if (recovery_client_new(client) < 0) {
- return -1;
+ if (client->recovery == NULL) {
+ if (recovery_client_new(client) < 0) {
+ return -1;
+ }
}
if (recovery_send_component(client, build_identity, component) < 0) {
@@ -347,6 +349,13 @@ int recovery_send_kernelcache(struct idevicerestore_client_t* client, plist_t bu
return -1;
}
+ if (client->restore_boot_args) {
+ char setba[256];
+ strcpy(setba, "setenv boot-args ");
+ strcat(setba, client->restore_boot_args);
+ recovery_error = irecv_send_command(client->recovery->client, setba);
+ }
+
recovery_error = irecv_send_command(client->recovery->client, "bootx");
if (recovery_error != IRECV_E_SUCCESS) {
error("ERROR: Unable to execute %s\n", component);