Wednesday, April 15, 2009
iPhone: jailbreaking and unlocking
OK, since it seems everyone will have to do that sooner or later, I am going to describe here brifly my understanding of the process and what specifically I did to "jailbreak" and "unlock" my phone; whether or not it is applicable to anyone else's situation I cannot say.
First, let's clarify some terminology.
Jailbreaking is the process of "freeing" iPhone from (artificial) restrictions imposed by Apple, in terms of which software it is allowed to run. "Freed", or "Jailbroken" iPhone becomes similar to any other WiFi device, completely open to any changes, run under special version of MacOS. Jailbreaking can be applied to any device working under "iPhone OS", such as (currently) iPhone 2G (older), iPhone 3G (newer), or iPod Touch (any of them).
Unlocking is, generally speaking, a process of making a cellular phone work with any SIM card, as opposed to being "locked" to a particular carrier. Speaking of Apple devices, "unlocking" can apply to (any) iPhone, but not iPod Touch which is not a phone.
These two notions are totally independent.
- There could be phones unlocked but not jailbroken. For examples, Apple cells such phones (officially) either for a premium, or because in certain foreign countries "locking" is illegal, or perhaps for some other practical reasons;
- Apple never officially sells "jailbroken" phones; process of "jailbreaking", while probably legal, is 100% unofficial, can void any warranty you might have, could damage the phone (though this never happened to anyone) and must always be carried at your own risk;
- There could be phones jailbroken but still locked. Someone might do that to be able to install some "unauthorized" software, while still using "official" authorized carrier under "official" plan, so there would not be any need for him to "unlock" the phone;
- To unlock the phone by your own, you must jailbreak it first. At least, I havn't heard of any other way;
- Reportedly, Apple's iTunes allows you to "restore" iPhone/iPod Touch to the "factory" condition no matter what you did to it, so in principle playing with jailbreaking and unlocking should be safe.
Another common source of confusion is when one needs to unlock the phone. Can I buy a phone from an online auction site or from a friend and still used it completely officially, without unlocking, if, let's say, I am already a Cingular customer?
The answer is, "it depends". For "newer" iPhone 3G, you probably can, though you might be forced to subscribe to additional services from AT&T like unlimited 3G internet, even if you don't want it.
For "older" iPhone's, this is a lot more involved. The reason is, Apple originally used a strange marketing maneuver when you were first buying a phone for $399 from any retailer or Internet, and then during activation were forced to subscribe to 2-year contract + additional services - or "unlock" it and use it any way you want. Later, with iPhone 3G Apple switched to more "standard" strategy when in order to buy iPhone you already had to subscribe (and commit), and thus any (new) iPhone no mаtter where from is considered "paid for".
Not so for iPhone 2, where AT&T has no obvious way of knowing if this specific phone has already been "paid for" by completing 2-year subscription or not, and obviously assumes the latter, forcing you to "commit", again. Reportedly, if you can bring a person from whom you got the phone and he could demonstrate that the phone has been fully paid for, AT&T representative might remove this commitment. But initially, you will need it anyway just to get behind iTunes "new service" page - there is no way around it. You can read some rather interesting discussion of the subject here.
OK, now going back to jailbreaking and unlocking. This is basically a 3-step process: Upgrading; Jailbreaking; Unlocking.
Upgrading. Make sure that the latest firmware version (2.2.1 at the time of this writing) has already been jailbroken. If not, you might find some tricks how to "upgrade" you phone to the version which is not the latest. The following however assumes that you are OK with upgrading the iPhone/iPod Touch to the latest firmware version from Apple.
- Install the latest iTunes software from Apple site. Make sure to reboot the computer as instructed;
- Attach iPhone to USB port, fire up iTines and see what it will tell you. It might want to upgrade right away, which is the best; but make sure first download upgrade, and only then install. After download, make sure there is a corresponding file *.ipsw in the diectory
%USERPROFILE%\Application Data\Apple Computer\iTunes\iPhone Software UpdatesIf your phone already has latest version, still try to force it somehow to "upgrade", there must be a way. Also, you can (optionally) "reset" the iPhone to remove any settings and files from a previous user. Whatever you do, make sure that you end up with *.ipsw file in aforementioned directory.
- Exit from iTines and kill all relevant processes. This is important! (or else QuickPWN will be crashing during the installation)
- Download the latest version of QuickPWN and also files bl39.bin, bl46.bin , unzip QuickPWN archive and start the executable (no installation required)
- QuickPWN will first detect your iPhone and will offer you to select *.ipsw file (see above). Make sure it is the right one and confirm.
- On the next screen, select what you want to do: install Cydia (recommended and required for unlock), Installer (recommended), Replace logos (not recommended), Unlock (required)
- You will have to identify locations of *.bin files mentioned above;
- Next screen is tricky. You'll need to play some games with your phone in order to switch it to special "upgrade" mode: hold Home button, then power, then both, etc. Program screen will tell you exactly what to do - just follow very carefully!
- At this moment program commences completely automated process of "Jailbreaking". You can relax and enjoy the show, just be patient and do not touch the phone (or the program) till it is all finished, and phone reboots into new "Jailbroken" mode.
Unlocking. For this to work, you must have an available WiFi network not separated by any NAT mapping or firewall from another computer (does not have to be Windows or Mac) you can use. The simplest approach is of course to use your home WiFi network.
- Remove any SIM card from iPhone (note: this could be tricky). Do NOT insert a new one.
- Make sure you can access Internet (e.g., via Safari browser) from the phone. Configure you WiFi using regular phone settings UI as required;
- Start Cydia, configure it as appropriate, and use it to install OpenSSH;
- Make sure you can access your iPhone from another computer through a SSH (with your favorite client), using it network IP address, user name "root", (default) password "alpine". Enjoy the beauty of accessing your phone with SSH command prompt! (Thanks to Unix-like kernel of MacOS, of course)
So far, we just made sure your iPhone performs well as SSH server, which could be useful to you in many ways; also, keep in mind, that it seems you could only use your phone this way till "power saving" feature kicks in, so either do everything really fast, or adjust power saving mode, or constantly touch the screen to keep it alive.
From this point on, we follow the instructions from here or here.
- Download tiny Lockdown.zip file from here; unzip it to get a few files in a directory named "Lockdown";
- Using your faivorite SSH-based file transfer program, replace iPhone directory /private/var/root/Library/Lockdown with new Lockdown directory you created in a previous step. It could be a good idea to backup "original" content of this directory someplace safe.
- Shut down the phone, insert your SIM card, and boot it up. Everything should work.