This is a guest by our regular reader, Kian Torab.
Sometimes your iPhone can’t start up properly and the only way to fix it is to do a full restore. In the case you’re using a jailbroken iPhone, if you simply hit the “Restore” button in iTunes, it will install the latest version of iOS (as of now, it’s iOS 4.1) and may make your device un-jailbreakable. Here are step-by-step instructions on how to safely restore or downgrade your iPhone to a version of iOS (aka firmware) other than the latest version.
For this to work you need an iPhone that’s already been jailbroken and has a copy of Cydia installed on it. You need your SHSH blobs saved.
Save the SHSH blobs for your iPhone
Before you start with this process you need to make sure your SHSH is saved on Saurik’s server. Normally, if you have jailbroken your iPhone and activated Cydia, your SHSH blobs should already be saved.
In case you haven’t done so, open Cydia on your iPhone. Wait for it to load and refresh all pages. You will see some variation of one of the two images below. If you see “Make my life easier, thanks!” then click on it. It may take a few days for your SHSH to be saved. If you see “SHSH: iOS xx” then you are ready.
Changing Hosts File
1. Make sure your HOSTS file is setup correctly. This will force iTunes to access signatures stored on Saurik’s server instead of asking Apple to sign the firmware.
For Mac user:
i) Open Finder.
ii) Hold down Command+Shift+G or click on Go on the top menu and then click on “Go to Folder”.
iii) In the field type “/private/etc/” and click “Go”.
iv) Find HOSTS file (hint: just type “hosts” and Finder will select it).
v) Drag the file onto your Desktop.
vi) Double click on the HOSTS file on your desktop. Finder may ask you to choose a program to open the file with. Select “TextEdit”.
vii) Make sure “220.127.116.11 gs.apple.com” is somewhere in the file. If it doesn’t exist then add it at the end. Make sure a pound sign ‘#’ is not in front of that line.
viii) Save the file and exit out of the editor.
ix) Drag and drop the file back onto the “/private/etc/” folder.
x) Click on “Authenticate” and enter your password.
For Windows user
i) Open “Windows Explorer”.
ii) Browse to “c:\windows\hosts” (Windows 95/98/ME) or “c:\winnt\system32\drivers\etc\hosts” (Windows NT/2000) or “c:\windows\system32\drivers\etc\hosts” (Windows XP/Vista/7).
iii) Find the HOSTS file. Right click on it and click on “Open With…” and then select “Notepad” from the list.
iv) Make sure “18.104.22.168 gs.apple.com” is somewhere in the file. If it doesn’t exist then add it at the end. Make sure a pound sign ‘#’ is not in front of that line.
v) Save the file and exit out of the editor.
Restore iPhone to the Specified version of iOS
2. Download a copy of the version of iOS firmware you wish to install from here and save it on your Desktop.
Note: You can only install a version of iOS you have SHSH blobs for. As you can refer to the above cydia screenshot, I can install iOS 4.0, 4.01, or 4.02 on my iPhone. Also, you need to install an iOS that can be jailbroken. At this time only 4.0 and 4.0.1 can be jailbroken. For those who are accidentally upgraded to iOS 4.1, it is recommended to download the iOS 4.0.1 firmware.
3. Open the latest version of iTunes (i.e. iTunes 10.0 as of this post is published).
4. Find your iPhone on the left window under “DEVICES”.
5. Sync your iPhone. iTunes should automatically backup your device as well. If you are paranoid and want to make sure your device is backed up then right click on your device and click on “Back Up”. This may take a few minutes.
6. Once your iPhone is backed up, hold down (Mac: Option key) or (Windows: Shift key) and click on “Restore”.
7. iTunes will prompt you to choose a file. Point the browser to Desktop and select the iOS firmware you downloaded earlier.
8. Sit back and relax! This step may take 10-20 minutes.
9. iTunes will prompt you to setup the iPhone “as a new” or “Restore from the backup”. Select the appropriate option, but most likely you want to restore your iDevice to the backup you made earlier in the process.
10. Once the process is complete and your iPhone is restored you can jailbreak your iDevice again.
To jailbreak iOS 4.0 or 4.0.1, you can use JailbreakMe and refer to the detailed guide here.
Kian Torab is an independent app developer and technology writer based in Salt Lake City, UT. He occasionally contributes to Simon Blog. He has developed an iPhone app called Torch Plus, the fastest and only Dual Flashlight app on iTunes.