diff options
author | 2023-07-12 18:08:16 +0200 | |
---|---|---|
committer | 2025-07-14 16:50:02 +0200 | |
commit | a9c143443c71ecbd186ad22e2c5082dfa8808467 (patch) | |
tree | bed1fa8e1bab49860eb50379c1131fcfa2498dd6 /tools | |
parent | 2b71b91f8a1a31328ef9afbbb379029f9a466868 (diff) | |
download | libideviceactivation-a9c143443c71ecbd186ad22e2c5082dfa8808467.tar.gz libideviceactivation-a9c143443c71ecbd186ad22e2c5082dfa8808467.tar.bz2 |
add 'itunes' command to kick iOS 3 devices out of "connect to itunes" screen
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ideviceactivation.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tools/ideviceactivation.c b/tools/ideviceactivation.c index ef16ca0..0ea3901 100644 --- a/tools/ideviceactivation.c +++ b/tools/ideviceactivation.c @@ -60,6 +60,7 @@ static void print_usage(int argc, char **argv) printf(" activate\t\tattempt to activate the device\n"); printf(" deactivate\t\tdeactivate the device\n"); printf(" state\t\t\tquery device about its activation state\n"); + printf(" itunes\t\ttell the device that it has been connected to iTunes (useful for < iOS 4)\n"); printf("\n"); printf("The following OPTIONS are accepted:\n"); printf(" -d, --debug\t\tenable communication debugging\n"); @@ -142,7 +143,7 @@ int main(int argc, char *argv[]) int use_network = 0; typedef enum { - OP_NONE = 0, OP_ACTIVATE, OP_DEACTIVATE, OP_GETSTATE + OP_NONE = 0, OP_ACTIVATE, OP_DEACTIVATE, OP_GETSTATE, OP_ITUNES } op_t; op_t op = OP_NONE; @@ -202,6 +203,10 @@ int main(int argc, char *argv[]) op = OP_GETSTATE; continue; } + else if (!strcmp(argv[i], "itunes")) { + op = OP_ITUNES; + continue; + } else { print_usage(argc, argv); return EXIT_SUCCESS; @@ -602,6 +607,18 @@ int main(int argc, char *argv[]) } } break; + + case OP_ITUNES: { + // set iTunesHasConnected if we succeeded + if (LOCKDOWN_E_SUCCESS != lockdownd_set_value(lockdown, NULL, "iTunesHasConnected", plist_new_bool(1))) { + fprintf(stderr, "Failed to set iTunesHasConnected on device.\n"); + result = EXIT_FAILURE; + goto cleanup; + } + result = EXIT_SUCCESS; + printf("Successfully set 'iTunesHasConnected'.\n"); + } + break; } cleanup: |