Blog/20140306 Flashing Samsung Galaxy S2 i9100 with Heimdall 1.3.2 in OS X 10.7.5

From Bjoern Hassler's website
Jump to: navigation, search

More from B's blog:

Some older entries are here.

1 Flashing Samsung Galaxy S2 i9100 with Heimdall 1.3.2 in OS X 10.7.5

This post applies to you if you have a Samsung Galaxy S2 i9100 and an OS X 10.7.5 computer, and you would like to flash a rom (e.g. the stock ROM). Background as to why I want to do this here: Samsung Galaxy S2 data recovery. After substantial hunting around, here are the steps.

1.1 Recover data, just to be safe

See previous blogpost: Samsung Galaxy S2 data recovery

1.2 Get heimdall working

2 Get the right rom

For stock roms, this seems to be the site most people use:

This blogpost explains how to extract the relevant files from the zip:

Or alternatively if you are good to use the commandline:

2.1 Extract files

Basically, once you have the zip file, unzip it, which gives you an ".md5" file, which is not md5, but a tar archive, which you can then extract, e.g.

unzip I9100*zip
tar xvf I9100*.tar.md5

3 Put your device in download mode


Home + volume down + power

I've found the phone to be somewhat unresponsive to this: I had to press that combination (first home and vol down, then power) several times, before I got a response. The home button is somewhat intermittent in general, so it may be to do with that.

When you get the "custom os warning", press

volume up 

to continue. Connect S2 via usb if you haven't already.

Now try

heimdall detect

You should get confirmation that device is detected.

3.1 ERROR: Claiming interface failed!

I then tried to download the pit file, just for fun, but got

ERROR: Claiming interface failed!

There are instructions here: as to what to do. Basically, unload the kernel extensions installed by Kies:

sudo kextunload -b com.devguru.driver.SamsungComposite
sudo kextunload -b com.devguru.driver.SamsungACMData
sudo kextunload -b com.devguru.driver.SamsungACMControl

4 Flash with heimdall

Both above blogposts have instructions: [1], [2],

If you are happy with the command line, use the second post, and run:

heimdall flash --primary-boot boot.bin --cache cache.img --factoryfs factoryfs.img --hidden hidden.img --modem modem.bin --param param.lfs --secondary-boot Sbl.bin --kernel zImage

which flashes your device.

5 Wait!

Initially it looked like this didn't help, with the phone stuck at the "SAMSUNG" screen. So I tried to flash again (which gave error messages), did another factory reset, etc. Eventually I accidentally left the phone, and voila it just booted into a fresh 4.1.2. So it may have been an issue with wait time. This is mentioned in blog posts as well, i.e. that the start up will take longer, because the system needs to be reinstalled. So give it some wait time.

When the device booted, all the content on the sd card was still there as well, so that's good.

When you are done, you may want to install a custom recovery, see data recovery here, so that if this happens again, you at least have a better recovery installed already. With CWM, you can backup the complete ROM to internal SD (e.g. in the steps described in data recovery here), and then restore data after re-flashing the device.

6 Update

UPDATE: A few months later, the same problem occurred, while at the Kigali Genocide Memorial. Not ideal for a phone to fail while travelling in Africa. So I'll be able to validate my own instructions... Unfortunately I didn't keep a backed up image of my phone on the internal SD, so it took several days trying to re-download the ROM, etc and get it going again. Quite a pain.

2014-03-06 | Leave a comment | Back to blog Share on Twitter Share on Facebook