Forget Odin. Get Heimdall.

No, I am not talking about the Norse gods. These are tools to flash roms or root your Android devices. Odin unfortunately is only for Windows. For Linux users like us, there is an alternative called Heimdall which I believe is even better.

In this guide, I used the following:

  • heimdall (v1.4 RC2)
  • Samsung Galaxy S2 I9100 (DXLPB-CL709089)
  • Siyah kernel (5.0.1)
  • Fedora 17 (64bit)

You may use other versions like heimdall 1.3 which is more stable, siyah kernel v4, or the root kernel equivalent of your existing stock s2 kernel. More on this later.

Get the Heimdall binaries

Look for a Heimdall binary release here that suits your Linux distro. If you found one skipped the next step and proceed to getting the kernel. If not, you need to get the source and build it.

Get and build the Heimdall source

Ensure that you have all the tools needed to compile the heimdall source.

sudo yum groupinstall "Development Tools"
sudo yum install libusb1-devel qt-devel

Get the source from github.

git clone git@github.com:Benjamin-Dobell/Heimdall.git
cd Heimdall/libpit
./autogen.sh
./configure.sh
make
cd ../heimdall
./autogen.sh
./configure.sh
make
sudo make install

Build the frontend gui (optional)

cd ../heimdall-frontend/
qmake-qt4 heimdall-frontend.pro
RCC: Warning: No resources in 'mainwindow.qrc'.
make
sudo make install

The above warning can be ignored.

Get the kernel

Normally, you would get a slightly modified kernel based from your original stock kernel for minimal changes. There’s already a thread in xda-developers that lists these kernels and gives a comprehensive guide on how to choose a kernel.

Check your Settings -> About Phone to know your kernel. Mine was DXLPB-CL709089 where LPB is the key string to look for.

In my case, I initially tried this but it didn’t work. So, I went for a custom kernel like Siyah. Look for the version you prefer. Make sure you get the kernel for S2 not S3. ;)

The link for Siyah version 5 is here then download the Odin tar. It’s always a good practice to verify your kernel download against its hash just to make sure you got the right one.

md5sum Siyah-s2-v5.0.1.tar | grep -i 6d783ad65cd3f2ab5c139675169c1d8c
6d783ad65cd3f2ab5c139675169c1d8c  Siyah-s2-v5.0.1.tar

Extract the image

tar xvf Siyah-s2-v5.0.1.tar
zImage

Backup

No wipe or factory reset is necessary, but backup everything in your phone just in case.

Switch your phone to download mode

  • Power off
  • Hold Volume down button + Home button + Power button
  • Press Volume up to continue

Flash the kernel

Connect your phone via USB. Make sure your phone is detected then flash the image.

heimdall detect
heimdall flash --kernel zImage

Your phone will reboot afterwards. If it hung during boot up, don’t panic, try a different kernel and flash again. ;)