summaryrefslogtreecommitdiffstats
path: root/tools/idevicebackup2.c
AgeCommit message (Collapse)AuthorFilesLines
2019-09-27idevicebackup2: Add passcode hint when enabling/disabling backup encryption ↵Gravatar Nikias Bassen1-0/+48
or change the password
2019-09-27idevicebackup2: Handle timeout vs. error condition in main loopGravatar Nikias Bassen1-6/+10
2019-06-23replace all occurrences of occured by occurredGravatar Yves-Alexis Perez1-2/+2
Do it in all comments and errors messages
2019-06-21idevicebackup2: Handle errors when receiving files and report back to deviceGravatar Nikias Bassen1-3/+7
2019-01-26idevicebackup2: Make reboot after restore the defaultGravatar Nikias Bassen1-6/+9
As seen in #726 the previous behavior results in wrong assumptions that a restore is possible without rebooting the device, however this is not how iOS is handling it. I added a command line switch --no-reboot now that will let you still restore without rebooting, if anyone wants to play around with that...
2019-01-26idevicebackup2: Move writing of RestoreApplications.plist to helper ↵Gravatar Nikias Bassen1-57/+72
function, add command line switch to skip
2019-01-26idevicebackup2: Write /iTunesRestore/RestoreApplications.plist on restoreGravatar Samuel Sadok1-3/+62
This will trigger re-installation of apps that were installed when the backup was created once the device finishes the restore and rebooted.
2018-10-30idevicebackup2: Fix scan_directory() for platforms not having d_type in ↵Gravatar Nikias Bassen1-0/+6
struct dirent
2018-10-29idevicebackup2: Fix rmdir_recursive() not deleting all files/directories ↵Gravatar Nikias Bassen1-20/+55
(esp. on network filesystems)
2018-10-01tools: Remove length check on device UDID arguments to support newer devicesGravatar Nikias Bassen1-3/+3
The 40 characters length check on the device UDID made newer devices unusable with the libimobiledevice tools and was actually redundant since an invalid UDID will always fail to resolve. This commit removes the length check alltogether (but makes sure it is not an empty string "").
2018-09-03idevicebackup2: Make sure iTunesSettings are correctly stored in Info.plist ↵Gravatar Nikias Bassen1-1/+1
(i.e. not freed before writing)
2018-09-03idevicebackup2: Prevent lockdownd timeoutsGravatar Nikias Bassen1-31/+38
2018-07-24idevicebackup2: Fix potential memleakGravatar Bastien Nocera1-1/+3
If either of dstpath or srcpath can be NULL, then make sure they get freed irrespective of the other variable's value in mb2_copy_directory_by_path()
2018-07-24idevicebackup2: Fix fd leak in mb2_copy_file_by_path()Gravatar Bastien Nocera1-0/+1
fd was leak in error path.
2016-12-15idevicebackup2: Fix logical bug when checking for success of backup operationGravatar Nikias Bassen1-1/+1
The condition in line 2278 is incorrectly evaluated when mb2_status_check_snapshot_state() isn't able to read the Status.plist file. While `if (-1) { ... }` will be a 'false' condition, `if (1 && -1) { ... }` will be 'true' which in this case would make idevicebackup2 assume the backup was successful while it was not. This commit fixes this issue by changing the default return value of mb2_status_check_snapshot_state() to be 0 (false). Thanks to Xiao Deng for pointing out this issue!
2016-11-27idevicebackup2: Plug some small memory leaksGravatar Nikias Bassen1-8/+8
2016-11-02idevicebackup2: Fix heap buffer out-of-bounds write caused by wrong buffer sizeGravatar Nikias Bassen1-1/+1
2016-10-21idevicebackup2: Don't report an error when file to remove doesn't existGravatar Nikias Bassen1-1/+1
2016-10-21idevicebackup2: Use remove_file() wrapper instead of remove()Gravatar Nikias Bassen1-3/+3
2016-10-05idevicebackup2: Suppress repeated printing of global status when 100% is reachedGravatar Nikias Bassen1-1/+5
2016-10-04idevicebackup2: Fix assertion occuring when copying non-present MEIDGravatar Nikias Bassen1-1/+2
2016-09-23idevicebackup2: Add installed application info to Info.plist during backupGravatar Nikias Bassen1-5/+110
For newer iOS versions, apparently >= iOS 8, iTunes stores information about installed applications inside of the Info.plist file. This commit mimics that behavior.
2016-09-18idevicebackup2: Fix build on win32 after last commitGravatar Nikias Bassen1-14/+14
2016-09-18idevicebackup2: Fix removal of Snapshot dir during backup with iOS 10+Gravatar Nikias Bassen1-23/+78
DLMessageRemoveItems needs to recursively remove directories and this commit implements that.
2016-04-01idevicebackup: fix some timestamps that are relative to the Mac epoch ↵Gravatar BALATON Zoltan1-3/+4
instead of Unix one
2015-10-06tools: Use PACKAGE_URL define for homepage project links in usage outputGravatar Martin Szulecki1-1/+5
2015-01-28Remove trailing whitespace errors from all filesGravatar Martin Szulecki1-22/+19
2015-01-27tools: Add link to project homepage on usage outputGravatar Martin Szulecki1-0/+1
2014-12-08Replace () with (void) in libinternalcommon and tools for consistencyGravatar Martin Szulecki1-1/+1
2014-10-22common: Move size format helper to utils and use it in idevicebackup toolsGravatar Martin Szulecki1-22/+3
2014-10-22common: Move string_toupper() helper to utils and use it in idevicebackup toolsGravatar Martin Szulecki1-11/+1
2014-10-22common: Share idevicebackup helper string_build_path() from utilsGravatar Martin Szulecki1-45/+18
2014-10-11tools: Make sure to print an error when lockdown connection failsGravatar Nikias Bassen1-1/+2
2014-10-05idevicebackup2: Fix error variables for type consistencyGravatar Martin Szulecki1-6/+7
2014-10-02idevicebackup2: Fix backup failure for passcode devices entering lock screenGravatar Martin Szulecki1-1/+1
A device would report "ErrorCode 1: Error copying keychain data (MBErrorDomain/1)" if a device entered lock state and had a passcode enabled during the backup or restore process. To prevent this, an escrow bag must be sent when starting the service to keep the operation "alive".
2014-10-02idevicebackup2: Use macro instead of plain AFC service nameGravatar Martin Szulecki1-1/+1
2014-10-02idevicebackup2: Use correct label for lockdown requestsGravatar Martin Szulecki1-2/+2
2014-09-13idevicebackup2: Fix retry loop when device requests 0 filesGravatar Nikias Bassen1-1/+0
Under certain circumstances a device could request an empty array of filenames to be transferred with DLMessageDownloadFiles. This was not handled correctly in idevicebackup2 by just doing nothing, resulting in a 'retry loop' waiting endlessly for new messages from the device. The solution is to send a termination packet and a success status response. Thanks to pondahai for reporting.
2014-08-06idevicebackup2/idevicebackup: Remove code duplication and use common code ↵Gravatar Nikias Bassen1-92/+1
for reading/writing plist files
2014-06-21idevicebackup2: Use afc_dictionary_free() helper instead of custom codeGravatar Martin Szulecki1-16/+3
2014-05-03idevicebackup2: Plug more memory leaksGravatar Nikias Bassen1-1/+8
2014-05-03idevicebackup2: Make sure to free idevice object in error conditionsGravatar Nikias Bassen1-0/+3
2014-05-03idevicebackup2: Plug small memory leakGravatar Nikias Bassen1-1/+1
2014-05-01idevicebackup2: Fix invalid check for password given on command lineGravatar Nikias Bassen1-1/+1
2014-03-24idevicebackup2: add cast to silence compiler warningGravatar Nikias Bassen1-1/+1
2014-03-24idevicebackup2: WIN32: Use _stati64() instead of stat() so we can handle ↵Gravatar Nikias Bassen1-2/+17
file sizes > 4GB
2014-03-20Bump dependency to libplist 1.11 and remove use of "plist_dict_insert_item()"Gravatar Martin Szulecki1-38/+38
2014-03-04idevicebackup2: Remove service name defines obsoleted by public headersGravatar Martin Szulecki1-3/+0
2014-01-31idevicebackup2: allow unbacking encrypted backups (given the password)Gravatar Nikias Bassen1-2/+6
2013-09-27idevicebackup2: Cloud support broke other commands thus change it be a commandGravatar Martin Szulecki1-24/+51
The experimental cloud support was triggered on each run of any command which caused some to break on devices without iCloud setup. We now trigger the cloud support in a separate command to fix this and allow further investigation into a proper implementation.