Conquering the Apple iPhone

It really pays to work for a company that provides room for creative investigation and experimentation as a matter of corporate principle. This way we get nice toys to play around with. A few weeks back our very first Apple iPhone arrived. Okay. A lot of people were enamored by its good looks and cool user interface. Believe, even I found it cool. A good number of people were also impressed by its new application development model (all applications are web-based), multi-touch screen and many other innovations by Apple.

But, my interest is totally different. A jailbroken Apple iPhone provides one of the most powerful application development environments since the HP iPAQ with Linux was discovered. The only difference is that we get full to use the BSD-based MacOSX mobile inside. Yes. Full system shell, ability to install native tools and other neat features.

After a few weeks of waiting, the Apple iPhone has finally landed on my hands. Fortunately, by this time, there are a lot of sites documenting how to get into the innards of an Apple iPhone. Here are some of the most helpful ones. I suggest you follow these tutorial in the order I am specifying them. I re-did this process around four (4) times because it bricked the iPhone at multiple times. If you are getting an already activated iPhone I suggest you restore it first with iTunes. Not following the instructions in the order mentioned could brick the iPhone.

  1. Restore iPhone to Factory Settings. Press both the home and the power button at the same time for around 25 seconds (sometimes more). Just wait until you see the exclamation point on yellow triangle. Then plug the iPhone into your PC. Make sure you have iTunes installed. Then select the iPhone in iTunes and select the “Restore” button.
  2. Bypass AT&T Activation - HackTheIPhone Site. I used the standard DVD Jon method and it worked like a charm. This may fail if you try to do this using an already activated iPhone that got deactivated some how. This is what happened in my case. Thus, I was forced to do the entire process again.
  3. Before JailBreaking the iPhone - HackTheIPhone Site. Pretty standard preliminary stuff. Just follow it up to setup your working filesystem.
  4. JailBreaking the iPhone and Installing SSHKit and the iPhone binkit - HackTheIPhone Site. After installing SSHKit, the document will give you the option to change your password. DO NOT CHANGE YOUR PASSWORD YET. This is because you might mess up the permissions and cannot log into the system anymore. It is best you install the iphone-binkit first and complete that BEFORE you change your root password. I also suggest you edit your master.passwd file using your SFTP client instead. This way the permissions don’t get messed up. Again, I bricked the iPhone in this case. I was able to determine permissions were the problem because the iPhone filesystem stores its logs in the /var/msg file. Beware, the file is pretty big.
  5. Installing the Installer.app - HackTheIPhone Site. This tool is cool because it allows you to install application without having to resort to jailbreaking and tethering.

Other stuff that you may encounter.

  • iPhone because unactivated after installing SSHKit. This happens when you try to SSHKit an iPhone in a computer that you did not jailbreak it in. I suggest you do the entire thing again from a freshly restored iPhone.
  • Mismatched ICCID. After activating the iPhone and if you notice this after doing a jailbreak instead of seeing the iPhone status as Activated. It is ok. I seem to be managing all my hacking initiatives without having to bother with status.
  • Unable to login after changing the root password in the master.passwd file. Then unable to proceed to login even after restoring the master.passwd file. Check out the steps above. It is best to change your root password AFTER installing SSHKit and the iphone binkit. Also change the password using the built in context menu “edit” in your scp or sftp client. I suggest you do the entire thing again from a freshly restored iPhone.

There are still a lot of things for me to try out. I am trying to get a working cross compiler in Linux but the problem is that I have a lot of missing libraries. It would have been easier if I were usingMacOSX or at least Darwin x86. Maybe, I can build a Darwin x86 VM running on my PC as a VMWare instance. Pwede.

Hope my experience helps you go through a more painless iPhone hacking. Again, try at your own risk. Good luck!

One Response to “Conquering the Apple iPhone”

  1. It’s hip2b2 (Mobile, Security, Web 2.0, Pipe Dreams and More) » Blog Archive » Conquering the Apple iPhone II - Tested on Globe and Smart Postpaid Says:

    […] This is the next phase of my iPhone cracking exercise. The first installment can be found here. However, this guide should be standalone since I am flashing the phone and restoring to factory settings. Here is a picture of it working! Sorry I could not get a better picture. […]

Leave a Reply