Comex, author of JailbreakMe, has finally released the source code of this awesome jailbreaking tool. This can be of interest to anyone who is looking to get into hacking iDevices and developing applications for Cydia. JailbreakMe can easily be called the most simple, easiest and painless jailbreak method ever to surface for iPhone, iPod Touch and iPad. In what follows, we will see how to get the source code of JailBreakMe and compile it ourselves.
JailbreakMe is hosted on git, making it really easy for anyone to fork it and compile it on their own. You can make any changes that you want, and if you add a major feature or come across a bug that you manage fixing, you can easily commit those changes to the main source code repository to be reviewed by the maintainers and merged into it if it is worthwhile.
Whether you simply want to compile it yourself for the experience, or want to make changes to it to suit your needs better, the developer has released a guide explaining the complete compiling method.
So without any further ado, here is the step by step guide released by Comex for compiling JailbreakMe from the source code:
1. Make sure you have MacPorts installed, and python26, plus fuse if you want to compile dsc.c (which isn’t necessary).
2. Copy stuff into bs/, e.g.
where cache is /System/Library/Caches/com.apple.dyld/dyld_shared_cache_armv, launchd is /sbin/launchd, and kern is
the decrypted kernel. Note that you can get ‘kern’ on platforms like the iPhone 4 where we don’t have keys yet by using
/dev/kmem and bs/unload.py, but there’s a chance the kernel already overwrote __LINKEDIT with crap.
3. config/config.py iPhone2,1_4.0.1
5. fix the places where you need to copy headers from OS X and I fail at documentation, goto 4
6. look at cff/out.pdf
That’s pretty much it – you should now have JailbreakMe compiled