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- /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

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

    adb install su-

  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.

, , , , , , , , , , , , , , , , , ,

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

  • Wladimir sagt:

    Thanks for the clear explanation!

    The only thing I messed up in is downloading the -d version of superuser instead of -efgh, causing a „CANNOT LINK EXECUTABLE“ when executing su. but after that, it worked like a charm.

  • geogeek sagt:

    Perfect guide for linux users 😀 , thanks a lot 😀

  • gnu.smas sagt:

    Do you also have a link to a secure kernel? Unfortunately, I could not find one (Samsung site requires account?) Before, I had GT-i9100XWKF3… is that the most recent one?

  • Hendrik sagt:

    Interesting guide. I’ll probably try this later.

    I’ve however heard that rooting your phone can void the warranty. Is there a way to undo this root if this is needed? (I apologise if this is a stupid question, I have very limited android rooting experience)

  • sam sagt:

    Great, it worked. BUT. The phone is now quite flakey (reboot every other day for no reason, sometimes no sound at all – that’s calls and alarm clock…).

    1. How do I get the old ROM back, now that I have root (and backup root!)

    2. If the phone in its current state still „kies friendly“ – as in will it upgrade to „stable, stock“ ICS once samsung UK get off their arse?

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

%d Bloggern gefällt das: