Blog/20140306 Flashing Samsung Galaxy S2 i9100 with Heimdall 1.3.2 in OS X 10.7.5
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
- Heimdall 1.4 does not work in OS X 10.7.5 ("Illegal Instruction: 4", to do with libraries, apparently on 10.8 it works )
- However, Heimdall 1.3.2 works
- Available here: https://github.com/Benjamin-Dobell/Heimdall/downloads
2 Get the right rom
For stock roms, this seems to be the site most people use: http://samsung-updates.com/device/?id=GT-I9100
This blogpost explains how to extract the relevant files from the zip: http://andmod.blogspot.co.uk/2013/02/tutorial-flashing-i9000-i9100-or-i9300.html
Or alternatively if you are good to use the commandline: http://wiki.bluelightav.org/display/BLUE/How+to+flash+a+stock+firmware+on+Samsung+Galaxy+S2+with+Ubuntu+12.04
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
to continue. Connect S2 via usb if you haven't already.
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: http://sonofgeektalk.wordpress.com/2013/06/13/heimdall-on-a-mac/ 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
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.
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.
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 | Back to blog|