This blog is turning to be some sort of hacker den where I post successful, complicated operations for fear of not remembering again how I did it.
This time it is about flashing a new ROM into my Samsung Galaxy S2; Windows owners use a piece of software called Odin, which sadly does not exist on Mac; its multiplatform equivalent is called Heimdall.
Unfortunately none of the operations I am about to describe is stoopid (=me)-proof, so I will try to detail every step here.
- download and install Heimdall (easy enough !)
- look for the ROM you want – that took some searching, because it’s normally listed as “ODIN” software (because this is the program that the majority of users will use. Of course, if you, like me are simply looking to restore the phone, you should look for “stock” firmware; the good news is that once you find it, you can store it on your computer for a future re-use
- the software is a .TAR package which you can open with GUItar; if it is .TAR.MD5 simply remove the .MD5 extension (it’s only a checksum control). You need the individual files making up the package;
- turn phone off;
- turn phone back on in download mode (Volume Down until download dialog mode appears, answer Yes)
- connect USB cable to computer;
- launch Heimdall – on the Utilities panel, check that your device is detected; if not repeat #5 and #6 until it does;
- in the Flash panel first look for the .PIT (Partition Information Table) file (some here) – of course you need the one that’s right for your phone (search “Partition Information Table” and “phone make” e.g. “Samsung” or “HTC”);
- now you must fill in the Partitions segment; the button sequence is: ADD – select Partition Name – BROWSE, and this is the list of partitions and the corresponding files for my Galaxy SII:
- BOOT – boot.bin
- SB1 – sbi.bin
- PARAM – param.ifs
- KERNEL – zimage
- CACHE – cache.img
- MODEM – modem.bin
- FACTORYFS – factoryfs.img
- DATAFS – data.img
- HIDDEN – hidden.img
- Press start – if you receive this error message:
ERROR: Claiming interface failed!
it’s because you – like me – have used the Samsung Kies software, which you should uninstall at once, but as it adds some offending kernel extensions, you also must unload such extensions:
A. launch Terminal
B. get root and unload extensions:
sudo sh -
kextunload -b com.devguru.driver.SamsungComposite
kextunload -b com.devguru.driver.SamsungACMData
kextunload -b com.devguru.driver.SamsungACMControl
C. return to #10 above and try again
At this stage my phone is successfully flashed, but for the new firmware to take effect I must perform a factory reset, which you do in recovery mode: Volume Up + Power + Home (I had to try this several times, not quite sure what I was doing wrong) – Volume key navigates, Power key selects:
- wipe cache
- factory reset
At that point my phone is really like new; unfortunately it means redownloading all the apps, which however is quick & easy from my Google Play account – also a good chance for some spring cleaning !