summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-01-31 14:25:05 +0100
committerGravatar Nikias Bassen2014-01-31 14:25:05 +0100
commitd526a089b39e829d565e7f8ddc5b0714eee5b45b (patch)
tree3f275a2b0056bfce80c0792e920fe4c0f0fb82f7
parentb3e2954930f99e450cd944517fe3577aba176645 (diff)
downloadlibimobiledevice-d526a089b39e829d565e7f8ddc5b0714eee5b45b.tar.gz
libimobiledevice-d526a089b39e829d565e7f8ddc5b0714eee5b45b.tar.bz2
idevicebackup2: allow unbacking encrypted backups (given the password)
-rw-r--r--tools/idevicebackup2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index 353d5f3..ecec5df 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -1538,7 +1538,7 @@ int main(int argc, char *argv[])
1538 } else if (cmd != CMD_CLOUD) { 1538 } else if (cmd != CMD_CLOUD) {
1539 /* backup directory must contain an Info.plist */ 1539 /* backup directory must contain an Info.plist */
1540 info_path = build_path(backup_directory, source_udid, "Info.plist", NULL); 1540 info_path = build_path(backup_directory, source_udid, "Info.plist", NULL);
1541 if (cmd == CMD_RESTORE) { 1541 if (cmd == CMD_RESTORE || cmd == CMD_UNBACK) {
1542 if (stat(info_path, &st) != 0) { 1542 if (stat(info_path, &st) != 0) {
1543 free(info_path); 1543 free(info_path);
1544 printf("ERROR: Backup directory \"%s\" is invalid. No Info.plist found for UDID %s.\n", backup_directory, source_udid); 1544 printf("ERROR: Backup directory \"%s\" is invalid. No Info.plist found for UDID %s.\n", backup_directory, source_udid);
@@ -1577,7 +1577,11 @@ int main(int argc, char *argv[])
1577 free(backup_password); 1577 free(backup_password);
1578 } 1578 }
1579 idevice_free(device); 1579 idevice_free(device);
1580 printf("ERROR: a backup password is required to restore an encrypted backup. Cannot continue.\n"); 1580 if (cmd == CMD_RESTORE) {
1581 printf("ERROR: a backup password is required to restore an encrypted backup. Cannot continue.\n");
1582 } else if (cmd == CMD_UNBACK) {
1583 printf("ERROR: a backup password is required to unback an encrypted backup. Cannot continue.\n");
1584 }
1581 return -1; 1585 return -1;
1582 } 1586 }
1583 } 1587 }