yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] mike.sw:
I wish I could give you the full log, but it was just way to big.

I think you should consider adding output for a file as well.

Basickly what happend was bunch of "File Part" messages, once or twice there were a failure and a retry.

It was going for like 2 minutes, then in the end I saw on the screen the blue loading bar.

Then the whole process failed and the download screen just stuck with the blue loading bar very early in the beginning.

I held Down+Home+Power to power it down and it did. But since then it never came up ;)

ah well, sometimes you got to take one for the team.

BTW, I tried firing it up in the whole verity of ways I know.. removing battery, then inserting it while holding the Down+Home combination, removing the battery for 5 minutes and trying..

Knocking on the wood 3 times

etc etc ;)
[Galaxy S I9000 Android Development] Benjamin Dobell:
Argh! I feel terrible, I seriously didn't think that would happen again! If you take it back for a warranty repair hopefully Samsung should fix/replace it.

EDIT: Also don't worry about the whole log. The log I'm referring to is a bit-perfect log of all data sent over the USB port when my phone was connected, it's not the same thing Heimdall outputs.

EDIT: I don't know if they're related but these two cases sound vaguely similar:

- http://xdaforums.com/showthread.php?t=757562

- http://xdaforums.com/showthread.php?p=7734553

They sort of seem battery-related so that probably isn't it unfortunately.
[Galaxy S I9000 Android Development] mike.sw:
don't worry about it, I'm a big boy, I knew the possible consequences.

I contacted the store I bough, will ship them the phone.

There's a good thing in this story, now I won't waste my time on messing with the phone :D
[Galaxy S I9000 Android Development] Benjamin Dobell:
I did find something wrong in how I had reverse engineered the protocol for the EndFileTransferPacket your phone failed on. I don't know if this will make much sense being out of context and all but I didn't have the following code:

if (partialPacketLength > 65535)
{
this->partialPacketLength = (partialPacketLength - 65536);
this->lastFullPacketIndex = lastFullPacketIndex + 1;
}
else
{
this->partialPacketLength = partialPacketLength;
this->lastFullPacketIndex = lastFullPacketIndex;
}

Mind you before your phone got to that point it has already sent that message 7 times and had it confirmed by the phone. Also I'd definitely managed to transfer that very same param.lfs to my phone numerous times.

So I'm leaning towards that perhaps the 20 ms delay was causing issues. For instance Loke might give the phone a certain amount of time for the whole flashing process to take place before it tunes out. Odin uses a 15ms delay which means a Heimdall flash would take ~33% longer. Your flash transferred 95% as much data as a successful Odin flash so perhaps we just ran out of time.

Anyway I've swapped to using 15 ms now. Originally I thought that the 20 ms would be safer but until we know what caused the problem it's probably better to just copy what Odin does.

I won't release any more updates until I've got my phone back and done some stress tests. However if someone would like a copy of alpha 6 to test with between now and then just send me a PM.
[Galaxy S I9000 Android Development] zirowan:
Hey Benjamin,

Just a quick question, are you reversing Odin protocol from scratch or are you working from an existing code basis ?

I know there's already been some work done about it by people working on Samsung H1 models.
[Galaxy S I9000 Android Development] Benjamin Dobell:
I did it from scratch, everything you use during a normal flash I've worked out already however there are probably other commands for backing up etc. which I haven't looked into yet.

Samsung seem to regularly change the protocol so the Samsung H1 protocol is entirely different to the one the Galaxy S uses.
[Galaxy S I9000 Android Development] Benjamin Dobell:
I'm still looking for alpha 6 testers. If anyone is interested please let me know by posting here or sending me a PM.
[Galaxy S I9000 Android Development] mike.sw:
Seroiously guys we need it! :)
[Galaxy S I9000 Android Development] j_r0dd:
it will be great to not use odin anymore!
[Galaxy S I9000 Android Development] Benjamin Dobell:
I've decided to make alpha 6 a public release like the other alphas before it. I know there a quite are few people waiting on Linux and OS X versions of the tool. As such I'm desperately in need of someone to test the Windows version so I can move on and make an official Linux and OS X release.

Please refer to the first post for information.
[Galaxy S I9000 Android Development] nandihno:
a mac os x will be the best if u can do that...

am pretty sure there is a lot of users that come from the iPhone world and saw the light and bought android....and so they will most likely have a mac.

so indeed bring on flashing roms on the mac! ;)
[Galaxy S I9000 Android Development] distortedloop:
Yeah, that's the pity here - those who really desperately need a replacement for Odin can't even alpha/beta test the replacement because it's still on Windows! LOL.

Looking forward to a Mac version myself so I don't have to fire up my friend's crappy old Windows laptop to flash a new ROM, but willing to wait while the dev gets it right for us.

Thank you for your efforts Benjamin Dobell.
[Galaxy S I9000 Android Development] FadeFx:
hi benjamin

just a wuestion for now...

do you think it will be possible at some point of development to extract the firmware from a phone to have an exact backup to flash onto another phone? i am somehow pissed over clockworks nandroid, since it turned out to be far away from bitexact like i was used to it on i7500 drakaz recovery.
[Galaxy S I9000 Android Development] Benjamin Dobell:
That flash command looks correct. What device are you flashing and how far do you get through the flash before it fails? If you own a Galaxy Tab and it fails when flashing the modem then checkout the dev-v1.1.1 branch instead of master from github.

If that's not the problem then the only possibility is a bad usb hub/port. For example until recently I'd only ever used one of the front two USB ports on my PC. I recently tried the other one and it consistently failed. Which makes sense as I also have trouble mounting USB drives with that port. Anyway, I suggest trying a different USB port or different USB hub.

No you only need the runtimes.
[Galaxy S I9000 Android Development] Benjamin Dobell:
Sorry I'm a bit confused, are you trying to open a DLL? Because you can't do that, a DLL is a library i.e. a set of functionality used by other applications. If you can run Heimdall Frontend fine then that's what you want to do.
[Galaxy S I9000 Android Development] legend_wok:
Oh, it seems I haven't clearly stated my problem: When I enter the command on the command line, I can successfully flash the ROM. However, when I use the GUI, flashing fails with the error message I mentioned in my previous post.
[Galaxy S I9000 Android Development] Benjamin Dobell:
Hmm that definitely shouldn't be happening. The GUI calls the command line tool directly, the only real difference to the above command is that --verbose isn't included, which shouldn't have an affect on the actual flashing. Well that and it will refer to the files via their absolute path.

Are you certain you're flashing the same files and they're included in the correct location when using the GUI? If so is the absolute path to the files really long, perhaps with weird characters? Ideally that shouldn't be a problem either but maybe Qt does something funky with the paths. Could you try moving the firmware files to a really short path, try again with the GUI and let me know what happens?

EDIT: Come to think of it you shouldn't be getting that error even if the paths are messed up. If the paths were broken you'd receive an error stating that the files couldn't be opened.
[Galaxy S I9000 Android Development] nzroman:
Well, this is where I was confused. The instructions in this thread http://http://xdaforums.com/showthread.php?t=821698 state the following:

01. Unplug the phone from the computer (if connected)

02. Kill all Kies related software (tray agent, etc)

03. Start Heimdall Downloader

04. Plug in the phone to the computer

05. Download adbDownload.zip

06. Unpack adbDownload.zip and run/double click on Download.bat

07. Download RAZ_P-SBL_SGS.tar

08. Unpack RAZ_P-SBL_SGS.tar

09. Move to Heimdall (GUI) and select boot.bin and SBL.bin.

10. Flash the bootloaders

Instruction # 9 says that I have to move to Heimdall GUI. I was assuming both boot.bin and SBL.bin are part of GUI (feel free to correct me at any time, cause mostly I don't know what I'm talking about :)). With Frontend then, would I choose Primary and Secondary Bootloaders and attach boot.bin and SBL.bin respectively? And then I assume that the .tar file supposed to be attached to the PDA (but which one)? Basically there are five fields there, but from what I can see only 3 files (two of which boot.bin and SBL.bin I have no idea where to get) and I don't know where each goes.

Again, please bare with me as I am a novice at this and have not done any flashing before. I've seen Odin and it only had three fields on the front screen, one of which was PDA. With old instructions you just had to download .tar file, attach it to PDA and done. However as Razvan had mentioned, Odin is a lot riskier.

Maybe, you could attach a pic of Heimdall Frontend with fields highlighted of what files need to be attached to where (and where to get them from). I'm sure there are a lot of people like myself who are not very confident at putting their expensive devices through this, but would like to learn and gain the functionality which was supposed to be there in the first place. And this is why I messaged you directly, not to come across as a complete tool in the thread, which is now too late. :P

I appreciate your patience and advice. Thank you. :>
[Galaxy S I9000 Android Development] legend_wok:
Yes, I am sure that I flash the same files. The absolute path of the files is not really long (/home/user/android/JPO). Also the path has no white space or any special characters like umlauts for example... I figured that the GUI doesn't do different things than I do at the command line...
[Galaxy S I9000 Android Development] grexe:
hmm... tried this under Debian Linux x64, Samsung Galaxy S (2.1) with 2.2 ROMs, using the command

but I always get the error

USB is connected and detected in Linux, USB debugging is enabled, tried also to mount the phone but that's not needed iiirc:

What am I doing wrong?

btw the GUI gives me the following error after selecting all the required files:

(installed 1.1 from the Debian 64bit packages).
[Galaxy S I9000 Android Development] Benjamin Dobell:
I'm not sure what you mean when you say boot.bin and Sbl.bin are part of the GUI. They are the primary bootloader and secondary bootloader respectively. These are the files that you wish to flash. I highly recommend that you do a bit of background reading before you flash your phone. You shouldn't really be blindly following instructions that you found on the internet. There are a lot of device or firmware specifics that can trip, you really need to understand what is happening. For instance you definitely should know that the primary bootloader is boot.bin and the secondary bootloader is Sbl.bin.

No the GUI does nothing different than the command line tool. The GUI is basically just a wrapper, it generate the command automatically based on the files you chose to flash and then calls the command line tool with that command. The GUI doesn't actually do any flashing. So I'm at a bit of a loss as to what could be going on.

Based on that output, you're not in download mode. Boot your device into download mode, then it should work.
[Galaxy S I9000 Android Development] ridepo:
why my heimdall say "failed to start heimdall!!"????

i put all the files required, put the galaxy in download mode... where i wrong?
[Galaxy S I9000 Android Development] dirk1978:
Just used the GUI on Ubuntu Maverick and it works perfectly.

Can't believe how well this works. Samsung should really consider using this instead of Odin because this works far better and... is cross platform, which is the real killer feature.

Thanks again Benjamin.
[Galaxy S I9000 Android Development] Benjamin Dobell:
What desktop OS are you running? If it's Mac OS X do you have the updated bootloader for your phone?

If you do have the updated bootloader, or you're not running OS X, what it the exact error you're getting?
[Galaxy S I9000 Android Development] ridepo:
hi and thanks for interest.

i'm running mac osx snow leopard.

i've downloaded the 1.1.0 version

installed pkg and qt libraries. run the frontend, put the phone in download mode, put the files in heimdall, and click start....

what is the updated bootloader??

thanks
[Galaxy S I9000 Android Development] eightace:
I am in the same predicament and it appears we cannot use Heimdall until we have installed a fixed bootloader............via Windows :(

http://xdaforums.com/showpost.php?p=9918224&postcount=2

Anyway around this???
[Galaxy S I9000 Android Development] ridepo:
LOL..........
[Galaxy S I9000 Android Development] pietro_spina:
no you have to flash the new secondary bootloader via linux or windows.
[Galaxy S I9000 Android Development] Benjamin Dobell:
Well other than installing the secondary bootloader via Windows or Linux, technically you could modify IOUSBFamily.kext source, as provided by Apple, and make your own. However, I don't want to do this myself as the problem isn't with the kext, the problem is with the secondary bootloader. That and it's more work that I unfortunately don't have time to do right now.
[Galaxy S I9000 Android Development] Breakthecycle2:
Im having an issue. I installed the drivers, said they installed fine, but when I go to run the exe, I get an error that MSVCP100.dll is missing. What is this?? My galaxy tab is soft "bricked" after installing the bootstrapper.
[Galaxy S I9000 Android Development] Breakthecycle2:
Yeah, im stupid. I figured it out. lol
[Galaxy S I9000 Android Development] ckvsoft:
Hi

Heimdall works on a GALAXY S Austria OPEN Edition very fine under Linux Kubuntu 10.10

lg Chris
[Galaxy S I9000 Android Development] wwortel:
"Failed to detect compatible device"

Same problem here as reported by grexe in a Linux-only setup (Fedora).

The usb is recognised, and adb works fine when the SGS is brought in development mode.

Heimdall though gave "Failed to detect compatible device"

Found the problem, my silly mistake.

Mixed up debug mode and download mode (from power-off activated by volume_down+home+power)

Then it worked fine; thanks !!!
[Galaxy S I9000 Android Development] PlayOn1:
After installing heimdall`s "Samsung Android Usb composite device" driver, adbDownload and recovery doesn`t recognise the phone.It just says divice not found.Without installing heimdall`s i can enter download mode with adbDownload but heimdall says that it can`t find the divice. (I trying to unlock my 3-button combination modes :), forgot to mention it from the start ). I`ll be grateful if someone help me.
[Galaxy S I9000 Android Development] Benjamin Dobell:
You only want to install the driver for download mode. So use the default android driver and adb to boot into download mode. Then once in download install the driver for Heimdall.
[Galaxy S I9000 Android Development] WintermuteHun:
Handshaking with Loke... Failed!

Hi all,

I'm trying to upgrade firmware with Heimdall on a Samsung Galaxy i5800. I boot it into download mode with home+menu+volume down+power, then start heimdall, which says:

Claiming interface... Success

Setting up interface... Success

Beginning session...

Handshaking with Loke... Failed!

What am I doing wrong?

TIA!

edit: I enabled verbose mode, and now I see the error:

Handshaking with Loke... Failed!

ERROR: Failed to receive response
[Galaxy S I9000 Android Development] Benjamin Dobell:
Sorry Heimdall only supports Galaxy S devices. Unfortunately older series of phones use a different version of the Loke flashing protocol.
[Galaxy S I9000 Android Development] WintermuteHun:
Is there any chance of implementing the old protocol? Do you have any plans for it? Is there a protocol description available on teh interwebz? :)

Thanks a lot!
[Galaxy S I9000 Android Development] CTown:
Great program, very easy to use.

I really do like this program thanks alot. I am running Windows 7 (64-bit) and am using the WinUsb driver. By the way, what goes in the recovery portion? It's not in the Readme.
[Galaxy S I9000 Android Development] BoredOOMM:
Can you help this fellow Ubuntu Maverick user out? I have been trying for about 2 hours to get past qmake. I have installed every type of qt4 in gnome and it will not move past this point.

Are you a KDE user?

I know I have the qt4, because I have K3B.

:eek:
[Galaxy S I9000 Android Development] dirk1978:
Why not just use the debs on Benjamin's site?
[Galaxy S I9000 Android Development] Benjamin Dobell:
Unfortunately these protocols aren't documented in any way, I had to reverse engineer the Galaxy S protocol. As I don't have access to older Samsung phones, and I can't reverse engineer the protocol. As such I won't be able to implement the protocol myself. Also, to be perfectly honest even if I did have access to an older phone I'm probably a bit short on free time to implement it now.

I'm not sure exactly how it's used by the phones themselves, someone correct me if I'm wrong, but I believe it's just a backup zImage optionally different to the regular kernel. I'm not sure when this recovery kernel is used however.

As mentioned by dirk1978, there are binaries available from my website. These binaries were themselves built on Ubuntu Maverick, if you'd like to build from source yourself then you can grab Qt 4.7.1 from the official website, grab the X11/Unix version.
[Galaxy S I9000 Android Development] mklappstuhl:
RCC: Warning: No resources in 'mainwindow.qrc'.

Hey, I posted this issue on Github:

https://github.com/Benjamin-Dobell/Heimdall/issues#issue/7

Maybe somebody here can help :)

(I directly cloned the source from Github.)
[Galaxy S I9000 Android Development] Benjamin Dobell:
Sorry about that, I meant to respond earlier on Github but forgot. I've done so now.
[Galaxy S I9000 Android Development] BoredOOMM:
The debs on Benjamin's site are 64 bit AMD. I run 32 bit Intel. :rolleyes:

Are you saying Qt 4.7.1 from Nokia site?
[Galaxy S I9000 Android Development] P30TiP:
Hi,

I downloaded the latest version for mac. I have a Macbook Pro with Intel Core 2 Duo CPU and Mac OS X 10.6, and when I installed it everything was fine until when I runned it it gave me a error that "it can't run because of a problem". why is that? do I need to install anything else too?
[Galaxy S I9000 Android Development] BoredOOMM:
When I was 14, I solved Rubik's cube. Today when I returned, I turned the files to a deb, and it installed.

I don't know how, and am somewhat at a loss to know how to use this program....:confused:

Today requires proper application of paper and cellophane to paper boxes..... software will have to wait until after Family Time.

:D
[Galaxy S I9000 Android Development] luismanson:
Feature Request

after building a reaaaally big kernel by mistake and flashing it i got some errors on heimdal authenticating with loke also the bootloader showed the connect to pc image...

since we already know the partition size why not add a check on file size and show a warning?
[Galaxy S I9000 Android Development] Chamgea:
Hey I realize this question might be posted in this thread; it may be in pieces of different people's responses and it might be answered in one simple post...whatever or where ever it is I can't find it.

Here's what my goal is - To restore my Samsung Vibrant t959 to factory, out of the box settings with all apps so I can send it in for a trade in.

What I've done - I've Heimdall Suite 1.1.0

Complication - The downloaded install doesn't seem to work

System - Mac OSx 10.6.5

Phone OS - Axura 2.2

Question - Can someone PM me, or send me a reply with a step by step process to accomplish my goal of restoring my phone to out of the box factory settings?

Thanks in advance to all the helpful insight from the world of open source contributors.
[Galaxy S I9000 Android Development] Benjamin Dobell:
Sorry about the delayed response everyone, I went for a little bit over Christmas. My recommendation; don't ride over 300km on a sports bike without stopping, very sore! Then don't ride another 200km or so the next day!

Sorry I haven't had a chance to build 32-bit binaries. However I should let you know that those binaries will run on a 64-bit intel processor. The specification is just called AMD64 as it was developed by AMD.

If you're trying to compile it yourself then you should definitely be grabbing the latest official version of Qt from the Qt website, I don't recommend getting it from elsewhere.

What error are you getting? Make sure you installed the Qt fix (also available from my website).

I'm sorry, I have no idea what you're trying to say.

If you've got a Galaxy S then you definitely shouldn't be getting any authentication problems. Perhaps try using a different USB port.

Well I don't actually know the partition size. I certainly can grab the PIT file from the phone and take a look, however at present the PIT file isn't retrieved before flashing.

I intentionally haven't included too many checks for these sorts of things because I don't want people to think that if Heimdall lets you flash then it will all be okay. Users really need to do some research and actually know what they're flashing. Even if a kernel is small enough it doesn't guarantee the phone will actually boot.

When you say the downloaded install doesn't work, exactly what do you mean? If Heimdall isn't able to detect your device on OS X then it's usually because your phone is running the older (broken) secondary bootloader. However if you can't get Heimdall Frontend to run then it's probably because you don't have Qt install. I did try package it up in installer but it didn't seem to work, as such on my website there is a link to a second file you need to download and install.
[Galaxy S I9000 Android Development] Chamgea:
Ok, I've download the Qt libraries and the program opens up...now how do I get my phone back to out of the box/factory settings so I can send it back? Thanks so far, I'm pumped!
[Galaxy S I9000 Android Development] Benjamin Dobell:
Now that I'm not sure about. I personally only have access to two GT-I9000s. My recommendation is to use the search functionality on this forum, if that fails then start a thread asking for help. Keep in mind that whether you're using Heimdall or Odin is irrelevant for this sort of thing. Heimdall can generally do everything that Odin can, and in some cases more.

You want to get your hands on the original firmware for your phone (Vibrant T595). I don't know what this version is called but it's likely samfirmware have a copy, so you probably just need to ask other T595 users what the original firmware is called.

Once you've got that, just follow the README.
[Galaxy S I9000 Android Development] Benjamin Dobell:
Sorry I took so long, however I finally had some time to build and upload binaries for Heimdall 1.1.1. The changes are fairly minor and mostly just improve installation for OS X and Linux as well as a few changes to ease creation of Linux packages.

Bug Fixes:

Fixed modem flashes for Galaxy Tab i.e. Reverted from the "Kies method" back to the "Odin method" of flashing modem files.

System Support Changes:

OS X binaries are now universal. Intel 32-bit, Intel/AMD 64-bit and PowerPC are all supported.

Installation Changes:

The OS X package should now include Qt 4.7.1.

Debian packages now install binaries to /usr/bin as opposed to /usr/local/bin.

Debian packages now take care of udev rules in a more standard complaint fashion.

Compilation Changes:

Heimdall Frontend can now be installed to any location by using "qmake OUTPUTDIR=/desire/output/dir".

On Linux running "make install" for Heimdall command line tool will now install the udev rules.