Apple iOS 4.0 final release has been available for iPhone 4, 3Gs, 3G, and iPod Touch.So if you owned iDevices you can easy upgrade your iPhone OS to iOS 4.0 either via iTunes or by manually download the .ipsw file of iOS 4.0.
If You Face Any Trouble in Unlocking or JailBreaking Any iPhone, You Could Get Lifetime support and Exclusive Unlocking Tools for Just One time pay – Click Here
Here is the manual steps to downgrade iOS 4.0 to 3.1.3. Note before starting to downgrade iOS 4: you will need the ECID SHSH certificate for firmware 3.1.3.
Steps to Downgrade iOS 4.0 firmware to 3.1.3
1- Windows users: Navigate to c:\windows\system32\drivers\etc\ then double click on the “hosts” file and open in a notepad. Mac users: Navigate to the path “/etc/” and open the hosts file with TextEdit. (I’am in Windows and using NotePad2)
2- At the end of the “Hosts” file simply add the string “184.108.40.206 gs.apple.com”.
3- Then set up your device in recovery mode by simply turn off and unplug your device from your computer >> press and hold the Home button while reconnecting the USB cable to your iPhone >> after iPhone is connected it should power on the device >> continue holding the Home button, and you will see the iTunes logo appear and then finally a “Connect to iTunes” will be displayed >> release the Home button now.
4- Now open iTunes and do a normal reset by holding down the SHIFT key (Windows) or Alt key (Mac) and clicking restore in iTunes >> now select the original 3.1.3 firmware and wait for the completion
5- So now you’ve downgraded your iPhone / iPod Touch firmware back to 3.1.3
You could always get support from UnlockAlliPhone.com about any Unlock & JailBreak issue of any model of iPhone including iPhone 2G,3G & 3GS and also upcoming iPhone 4. They provide Premium Members Support for life time. Means just pay one time a small fee and you will receive support(real human support – avg response time 2 hour) for all present & future version of iPhone.