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.
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.