You cannot use JailBreakMe method to jailbreak and unlock iOS 4.0.2 on iPhone 3G. However you can still jailbreak and unlock iPhone 3G using redsn0w. Here are the instructions:
Run RedSn0w and point it at the 4.0 IPSW. (Yes – point it at the 4.0 IPSW even though you’re at 4.0.2). This will also hacktivate your iPhone3G at 4.0.1 if you haven’t already been activated by iTunes.
If you need a carrier unlock – install ultrasn0w in Cydia (add repository http://repo666.ultrasn0w.com). For T-Mobile in the USA remember to turn off 3G mode in Settings→General→Network.
Have you already updated your device to the version iOS4 and want to unlock your 3GS? Firstly there was Redsn0w, now PwnageTool is available, which can easily help you. Here is a simple and easy tutorial for jailbreaking iPhone 3GS (old bootrom). Warning: this is not an official release and therefore may be some bugs that can destroy your device or delete some important information. So be careful while using it!
Go to /private/var/root/Library/, delete original lockdown folder and put this lockdown folder after you extract it from the zip file
Restart phone
If you are not jailbroken:
Sherif Hashim discovered that you can activate your iPhone 4, iPhone 3GS or even iPhone 3G without the original carrier SIM card. You need a “phonebook sim card” or 02 simcard. You can buy these type of sim at radioshack, bestbuy or other mobile electronics store (for example here).
Once you get passed the Emergency Call screen, connect to Wifi, jailbreak using JailbreakMe.com and unlock using ultrasn0w. Once that is complete you should be passed activation and unlocked (able to use any sim). If you get a different simcard error, do the following final step:
Go to /private/var/root/Library/, delete original lockdown folder and put this lockdown folder after you extract it from the zip file
Restart phone
If you have itunes invalid response problem:
Connect to wifi and ssh to your phone (via winscp, putty, terminal, etc).
Navigate to your lockdown folder (/private/var/root/Library/).
Delete pair_records folder
Reconnect the cable and see that your invalid response problem is gone.
If you bought your iPhone 4 on ebay you will need the official sim (at&t) or a universal sim, like ones you can grab at bestbuy for $10 this will get you passed Emergency Screen.
MuscleNerd tweeted today that the recent redsn0w utility is able to jailbreak the iOS 4.1 beta2 on iPhone 3G and iPod Touch 2G. This is useful for developers only, however good news for everyone.
Here’s some info from the DevTeam wiki page:
If you’ve updated to 4.1beta2 on iPhone3G or iPod2G(non-MC), you can use this redsn0w from June to jailbreak. Just point it at the 4.0 IPSW (the public one, not the developer GM one).
(Yes – point it at the 4.0 IPSW even though you’re at 4.1beta2).
Don’t do this if you need the ultrasn0w carrier unlock!!
Note 1: This won’t hacktivate your iPhone3G – but for those with legit access to the 4.1beta2 this shouldn’t matter. Please don’t pirate Apple software
Note 2: If you’re at 4.1beta2 you’ll probably experience network problems after jailbreaking. Until a new version of redsn0w is released, you may need to rely on afc2 access (such as FunBox-like file browser programs) to manipulate your filesystem.
Note 3: This is recommended only for power users who can deal with the problems that will pop up as the JB apps fall further behind the beta firmwares.
Run RedSn0w and point it at the 4.0 IPSW. (Yes – point it at the 4.0 IPSW even though you’re at 4.0.1). This will also hacktivate your iPhone3G at 4.0.1 if you haven’t already been activated by iTunes.
Install ultrasn0w in Cydia (add repository http://repo666.ultrasn0w.com) if you need a carrier unlock (and in the USA, remember to turn off 3G mode in Settings→General→Network).