There have been a lot of articles out recently on how to hack your iPhone. The Inman recently posted instructions on how to add SSH to your phone, so that you can SFTP things to your phone.
I thought that it was time to post my little solution to this problem. When I started looking for my solution I had two requirements:
- Mount the iPhone as a removable drive
- Rehacking had to be dead simple, since I like to update my phone
I think my solution satisfies both of those requirements nicely. You ready to get more out of your iPhone? Good, lets get to it.
First, we install some crap on our mac
Right, the first thing we need to do is download and install MacFUSE, a mac native port of the very cool File-system in USErspace found over in the Linux world. Basically with FUSE we can create a File System out of virtually anything. Some of the popular implementations are GmailFS (Gmail File System), SpotlightFS (yeah, a Spotlight File System) and my personal favorite sshfs, which as you no doubt guessed allows us to create a FileSystem out of any space we can connect to via SSH. We will be using sshfs with our little project.
Once we have downloaded and installed MacFUSE we need to download the sshfs that is linked on the MacFUSE Google code site. Move sshfs to somewhere on your hard drive and then restart your machine, if you haven't already (MacFUSE installs a kernel extension, so it won't be loaded until we restart our machine).
Now we install some crap on our iPhone
Next we need to download and run a program called AppTapp Installer which will allow us to install ssh on our lovely iPhones.
The process is painless and once your iPhone restarts it will be freed from jail, and have a new native app, "installer" which get this, allows you to install 3rd party applications on your iPhone. I have an apache web server running on my iPhone right now, it is freaky.
Once your phone restarts, tap the installer icon, add the "community sources" package, then add the "BSD subsystem" package, and finally install OpenSSH.
At this point your phone can be accessed at whatever IP it has on your Wireless network, as you would any normal ssh enabled server. Open up sshfs, type in the Server Address, root for the username and "/" (without the quotes) as the Remote Directory, hit enter and wait for the password dialog. Type in the iPhone root password, which you can find online by googling, and after a second or two you will see a folder/drive icon on your desktop labeled the ip of your iPhone. Here is a shot of mine mounted on my desktop:
And here is an image of the contents of my iPhone's "applications" folder:
And that people, is it. From this point on when you want to add something to your iPhone, like I don't know... a custom ringtone, just fire up sshfs and go for it. Pretty simple.
Enjoyed this article? Follow me on Twitter.