On “upgrading” firmware when tricked out

Important note: I wrote this back in September 2008 when upgrading to FW 2.2 but never published it to the blog.  Much of it is outdated, but many of the same principles apply.  Since a lot of people will be upgrading to FW 3.0 if they haven’t already, and I don’t have time to completely rewrite this at the moment, I thought it would still be helpful.

Please see several of the most recent blog posts for information relating to FW 3.0, as well as the rewrites of the main pages.

Situation normal

So you have tricked out your jailbroken iPhone and want to upgrade its firmware as painlessly as possible without losing anything.  If you’re like me, you have both free or purchased App Store apps, cracked IPAs, and a bunch of stuff installed with Cydia and/or Installer.  You also probably have hidden apps and/or are using Categories.

What to do?  There are a lot of guides out there for this process.  In particular, see:

(#1). BigBoss’ “How To Upgrade In iTunes

(#2). BigBoss’ “How To Restore Your 2.1 Backup

(#3). modmyi’s “Upgrade from Jailbroken 2.0.2 to Jailbroken 2.1 without losing ANYTHING!!”

But these guides are contradictory or incomplete.  I will not try to claim that what follows is in any way definitive. Instead I will point out some considerations I had when reading over the ones above.  Then I will sketch out a re-do of the steps in BigBoss’ guide #1.

The Unlocking Chimera (or, keeping options open)

We know that as of October 2008, the iphone-dev team was still making “slow progress” on an unlocking solution for the iPhone 3G.  You will recall that unlocking means being able to use your iPhone with any SIM card in the world.  It is not the same thing as jailbreaking.  This is important to me.  In order to maximize the chances of eventually being able to unlock my phone, I did not want to use QuickPwn, which, since you must upgrade your phone in iTunes first, means that the baseband firmware will also be upgraded to 2.1.  We wanted to keep the original baseband firmware while upgrading to 2.1.  This required using Pwnage Tool 2.1 and not QuickPwn.

Most easily retaining everything

Several of the comments about (#1) talks about using the Mac OS X application iBaReS (formally iBackup) to backup your iPhone and restore after an upgrade.  This is a more complete way than using iTunes.  Unfortunately it has some quirks and limitations.  These are addressed below.

Dealing with cracked IPAs

(#1) says nothing about the whole issue of Mobile Installation framework patching to allow cracked IPAs to work. Note that Firmware 2.1 needs an upgraded Mobile Installation framework if you were previously using 2.0.x.

Comments and revisions to BigBoss’ steps in (#1):

First, these are amendments and comments on BigBoss’s steps given my considerations above.  Refer to Guide (#1) for complete details.   I will also underscore this:  “never use ‘upgrade’ on a jailbroken device…Restore, do not upgrade.”

Step 0) Same. Upgrade to iTunes 8.

Step 1) Same. Install & run apt backup.

Step 2) Instead of backing up with iTunes, use iBaReS in individual backup mode with all options checked.  First, review the iBaReS readme and usage scenarios file, and check out this thread.  I found as some others did that running an individual backup first before ever using the standard backup put iBaReS into an infinite loop while checking RSA keys and had to be force quit.  The solution, though sucky, is to let it do a standard backup first.  This of course doubles the backup time, so be prepared for this.  Hopefully this problem will be fixed sooner rather than later.

Step 2B) iBaReS even in full mode does not backup anything in your /User/Media/ folder, which means you need a way to back up anything important to you there. In my case this included /User/Media/Comics/ and /User/Media/ROMs/.  You could just copy files with CyberDuck via SFTP or you could try what I did, the terminal command rsync.  Of course you need to adjust the IPs and the paths:

rsync --exclude iTunes_Control/ -av root@
/Volumes/Disk/Archives/iPhone-Media/ --delete

The above command is one line separated by a space, but has been broken into two here for readability.

Steps 3 – 5) Instead of restoring the firmware through iTunes and then jailbreaking with Quickpwn in step 5, we used Pwnage Tool 2.1 in Simple Mode.  I made the mistake of answering “Yes” to the question about whether this iPhone had been pwned before.  Apparently, I should have said “No” even if it had, and let Pwnage Tool guide me in putting the phone into DFU mode.  As a result, I got the dreaded error 1600. Apparently I was in recovery mode and not DFU mode.  Heelfan71’s answer in this thread helped us recover from this, and achieve a successful restore of the custom firmware.

Step 4) Same.  Activate service in iTunes but do nothing else EXCEPT despite what BigBoss says, when you are given the chance to name your device, give it the old name.  I made the mistake of following BigBoss on this one and did not do that.  But after I restored from the iBaReS backup in step 7, iTunes would no longer recognize the iPhone.  No amount of re-installing iTunes 8 or restarting phone or computer solved that, so I was forced to start again with step 3 after making it through step 7.  This time naming it allowed iTunes to recognize the iPhone after step 7.

Step 5) Not applicable because we have already jailbroken in step 3.

Step 6) Same. Using Cydia, install aptbackup… Etc.  Unfortunately, whatever aptbackup did was not restored in step 7 either, so I chose to manually reinstall a bunch of stuff from Cydia.  For me this included: OpenSSH, BossPrefs, Categories, and Cycorder.

Step 6B)  Since you will be using your Wi-Fi connection, make sure you have entered any Wi-Fi password in general settings.  Set auto-lock to never, since we’ll need to restore things in step 7.

Step 6C) One of the things you need to make sure to do at this point is to install the new Mobile Installation Framework IPA crack.  One way to do this easily is to join xsellize and then add to your sources the xsellize repo. (http://xsellize.com/cydia/user-pass/) Then you can install IPA Prep 2, found in the “X Apps” section of Cydia.

Step 7) Instead of restoring from the iTunes backup, we’re going to restore from the iBaReS backup. Again, see the iBaReS usage scenarios document and read this thread.  In summary: 1) restore Applications ONLY with “update mode” checked, then 2) restore user and mobile data WITHOUT update mode.

Step 8) iTunes will restore your settings, contacts, notes, pictures, and all your apps. Now to restore the rest of your Cydia installs. Open aptbackup and hit restore. It should reinstall all your packages from Cydia. If aptbackup is now hidden (missing icon) after your iTunes restore, load BossPrefs, go to hidden icons, and unhide it. You can also unhide any other hidden icons here.

Step 9) If you had a bunch of category folders and moved most things into it, the iTunes backup will have made these icons disappear. You  can unhide them via BossPrefs.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: