I have seen quite a few people you have either updated to 4.0.2 and want to downgrade back to 4.0 or 4.0.1 and jailbreak or are on 3.1.3 and want to update to 4.0 or 4.0.1 and not be forced to go to 4.0.2. Using tiny umbrella is mainly for iPhone 3GS/4, ipod touch 3G, and iPad since you do not need SHSH for previous devices (although there is a soft SHSH being done on iPhone 3G for 4.0 and up firmwares now but that can be easily avoided by using redsn0w or pwnage tool). For this to work you NEED to have your SHSH for 4.0 or 4.0.1. If you do not then tiny umbrella will not help you restore to these firmwares. You will just have to wait until the next jailbreak comes out.
1. Download the latest tiny umbrella from: The Firmware Umbrella . I would recommend you reading what the developer has written on there about his tool. It is very informative and he explains what is going on and any errors that you may come across when using tiny umbrella.
2. Run tiny umbrella (on windows right click then choose run as administrator). Click “Save my SHSH” ,this will download your most recent SHSH from cydia. To download a previous firmware SHSH click on advanced then choose the firmware you want for your device. If you never used tiny umbrella when apple was signing that specific firmware or pressed the “make my life easier” button in cydia then it may come back with an error saying there is no SHSH, if that is the case I am sorry but that means that you will not be able to restore to that firmware. You can check what SHSH you have on file with cydia by opening cydia, the first page at the top will tell you what firmwares your device can restore to. As far as SHSH go it does not matter what firmware is on the device itself. It only matters as to what firmware apple was still signing at the time you pressed “make my life easier” in cydia or saved your SHSH with tiny umbrella. Even if you are still on 3.1.3 you cannot get your SHSH now since Apple is not signing that firmware anymore. Likewise even if you are on 3.1.3 you can get your SHSH for 4.0.2 now since that is the firmware Apple is currently signing (or 3.2.2 for iPad). Although it is useless right now to have 4.0.2 SHSH it may be beneficial in the future especially to save your SHSH for 4.1 when it comes out since more than likely a jailbreak will be out for that and this would mean you can restore to a firmware that can always be jailbroken.
3. To restore simply press “Start TSS Server” then open itunes, hold down shift(windows) or option(mac) then press restore/update. A windows will open where you can choose the firmware that you want to restore to. You can download firmwares from here: IPhone Firmware Download Links – ModMyi – Wiki
It is best to use a browser other than internet explore for this as internet explorer will download the file as a .zip file when it is supposed to be .ispw. If that happens simply rename the extension from .zip to .ipsw. Firefox and other browsers do not have this issue.
4. If near the end of the restore process you get error 1004 or 1015 do not panic it is expected. Just use the “kick device out of recovery” button and your device should boot up. If that doesn’t work you can download recboot from here to boot your device: Fix iPhone Recovery Mode Loop – Works On iPhone 4 & Windows 7
5. From here you should be good to use jailbreakme.com. There are plenty of tutorials on that right now so I won’t get into that. If not on an official carrier you are going to need either a sim from the original carrier of the iphone or a phonebook sim to activate the iphone. If you use a phonebook sim you have to add cydia.pushfix.info to cydia under sources after jailbreaking and install “hacktivation patch”. This will stop any problems after unlocking when putting a non-official carrier sim in the iphone.