Back to Mobile View

Skip to Content

There and back again: How I broke into the iPhone UNIX files and lived to tell about it

Yesterday, I took my iPhone hacking to the next level. After reading through these instructions at HackTheiPhone.com, I downloaded a copy of jailbreak and broke into the iPhone UNIX file system.

It actually took me several tries to get this far. I didn't have access to the jailbreak source, and it was compiled for i386 computers. So I ended up moving from my 733 G4 over to my Mac mini. There, I discovered that my OS X 10.4.8 installation wasn't up to the task. Since I didn't want to mess with upgrading 10.4.8 (because of Apple TV hacking), I ended up using my secondary boot partition to create the magic combination of 10.4.10 or greater plus Intel.

Even then, I'd forgotten to reinstall my SIM and to quit from iTunes, essential components for jailbreak success. So my first few attempts looked like this.

Macintosh:phonedmg ericasadun$ ./jailbreak 
[jailbreak 1.0] by ziel w/ special thanks to GeoHot and the rest of the #iphone-dev crew.

Looking for iPhone...
Sending Files...

*** If iTunes is running, please close it.
*** Hold the POWER and HOME buttons for approximately 25s.
*** Release when the display says 'Please Connect to iTunes'.

Sending More Files...
Booting iPhone...

Waiting for iPhone to finish booting...
Moving files into place...
Problem with Ditto: 6

Sorry, apparently things just didn't work out.
Look on the bright side, if jail was that good for Paris maybe you should give it a second chance. ;)

However, I eventually did get it running properly.

Macintosh:phonedmg ericasadun$ ./jailbreak 
[jailbreak 1.0] by ziel w/ special thanks to GeoHot and the rest of the #iphone-dev crew.

Looking for iPhone...
Sending Files...

*** If iTunes is running, please close it.
*** Hold the POWER and HOME buttons for approximately 25s.
*** Release when the display says 'Please Connect to iTunes'.

Sending More Files...
Booting iPhone...

Waiting for iPhone to finish booting...
Moving files into place...
Cleaning up...
Rebooting iPhone...

Enjoy your newfound freedom. Thank the devs at #iphone next time you see them for making this all possible.
p.s. Like most other useful tools, this one may be dangerous if used carelessly. Always remember -- You brick it, you bought it.

p.p.s. I have no idea how 'My Humps' could possibly have gotten set as your ringtone. ;)

Once in, I started taking a look around at the available files on my iPhone using iPhoneInterface. I was surprised at exactly how sparse the iPhone UNIX installation was. Everything was pared down to the bare minimum, unlike Apple TV, and there were no onboard utilities like sftp, sbin and so forth. Plus the prospect of compiling those for the ARM processor seemed daunting.

Macintosh:phonedmg ericasadun$ ./iPhoneInterface 
iPhoneInterface v0.3.3 built on Jul 11 2007

Waiting for phone... established.
iPhone state: Activated
type "help" for help
iPhone:/# ls
.
..
Applications
Library
System
bin
com.apple.itunes.lock_sync
cores
dev
etc
iTunes_Control
mach
private
sbin
tmp
usr
var
iPhone:/# ls sbin
.
..
fsck
fsck_hfs
fstyp
fstyp_hfs
kextload
launchd
mount
mount_hfs
iPhone:/# ls tmp
.
..
MediaCache
MobileSyncRunning.lock
com.apple.Bookmarks.lock
com.apple.MailAccounts.lock
launchd
iPhone:/# ls usr
.
..
bin
lib
libexec
sbin
share
iPhone:/# ls usr/bin
.
..
simulatecrash
iPhone:/#

After poking around the files for about an hour, I decided to see how the semicracked iPhone would behave back in iTunes. Not good, it turned out. iTunes could now only see about 50-odd megabytes of disk space on my 4GB iPhone. I eventually gave up trying to convince iTunes otherwise, and chose instead to restore my iPhone. It was a process that took about a half hour in total--most of that downloading the iPhone restore data from Apple. In the end, my iPhone completely restored, rebooted and returned to normal use. I recovered my iPhone data from my latest automatic iTunes backup and all was back as normal.

The complete restoration proved to be relatively simple. And it was nice that I could so easily return to my backed up state. iTunes also offered the option to "Set up as a new iPhone", which would probably have been handy if I were selling the thing.

So should you try this at home? You certainly could although I'm not convinced the majority of readers should attempt this. But if you thoroughly mess up, it's nice to know that restoring your iPhone is pretty straight forward.

And remember: TUAW tests so you don't have to.

© 2014 AOL Inc. All Rights Reserved.