yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] Benjamin Dobell:
The problems you're having don't really seem to be a fault of Heimdall Frontend but rather with the packages you're trying to flash. Firstly, Odin's 3 tar-archive format (if you could call it that) is ludicrously bad, messy and extremely confusing for users. To make matters worse whomever it is that produces these packages doesn't really seem to know what they're doing. For instance the issue with the two cache files, by the way you'll want to use the one in the CSC tar.

I really do hope to remedy the situation with Heimdall Frontend 1.3 and Heimdall Firmware Packages. In essence a Heimdall Firmware Package provides you with the automated process you're looking for. To flash a Heimdall Firmware Package, you just:

1. Browse for the package on your PC.

2. Load it by pressing the "Load / Customise" button.

3. Flash it by pushing the "Start" button.

Then for the sake of providing a good experience for both beginner and advanced users there's the optional step:

2b. Customise the the firmware package.

Other than this process being vastly simpler than any alternative Heimdall Firmware Packages also include extra information about the firmware, the most important piece of information being a list of supported devices.

So the problems you're experiencing right now as an end user aren't really with Heimdall, but rather with the way that firmware is currently distributed by sites like samfirmware. So what really needs to happen is as many people as possible need to start contacting samfirmware and ask them to start distributing all their Galaxy S firmware as Heimdall Firmware Packages.

Again this is another case of people doing an extremely poor effort of redistributing firmware. Those .tar.md5 files are actually perfectly valid .tar files. All you need to do is remove the pointless .md5 extension and you'll be able to extract those files the same way as any other .tar archive.

I'm really really hoping that the Heimdall Firmware Package format becomes heavily adopted after the official release of Heimdall Frontend 1.3.0. The format has the potential to save a lot of accidental bricks (due to the additional included information) as well as generally making life easier for users.
[Galaxy S II Original Android Development] king_dani:
thanks again Ben

I have never said anything is wrong with Heimdall, in my humble opinion, Heimdall is pretty much straightforward software, with the added option to go pro for advanced users. however, as you have pointed out, there is currently no ROM distributed under Heimdall standard, it is sad but it is what it is. so my suggestion is either we start writing help files which would guide semi-noob user to put all the files in the right place from a number of categories of releases (stock, famous custom, etc.) or you develop a method for the program to identify various files inside a package and do the trick. i don't know much about coding but i assume it is a lot of work, still doable though.

if i am not mistaken, the Heimdall package files are just a analogous to pit files for Heimdall, telling it which file is which, but there are no HPFs for any of releases ROMs even for the most famous of them.

i hope more people would hop in and help this project, and thanks for keeping up the good work
[Galaxy S II Original Android Development] king_dani:
so i renamed the files in KG2 update, still no sign of pit file, not sure if i could use previous release pit file to flash this one, but more importantly, i see two files for CSC, one has home multi in its name, the other has multi , and both have a cache.img file, any idea which one is the right one?

also there is a file wit Kernal inside, which would give me a zimage file, not sure if it is the same as with large tar file. and there is a modem file with modem.bin inside. you are right, THIS IS A MESS!
[Galaxy S II Original Android Development] king_dani:
damn it, ERROR: Failed to detect device!

after lots of research and figuring out all the files, now I can not flash.

Uploaded with ImageShack.us

any ideas?
[Galaxy S II Original Android Development] Boal:
You are now where every other Mac user also appears to be. The kernel extensions does not load properly, hence the Mac won't recognize the device. So far there doesn't seem to be a solution.
[Galaxy S II Original Android Development] king_dani:
but i have read a number of people commenting that they have managed to install updates using Heimdall in XDA. is there really no single success?
[Galaxy S II Original Android Development] Boal:
Explicitly with the latest Heimdall for Macs? Where did you read that?
[Galaxy S II Original Android Development] king_dani:
no i think it was with 1.2 or the one that has command line. i think it was on XDA. someone reporting back using Heimdall to flash SGS I successfully. i'll try to look it up
[Galaxy S II Original Android Development] Benjamin Dobell:
Presumably you've got your device in download mode?

If so are you running OS X Beta 1 or Beta 2? If you're running 10.6.4 or later then you'll definitely want to run Beta 2 as it includes a fix for the 64-bit kext issue.
[Galaxy S II Original Android Development] king_dani:
sorry for not providing these data beforehand, I am in download mode (turn off, three buttons, volume up, Downloading, do no turn off target), and I am running 10.6.8 (the latest version, well at least the latest of Snow Leopard), and yeah, I am using beta two, although I must look again, cuz that's the one thing I am not sure of!

EDIT: there is no way of me being sure I'm on beta2, i mean i have dled the beta2, and installed and reboot and all, but in your program, it does not say which beta it is. and I did not uninstalled the previous version, so what I'm going to do is, I will uninstall one more time, though i'm sure it is beta2, and install beta2 again, and try one more time.

Second EDIT: nope, it does not work, i uninstalled, rebooted, installed, rebooted, and tested with the same method. it gives the exact same message. somehow i think i was on beta2 right from the start.
[Galaxy S II Original Android Development] madmack:
sdcard formatted ?

I used your latest beta to flash a zImage file (using command line) in Linux:

heimdall flash --6 zImage

However, my internal sdcard got wiped with that command. I'm thinking it could be due to the fact that I haven't specified any PIT ? It would be great if you can shed some light on possible causes (no pit, a possible bug) so that I don't fall into that again :(

I really don't want to boot into my windows box, so I prefer to stay where am at and be able to flash kernels/roms from linux.
[Galaxy S II Original Android Development] MicioMax:
Again a problem with litening rom, this time 4.1

I posted the problem in its forum :

http://xdaforums.com/showpost.php?p=15989194&postcount=7910

maybe you can test it and see if it's an heimdall bug, as it seems that for people flashing with odin there's no problem....

Ciao

Max
[Galaxy S II Original Android Development] Benjamin Dobell:
Heimdall Suite 1.3.0 is now available from the Heimdall product page.
[Galaxy S II Original Android Development] omniwolf:
Hi,

Thanks a lot for the new version. However, i can't for the life of my see a way to flash a kernel via the front-end. Is this as expected?

Never mind the below - i turned the phone off for a few mins, turned it back on and booted into download mode and it worked fine.

also, if i try and flash via the command line version i get this:

any ideas?

Thanks!
[Galaxy S II Original Android Development] king_dani:
thanks a lot for the new release. i have managed to flash latest ROM via a PC however, and i really don't know what to test, so do you think it have solved my problem?
[Galaxy S II Original Android Development] Benjamin Dobell:
Heimdall Frontend calls the command line tool so there's no reason for different behaviour.

However, that will happen if you flash and use the no reboot option (until I release the next version), however that shouldn't happen if you've freshly boot into download mode. Was that after a fresh boot into download mode?
[Galaxy S II Original Android Development] Benjamin Dobell:
If you're referring to the OS X problems you were having, then I'm not sure. I really expected Beta 2 to work and nothing related to the kexts changed in the official release. It's definitely worth giving it a try but if it doesn't work then I'm out of ideas for now.

EDIT: If it does start working in OS X then that may even be the result of an updated secondary bootloader (if you flashed one from the PC).
[Galaxy S II Original Android Development] schack:
Heimdall & Mac

Hi

I'm unable to make Heimdall work with my Mac, actually I've tried on 2 Macs

32 bit and 64 bit, I even tried compiling from source.

It appears to work for some but not all.

Could this problem be related to the secondary bootloader, like it was on the Samsung Galaxy S http://xdaforums.com/showthread.php?t=891518

Best regards

Henrik Schack
[Galaxy S II Original Android Development] omniwolf:
Hi, thanks for the reply. you must have missed some of my post though, as i didn't have errors using the front-end tool, i just cannot actually find how to flash a kernel with the front-end tool. there seems to be no interface for it..

the error i had with the command line tool i was able to fix by restarting the phone.
[Galaxy S II Original Android Development] Benjamin Dobell:
schack has just helped me confirm that there are SGS2 secondary bootloaders floating around that exhibit the same faulty USB behaviour in download mode that was found in older bootloaders for other Galaxy S devices.

This faulty behaviour isn't a problem for Windows or Linux, mostly as a result of sheer dumb-luck on Samsung's behalf. However this is a serious problem for OS X users as the OS X kernel will be totally unable to recognise their device in download mode. Even a Windows or Linux virtual machine running on top of OS X will not be able to detect the device.

The good news is that because some OS X users have confirmed success with their Galaxy S2 then there must be some working secondary bootloaders floating around. As such I need users who are able to detect (and hence flash) their device on OS X to post what firmware they're using in this thread.

Once we know which secondary bootloaders have the correct behaviour users can fix their device by flashing a working secondary bootloader via Linux or Windows. Obviously that's a pain but once it's done you'll be able to use OS X in future.

Also I think it's fairly important to make firmware/ROM developers aware of this issue so that they may also distribute their firmware with a fixed secondary bootloader. As such please spread the word as much as possible!
[Galaxy S II Original Android Development] Benjamin Dobell:
1. Open the "Flash" tab.

2. Browse for the appropriate PIT file on your PC (you can download your device's PIT from the Utilities tab).

3. Click the "Add" button below the partition list to add a file/partition to the flash.

4. Chose the "KERNEL" partition from the drop-down box and browse for the kernel you'd like to flash.

5. Press the "Start" button to perform the flash.

This process can be made a bit more straight-forward if the kernel you wish to flash comes as a Heimdall Firmware Package. A developer could create a Heimdall Firmware Package for a kernel by following steps 1-4. Then instead of pressing the "Start" button, they'd fill out the information in "Create Package" tab and press the "Build" button.
[Galaxy S II Original Android Development] Benjamin Dobell:
Okay everyone, xda_devtom has reported XXKG3 contains a good secondary bootloader! So if you're having problems with OS X try get your hands on the secondary bootloader from that firmware.

Keep in mind that some primary and secondary bootloaders are incompatible with each other. So unless you're certain what you're doing will work, make sure you always flash both a primary and secondary bootloader at the same time.
[Galaxy S II Original Android Development] madmack:
Bejamin,

Could you please give me an answer to my post ? Is having my internal sdcard completely wiped something you can explain or does it not have anything to do with Heimdall and not choosing a PIT file while flashing a kernel in Linux ?

Thanks.
[Galaxy S II Original Android Development] schack:
What's the procedure for flashing primary & secondary bootloaders. Can this be done with Heimdall on Windows ?

Best regards

Henrik Schack
[Galaxy S II Original Android Development] Benjamin Dobell:
Sorry, I saw your post a couple of days ago and forgot to respond. The internal SD card wiping issue has been fixed in the official 1.3.0 release. At least that's what other users have reported.

I'm not entirely certain why the phone went ahead and wiped the internal SD, or even why you'd include that functionality! However this only occurred when you performed a non-flashing operation i.e. print-pit etc.

To solve the problem I just made the print-pit (and other non-flashing actions) behave slightly more like the flash action. Obviously they don't flash any files to your device, but I changed the connection initialisation process slightly.
[Galaxy S II Original Android Development] Benjamin Dobell:
Yeah. I doubt a Heimdall Firmware Package exists though, so you'll need to perform a custom flash. The steps will actually be pretty similar to those listed a couple of posts back for the kernel. Except instead of flashing the kernel you'll want to flash the primary bootloader (BOOT), secondary bootloader (SBL1) and param.lfs (PARAM).

To be super dooper safe it's actually best to flash one extra file along with the boot files listed above. A kernel or modem would do the trick. The reason for this is that Heimdall is smart enough to always flash files non-essential to booting first. Typically if a flash is going to fail (due to a bad cable etc.) it's pretty much guaranteed to fail near the start of the flashing process. So if a flash ever does fail then you definitely want it to fail on files not required for boot.

In saying that I've flashed my bootloaders by themselves (no other files) probably fifty or so times without any problems. But there's no harm in being cautious, so if you're not sure about your USB cable or USB port, include a kernel at the same time.
[Galaxy S II Original Android Development] schack:
Yes Yes Yes, it worked :-) Finally I can use Heimdall on my Mac.

I grabbed the necessary files from the I9100XXKG3 package at samfirmware.com

Best regards

Henrik Schack
[Galaxy S II Original Android Development] madmack:
Thanks a ton Bejamin,

I indeed did run print-pit. Good to know that its taken care of and that I can safely flash away in my *nix box :)
[Galaxy S II Original Android Development] omniwolf:
ah ok, so from the 1.1 front-end and the command line (any version) you can flash the zImage file directly, but the 1.3 front-end you need a heimdall package or to pull the PIT file from your phone first?
[Galaxy S II Original Android Development] Benjamin Dobell:
Essentially yes.
[Galaxy S II Original Android Development] madmack:
Using 1.3.0 and trying to flash KG3 I get the following:

Heimdall v1.3.0, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...

Beginning session...
Handshaking with Loke...

Downloading device's PIT file...
PIT file download sucessful

Uploading KERNEL
0%
1%
3%
4%
6%
7%
9%
10%
12%
14%
15%
17%
18%
20%
21%
23%
25%
26%
28%
29%
31%
32%
34%
35%
37%
39%
40%
42%
43%
45%
46%
48%
50%
51%
53%
54%
56%
57%
59%
60%
62%
64%
65%
67%
68%
70%
71%
73%
75%
76%
78%
79%
81%
82%
84%
85%
87%
89%
90%
92%
93%
95%
96%
98%
100%

KERNEL upload successful
Uploading CACHE
0%
1%
2%
3%
4%
5%
6%
7%
8%
9%
10%
11%
12%
13%
14%
15%
16%
17%
18%
19%
20%
21%
22%
23%
24%
25%
26%
27%
28%
29%
30%
31%
32%
33%
34%
35%
36%
37%
38%
39%
40%
41%
42%
43%
44%
45%
46%
47%
48%
49%
50%
51%
52%
53%
54%
55%
56%
57%
58%
59%
60%
61%
62%
63%
64%
65%
66%
67%
68%
69%
70%
71%
72%
73%
74%
75%
76%
77%
78%
79%
80%
81%
82%
83%
84%
85%
86%
87%
88%
89%
90%
91%
92%
93%
94%
95%
96%
97%
98%
99%
100%

CACHE upload successful
Uploading MODEM
0%
1%
2%
3%
4%
5%
6%
7%
8%
9%
10%
11%
12%
13%
14%
15%
16%
17%
18%
19%
20%
21%
22%
23%
24%
26%
27%
28%
29%
30%
31%
32%
33%
34%
35%
36%
37%
38%
39%
40%
41%
42%
43%
44%
45%
46%
47%
48%
49%
51%
52%
53%
54%
55%
56%
57%
58%
59%
60%
61%
62%
63%
64%
65%
66%
67%
68%
69%
70%
71%
72%
73%
74%
76%
77%
78%
79%
80%
81%
82%
83%
84%
85%
86%
87%
88%
89%
90%
91%
92%
93%
94%
95%
96%
97%
98%
99%
100%

MODEM upload successful
Uploading FACTORYFS
0%
1%
2%
3%
4%
5%
6%
7%
8%
9%
10%
11%
12%
13%
14%
15%
16%
17%
18%
19%
20%
21%
22%
23%
24%
25%
26%
27%
28%
29%
30%
31%
32%
33%
34%
35%
36%
37%
38%
39%
40%
41%
42%
43%
44%
45%
46%
47%
48%
49%
50%
51%
52%
53%
54%
55%
56%
57%
58%
59%
60%
61%
62%
63%
64%
65%
66%
67%
68%
69%
70%
71%
72%
73%
74%
75%
76%
77%
78%
79%
80%
81%
82%
83%
84%
85%
86%
87%
88%
89%
90%
91%
92%
93%
94%
95%
96%
97%
98%
99%
100%

FACTORYFS upload successful
Uploading DATAFS
0%
1%
2%
3%
4%
5%
6%
7%
8%
9%
10%
11%
12%
13%
14%
15%
16%
17%
18%
19%
20%
21%
22%
23%
24%
25%
26%
27%
28%
29%
30%
31%
32%
33%
34%
35%
36%
37%
38%
39%
40%
41%
42%
43%
44%
45%
46%
47%
48%
49%
50%
51%
52%
53%
54%
55%
56%
57%
58%
59%
60%
61%
62%
63%
64%
65%
66%
67%
68%
69%
70%
71%
72%
73%
74%
75%
76%
77%
78%
79%
80%
81%
82%
83%
84%
85%
86%
87%
88%
89%
90%
91%
92%
93%
94%
95%
96%
97%
98%
99%
100%

ERROR: Failed to confirm end of file transfer sequence!
DATAFS upload failed!
Ending session...ERROR: Failed to send end session packet!
Re-attaching kernel driver...
[Galaxy S II Original Android Development] Benjamin Dobell:
I'm not quite sure what the problem is here. Are you sure that the DATAFS file you're flashing is not too large for the partition?
[Galaxy S II Original Android Development] madmack:
I guess it should be, given that its a stock rom.

in the end I flashed without data.img and it seems to work just fine. I'm not entirely sure what's in that file anyways.:o
[Galaxy S II Original Android Development] intronauta:
same problem with datafs in front-end and command line. Process freeze at uploading DATAFS 100% .

After several minutes, when I unplugged the usb get the obvious error:

...
99%
100%

ERROR: Failed to confirm end of file transfer sequence!
DATAFS upload failed!

Excluding data.img from partition list works fine with or without repartition, cause the csc process do format to the "/data" partition and boot fine.

Benjamin, if you need more info or some type of debug file please tell us.

I tried with stock XXKG6 and XXKG5 in Ubuntu 11.04 - Mac & Heimdall 1.3.0
[Galaxy S II Original Android Development] Lorse:
Same with windows and data.img

getting a semibrick

Fixed repeating as indicated Intronauta repartition process without data.img

Not if you have easy solution, but if so now I can forget and start odin

to exploit the possibilities offered by Heimdall

great work
[Galaxy S II Original Android Development] r47z:
i used this on osx went to download mode and heimdall said it could not detect my device, on lion. anyone have the same problem?
[Galaxy S II Original Android Development] r47z:
Anyone?? Is this DEAD?
[Galaxy S II Original Android Development] vorcigernix:
I9100xwki4

Hi,

I have a weird problem with firmware above, I tried to flash it from Heimdall, but I wasn't successfull (phone didn't boot). So, I tried to include new bootloader, repartition, secondary bootloader and generally every option I found in heimdall help, but it didn't helped.

Today at work I tried to simply flash whole tar from Odin and it is working.

I never had any problems like that before.

Anyone have an idea what hapened?
[Galaxy S II Original Android Development] voc:
I have had the same problem flashing "XXI4 without the bootloader" today. With heimdall, the device stuck at the boot logo. Flashing with ODIN worked out of the box!

Is this a problem with the heimdall or with the XXI4?
[Galaxy S II Original Android Development] vorcigernix:
Thanks for confirming. Samsung changed something in update tars or what, what I don't get is that messages on phone seems to be same and both programs flashed phone successfully.
[Galaxy S II Original Android Development] Benjamin Dobell:
Quick update, sorry about the lack of responses guys! It's pretty difficult for me to keep track of all the different threads about Heimdall. That's what I get for writing software that works with multiple devices :P

Source code for Heimdall 1.3.1 has been available on Github for a while now however I've had serious problems getting it to compile on Lion. There are a few issues, GCC version, lack of universal libraries etc. However I hope to finally have that sorted out this weekend.

I don't know about the bootloader issues mentioned here. Are you flashing without the bootloaders in Odin or just Heimdall? Some firmware requires particular bootloaders in order to function correctly.

Anyway this latest version includes a few minor changes but most importantly it fixes the repartitioning issues users were having (i.e. Heimdall said it repartitioned but it didn't). Hopefully the changes will also help in other areas where users are having difficulties.
[Galaxy S II Original Android Development] vorcigernix:
I9100XXKI3 is working fine again. There was something in official 2.3.4 what put heimdall out of game. I doubt it was a bootloader issue, as I flashed both bootloaders successfully.
[Galaxy S II Original Android Development] kevinkui:
Hi,

Once I ran this command:"heimdall flash --factoryfs factoryfs.img", I got this message: (Please help, thanks)

Initialising connection...

Detecting device...

Claiming interface...

Setting up interface...

Beginning session...

Handshaking with Loke...

ERROR: Failed to receive response!
[Galaxy S II Original Android Development] erhangulsum:
i have lion 10.7.1 nd i couldnt finish install :) You are lucky...

Its not ready for Lion i think...
[Galaxy S II Original Android Development] sunseaker:
I'm running Heimdall on openSUSE 11.4. I'm getting the following error when trying to print the PIT file using the frontend. The device is detected fine.

Initialising connection...

Detecting device...

ERROR: Failed to access device. libusb error: -3

The logs show.

Oct 3 12:47:31 suntp001 kernel: [17664.563092] usb 1-2: new high speed USB device using ehci_hcd and address 14
Oct 3 12:47:31 suntp001 kernel: [17664.759616] usb 1-2: New USB device found, idVendor=04e8, idProduct=685d
Oct 3 12:47:31 suntp001 kernel: [17664.759624] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Oct 3 12:47:31 suntp001 kernel: [17664.759631] usb 1-2: Product: Gadget Serial
Oct 3 12:47:31 suntp001 kernel: [17664.806788] cdc_acm 1-2:2.0: This device cannot do calls on its own. It is not a modem.
Oct 3 12:47:31 suntp001 kernel: [17664.806906] cdc_acm 1-2:2.0: ttyACM0: USB ACM device
Oct 3 12:47:31 suntp001 mtp-probe: checking bus 1, device 14: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-2"
Oct 3 12:47:32 suntp001 mtp-probe: bus: 1, device: 14 was not an MTP device

I've tried different usb ports but the same result.

Any ideas why this is happening?