We all know that iTunes will generally restore your application settings and documents after an upgrade. But if you are jailbreaking and restoring fresh, this rarely goes very smoothly. I prefer to have iTunes sync all my apps from scratch and not touch the backup, then restore the documents and preferences for each app.
For Mac OS X, I put together and AppleScript to do this. It is an advanced script that requires some knowledge of shell scripting, SSH, and applescript.
After reading the initial comments, if you want to go ahead, download the compiled application script from rapidshare here. (Because copy & paste wouldn’t compile, I’m just including the comments here. Must download actual script.)
This download is the version for 6/20/2009. (tested successfully with a couple bug fixes.)
(*
RESTORE APP SETTINGS AND DOCS
by metaclam
http://metaclam.wordpress.com
donations accepted via PayPal at web site above
06/19/2009 (see version history at end of beginning comments)
This script application will restore your documents and preferences folders of all iTunes synched "mobile applications" from an rsync backup of your iPhone to a new iPhone restore.
The assumption is that if iTunes re-installs your applications, they will all have new app ids (the hex strings).
So this script finds the new id and restores the documents folder and the library/preferences folder for each application from the old app id location to the new location.
This script is an ADVANCED script and requires some knowledge of shell scripting and applescript, but not TOO much.
Be warned, it does not do extensive error checking, so watch the log, which by default is set to go to ~/Library/Logs/iPhone_App_Settings_Restore.log
DISCLAIMER:
YOU USE THIS AT YOUR OWN RISK.
To set this up:
#1. You will have first had to run a BACKUP using rsync of your iPhone (before upgrading firmware or otherwise restoring) to a set local directory.
#2. You will need to jailbreak your phone, install OpenSSH from Cydia, etc, and then re-sync all your apps with iTunes.
#3. You will also need to make minor edits to these script properties.
#4. You will also need set up remote SSH login RSA keys on your restored phone.
NOTE: in the following examples I use MY iPhone IP (192.168.0.203) and my local backup directory path (/Volumes/Naga/Archives/iPhone-Backup/).
#1. the command to make a backup using rsync:
rsync --exclude private/var/mobile/Media/iTunes_Control/ -av root@192.168.0.203:/ /Volumes/Naga/Archives/iPhone-Backup/ --delete
This will of course take a long time -- maybe hours depending on how much stuff you have on your phone.
This excludes all your iTunes files which will of course be synched by iTunes itself.
#2. Can't help you much with step #2; if you don't know what all that is, this will do you no good anyway.
Remember you must install a patched mobile installation file if you plan to sync cracked apps etc, and follow relavent directions.
#3. You must edit the first 4 properties in this script as described.
#4. SETUP SSH AUTHENTICATION for ROOT on your iPhone
This is the most tricky part. See this page for details:
http://www.webmonkey.com/tutorial/Automate_a_Remote_Login_Using_SSH-Agent
You will do this after you have set up SSH on your new iPhone and adjusted the root password as necessary (ie, with the "passwd" command via ssh)
In summary, in Terminal you must:
a. create your local user SSH key pair with this command:
-- $ ssh-keygen -t rsa
b. when prompted, save the key in your local user directory as such:
Enter file in which to save the key (/Users/USERNAME/.ssh/id_rsa):
c. then copy the file from your local user directory to your iPhone root directory with this command:
-- $ cat ~/.ssh/id_rsa.pub | ssh root@192.168.0.203 'cat >> .ssh/authorized_keys'
(note, you may need to create the .ssh directory in your root home with 'mkdir .ssh' first)
d. enter your root login password (which is alpine unless you changed it with the 'passwd' command).
VERSION HISTORY
=====
06/19/2009: initial release
06/20/2009:
- fixed searching for apps with spaces
- other bug fixes and tweaks
- tested successfully after restore from FW 2.2 to 3.0!
*)
June 28, 2009 at 10:24 am |
i have successfully jailbroken and unlocked my 3g.
one problem: i realize that i need some of the data from an app on my jailbroken 2.2. is there any way to access that info? I did make a backup before i started this upgrade process (and it is a different name than my new 3.0 backup). do i have to restore to fresh 2.2, then jailbreak with redsnow and then restore to the previous backup? will the app data be there after all that?? can i selectively restore only the data i need?
it’s literally 5 bits of info that i need to recover! im such an idiot for not emailing a backup to myself when i had the chance! i was just so excited to upgrade…
i appreciate any info….and hope this isnt too off topic. it somehow seemed relevant…
June 29, 2009 at 3:36 pm |
If you mean you made a backup with iTunes rather than something like RSYNC, you need a utility to extract the files from the iTunes backup (assuming you don’t want to restore everything from the iTunes backup, which you probably don’t). Personally, I’ve never tried any such utilities but there have been a couple. Here’s one I just found through Google:
http://supercrazyawesome.com/
let us know your results if you go this route.
July 7, 2009 at 7:28 am |
Great post!
August 4, 2009 at 12:15 am |
Thanks Metaclam for the tip about [...] I just had to restore something selectively and googled how, came across this site and saw your post.
The program actually worked perfectly and was very easy to use.
September 20, 2009 at 8:22 pm |
Hi! What is the difference between those 2 terms, or are they the same thing but with different names? thanks!
________________
world of warcraft warlock guide fap turbo forex robot NetcCom iphone 3g unlock how to unlock iphone 3g