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:
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))
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.