When iOS 4 jailbreak first came out, it was only compatible with iPhone 3GS (old bootrom), iPhone 3G and iPod touch 2G (non-MC models). Things were even more trickier for iPhone 3GS. These 3GS devices were not only required to have old bootrom, but they were also required to have previously been pwned or jailbroken on anything (like blackra1n) other than Spirit.
If your iPhone 3GS was not previously jailbroken with anything other than Spirit, iTunes used to throw an error whenever you tried to restore your phone with custom firmware. Sn0wbreeze 1.6.2 later brought support for these Spirit’ed devices. But in case if you are still getting problems restoring to custom cooked iOS 4 firmware (from PwnageTool or Sn0wbreeze), you can use Spirit2Pwn patch to perfectly restore your iPhone 3GS on iOS 4 custom firmware.
NOTE: This applies to iPhone 3GS with old bootrom, previously jailbroken on iPhone 3.1.3 using Spirit.
Step 1: Start Cydia on your iPhone 3GS (old bootrom, jailbroken on 3.1.3 using Spirit) and touch on “Manage” tab on the bottom. Now touch on “Sources” as seen in the screenshot below:
Step 2: Touch on “Edit” and then on “Add”. You will be prompted to enter a url source as seen in the screenshot below. Type “http://repo.woowiz.net” and touch on “Add Source”.
Cydia will now automatically update your sources by following a series of automated steps.
Step 3: Once the repository has been added successfully, Search for “Spirit2Pwn” in Cydia and install this application.
Step 4: Now from here onwards, simply follow our previous guides on how to jailbreak iOS 4 on iPhone 3GS using PwnageTool 4.0 / 4.0.1 for Mac posted here, and Sn0wbreeze 1.6 for 4.0 on Windows guide posted here.
Once you have jailbroken your phone, you can unlock it using ultrasn0w 0.93 (on any baseband), guide for which is posted here.