summaryrefslogtreecommitdiffstats
path: root/tools/idevicebackup.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2010-06-04 12:39:25 +0200
committerGravatar Nikias Bassen2010-06-04 12:39:25 +0200
commit6586d0b91b67ed47eb79e7bfdf830de5f681c4fa (patch)
tree731d8ac33169e2cdccb7d7ce799178edcc265a6e /tools/idevicebackup.c
parent43964b02b5c32ead9d69f3eafc5f22700d0d5436 (diff)
downloadlibimobiledevice-6586d0b91b67ed47eb79e7bfdf830de5f681c4fa.tar.gz
libimobiledevice-6586d0b91b67ed47eb79e7bfdf830de5f681c4fa.tar.bz2
idevicebackup: updated the workflow for the restore process
Diffstat (limited to 'tools/idevicebackup.c')
-rw-r--r--tools/idevicebackup.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c
index d6380d0..cacacc4 100644
--- a/tools/idevicebackup.c
+++ b/tools/idevicebackup.c
@@ -872,11 +872,22 @@ int main(int argc, char *argv[])
break;
case CMD_RESTORE:
- printf("Restoring backup is NOT IMPLEMENTED.\n");
- /* verify battery on AC enough battery remaining */
+ /* TODO: verify battery on AC enough battery remaining */
+ /* verify if Status.plist says we read from an successful backup */
+ /* now make sure backup integrity is ok! verify all files */
+ /* loop over Files entries in Manifest data plist */
+ /* make sure both .mddata/.mdinfo files are available for each entry */
/* request restore from device with manifest (BackupMessageRestoreMigrate) */
- /* read mddata/mdinfo files and send to devices using DLSendFile */
- /* signal restore finished message to device */
+ /* loop over Files entries in Manifest data plist */
+ /* read mddata/mdinfo files and send to device using DLSendFile */
+ /* if all hunks of a file are sent, device must send ack */
+ /* observe notification_proxy id com.apple.mobile.application_installed */
+ /* loop over Applications entries in Manifest data plist */
+ /* send AppInfo entries */
+ /* receive com.apple.mobile.application_installed notification */
+ /* receive BackupMessageRestoreApplicationReceived from device */
+ /* signal restore finished message to device; BackupMessageRestoreComplete */
+ /* close down notification_proxy connection */
/* close down lockdown connection as it is no longer needed */
lockdownd_client_free(client);
client = NULL;