How To Unlock iOS 4.0.2 iPhone 3G Using Ultrasn0w 1.1-1
Apple has releasediOS 4.0.2 to fix the PDF exploit, thus putting an end to JailbreakMe jailbreak for iPhone 4, iPhone 3GS, 3G on iOS 4,iOS 4.0.1 and iPad 3.2.1. Some good news for iPhone 3G and iPod Touch 2G (non-MC) users is that they can still jailbreak using Redsn0w 0.9.5b5-5.
iOS 4.0.2 can be unlocked using Ultrasn0w, as it is still on baseband 05.13.04. Here are the steps to unlock iPhone 3G iOS 4.0.2 to run on unofficial carrier using Ultrasn0w 1.1-1.
1. Jailbreak iPhone 3G on iOS 4.0.2 using Redsn0w 0.9.5b5-5. Select the ‘Install Cydia’ option while jailbreaking.
2. Launch Cydia on your jailbroken iPhone and navigate to Manage –> Sources.
3. Tap Edit, then Add. Enter enter http://ios4.ultrasn0w.org and add it as a source.

4. Let Cydia update it’s sources. Then search for Ultrasn0w 1.1-1 in Cydia and install the app.

Ultrasn0w will automatically unlock your iPhone 3G, which you should then be able to use any unofficial carrier such as T Mobile.

SBSettings Alternative for iPhone 4S/iPad 2, No Jailbreak Required
How to Unlock iPhone 4S on AT&T without Jailbreaking
Save SHSH Blobs of iOS 5.0.1 for iPhone 4S with TinyUmbrella
Gmail App for iPhone, iPad, iPod Touch Available for Download
Enable FaceTime over 3G in iOS 5 [Jailbreak Tweak]
iTunes 10.5.1 for Windows, Mac OS X [Direct Download Links]
Jailbreak iOS 5.0.1 with Redsn0w 0.9.9b8