Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

How to root the Samsung Galaxy S II (GT-i9100) with GNU/Linux or Mac OSX using the FOSS tool heimdall

There are thousands of reports on the internet already explaining how the new and shiny Samsung Galaxy SGII Android smartphone can be rooted. But most of them suggest using »Odin«, which is a leaked internal tool from Samsung and which is included in many Samsung firmware packages you can find on the world wild web. Unfortunately, Odin is only available for Microsoft Windows.

For this reason, I put a short guide here, which explains how to root the Samsung Galaxy SGII with GNU/Linux using the FOSS tool heimdall (heimdall and this guide work on Apple Mac OSX and Microsoft Windows, as well):

  1. Download and install heimdall.
  2. Download an »insecure« kernel image »XWKDD_insecure.tar«, e.g. from here.
  3. Put your SGII into download mode by pressing the volume down button, the home button and the power button at once.
  4. Flash the device:

    sudo heimdall flash --kernel zImage-insecure

If you now do

adb shell,

you end up in a root shell.

If you would like to have further root functionality (e.g. for root apps), you can now install the su binary and the Superuser app from androidsu.com:

  1. From your computer: Remount the /system partition to read-write mode:

    adb remount

  2. Download the su zip file from androidsu.com to your computer and extract it. Then, on a console on your computer, push the su image to your phone with adb:

    adb push su-2.3.6.3-efgh-signed/system/bin/su /system/bin/su

  3. Start a root shell on your phone with adb shell. On your phone: Correct the permissions and the ownership of the image and set a symlink to /system/xbin:

    rm /system/xbin/su
    ln -s /system/bin/su /system/xbin/su
    chown root.shell /system/bin/su /system/xbin/su
    chmod 6755 /system/bin/su /system/xbin/su
    exit

  4. Install the Superuser app (with a shell console on your computer):

    adb install su-2.3.6.3-efgh-signed/system/app/Superuser.apk

  5. You now might want to flash your mobile again with a secure kernel. The access to the su executable binary is now controlled via the Superuser app.