The following step by step guide will help you rollback / downgrade to iOS 4, iPhone 3.1.3 and 3.1.2 from iOS 4.1 Beta as long as you have SHSH blobs saved for the respective firmwares for iPhone 4, iPhone 3GS, iPhone 3G and iPod touches.
Step 1: Download the required old ipsw firmware files. (Download links: iOS 4, 3.1.3, 3.1.2)
Step 2: Put your device into DFU mode (not recovery mode).
So what we will do is to trick iTunes into thinking that it is watching Apple servers, while in real, we are going to change the address to Saurik’s server.
Navigate to C:\Windows\System32\drivers\etc\ and locate “hosts” file.
Mac users can get to “/etc/” directory by going through “Go –> Go to Folder” from Finder.
Open this “hosts” file in Notepad (for Windows) or TextEdit (for Mac OS X) and add this
line as shown in the screenshot below:
Now simply save this file and you are good to go!
NOTE for Windows 7 and Vista: Start “Notepad” with Administrator privileges by right clicking on “Notepad” app, and click on “Run as Administrator“ option.
Step 4: You will now have to restoreyour iPhone or iPod touch to the firmware you downloaded in Step 1. Click on your phone icon from the sidebar in iTunes. Now press and hold left “alt” (option) button on Mac (Left “Shift” button on Windows) on the keyboard and then click on “Restore” (Not “Update” or “Check for Update”) button in the iTunes and then release this button.
This will make iTunes prompt you to select the location for your downloaded firmware file. Select that ipsw file and click on “Open”.
Step 5: Now sit back and enjoy as iTunes does the rest for you. This will involve a series of automated steps. Be patient at this stage and don’t do anything silly. Just wait while iTunes installs firmware on your iPhone or iPod touch. Your iPhone screen at this point will be showing a progress bar indicating installation progress. Now at some point, iTunes will throw 1011, 1013 or 1015 error at you. This is normal, just ignore this error as the firmware has already been successfully installed on the device.
Step 6: Now you will need to exit your device from Recovery Mode. To do this, download a program called RecBoot (Windows / Mac). Run it and the click on “Exit Recovery Mode” button. Your device will now restart normally.