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:
Initialising connection…
Detecting device…
Claiming interface…
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 !
Thanx a lot for the hint with the kies blocking usb!
Like 3 years ago I owned a Samsung mobile for only 2 weeks before I got rid of it on ebay again and bought an htc. And of course I had forgotten completely about that samsung suite I installed. With unloading the kexts I was able to flash my galaxy tab.
Best, Stephan
[…] (Edit: Note, if you encounter “ERROR: Claiming interface failed!” when trying to download your PIT file, see: https://sonofgeektalk.wordpress.com/2013/06/13/heimdall-on-a-mac/) […]
Download mode is actually volume down, and to get in the bootmanager is it volume up + power + home button.
thanks Karim, amended accordingly !
I think I’ve got everything pretty much figured out, except . . . what is a .pit file? And where exactly can I find it? I’ve Googled it but can’t find anything that clearly answers! Thanks so much for your guide!
Jen,
sorry for unclarity. PIT stands for Partition Information Table. Try searching that and your phone make. A good list for can be found here:
http://www.vungoc-mobile.com/index.php/news/51-solution/619-partition-information-table-pit-for-samsung-android-phones
Thanks so much for answering! I’m sorry to be such a pest, but I have another question. How do I get root in terminal? I tried manually typing in what you wrote, and it won’t work, then I tried copying and pasting. It asks for my password, but it won’t let me type. Thanks again for all your help!
ach, this is more difficult. This means your phone is NOT unlocked and this is a not trivial operation. Read this article it has a good procedure and tips: http://www.androidcentral.com/root
Jenn,
be careful though. If the rooting procedure goes wrong, you are left with a $500 paperweight, so take your time, read the boards and don’t rush into this, OK?
@ Jenn ~ When entering your password in Terminal when entering the root password, there is no characters shown when typing (not even a black box).
Simply type your password then press enter to proceed: You can hit backspace the required times to undo an error.
Hello, when i unzip the zip file that i downloaded on a mac i only get the FACTORYFS – factoryfs.img .The other files that you have listed above i can see them& also the Heimdall crashes unexpectedly on my OS YOSEMITE 10.10. Please help!
Alright guys I have fixed the issue running a mac sierra. Download Heimdall 1.4.0 as 1.4.1 will know show up in applications. there will be a install error that occurs just click install anyways now you will see the Heimdall app in applications. To fix
“Initialising connection…
Detecting device…
Claiming interface…
ERROR: Claiming interface failed!”
Please use the above fix mentioned running terminal app on the mac.
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
after this you can run Heimdall and successfully retrieve your Pit file which I have saved on my desktop and it is correct and 8KB file.
Next you will need Jodin3 the mac equivalent for Odin. Once device is in download mode Jodin will have a Pit search button find the Pit file and click on PDA same search add the stock firmware and run there you go completely flashed to stock rom and should take care any boot loop errors which i encountered on my S5.
thanks
Awesome, Ben, much thanks !!!