diff options
author | BALATON Zoltan | 2015-05-05 01:02:14 +0200 |
---|---|---|
committer | BALATON Zoltan | 2015-05-05 01:02:14 +0200 |
commit | ac78b820e4144617f80c27f866f153f49ffdd92e (patch) | |
tree | ae05c2c324e3072da5c85f7862dca9c334245aa4 /src/recovery.c | |
parent | 245bc9b6510a8900c69c2fd543434bae1bc6ca6a (diff) | |
download | idevicerestore-ac78b820e4144617f80c27f866f153f49ffdd92e.tar.gz idevicerestore-ac78b820e4144617f80c27f866f153f49ffdd92e.tar.bz2 |
Improved command sequence and use SystemPartitionPadding from build
identity to make sure we use correct values.
Diffstat (limited to 'src/recovery.c')
-rw-r--r-- | src/recovery.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/recovery.c b/src/recovery.c index 5930db6..c21af19 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -164,10 +164,6 @@ int recovery_enter_restore(struct idevicerestore_client_t* client, plist_t build } } - if (recovery_set_autoboot(client, 0) < 0) { - return -1; - } - info("Recovery Mode Environment:\n"); char* value = NULL; irecv_getenv(client->recovery->client, "build-version", &value); @@ -197,6 +193,10 @@ int recovery_enter_restore(struct idevicerestore_client_t* client, plist_t build } } + if (recovery_set_autoboot(client, 0) < 0) { + return -1; + } + /* send logo and show it */ if (recovery_send_applelogo(client, build_identity) < 0) { error("ERROR: Unable to send AppleLogo\n"); @@ -393,8 +393,11 @@ int recovery_send_ramdisk(struct idevicerestore_client_t* client, plist_t build_ } } - irecv_send_command(client->recovery->client, "getenv ramdisk-size"); - irecv_receive(client->recovery->client); + char* value = NULL; + irecv_getenv(client->recovery->client, "ramdisk-size", &value); + info("ramdisk-size=%s\n", (value ? value : "(unknown)")); + free(value); + value = NULL; if (recovery_send_component(client, build_identity, component) < 0) { error("ERROR: Unable to send %s to device.\n", component); |