summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-07-14 04:50:29 +0200
committerGravatar Martin Szulecki2010-07-14 04:50:29 +0200
commit18e9411aac155ff4aa35ac1c50e752102b1ed531 (patch)
treed814a004d25ef444e54c0c026b5062284f12a33e /src
parent803d4af2ef109f39a512c23b74e3b99cc3bde61b (diff)
downloadidevicerestore-18e9411aac155ff4aa35ac1c50e752102b1ed531.tar.gz
idevicerestore-18e9411aac155ff4aa35ac1c50e752102b1ed531.tar.bz2
Move ecid retrieval code right before shsh blob retrieval
Diffstat (limited to 'src')
-rw-r--r--src/idevicerestore.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 32dd736..90fe4bc 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -163,18 +163,6 @@ int main(int argc, char* argv[]) {
info("Custom firmware requested. Disabled TSS request.\n");
}
- // devices are listed in order from oldest to newest
- // so we'll need their ECID
- if (tss_enabled) {
- debug("Getting device's ECID for TSS request\n");
- // fetch the device's ECID for the TSS request
- if (get_ecid(client, &client->ecid) < 0) {
- error("ERROR: Unable to find device ECID\n");
- return -1;
- }
- info("Found ECID %llu\n", client->ecid);
- }
-
// choose whether this is an upgrade or a restore (default to upgrade)
client->tss = NULL;
plist_t build_identity = NULL;
@@ -200,7 +188,16 @@ int main(int argc, char* argv[]) {
/* print information about current build identity */
build_identity_print_information(build_identity);
+ /* retrieve shsh blobs if required */
if (tss_enabled) {
+ debug("Getting device's ECID for TSS request\n");
+ /* fetch the device's ECID for the TSS request */
+ if (get_ecid(client, &client->ecid) < 0) {
+ error("ERROR: Unable to find device ECID\n");
+ return -1;
+ }
+ info("Found ECID %llu\n", client->ecid);
+
if (get_shsh_blobs(client, client->ecid, build_identity, &client->tss) < 0) {
error("ERROR: Unable to get SHSH blobs for this device\n");
return -1;