From ModMyiFone - Wiki
Part 4, Unlock
This is the final part, part4, of the OS X iPhone Unlock Guide.
I cannot stress enough, make sure you are running the latest version of the iPhone firmware, 1.0.2. This has already been mentioned in bold, red font in this tutorial a couple times, but I will repeat it here. Reports say that if you do this method while running 1.0.0, you will NOT be able to get service with any other carrier that AT&T, and there IS NO FIX for this at the moment.
Download the Unlock.app (mirror) by Erica Sadun, lockdownd (mirror - make sure you unzip this after downloading), and CyberDuck (also make sure you double-click this file to extract it).
Step 1
Go to Settings>General>Auto-Lock>and set it to Never.
Check your iPhone's IP address. This can be found by going to Settings>Wi-Fi on your iPhone itself, and clicking the blue arrow next to the network you're connected to. The IP Address will be displayed on the page that comes up. Note that for the next step.
--Warning-- If you have not installed the BSD tools, your iPhone will not function. Replace lockdownd with the original file and install it before continuing.
Step 2
Open CyberDuck. Click Open Connection in the top left.
In the connection window, input your IP address from Step 1, and make sure the rest of your info matches mine here.
Protocol: SFTP, server: your.ip.address, port: 22, username: root, password: dottie.
CyberDuck will take between 30-45 seconds to connect, and then will show you this window:
Click the dropdown box, and go to /
Now, open up /usr/libexec, and drag the lockdownd file you downloaded in the beginning of this part of the tutorial into it.
It will ask you to overwrite the file. Click Continue, and it will upload the file.
Now drag the Unlock file from your desktop onto the /Applications folder in CyberDuck.
It will show a progress window, and will install.
Good! Now, turn off your iPhone (by holding the Sleep button for about 3 seconds, then sliding the power off switch). Take out the SIM card by inserting a paperclip into the small hole in the top of the iPhone by the Sleep button, and gently pushing. Turn the iPhone back on by pressing the Sleep button once more.
Step 3
Now you will see a new icon on your iPhone's screen titled Unlock.
Click it. Assuming all went well, you should see All files found. Ready to go. Press Start. Good! Now press start.
This process will take a little over 20 minutes. Let it run! Once it completes, you will get a success message! Yay! Turn off your iPhone again, insert your non-ATT sim, and turn the phone back on. You should see your carriers name in the top now, you are the proud owner of an unlocked iPhone!
Step 4 (cleanup
Now, you don't have to, but I like to delete the Unlock folder from Applications using CyberDuck, so the app doesn't remain on my iPhone. After all, you only need it once. ;) Assuming updates break the unlock, you will need a different version of the app anyway.
You should also use Installer to uninstall OpenSSH; if you want to leave sshd running, that's fine, but you really should change your root password. If you don't know how to do this, just uninstall OpenSSH.
Problems? Check the F.A.Q.!
NOTE: To set up T-Mobile's EDGE, make sure you have the Total Internet Add-On (with or without VPN, to enable VPN you must call Customer Service) enabled on your account (its $19.99/month as of September 12, 07). T-Zones will work as well - check this link for info.
Do NOT update your phone in iTunes until it has been proven the unlock will carry through, or a new version comes out.
Then go to Settings>General>Network>EDGE> and change the APN to internet2.voicestream.com, and leave the user name and password blank! This will only work if you have the Total Internet Add-On enabled on your line. If you have the $5.99 t-zones, this won't work, since the iPhone doesn't have proxy settings built in. If you have the Total Internet Add-On w/ VPN enabled on your line then use: internet3.voicestream.com as your APN.
Recently it has been found by Syasses in the Hackint0sh forum that you CAN get the $5.99 T-Mobile T-Zones plan working by adding a proxy.pac file and editing your preferences.plist file. All information on this can be found here: http://www.hackint0sh.org/forum/showthread.php?t=6365 .
For a step-by-step tutorial on getting T-Zones working on your iPhone, check out this quick guide.
http://arashpayan.com/blog/index.php/2007/09/17/t-zones-aka-599-internet-access-on-the-iphone/