diff options
| -rw-r--r-- | tools/idevicebackup.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c index 195f837..393b714 100644 --- a/tools/idevicebackup.c +++ b/tools/idevicebackup.c | |||
| @@ -793,6 +793,27 @@ int main(int argc, char *argv[]) | |||
| 793 | return -1; | 793 | return -1; |
| 794 | } | 794 | } |
| 795 | 795 | ||
| 796 | node = NULL; | ||
| 797 | lockdownd_get_value(client, NULL, "ProductVersion", &node); | ||
| 798 | if (node) { | ||
| 799 | char* str = NULL; | ||
| 800 | if (plist_get_node_type(node) == PLIST_STRING) { | ||
| 801 | plist_get_string_val(node, &str); | ||
| 802 | } | ||
| 803 | plist_free(node); | ||
| 804 | node = NULL; | ||
| 805 | if (str) { | ||
| 806 | int maj = strtol(str, NULL, 10); | ||
| 807 | free(str); | ||
| 808 | if (maj > 3) { | ||
| 809 | printf("ERROR: This tool is only compatible with iOS 3 or below. For newer iOS versions please use the idevicebackup2 tool.\n"); | ||
| 810 | lockdownd_client_free(client); | ||
| 811 | idevice_free(device); | ||
| 812 | return -1; | ||
| 813 | } | ||
| 814 | } | ||
| 815 | } | ||
| 816 | |||
| 796 | /* start notification_proxy */ | 817 | /* start notification_proxy */ |
| 797 | np_client_t np = NULL; | 818 | np_client_t np = NULL; |
| 798 | ldret = lockdownd_start_service(client, NP_SERVICE_NAME, &service); | 819 | ldret = lockdownd_start_service(client, NP_SERVICE_NAME, &service); |
