From d526a089b39e829d565e7f8ddc5b0714eee5b45b Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 31 Jan 2014 14:25:05 +0100 Subject: idevicebackup2: allow unbacking encrypted backups (given the password) --- tools/idevicebackup2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tools/idevicebackup2.c') 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[]) } else if (cmd != CMD_CLOUD) { /* backup directory must contain an Info.plist */ info_path = build_path(backup_directory, source_udid, "Info.plist", NULL); - if (cmd == CMD_RESTORE) { + if (cmd == CMD_RESTORE || cmd == CMD_UNBACK) { if (stat(info_path, &st) != 0) { free(info_path); 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[]) free(backup_password); } idevice_free(device); - printf("ERROR: a backup password is required to restore an encrypted backup. Cannot continue.\n"); + if (cmd == CMD_RESTORE) { + printf("ERROR: a backup password is required to restore an encrypted backup. Cannot continue.\n"); + } else if (cmd == CMD_UNBACK) { + printf("ERROR: a backup password is required to unback an encrypted backup. Cannot continue.\n"); + } return -1; } } -- cgit v1.1-32-gdbae