Monday, September 17, 2007

Dare to Hack an iPhone?

Remember when the iPhone was first released? In those olden days of three months ago? There were all those lists, circulating on the Web, of features that people wished had been included in the iPhone. Those lists may not yet have shrunk to zero, but the currently available hacks have substantially shortened them. That's in less than 3 months from iPhone's release.

In the classic scene from "Marathon Man," an ex-Nazi dentist (played by Laurence Olivier) menacingly asks Dustin Hoffman (who is strapped to a chair): "Is it safe?"

It's the same question being asked these days by a growing number of iPhone users. Unlike Olivier, these users have no evil motive behind the question. Instead, they simply want to know: Is it safe to hack my iPhone? Do I need to worry about losing my data or damaging the phone so that it no longer works? Must I first take a course in programming or Unix before I can perform the necessary surgery?

Answering iPhone hacking questions is a bit like trying to take a photograph of a race car while it zooms by at 200 m.p.h. By the time you press the button to snap the shot, the car is gone. That's how fast the world of iPhone hacking is changing. Still, I can now offer a definitive answer to the "Is it safe?" question. The answer is "Yes."

Easier by the Day
To be clear, by hacking, I mean modifying and customizing your iPhone so as to add to its capabilities. I am not talking about hacks that involve breaking into someone else's iPhone.

If this column had been written two months ago, I would have advised not to even attempt hacking your iPhone, unless you were familiar with Unix and/or did not worry about potentially turning your iPhone into a paperweight. Even so, I would have said it wasn't worth the risk or effort. It would likely take you at least several hours to do the needed research, accumulate the "tools" and actually carry out the task. The reward for all this work would have been minimal. There was not much you could do with a hacked iPhone, other than admire your own handiwork.

If I had written this column one month ago, I would have admitted that hacking was now a viable task for mere mortals. Utilities such as iFuntastic removed much of the heavy lifting, such as automating the critical task of jailbreaking (the name hackers gave to the changes needed to gain access to the iPhone from applications other than iTunes). Plus, there were now at least a few useful and fun things you could actually do with a hacked iPhone, such as adding custom ringtones or taking screenshots of your iPhone.

However, you were still required to work in Terminal, changing file permissions and entering other Unix commands. It was easy to make mistakes and the process sometimes failed even if you did it all correctly, even if you had a step-by-step tutorial to guide you (such as this one by Chris Breen and Ben Long).

Regular Rehacks Required
Writing this column today, I can unequivocally state that hacking an iPhone can be easily and safely done by almost any Mac user. You can do it all without ever having to launch Terminal or know a single Unix command. If you feel competent to use Mac OS X utilities such as TinkerTool, you are skilled enough to hack your iPhone. Even better, the number of useful things you can do with a hacked iPhone keeps growing every day. For starters, you can add a Finder-like utility, a launcher, a text editor, an AIM program and a variety of games.

There is only one remaining hassle: Whenever Apple (Nasdaq: AAPL) releases an iPhone software update, the update will initially fail to install. This is because, when the update installer recognizes that system files have been hacked, it refuses to proceed. You can still update your iPhone. However, you will need to do so by restoring your iPhone, rather than merely updating it.

Restoring is a considerably more time-consuming task than updating. You have to resync all your content (including all your music, video, and photos). However, the real kicker is that all your hacking modifications are wiped out by the restore. You have to do them all again. Fortunately, the hacking process is now simple enough that this should not be a big deal. I expect that even this obstacle will be overcome soon, as someone figures out a one-step method to reinstall hacks after an update.

Hacker Beware
The only real "danger" from installing an update is that Apple may include changes designed to prevent existing hacks from working. So far this has not happened, and I expect this to remain the case. My guess is that Apple is content to let the hackers have their fun. It doesn't hurt iPhone sales nor does it affect the vast majority of users who will never consider hacking their phone.

Caveat: There is always a small risk that a given hack will cause some unexpected problem. That's why most hacks include a warning such as "This software comes with absolutely no warranty of any kind. If it should cause any harm to your iPhone or data, we shall not be held responsible." You should take the warning seriously. Still, I know of no instance where a problem has occurred that could not be remedied by restoring the iPhone. Just make sure you have a current sync of your phone before you begin your hacking attempts.

How to Hack
OK. I've convinced you to give hacking a try. How exactly do you go about it? I'm not going to provide a detailed step-by-step tutorial here (it would require another column!). However, here is an overview that should be sufficient to get you started:

The first step is to get a free Mac OS X application from Nullriver Software called AppTappInstaller (sometimes just referred to as Connect your iPhone to your Mac, quit iTunes if it is open, and launch AppTappInstaller. Follow the instructions and, when you are done, an application named Installer will appear among the icons on your iPhone's home screen. Tap it to launch it. From here, assuming you are connected to the Internet , via EDGE or WiFi, you can install virtually any existing iPhone program. Just select what you want from the list of programs Installer provides. At this point, a wired connection between your iPhone and your Mac is no longer required.

One option you will certainly want to install is Community Sources. This adds a wealth of additional software to Installer's list, software not created by the Nullriver Software. Next, install a tool such as Launcher, which allows you to access applications beyond the maximum of four icons that can add to the iPhone's home screen.

If you are at least a bit technically inclined, you will want to add OpenSSH. This will let you use a Mac OS X FTP utility (such as Fetch or Transmit) to transfer files back and forth between your iPhone and your Mac. Doing this also requires that you know the iPhone's IP address (obtained from the WiFi settings section on your iPhone), user name (root) and password (dottie, by default) for the iPhone account. More details regarding these settings are covered elsewhere, such as in the Chris Breen article I cited above.

Dead Simple
After that, start having fun. Choose whatever you prefer from among the ever-expanding variety of games and utilities that are listed. One of the first programs I installed was Dock, a launcher application that (in its latest version) includes an option to take iPhone screenshots and store them in the iPhone's Camera Roll folder.

Should anything you install not work as you expected or if you simply decide you don't want it, you can use Installer's Uninstall feature to remove the software. Installer also automatically notifies you of updates to any software you have installed.

AppTappInstaller is truly the first "killer app" of iPhone hacking. It's the program that has pushed iPhone hacking over the tipping point, where anyone can now do it.

Note: Although I have not had a chance to test this out yet, I expect that these same hacking techniques will work with the new iPod touch. However, some modifications to the software may be needed to work with the likely different firmware on the touch. Stay tuned.

Remember when the iPhone was first released? In those olden days of three months ago? There were all those lists, circulating on the Web, of features that people wished had been included in the iPhone. Those lists may not yet have shrunk to zero, but the currently available hacks have substantially shortened them. From custom ringtones of any music you own to Web-independent games to file transfers, you can do it all. That's in less than 3 months from iPhone's release. Imagine where we will be a year from now. Heck, at the rate things are going, imagine where we will be week from now.