summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/common.h1
-rw-r--r--src/idevicerestore.c13
2 files changed, 13 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h
index 748acbf..1421b94 100644
--- a/src/common.h
+++ b/src/common.h
@@ -47,6 +47,7 @@ extern "C" {
#define FLAG_CUSTOM 8
#define FLAG_EXCLUDE 16
#define FLAG_PWN 32
+#define FLAG_NOACTION 64
extern int use_apple_server;
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 36822a9..b77754b 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -57,6 +57,7 @@ static struct option longopts[] = {
{ "exclude", no_argument, NULL, 'x' },
{ "shsh", no_argument, NULL, 't' },
{ "pwn", no_argument, NULL, 'p' },
+ { "no-action", no_argument, NULL, 'n' },
{ NULL, 0, NULL, 0 }
};
@@ -80,6 +81,8 @@ void usage(int argc, char* argv[]) {
printf(" -x|--exclude exclude nor/baseband upgrade\n");
printf(" -t|--shsh fetch TSS record and save to .shsh file, then exit\n");
printf(" -p|--pwn Put device in pwned DFU mode and exit (limera1n devices only)\n");
+ printf(" -n|--no-action Do not perform any restore action. If combined with -l option\n");
+ printf(" the on demand ipsw download is performed before exiting.\n");
printf("\n");
}
@@ -298,7 +301,7 @@ int main(int argc, char* argv[]) {
}
memset(client, '\0', sizeof(struct idevicerestore_client_t));
- while ((opt = getopt_long(argc, argv, "dhcesxtpli:u:", longopts, &optindex)) > 0) {
+ while ((opt = getopt_long(argc, argv, "dhcesxtpli:u:n", longopts, &optindex)) > 0) {
switch (opt) {
case 'h':
usage(argc, argv);
@@ -355,6 +358,10 @@ int main(int argc, char* argv[]) {
client->flags |= FLAG_PWN;
break;
+ case 'n':
+ client->flags |= FLAG_NOACTION;
+ break;
+
default:
usage(argc, argv);
return -1;
@@ -556,6 +563,10 @@ int main(int argc, char* argv[]) {
}
}
+ if (client->flags & FLAG_NOACTION) {
+ return 0;
+ }
+
if (client->mode->index == MODE_RESTORE) {
if (restore_reboot(client) < 0) {
error("ERROR: Unable to exit restore mode\n");