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.
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).
For those who can legitimately activate to the iPhone3G 4.0GM seed, the “point to previous IPSW” redsn0w trick works and will jailbreak your 4.0GM. The “trick” is to point redsn0w at the 4.0beta4 IPSW instead of 4.0GM (do this after you’ve updated to 4.0GM and activated through the new iTunes 9.2 on your Mac). Since the carrier unlocks aren’t yet supported at 4.0, don’t do this if you use yellowsn0w/ultrasn0w/blacksn0w. Many JB apps are still pretty buggy in 4.0, so again this is mostly useful only for developers of those JB apps.
Note: If you’re experiencing MobileSafari crashes, double check that you’re running the version at the bottom of this page.
For those without legit iPhone3G 4.0GM seed access, please wait until the full public 4.0 release for updates to the jailbreak tools.
So this is a minor update, which fixing only the accuracy of the 3GS battery meter and the stability of some third-party app launches. This update is avaliable via iTunes.
New firmware 3.1.3 also introduces a new version of the baseband, the 05.12.01. So if you need unlock do not update! DevTeam also warns us:
If you care about your jailbreak and unlock, don’t update your device – 3G and 3G(S) owners should pay particular attention to this warning.
PwnageTool and redsn0w are not yet compatible with 3.1.3
Experimenters show that the latest version of redsn0w 0.9.2 is able to jailbreak iPhone 2G, iPhone 3G and iPod touch 1G. Just point it at the 3.1.2 IPSW (download here) after doing update or restore to firmware 3.1.3. Sounds like DevTeam will release an updated version of redsn0w that will handle firmware 3.1.3 officially. They say iPod touch 2G with firmware 3.1.3 is also jailbreakable.
Users report that unlock software, blacksn0w and ultrasn0w, doesn;t work with the new baseband.