summaryrefslogtreecommitdiffstats
path: root/tools/idevicebackup2.c
AgeCommit message (Collapse)AuthorFilesLines
2025-06-29tools: Use new afc_get_file_info_plist/afc_get_device_info_plist functionsGravatar Nikias Bassen1-10/+4
2025-06-09Use updated libplist API if availableGravatar Nikias Bassen1-2/+13
2025-06-07idevicebackup2: Use new idevice_get_device_version helperGravatar Nikias Bassen1-21/+3
2025-01-06tools/idevicebackup2: Fix free disk space calculationGravatar Nikias Bassen1-1/+1
2024-11-29Fix attempts to detect Windows using _WIN32Gravatar Duncan Ogilvie1-11/+11
2024-09-16tools: Add detection and note about passcode requirement for iOS 16.1Gravatar Nikias Bassen1-1/+18
2023-04-21Updated to use latest libplist API changesGravatar Nikias Bassen1-4/+5
2022-12-10idevicebackup2: Fix missing break in switch case statementGravatar Nikias Bassen1-0/+1
2022-06-09tools: Fix idevicebackup2 option parsing for --password optionGravatar Nikias Bassen1-1/+1
Thanks @EmilienCourt for pointing this out!
2022-05-10idevicebackup2: Fix option parsingGravatar Nikias Bassen1-0/+1
2022-05-01idevicebackup2: Fix command line option parsing not processing the backup ↵Gravatar Nikias Bassen1-2/+0
directory
2022-04-30[clang-tidy] Do not use else after returnGravatar Rosen Penev1-13/+15
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-30tools: Use getopt for option parsing in all toolsGravatar Nikias Bassen1-199/+224
2022-04-22[clang-tidy] add parentheses to macrosGravatar Rosen Penev1-1/+1
Found with bugprone-macro-parentheses Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-22[clang-tidy] idevicebackup2: use uppercase numeric literalsGravatar Rosen Penev1-1/+1
Found with readability-uppercase-literal-suffix Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-22idevicebackup2: Allow passing backup password via environment variableGravatar Nikias Bassen1-4/+38
2022-02-04tools: Print meaningful error messages when service startup failsGravatar Nikias Bassen1-1/+1
2022-02-04tools/idevicebackup2: Make sure RemoveItemsNotRestored is always set in ↵Gravatar Nikias Bassen1-3/+2
restore options
2021-09-01Remove common code in favor of new libimobiledevice-glueGravatar Nikias Bassen1-1/+1
2021-07-30tools/idevicebackup2: Move some declarations to the start of main functionGravatar Nikias Bassen1-6/+7
2021-07-30tools: idevicebackup2: Exit on service startup failure and improve error ↵Gravatar Nikias Bassen1-6/+14
messages
2020-12-07idevicebackup2: Handle DLMessagePurgeDiskSpace by sending back error codeGravatar Nikias Bassen1-0/+5
2020-11-19idevicebackup2: Update errno to device error mappingGravatar Nikias Bassen1-1/+14
2020-09-29idevicebackup2: Don't fail on restore when source backup doesn't have any ↵Gravatar Nikias Bassen1-2/+4
application info
2020-06-05tools: Unify --network command line switch and add it where missingGravatar Nikias Bassen1-12/+15
2020-06-05tools: Add --version command line switchGravatar Nikias Bassen1-7/+14
2020-06-04Unify usage output in all tools and add bugreport URLGravatar Martin Szulecki1-4/+7
2019-09-30idevicebackup2: Remove RestoreApplications.plist if restore failedGravatar Nikias Bassen1-1/+7
2019-09-30idevicebackup2: Only print device reboot message if restore was successfulGravatar Nikias Bassen1-3/+3
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