How to Unlock iPhone 3GS, iPhone 4 on iOS 5.0.1 Using UltraSn0w
After you have jailbroken your device, simply follow the steps below to unlock your phone for use on unofficial carriers.
Step 1: You must update to 5.0.1 using Sn0wbreeze in order to preserve your baseband(be sure to check the 'Hacktivate' option under general settings when you are making the firmware). The unlockable basebands are 04.26.08 – 05.11.07 – 05.12.01 – 05.13.04 – 06.15.00 – 01.59.00
Step 3: Install Ultrasn0w 1.2.5 through Cydia.
Step 4: Turn off your device, insert your unofficial SIM and reboot the phone. Once the phone reboots you should be unlocked on 5.0.1!