How-To: Four Steps to Restore, Install SSH and Customize the Apple iPhone

UPDATE 9/28/2007: The directions and programs detailed in this How-To do not work with version 1.1.1 of the Apple iPhone firmware (the latest update.) If your Apple iPhone is using the latest firmware update, then you will need to downgrade your firmware before proceeding.

By following some basic steps, any Apple iPhone can be tweaked to have custom ringtones and 3rd party applications. Even the system graphics, icons and text messages can be changed.

Step One: Restoring the Apple iPhone
Starting with a clean slate cannot be understated. In fact, when you are tweaking the Apple iPhone, it makes life a whole lot easier. Using Apple iTunes, "Restore and Update" the Apple iPhone. This is achieved by holding the Sleep + Home buttons at the same time, until the yellow triangle alert appears on the screen. At that point, plug the Apple iPhone into your computer and start Apple iTunes. Once opened, Apple iTunes will recognize the Apple iPhone and step you through the restoration process.

Once restored, proceed with activation but *do not* synch any data. This is critical before proceeding to the next step. If the Apple iPhone starts to synch automatically, stop it as quickly as possible (you can manually stop a synch in Apple iTunes or on the Apple iPhone itself.) Alternatively, you can "disable automatic synching for all iPhones" within the iTunes preferences, which is even simpler. Another option is to forget about iTunes altogether and activate the iPhone using a program like iActivate or iNdependence

Once the Apple iPhone has been restored and activated (but *not* synched!) completely shut down the Apple iTunes application. NOTE: You will know you succeeded with Step One because (a) the Apple iPhone will be activated, and (b) you will be prompted to provide the Voice Mail password (which is okay to enter), and (c) the Apple iPhone will not have any music, movies or photo's on it (it will have your contacts, this is okay.)

Step Two: Installing and Securing SSH
Now it's time to install SSH on the Apple iPhone. Depending on your setup (Mac, Windows, etc.) there are several "easy install" scripts available for installing SSH. The web site uses nothing but Apple computers, from our Apple iPhone to our Apple MacBook, so we prefer the BlueDonkey easy install for Intel based Mac's, but there is also a PPC version available.

Installing SSH requires that the Apple iPhone be "freed from jail", that is to say hacking the Apple IPhone to allow you to access and manipulate the file system. Popular programs for this include ./jailbreak with iPhoneInterface, iFuntastic, iPHUC, iActivate, and iNdependence (our current favorite is the iNdependence program, which can activate/deactivate an iPhone, install SSH, change the root password, and much more.)

NOTE: All of these programs perform the same basic task: hacking the Apple iPhone to allow manipulating the file system. However, depending on your purpose, some programs work better together than others. Individual mileage may vary, but we've found that:
  • ./jailbreak with iPhoneInterface are ideally suited for use together
  • iActivate works best with iPHUC (use iActivate to "free" the Apple iPhone and iPHUC to manipulate the file system after the Apple iPhone is "free")
  • Install_IPB works best with iFuntastic (we'll talk more about Install_IPB in a little bit.)
Okay, back to installing the SSH server. With the Apple iPhone plugged into your computer and with the Apple iTunes application completely shut down, launch your preferred SSH server installation script. As mentioned, we'll be using the easy install package that BlueDonkey's SSH install is packaged with a version of ./jailbreak and *does not* require using one of the previously mentioned tools to "free" the Apple iPhone before it's use. This is one of the many attractive features of BlueDonkey's install package, it is fully self-contained and automatically downloads any other files you need but don't already have. Another attractive feature is that we've found it to work, every time, provided that Step One is followed exactly.

Once you have the SSH server installed and tested to be working, it's time to change the 'root' password. Most people skip this step, yet everyone knows the default 'root' password for the Apple iPhone is "dottie". Unless you really want to be a walking exploit waiting to happen, change the default password, especially since changing the root password is a very straight forward process, with only a few simple steps.

Step Three: Synching the Apple iPhone and Apple iTunes Data
If you've come this far, the Apple iPhone should now have a functioning SSH server installation, with a unique 'root' password to keep it secure. Now, the real fun can begin as everything is in place to start fully customizing the Apple iPhone, installing 3rd party applications and becoming a bona-fide Apple iPhone hacker.

What should we do to the Apple iPhone first? Installing 3rd party applications sounds fun. How about changing the home screen icons or adding custom ringtones to the Apple iPhone, those both sound like fun too. Now is a great time to mention that once Step Two is successfully complete, it is perfectly okay to synch the Apple iPhone with the Apple iTunes. In fact, that's what we are going to do first, before we start tweaking.

Before the Apple iPhone can be synched with Apple iTunes, it needs to be "returned to jail". Using whatever program originally used to "free" the Apple iPhone, send it back to jail. Once jailed, the Apple iPhone will synch with Apple iTunes, without issue, and can be easily "freed" again for any future changes. Also, the SSH server installation and 'root' password remain active and unchanged.

Step Four: Customizing the Apple iPhone, Installing 3rd Party Applications and Ringtones
When the Apple iPhone launched, one of the biggest disappointments was (and remains) the lacking ability to add custom ringtones. Thankfully, this was also one of the first things to be hacked and, as far as hacking goes, adding custom ringtones to the Apple iPhone is now very easy. Our favorite application, for creating custom ringtones on the Apple iPhone, is iFuntastic. However, even if you are still using Windows, a simple solution is available (and hopefully owning an Apple iPhone will turn you into a switcher.)

iFuntastic installs on your Mac vs. the Apple iPhone itself and is a great application for changing the existing files on the Apple iPhone. This means that iFuntastic is great for changing system settings, text ("slide to unlock" can become almost anything you want), system sounds and even application icons and system graphics. iFuntastic also makes it very easy to add custom ringtones to the Apple iPhone. All things considered, iFuntastic is great for what it does, although it can be time consuming to use it for extensive modifications. iFuntastic also does not support uploading new files to the Apple iPhone, which means it cannot be used to install 3rd party applications (at least, the current version doesn't, who knows about future versions.)

To install 3rd party applications on the Apple iPhone, programs like iNdependence can be used, as well as SFTP programs like CyberDuck or WS-FTP. Using the SCP command is also very handy and straight forward. If you are on a Mac, the SCP program is a command line tool built into the operating system. If you are on Windows, programs like WinSCP are available.

Once you have chosen the program you are going to use (again, we prefer using the SCP command), installing new applications onto the Apple iPhone is as simple as (a) copying an application to the "/Applications/" directory on the Apple iPhone, and (b) changing the permissions on the application to be 'executable' (chmod +x .) NOTE: Installing new ringtones in this way is just as easy, simply copy them into the "/Library/Ringtones" directory on the Apple iPhone.

Admittedly, the steps detailed in this How-To article are not exactly short, but they provide us with a 100% success rate. Individual mileage may vary, but the iPhoneWriter team follows these steps every time they come across an Apple iPhone in need of attention.