Wednesday, July 18, 2012

Rooting Samsung Galaxy S2 i9100 with Android 4.0.3

For every web developer it comes handy to modify hosts-file for testing/demoing purposes. I wanted to test my Django project also on my Android phone to verify the mobile usage. For modifying the system files you however need the root privileges on Android and for that you need rooted kernel.

The rooting itself is just flashing the kernel on the phone, quite easy and quick operation but took time to find the right kernel and a tool for a Linux machine. Most of the info you find by searching is for Odin on Windows. For Linux machines you can't use Odin but there is Heimdall, cmd-line tool for that.
Ready for rooting?

Steps:

1. Check your kernel version from Settings, Phone info, Kernel version. In my case this is 3.0.15-I9100XWLP7-xxxx.. IMPORTANT: This instructions is only for Android 4.0.3 with kernel 3.0.15-I9100XWLP7-xxxx..
2. Download the root kernel from the download link [2] and extract the zip and then the tar until you have 'zImage'
3. Download and install Heimdall from github [1]. Select the right package for your operating system. On Ubuntu/Debian select the newest deb-package. Note! Heimdall is cross-platform, for Win, Mac & Linux.
4. Connect your phone with USB to the PC and follow the rooting instructions with Heimdall by MrZammler(Winterland) [3]. Remember to verify that the device is detected before flashing.

Congratulations, your phone is rooted! For me searching this info was the biggest task, rooting itself was quite fast & easy operation. I hope this collected info helps someone :)