Sherif Hashem already showed us a video to activate iPhone 4 / 3GS / 3G on iOS 4 / 4.0.1 but unfortunately Apple got the phonebook SIM card trick and fixed it by hooking the activation wildcard ticket to the ICCID of the used SIM. But, don’t worry you can pass this by following the guide below to install a small patch!
Step 1: Purchase a PhoneBook Card from DITS online store or eBay
Step 2: Upgrade your iPhone to iOS 4.0.1 [Download and Guide posted here] then activate it with the PhoneBook Card by inserting it as a normal SIM. Your iPhone will be activated for a while but it will be stop again whenever you remove your Card.
Step 3: Now, Go ahead and jailbreak your iPhone using JailbreakMe 2.0 “Star” by following our guide posted here.
Step 4: After the jailbreak is done, open Cydia and touch on Manage -> Sources -> Edit -> Add -> and write in http://cydia.pushfix.info as shown below,
Step 5: Now Search in Cydia for “Hacktivation Patch (lockdownd)” and Install this app to allow hacktivation of your device.
Step 6: Your device will be rebooted automatically, after reboot go ahead and unlock your iPhone 4 / 3GS / 3G on any baseband using Ultrasn0w 1.0-1 by following our guide posted here.