One of the main reasons of downgrading the iOS version is for binary app testing. XCode3.2.3 allows you to compile with the latest iOS SDK using the Base SDK and set the targetiPhone version in the iPhone OS Deployment Target.

xcode-1.png

xcode-2.png

On the iPhone simulator, you could only test your application using 3.2 or 4.x. So, to test for devices > 3.1, we actually need a dedicated device for it. The iPhone3G that I passed on to my wife will suit the scenario.

Before doing anything, it is necessary to make backups.

  1. Currently the iPhone 3G is on 4.1. Let’s Backup/Sync. Just in case we need to go back to 4.1. (Note: you can’t use this backup when 3.1 is loaded, yeah it sucks, find out later on.)

  2. Contacts. Sync the contacts with Google Contacts. From there, we could have them exported to CSV later on just in case something goes wrong.

Below are the steps taken to downgrade iPhone 3G to iOS3.1:

  1. Download the firmware from http://www.iclarified.com/entry/index.php?enid=750. I downloaded 3.1.0 (3G): iPhone1,2_3.1_7C144_Restore.ipsw

  2. From XCode’s Organizer, choose the 3.1.0 and hit Restore.

  3. During the restore process: “the baseband cannot be rolled back.”

baseband.gif

On the device, you will only see the Apple Logo and the progress bar to its full bar. Don’t panic.

device.jpg

  1. Hit OK.

  2. QUIT XCode. The device blacks out and you will see the connect to Itunes graphic.
    iTunes.JPG

  3. Install iRecovery and libusb-package.

iRecovery-1.png

Now we need to tell the device to auto-boot again, save the settings. Enter the ff commands:

iRecoverty-2.png

  1. Disconnect the USB. Turn off the device (hold home+power button). Turn on device (power button). Open iTunes. We should be greeted with the Activation Screen.

activation.png

  1. Restore from the last backup/sync doesn’t work.

backup-fail.png

  1. Restore contacts from Google Contacts or accept bashing from wife? I’ll go with the google contacts sync. :)

  2. Check version from settings
    iphone-3.1.jpg

References:
http://www.iclarified.com/entry/index.php?enid=750
http://www.funkyspacemonkey.com/downgrade-iphone-os-40-313-mac-windows