summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-05-28 12:03:37 +0200
committerGravatar Martin Szulecki2010-05-28 12:03:37 +0200
commitb2c56d67d0dda2bf7624c27dc3714fa8e323bcf7 (patch)
tree28b8263df1b429ffdb9c2d6f0db6e0a5eee24c0c /tools
parent75f7ce360a7cfd5a2fb25cf852fb9c4a6d0f38f4 (diff)
downloadlibimobiledevice-b2c56d67d0dda2bf7624c27dc3714fa8e323bcf7.tar.gz
libimobiledevice-b2c56d67d0dda2bf7624c27dc3714fa8e323bcf7.tar.bz2
Add option to avoid auto-pairing for lockdownd connections in ideviceinfo
Diffstat (limited to 'tools')
-rw-r--r--tools/ideviceinfo.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c
index 9183d92..cbf2ef8 100644
--- a/tools/ideviceinfo.c
+++ b/tools/ideviceinfo.c
@@ -199,6 +199,7 @@ static void print_usage(int argc, char **argv)
printf("Usage: %s [OPTIONS]\n", (name ? name + 1: argv[0]));
printf("Show information about a connected iPhone/iPod Touch.\n\n");
printf(" -d, --debug\t\tenable communication debugging\n");
+ printf(" -s, --simple\t\tuse a simple connection to avoid auto-pairing with the device\n");
printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n");
printf(" -q, --domain NAME\tset domain of query to NAME. Default: None\n");
printf(" -k, --key NAME\tonly query key specified by NAME. Default: All keys.\n");
@@ -218,6 +219,7 @@ int main(int argc, char *argv[])
idevice_t phone = NULL;
idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR;
int i;
+ int simple = 0;
int format = FORMAT_KEY_VALUE;
char uuid[41];
char *domain = NULL;
@@ -268,6 +270,10 @@ int main(int argc, char *argv[])
format = FORMAT_XML;
continue;
}
+ else if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--simple")) {
+ simple = 1;
+ continue;
+ }
else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
print_usage(argc, argv);
return 0;
@@ -294,7 +300,9 @@ int main(int argc, char *argv[])
}
}
- if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "ideviceinfo")) {
+ if (LOCKDOWN_E_SUCCESS != (simple ?
+ lockdownd_client_new(phone, &client, "ideviceinfo"):
+ lockdownd_client_new_with_handshake(phone, &client, "ideviceinfo"))) {
idevice_free(phone);
return -1;
}