And one thing worth noting that hacktivation is not supported by this Pwnage Tool, thus as the consequence you are going to need phonebook SIM or official SIM carrier in order to activate it before step further on unlocking your iDevice using Ultrasn0w.
So here is the how to jailbreak iPhone 3GS old bootrom running on iOS 4.1 using Pwnage Tool.
1. As always you need to download and then install the final version of iTunes, if you have not done so.
2. Afterward, launch iTunes and sync your iPhone with your Mac or PC, to back up all your datas you think they are necessary to be kept.
3. Since we are going to use Pwnage Tool, then we need to download it from here. And download iOS 4.1 firmware from this link. Now put the both files on your desktop.
4. Launch Pwnage Tool, and choose iPhone 3GS.
5. Then Pwange Tool will do the job, by automatically detect the firmware you downloaded in the step 3, if it fails to do so, hit "Browse for IPSW"
6. You will be asked a question in this phase, it asks you: “Do you have an iPhone contract that would activate normally through iTunes?” Answer NO, or else it will update your baseband.
7. Wants to see some magical performance, here is your chance. Because Pwnage Tool will create custom firmware for your machine.
8. During custom firmware creation, you will be asked a question again, it will ask you for your MAC account authentication, just leave it blank. Then move ahead to "iOS 4.1 jailbreaker installer package" you downloaded in step 3, it's a zip file, then install it. Soon after the package installation finished, go back to Pwnage Tool, now enter your Mac account password for the authentication purpose.
9. Once the custom firmware building completes it will show “ihaz Success” screen.
10. In this phase, "ihaz Success" will appear, as the sign of ipsw file has been created successfully.
12. You will be prompted by iTunes to pick which the proper location for your new custom firmware 4.1. Then select ipsw file and then hit on "Open"
13. Do not nothing, but make some hot coffee at this stage, as this going to take sometimes for iTunes to installs the new firmware 4.1 in your iPhone. When the installation process done, your device will automatically restart and give you a jailbroken iPhone 3GS running iOS 4.1!
Just in case:
Fix iTunes 1004 or 1015 error and Kick Device Out of Recovery
1.Who knows you might be one of the unlucky ones who receive 1004 or 1015 error message from iTunes. No need to be panic, ignore the message because the firmware is installed already on your device anyway. But that message appearance not without the effect, because it will make your iPhone stuck in Recovery Mode with the "connect to iTunes" announcement.
To solve the problem, TinyUmbrella is the program you need, download Tinyumbreall 4.02.05 then, if you use Mac download TinyUmbreall here, and if you use Windows download it here. After it's downloaded, activate the program then click on the "kick Device Out of Recovery" button. You are now able to normally restart your iPhone.
Fix Cydia Icon With no repositories
2. Another issue that could also appear is Cydia icon on the homescreen is in white and there is no repositories there. To cure that, add this source: http://apt.saurik.com/cydia-3.7 in Cydia. If your Safari crash simply add add http://repo.woowiz.net repository and install Safarifix.
When the jailbreak steps finished and your iPhone 3GS is jailbroken then you can unlock it using Ultrasn0w 1.1-1. And then restore all your back up data you saved in the previous step.
Keep in mind as I mentioned on the first paragraph that we are using unofficial version of Pwnage Tool, thus it's not too recommended to make an adventurous risk, the post only for educational purpose.
And are you using iPhone 4, so here is How To Update iPhone 4 on iOS 4.1 But Keep The 1.59.00 Baseband