[Q] Clarification req'd for flashing rom using Heimdall - Galaxy S II Q&A, Help & Troubleshooting

I'd like to flash to this rom GT-I9100_CPW_I9100XWKI4_I9100CPWKH1_I9100XXKI1.tar which I got from Intratech's thread as I want the older bootloader. I cannot use Odin as I run Linux and don't have access to a MS machine so want to use Heimdall.
Heimdall is installed and I've got as far as extracting the files from the above tar and have the following files.
Sbl.bin
boot.bin
cache.img
factoryfs.img
hidden.img
modem.bin
param.lfs
zImage
My questions are:
Whether I need to flash all the files in that list? I assume yes.
Heimdall offer the option of flashing primary and secondary boot loaders spl1 and spl2). Is Spl.bin above the primary or secondary bootloader?
Heimdall also requires a PIT file. I assume I should use the PIT file that I saved off my device?
I did do a search on here and google but found nothing that really answered all my questions so would appreciate a more knowledgeable person offering their advice.

Related

[Q] Files in Firmware <-> Odin/Heimdall fields

Hello,
I'm quite new to Android, so please forgive me if my question has been already asked a lot of times (I've searched with no luck btw).
If i unpack a stock FW I see the files listed below. It's unclear to me what some of these are; I'll make my questions inline, please also correct me if I state something wrong. One thing before the questions: I know I don't need to flash most of these files most of the times, I just want to learn what they are I'm familiar with tar archives, unix and so on, I just don't know android.
boot.bin -> Bootloader, listed as "BOOTLOADER" in Odin and "Primary Bootloader" in Heimdall. Heimdall takes the file directly, should I put it alone in a .tar to flash it in Odin?
cache.img -> What is that? Is it flashed with "CSC" (inside a .tar) in Odin? Heimdall has the "cache" field for this one.
factoryfs.img -> User software, flashed in a .tar through the "PDA" field in Odin, heimdall has a field for this one.
hidden.img -> What is that? Which field flashes it?
modem.bin -> Phone firmware/baseband etc. "Phone" field in Odin (inside .tar), "Modem" in heimdall
param.lfs -> what is that? I think it's flashed with PDA (inside .tar) in odin, heimdall has the field
Sbl.bin -> What is that? Which field flashes it?
zImage -> Kernel, i know that one and how to flash it.
Other heimdall fields : secondary bootloader, database data: what are these?
Finally, if I'm not wrong, PIT is the partition scheme (usually it doesn't change) and Recovery is the recovery software (i.e. separate boot partition where you do hard reset)
I know it's a lot of questions the most of you already know well, links to sites describing the firmware structure could do too. I'm a developer at work, so I shouldn't have problems with technical documentation.
Many thanks and sorry for my poor english.
edit: of course I have a galaxy S2 and I'm referring to the files in its firmware. I have a mac and no space to install windows so I really need to understand heimdall
All files are packed in a tarball. If I am not wrong the .img files and the kernel are packed for PDA. PDA is the firmware/rom.
I don't know param.lfs but it looks like it just contains some pictures used for boot etc. (See here)
I would not touch the bootloader, if you screw something up, the device is bricked. Looks like Sbl.bin is familiar with the bootloader (Maybe Heimdall Seconday Bootloader?)
zxz0O0 said:
All files are packed in a tarball. If I am not wrong the .img files and the kernel are packed for PDA. PDA is the firmware/rom.
I don't know param.lfs but it looks like it just contains some pictures used for boot etc. )
I would not touch the bootloader, if you screw something up, the device is bricked. Looks like Sbl.bin is familiar with the bootloader (Maybe Heimdall Seconday Bootloader?)
Click to expand...
Click to collapse
Sbl is an acronym for Secondary Boot Loader! I was blind
I'm looking now for an architectural view of the software, I don't know why there are 2 boot loaders.
Thanks

Flashing with heimdall

Hey guys, i used to flash with odin, but those times are now gone. moved to linux for real, so i installed heimdall (and heimdall-frontend).
Honestly it seems that command line is easier to understand. My question is: how do i flash only the bootloader?
I need to use the jig, so i need the old bootloader. i already have the TAR.
to execute a normal rom installation, it seems these are the commands:
heimdall flash --factoryfs factoryfs.rfs --cache cache.rfs --param param.lfs --kernel zImage --modem modem.bin --pit s1_odin_20100512.pit
Click to expand...
Click to collapse
But how about flashing just the bootloader?
Also, i didn't install any samsung drivers...is that possible on ubuntu?
This is linuxmint, but anyway, is ubuntu based. thanks
Well, nevermind guys... i'm going to flash it on a friend's computer. However i would like to learn some more about heimdall. the videos i see on youtube, and on google, are from an early version. as the interface changed, i'm kinda lost now.
appreciate any tips. ty
If you just type "heimdall" in Terminal, then there will be a list of possible arguments you can use.
As far as i know you just have to type:
sudo heimdall flash --primary-boot "boot.bin" --secondary-boot "Sbl.bin"
Click to expand...
Click to collapse
I never flashed only a bootloader, so i don't know if there will be any compatibility problems. But command should work.

flashing stock rom on i9300 using heimdall and linux

hello guys!
Could you please help me to flash stock rom on my i9300 with heimdall?
i downloaded stock firmware for croatia(tmobile) from sammobile and tried to flash rom with mobile odin lite. it worked. kinda. csc was broken and i was not sure shich csc to choose so i rooted my phone back to cm10.
now i'd like to try with heimdall. after unzipping and untaring downloaded file i got following files:
boot.img
cache.img
hidden.img
modem.bin
recovery.img
system.img
How should i flash it?
i'd try by myself but i'm not so sure.
i guess using something like heimdall --primary-boot boot.img --system system.img --modem modem.bin --recovery recovery.img --hidden hidden.img --cache cache.img
is order ok? should i try with different order? and I'm not so sure about boot.img switch because there is --primary-boot and --secondary-boot
Thanks in advance!
devil_kc said:
hello guys!
Could you please help me to flash stock rom on my i9300 with heimdall?
i downloaded stock firmware for croatia(tmobile) from sammobile and tried to flash rom with mobile odin lite. it worked. kinda. csc was broken and i was not sure shich csc to choose so i rooted my phone back to cm10.
now i'd like to try with heimdall. after unzipping and untaring downloaded file i got following files:
boot.img
cache.img
hidden.img
modem.bin
recovery.img
system.img
How should i flash it?
i'd try by myself but i'm not so sure.
i guess using something like heimdall --primary-boot boot.img --system system.img --modem modem.bin --recovery recovery.img --hidden hidden.img --cache cache.img
is order ok? should i try with different order? and I'm not so sure about boot.img switch because there is --primary-boot and --secondary-boot
Thanks in advance!
Click to expand...
Click to collapse
Hi, did you try it? I had the same problem with my italian firmware some days ago. I tried and unfortunately I failed! My phone freezed in "Samsung".
I flashed via CWM that firmware and so now it's working.
But it seems that Heimdall isn't so popular...
devil_kc said:
hello guys!
Could you please help me to flash stock rom on my i9300 with heimdall?
i downloaded stock firmware for croatia(tmobile) from sammobile and tried to flash rom with mobile odin lite. it worked. kinda. csc was broken and i was not sure shich csc to choose so i rooted my phone back to cm10.
now i'd like to try with heimdall. after unzipping and untaring downloaded file i got following files:
boot.img
cache.img
hidden.img
modem.bin
recovery.img
system.img
How should i flash it?
i'd try by myself but i'm not so sure.
i guess using something like heimdall --primary-boot boot.img --system system.img --modem modem.bin --recovery recovery.img --hidden hidden.img --cache cache.img
is order ok? should i try with different order? and I'm not so sure about boot.img switch because there is --primary-boot and --secondary-boot
Thanks in advance!
Click to expand...
Click to collapse
Start with Hiemdall --print-pit>tmp.txt.
Then open tmp.txt in a text editor, You will see the proper names of the partitions. Then you have to match the partition names from the phone to the file names in your rom image. The command you typed seems mostly correct, but you need to check these partition names to make sure your current rom matches up, for instance,"--primary-boot" might be "--boot", and "--modem" might be "--radio" but don't quote me on that.
skeptonomicon said:
Start with Hiemdall --print-pit>tmp.txt.
Then open tmp.txt in a text editor, You will see the proper names of the partitions. Then you have to match the partition names from the phone to the file names in your rom image. The command you typed seems mostly correct, but you need to check these partition names to make sure your current rom matches up, for instance,"--primary-boot" might be "--boot", and "--modem" might be "--radio" but don't quote me on that.
Click to expand...
Click to collapse
Thanks man! but unfortunately my i9300 died of sds and i'm trying to get it fixed by samsung. with no luck so far.
sending it back to service tomorrow and we'll see. but this is good to know, thanks!

ND7 Boot loop

odin'd ND7 for the correct model i605 from a site other than sammobile (download was really slow), everything went through fine when it went to reboot it does a quick boot loop
cannot go to recovery mode, but can go to odin.
cannot flash full tar back to it, it fails on sboot
So I downloaded the file from sammobile and extracted it
thinking maybe I have to make a flash file without the bootloader if possible?
extracted the tar
boot.img
cache.img
hidden.img
modem.bin
recovery.img
sboot.bin
system.img
tz.img
edit. used pit file with odin (read in other threads after the fact) and all seems clear, very noob of me -.-
normally don't have to use it...
anyways still want to know if possible to make without bootloader and/or make something like this:
http://forum.xda-developers.com/showpost.php?p=24278264&postcount=9

[SM-G991B] How to obtain PIT file?

I'm trying to flash my S21 with JOdin3, which requires a PIT file.
JOdin3 can't extract the PIT out of my device.
heimdall download-pit gives me the common "libusb error -7".
Unzipping the CSC file asks for a password (which I could not find).
Do you guys have any ideas on how to obtain the stock PIT file?

Categories

Resources