From 6586d0b91b67ed47eb79e7bfdf830de5f681c4fa Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 4 Jun 2010 12:39:25 +0200 Subject: idevicebackup: updated the workflow for the restore process --- tools/idevicebackup.c | 19 +++++++++++++++---- 1 file 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; -- cgit v1.1-32-gdbae