github email rss
Root Galaxy S2 with heimdall on linux
Sep 15, 2011
2 minutes read

So, I got myself a new Samsung Galaxy SII. It’s a great phone as it is, but of course after a while your hand scratches to really start using it. The first thing you must do is root your device. There are many guides out there on how to root it by using Odin (a Samsung application for flashing) but if you don’t have access to a Windows machine, your only chance is with Heimdall. As always, I’m not responsible for any damage. Use the following at your own risk! As you may know, Heimdall is an application that tries to re-implement Odin’s functionallity for Linux/MacOS and Windows. First thing to do is download and compile it. Get Heimdall source from here: http://www.glassechidna.com.au/products/heimdall/. Try some binaries, if they don’t work, compile it. Check the package docs. Eventually you should have a ‘heimdall’ binary. The frontend is not needed at this point.

Find a kernel file that is suited to your stock kernel. Check this thread: http://forum.xda-developers.com/showthread.php?t=1103399. Make sure you download the correct kernel. Extract the archives twice, untill you have zImage.

Put your phone in download mode. Power off, then press Volume Down+Home Key+Power key. Keep them pressed untill you see an intro screen, then release and press Volume up. You should now see the “Downloading” mode. Connect the phone to the PC and check if it’s detected:

mrz@winterland ~/stuff/galaxy $ heimdall detect
Device detected

Then run (sudo is needed if you get a permission denied for the usb (libusb couldn’t open USB device /dev/bus/usb/001/010: Permission denied))

mrz@winterland ~/stuff/galaxy $ sudo heimdall flash --kernel zImage
Heimdall v1.3.1, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...

Checking if protocol is initialised...
Protocol is not initialised.
Initialising protocol...
Handshaking with Loke...

Beginning session...
Session begun with device of type: 131072

Downloading device's PIT file...
PIT file download sucessful

Uploading KERNEL
100%
KERNEL upload successful
Ending session...
Rebooting device...
Re-attaching kernel driver...

That’s it! The phone will reboot (notice the yellow triangle when booting), and voila. You should now have 2 extra apps, CWM and SuperUser. One last thing…

Backup your /efs folder. This is important, and can save you from an expensive trip to a Samsung Service Center. Check http://forum.xda-developers.com/showthread.php?t=1068193 for more information.


Back to posts