PoempelFox Blog

[..] [RSS Feed]
 

Sat, 06. Aug 2011


Rooting Samsung Galaxy S2 with Heimdall Created: 06.08.2011 17:59
Please note: This article simply describes what I did to root my Samsung Galaxy S2. It is provided in the hope that it will helpful for others.
Neither will I assist you in doing the same to your phone, nor will I accept responsibility for damages to your phone while doing what I describe here.
For some time now, I have owned a Galaxy S2, and been quite happy with it. I didn't really feel the urge to root it - things worked well enough without rooting. However, then I tried to take some pictures of sleeping cats with it - and noticed that there is absolutely no way to turn off the annoying shutter sound the camera makes when it takes a picture without rooting the phone. It even does that sound even when the phone is set to silent. That's the sort of braindead design decision I'd expect from Steve Jobs, but on an otherwise nice phone?!
Anyways, my annoyance with this crap was large enough to decide to root the phone.

Google spits out tons of helpful threads on the topic, however they all use some leaked software from Samsung named "Odin". That software of course is Windows only, but I run Linux. And I didn't really like the idea of using some rather fishy and copied around for years software of unknown origin either.
My search for Alternatives turned up Heimdall. It's open source, runs on (probably) almost everything, and there are Binaries for Windows, Mac and Debian Linux available. As it was easy enough, I simply decided to build it from source on my Ubuntu 11.04 system. Main dependency from the system was libusb-1.0-0-dev. Build process:

tar xvzf Benjamin-Dobell-Heimdall-v1.3.0-0-ged9b08e.tar.gz cd Benjamin-Dobell-Heimdall-ed9b08e/ cd libpit/ ./configure make cd ../heimdall ./configure make

That's about it - you should now have a 'heimdall' binary in the current directory.

I then used a rooted kernel - i.e. a kernel that is essentially the stock kernel with minor modifications to include root access - from this cf-root thread on forum.xda-developers.com. I downloaded the modified kernel matching my current device kernel and unpacked it (it's a .zip file containing a .tar containing the zImage for the kernel).
Flashing that kernel to the device is then pretty straightforward:
  • Activate USB debugging on the S2 in settings / applications / development
  • connect the S2 to your computer via USB
  • Turn off the S2 and wait for it to shut down
  • Press the Home Button, Volume Down, and the Power Button at the same time and keep them pressed until the "Downloader" screen appears. It will display a yellow attention sign and a warning that you need to acknowledge.
  • Only if you don't want to run heimdall as root: Find out which bus and device ID the kernel assigned to your phone with lsusb and then chown that device to the user running heimdall, i.e. sudo chown fox /dev/bus/usb/002/022
  • Tell heimdall to flash the modified kernel: ./heimdall flash --kernel /tmp/zImage
That's it. The phone will automatically reboot as soon as heimdall exits. From now on it will show an attention sign during boot to show that the firmware has been tampered with, but see the already mentioned forumthread for tips on how to get rid of that.

PS: Just in case you want to get rid of the annoying camera sound too: After rooting the phone, open a shell (look for Terminal Emulator in the market), and then enter this:

su cd /data echo 'ro.camera.sound.forced=0' >> local.prop

This will not directly "disable" the sound, but instead the shutter sound will then be controlled by the "system sounds" volume setting - as it should have been from the beginning. And in particular, if you set your phone to "silent", the camera will be silent as well.
You will probably need to reboot the phone for this setting to take effect.
no comments yet
write a new comment:
name or nickname
eMail adress (optional)
Your comment:
calculate: (2 times 10) plus 3
 

EOPage - generated with blosxom