So follow the following guide to downgrade your iOS firmware back to the iOS 4.0.1, 4.0.1 and iOS 4.1 if you have SHSH blobs saved:
1. Get the previous iOS first: for iOS 4.1 and for iOS 4.0.2 and below.
2. Set up your iPhone in recovery mode
3. This step only applies to iPhone 3GS, iPod touc 2G & 3G (MC model) and iPhone 4 that have SHSH Blobs saved on Cydia. Make sure you have SHSH files saved, or else there is no way to downgrade your iOS.
- For windows go to-> C:\Windows\System32\drivers\etc\ and locate "hosts" file.
- For Mac OS X navigate to "/etc/" directory by heading to "Go –> Go to Folder" from Finder.
Just like this:
And then save it!
4. Now your iPhone need to be restored to the iOS you've downloaded at the first step. On the iTunes's sidebar click your phone icon, on your keyboard hold left "alt" (Mac) or left "shift" button for Windows" and continue it with click on "Restore" button inside iTunes, afterward release this button.
5. Do not nothing, but make some hot coffee at this stage, as this going to take sometimes for iTunes to installs the iOS you selected for your iDevice. In case you receive the 1004 or 1015 error message from iTunes, just ignore it, means you are on the right road as the firmware you picked already installed successfully.
6. Unfortunately you will likely be stucked in the Recovery Mode at this stage, giving you a message say: "Connect to iTunes". To solve the said problem, you can use a program called TinyUmbrella. Download TinyUmbrealla according your OS you use:
- Jailbreak iPhone 3GS On iOS 4.1 using Pwnage Tool Unofficial Version
- Unlock iPhone 3GS On iOS 4.1 Old Bootrom Using UltraSn0w
Note: make sure you remove 22.214.171.124 gs.apple.com you added on the step 3, so you will be able to update to the upcoming firmware versions.