Nov
28
2008

Howto: Backup & Restore All Cydia Apps

Before updating/restoring to a new firmware version, you may want to restore all the apps you had installed through Cydia without having to remember which ones you installed and re-installing them one by one. Since Cydia uses APT, we can use some commands to do this from the console with much less hassle. Here I will outline some steps you can follow to backup and restore all your ‘Cydia apps’ while doing a full restore to the same version (to repair or just ‘clean up’) or to a higher firmware version inbetween.

NB: yeah, I do know there’s an app to do something much like this automatically (called aptbackup; see BigBoss’s post with instructions on how to use it). You may prefer to use that for ease of use. However, you may prefer to do so manually to have more control over the process or some other reason. If so, read on.

Below we’re assuming 2.1 firmware on a 1st generation iPhone device, and I will make a transition from 2.1 to 2.2 firmware between backing up and restoring. However, the same process can be used for most other not-too-ancient firmware versions. I don’t think it matters whether or not the device is already pwned, jailbroken, activated, unlocked before we start, since we will do that in the process, but for clarity, the device I used was already all of the above things. Of course we need to have the device at least jailbroken after the update / restore cycle, because we need to reinstall (at least) Cydia and OpenSSH to get in.

  1. From the console (e.g. Terminal on your OSX via SSH, or MobileTerminal), you do (from any folder; I usually do this from the /tmp folder by first doing “cd /tmp”):
    dpkg --get-selections > selections.txtThis generates a file with the name “selections.txt” (which you may change to whatever you want; you could also put in a name, date, serial number, firmware version or whatever. I prefer to do such things with folder names myself).
  2. Use SCP to tranfer the file “selections.txt” to your pc from your iPhone.
  3. Restore to the pwned iPhone firmware image you want (using PwnageTool / QuickPwn and iTunes);
  4. After the restore is completed, use Cydia to install OpenSSH again first (so you can SSH/SCP to your iphone; also remember to change the passwords for user mobile and root using the command “passwd”).
  5. From the console, do:apt-get update
  6. Use SCP (e.g. Windows: WinSCP; OS X: Cyberduck) to transfer the “selections.txt” file (the one you saved earlier) back to your iPhone. Again, it doesn’t matter where (I just use /tmp again).
  7. From the console, do:dpkg --set-selections < selections.txt
  8. apt-get -u dselect-upgrade
  9. rm /private/var/mobile/Library/Caches/com.apple.mobile.Installation.plist; killall SpringBoard(This last line will cause SpringBoard to check all your apps, so the new ones will show up).
 by: PiMP | in: How-To's | Tags: | Views: 4,808 | Rating: 4(/4)

Rate: DownUp 4 (/4) Loading ... Loading ...

5 Comments »

 RSS feed for comments on this post.  TrackBack URL.

Leave a Comment

PiMPMiPhone.info