We had previously written a guide on how to find iPhone firmware and baseband versions? So what if you accidentally upgraded your device to iPhone 3.1.3?
Since the situation is different for every iPhone model, I have decided to write up a post with answers to the question.
iPhone 2G
Jailbreak? Yes Unlock? Yes Relax, you’re lucky. The original iPhone has been permanently pwned, and nothing Apple does can prevent your jailbreaking or unlocking your phone. If you have upgraded your phone, you will have lost your jailbreak and unlock, but you can easily get it back by running redsn0w 0.9.4. When it asks you to point it to the firmware currently installed on your iPhone, you will have to “trick” it by pointing it to the 3.1.2 ipsw instead. Redsn0w will jailbreak your phone and with Ultrasn0w, which you can use to unlock your phone.
iPhone 3G
Jailbreak? Yes Unlock? No You can jailbreak your phone using redsn0w 0.9.4. When it asks you to point it to the firmware currently installed on your iPhone, you will have to “trick” it by pointing it to the 3.1.2 ipsw instead. Sadly there is currently no way to unlock the new baseband installed with this firmware upgrade. This means that you can only use your phone on the carrier it is officially locked to (unless your phone is factory unlocked). There is not currently any prospect for unlocking your phone.
iPhone 3GS
Jailbreak? Maybe Unlock? No Whether you can jailbreak your iPhone depends on whether you were previously jailbroken and have your phone’s ECID SHSHs on file in Cydia (you can check this by opening Cydia on your phone and seeing if it says in green at the top of the main page: “This device has SHSHs on file for iPhone OS: 3.1.2”). If you do have this information on file, you will be able to downgrade your phone to 3.1.2 using Saurik’s server to sign your install request (follow instructions here). You will then be able to jailbreak your phone using redsn0w or blackra1n. If you do not have your SHSH on file, you cannot downgrade your phone’s firmware at this time, and you will therefore be unable to jailbreak your phone. All of the 3GS jailbreaking tools currently available rely on a USB exploit which has been patched in the 3.1.3 firmware. Since you cannot downgrade to 3.1.2 or earlier, you are out of luck for jailbreaking at the present time. Sadly, whether you can jailbreak or not, there is currently no way to unlock the new baseband installed with this firmware upgrade. This means that you can only use your phone on the carrier it is officially locked to (unless your phone is factory unlocked). There is not currently any prospect for unlocking your phone. [via]macrumors