yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] Benjamin Dobell:
Perhaps, it may although I wouldn't recommend it.

There are definitely different versions of the protocol, older phones don't use the same version as the Galaxy S. Even though the Spica might support the same protocol version there are certain files being flashed and each file is identified by a file index. If the file indexes don't match up exactly then it's likely you'll brick your Spica.

If someone has an old Spica they want to donate me to me then I'm willing to look into supporting it.
[Galaxy S I9000 Android Development] ashwinds:
It does work on 64 bit - I even rebooted (after ages :P) with the 6 + 4 keypress to be doubly sure:

Macintosh:Flash ashwind$ uname -a

Darwin Macintosh.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:27:12 PDT 2010; root:xnu-1504.7.4~1/RELEASE_X86_64 x86_64

Could it be because I am using a compiled from source version?
[Galaxy S I9000 Android Development] zaptac:
RPM-Package for Fedora 14

RPM-Package for Fedora 14.

Feedback welcome!
[Galaxy S I9000 Android Development] kage00:
bricked!!

So my galaxy s is also buggered! Damn!

it comes up with the error as earlier in the thread...

"failed to confirm end of file transfer sequence!

kernel upload failed!"

so is my phone now completely stuffed or can I do something to fix it??

I'm running win xp

i typed in heimdall flash --pit s1_odin_20100512.pit --kernel GT-I9000_Kernel.tar

kernel was downloaded from samsung's opensource website

where did I go wrong??

and what am i supposed to do with the 'GT-I9000_Platform.tar' file also downloaded from samsung's opensource website??

Thanks in advance for any help:(
[Galaxy S I9000 Android Development] zurchpet:
You must untar the GT-i9000_Kernel.tar

And tell heimdall to falsh the zImage file that is i side the TAR.
[Galaxy S I9000 Android Development] troyvit:
Linux tweaks + help!

This is a great tool! I'm running Ubuntu Lucid and install was almost seamless. Here are the complications (all minor):

I had to compile libusb-1.0 v1.0.8 from source (downloaded from libusb dot org per your rec). Compile and install was seamless.

Make sure you also install build-essential to compile c++:

sudo apt-get install build-essential

Then I needed make the configure script executable:

chmod u+x configure (in the heimdall source directory).

NOW for the question. It's a newb one too. I'm one of those poor idiots who has bricked his Vibrant and is trying to recover it. The Heimdall README says to download a ROM, extract it, then flash the pit file, etc. onto the phone.

My problem is that when I download a ROM I get a zip file. I extract it and I get an entire filesystem. I don't get any tars to extract in order to get the files I need. So far I've tried Bionix_Obsidian_v3 and Macnut and I get the same thing. What am I missing?

I did find one ROM: T959UVJFD.tar. That along with s1_odin_20100512.rar gave me:

cache.rfs

dbdata.rfs

factoryfs.rfs

modem.bin

param.lfs

s1_odin_20100512.pit

zImage

That isn't everything I need but I tried:

heimdall flash --pit s1_odin_20100512.pit --factoryfs factoryfs.rfs --cache cache.rfs --kernel zImage

and received this feedback:

Claiming interface... Failed. Attempting to detach driver...

Claiming interface again... Success

Setting up interface... Success

Beginning session...

Handshaking with Loke... Success

Downloading device's PIT file...

PIT file download sucessful

Local and device PIT files don't match. Functionality for this is yet to be implemented.Ending session...

Rebooting device...

Re-attaching kernel driver...

---

So what the heck do I do now? At this point I just want to go back to a stock Vibrant install and pretend I never even heard of Froyo.

Benjamin -- I am happy to make a donation for all of your trouble if you can help.
[Galaxy S I9000 Android Development] zurchpet:
Try using another pit file. Like 803.pit. you can get it from samfirmwares.com. since heimdall does not do any partitioning it could work even if it is not the proper pit for the rom you want to flash.
[Galaxy S I9000 Android Development] troyvit:
problems getting roms

Thanks for the info. Unfortunately samfirmware.com doesn't let me create an account (says I need to provide a valid email when in fact I do). Can yo recommend another place? Also, I'm still missing all the other good stuff like boot.bin. Would Sam's (or another place) be the place to find those?

Thanks again
[Galaxy S I9000 Android Development] zurchpet:
Since I'm on the road I can't post it in here. But I'm sure you can find it somewhere in here.

Boot.bin and sbl.bin are not necessary. In fact most samsung leaked rom come without them.

I just had to flash them once to make download mode work with my mac. The old one has a bug.
[Galaxy S I9000 Android Development] troyvit:
Thanks for the good info. I found 803 elsewhere. Unfortunately I still received the same error. Looking through the c++ it seems simple enough to disable the check for == .pit files. What would happen if I did that I wonder?
[Galaxy S I9000 Android Development] [Ramad]:
Try 513.pit, it's the old one and is not used any more, but your device may be using it.

https://www.wuala.com/Samsung Galaxy S/Firewares , Updates and Odin/Odin & .PIT/?key=AfzUZSU4SpKU

Thanks to http://xdaforums.com/showthread.php?t=723596 by Darkstriker
[Galaxy S I9000 Android Development] troyvit:
Thanks [Ramad] but apparently I'm not using that one either. Here's what I do know. I installed Bionix_Obsidian_v1 a week ago. Things weren't working well so I tried to install my original ROM from backup. That is what failed. Would knowing that help figure out which ROM my phone does use? I attempted to hack heimdall to show the size of my vibrant's existing rom, but it shows 4096 -- that number is suspicious because it's the size of directory, so I think I screwed up in heimdall.

Another possibility is that the pit file is screwed up on the phone (maybe that's why it won't boot) in which case, why not just over-write it with 803? I tried the 3 main ones, they all failed, so what's left? I'm gonna try it.

EDIT

Woohoo it worked! All my data's gone but that's floating around somewhere. Thanks for helping out. Ramad and zurchpet you guys kick ass for helping this newb out. Benjamin: Heimdall is awesome and so is your code. It was very easy to follow. If you need help with documentation or anything you let me know. I'm off to make a donation now. Cheers!
[Galaxy S I9000 Android Development] Benjamin Dobell:
I'm glad you got it working. Sorry I didn't get back to you sooner, I was sleeping :P Also thank you very much for the kind words and the donation I just received.

If in future if you want work out what pit file is on your phone you can modify the code slightly to dump it to a file. However as you picked up the galaxy always sends 4096 bytes, which I believe is the block size of the memory on the Galaxy S. I'll experiment with this behaviour a bit myself as it could be quite useful to other users.

EDIT: Wow, that's the largest donation I've received. It is very much appreciated, thank you again!
[Galaxy S I9000 Android Development] Benjamin Dobell:
Sorry kage00, I missed your post.

By the sound of it the files that you tried to flash are not actually binary files for the phone. If the files you tried to flash were downloaded from the Samsung open source website as you said, then you have attempted to flash an archive which contains source code as the kernel. That is going to be very very bad!

Samsung don't easily make the binaries available unfortunately. You also can't just go ahead and compile the source code without adding some missing functionality.

If you did flash that file to your phone then I imagine it's in a partially bricked state right now, unless you've recovered already. What you will need to do is download a ROM from somewhere (Samfirmware etc.), extract the archive that you've downloaded and then flash the contents of the archive to your phone. I don't necessarily recommend this sort of thing to everyone. So perhaps it might be a good idea to just flash the kernel (zImage) to your phone and leave it at that for now. You can do a bit of reading and then come back to flashing your phone once you've got a general understanding of how everything works.

If you have any questions I'm more than happy to help, although it would be great if you could try to search around to see if they've been asked before.
[Galaxy S I9000 Android Development] jrhinds:
Can you post a diff/patch of the changes you made? I am receiving the same "PIT files don't match" error on my Vibrant and have tried the 512, 513 and 803 pit files as well.

Thanks,
[Galaxy S I9000 Android Development] troyvit:
Sorry it took so long. Here it is:

diff -u main.cpp ../../Rig-Source/source/main.cpp

--- main.cpp 2010-10-15 17:40:22.000000000 -0600

+++ ../../Rig-Source/source/main.cpp 2010-11-16 11:47:49.945153991 -0700

@@ -340,17 +340,17 @@

delete [] localPit;

delete [] devicePit;

-

if (!pitFilesMatch)

{

- printf("Local and device PIT files don't match. Functionality for this is yet to be implemented.");

-

+ printf("Local and device PIT files don't match.\n\n");

// TODO: Check if this is a good or bad idea!

+ /*

if (!bridgeManager->EndSession())

return (false);

bridgeManager->RebootDevice();

return (false);

+ */

}
[Galaxy S I9000 Android Development] jrhinds:
Thanks a bunch, that worked perfectly. I can confirm that with this patch and the 512 pit file, I was able to successfully flash my Vibrant.

Cheers,

Jon
[Galaxy S I9000 Android Development] gthiruva:
Just tried that and no dice. It fails to detect the phone.

$ heimdall close-pc-screen --verbose

Heimdall, Copyright (c) 2010, Benjamin Dobell, Glass Echidna
...

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:
...

Failed to detect phone device

On the other hand, I'm seeing something in the Apple System Profiler's listing of USB devices:

Gadget Serial:

Product ID:	0x6601
Vendor ID:	0x04e8 (Samsung Electronics Co., Ltd.)
Version:	2.1b
Speed:	Up to 480 Mb/sec
Location ID:	0x26200000
Current Available (mA):	500
Current Required (mA):	Unknown (Device has not been configured)

But the above doesn't seem to match the kext.

When I check the kext with kextutil, it mentions the 64-bit issue:

$ sudo kextutil -pi /System/Library/Extensions/heimdall.kext
/System/Library/Extensions/heimdall.kext has problems:
Warnings:
Personality CFBundleIdentifier differs from containing kext's (not necessarily a mistake, but rarely done):
GalaxyS

Dependency Resolution Failures:
64-bit kexts must use com.apple.kpi.* libraries, not com.apple.kernel* libraries.

That last statement makes it seem definitively clear that com.apple.kpi needs to be used. Another poster mentioned that he was successful with an unmodified kext on a 64-bit kernel, but I'm wondering his system really booted the 64-bit kernel. On some older 64-bit x86_64 Macs lacking a firmware fix, the system will override the request to boot a 64-bit kernel and force load the 32-bit one - yes, despite the presence of a 64-bit processor.

I'm using OS X Snow Leopard 10.6.5 on a Fall 2009 MacBook Pro 17" which has EFI firmware support for 64-bit kernels.

Anyway ...
[Galaxy S I9000 Android Development] Benjamin Dobell:
Thanks for the details. I'll see if I can reproduce the problem on a 64-bit Snow Leopard install.
[Galaxy S I9000 Android Development] ashwinds:
I get the same message - but Heimdall works. And I am certain I am on 64 bit:

From System Profiler:

System Software Overview:
System Version:	Mac OS X 10.6.4 (10F569)
Kernel Version:	Darwin 10.4.0
Boot Mode:	Normal
[B][I] 64-bit Kernel and Extensions:	Yes[/I][/B]
Time since boot:	2 days 19:31

From Terminal

Macintosh:~ ashwind$ uname -a
Darwin Macintosh.local 10.4.0 Darwin Kernel Version 10.4.0:
Fri Apr 23 18:27:12 PDT 2010;
[B]root:xnu-1504.7.4~1/RELEASE_X86_64 x86_64
[/B]Macintosh:~ ashwind$

Are you sure you have loaded JPA in the past? Another thing you could check is if you have vmware fusion, if Odin works on it. Also, it is not detected if you have vmware running. You have to turn off and quit vmware.
[Galaxy S I9000 Android Development] gthiruva:
From Terminal

Macintosh:~ ashwind$ uname -a
Darwin Macintosh.local 10.4.0 Darwin Kernel Version 10.4.0:
Fri Apr 23 18:27:12 PDT 2010;
[B]root:xnu-1504.7.4~1/RELEASE_X86_64 x86_64
[/B]Macintosh:~ ashwind$

JPA? No. I'm assuming you're not talking about the Java Persistance API. What's JPA? Also, I don't have VMWare running at the moment, but I could launch it and try out Odin ...
[Galaxy S I9000 Android Development] ashwinds:
lol no - not Java Persistance API :) JPA is the first ROM released which had the new SBL which enables the device to be recognized by Macs. You have to flash one of the newer Froyo ROMS to make sure the SBL is updated

On Vmware - there are 2 points - one is about running it to try Odin. The other is when you are trying Heimdall, make sure it is NOT running.
[Galaxy S I9000 Android Development] RambJoe:
When I do make I just get loads of stuff like:

/tmp/ccGipgT0.s:11500: Error: unknown .loc sub-directive `discriminator'
/tmp/ccGipgT0.s:11500: Error: junk at end of line, first unrecognized character is `1'

Arch Linux.

edit: Dw I just noticed it's in the Arch User Repository. I love Arch. :P
[Galaxy S I9000 Android Development] getmoney2xl:
Brick caused by heimdall?

This guy bricked his phone... According to your instructions weren't really all that good... seems like trouble with drivers or flashing...

http://forum.ppcgeeks.com/sprint-epic-4g/137266-brick-brick-heimdall-vs-odin.html
[Galaxy S I9000 Android Development] Benjamin Dobell:
He didn't brick his phone using Heimdall, he bricked it using Odin. However, he is trying to unbrick his phone using Heimdall and the reason it's not working is because he didn't follow the instructions to install the drivers.

I can't go signing up to every forum where a user is discussing Heimdall, especially since there are many in languages I don't speak. However, if he needs more help he should contact me here or send me a e-mail via the contact form on the Glass Echidna website.
[Galaxy S I9000 Android Development] TheSneakerWhore:
Having trouble installing Hiemdall.

Mac OS X 10.4 (tiger).

What the heck do I do to install this onto the HD? I have the DL and opened the .zip but cannot get it to install via the terminal. Anyone have the commands to install it?

Used Odin many times, but for the life of me I cannot even start with the installation.
[Galaxy S I9000 Android Development] Benjamin Dobell:
The README included in the zip should help you out with what to do. If not there is some detailed instructions in this thread about 2-4 pages back, sorry I don't have time to elaborate now.
[Galaxy S I9000 Android Development] craigl56watson06:
Seems like the link to download is broken; something about not being able to make a DB connection...
[Galaxy S I9000 Android Development] Benjamin Dobell:
Hmm, which link are you using? What is the URL?

I just tested then and all the downloads seem to be working fine. There shouldn't be any database involved in downloading either, well assuming you're referring to a download link and not the product page.
[Galaxy S I9000 Android Development] TubeShaped:
Hi Benjamin

First of all, thanks for coming up with a non-windows flash solution!

My SGS won't boot anymore so I tried heimdall on my mac (snow leopard, 32bit). My phone was running Doc_Froyo XXJPO flashed via CWM, so I never used Odin.

Luckily I can boot in download mode but heimdall doesn't recognise the phone.

Is this due to the secondary bootloader thing? Isn't JPO a "newer" ROM?

Thanks in advance
[Galaxy S I9000 Android Development] zurchpet:
I had to Flash JPJPA from samfirmware.com to get the corrected secondary bootloader.

I'm able to flash on my MacBook now without a problem. If you need help. Feel free to PM me.
[Galaxy S I9000 Android Development] Benjamin Dobell:
TubeShaped, as zurchpet has mentioned, unfortunately my guess is that Doc's Froyo doesn't include the updated bootloader. I don't think the JPO listed on samfirmware contains a secondary bootloader at all (Sbl.bin) as a lot of the ROMs on the site are only partial ROMs. However Samsung have informed me that all official Froyo ROMs should contain the updated bootloader.

Unfortunately that means you'll have to use a Windows or Linux PC to recover your phone this time around.
[Galaxy S I9000 Android Development] tytdfn:
Thanks!

Just wanted to drop in and say that this has worked wonderfully on my captivate. I was a little hesitant at first and when I noticed there was no progress bar on the phone while it flashed I almost cried thinking that I would brick it. Then my rational side slapped my emotional side and pointed out that I wasn't flashing any boot loader and then I just looked away and when I looked back I was astounded to see it booting up. It was so fast!

Short Story: Little scary the experience but the program is wonderful.

Note: Any captivate owners that have trouble with this on ubuntu just pm me and ill help.
[Galaxy S I9000 Android Development] Benjamin Dobell:
Haha, that sounds a little bit like my experience during the early development stages when things were very experimental ;)

However, I'm very confident in Heimdall's ability now. I'm yet to hear of a single brick caused by Heimdall. On top of that I've only heard of one semi-brick, and that was a result of someone accidentally flashing an archive containing source code over the top of the kernel.

tytdfn, do you have any recommendation on how I could make the experience a little less scary for first time users?
[Galaxy S I9000 Android Development] dirk1978:
Ive got Heimdall installed on lots of different Ubuntu machines, netbooks, desktop etc. and Im forever flashing this and that onto my galaxy s and others' phones. Im much more confident using Heimdall to flash anything than I am odin and it hasn't once caused any issues.

I just find it incredibly easy to download the kernel du jour, press up and return and it's done.

I'd like to see the gui as I was going to attempt this myself until I saw someone else say they were doing it.

Unless anyone else was going to do it i was going to try and get it into the ubuntu universe repo.
[Galaxy S I9000 Android Development] Benjamin Dobell:
There are 2 reasonably simple GUIs already however it is still my intention to release my own cross-platform GUI. I did start on a GUI but got interrupted with work before making too much progress.

That was the other thing I meant to do. I need to make linux binaries available from my site. I'll probably chuck them up on a few different repos if others don't beat me to it.

I'm hoping to find some time next week to make a release with the following:

- An optional GUI.

- Galaxy Tab support (one line code change).

- Linux binaries.

- Simplified driver install mechanism for Windows.

- Better flashing progress feedback for non-verbose mode.

- Repartition (This one is a bit iffy, I need to investigate).

- Upload the source to github.

- Remove the PIT file requirement when flashing (without repartitioning).

Heimdall roadmap:

- Gjallarhorn, a tool to download (directly from Samsung), decrypt and optionally patch official firmware releases.

- Add functionality to use Gjallarhorn from the aforementioned GUI.

- Repartitioning (if I can't work out how to do it by the next release).

If there is something else you guys would like me to add let me know.

Research roadmap:

- I'd definitely love to dig my paws into Sbl.bin and see what makes it tick. If anyone has experience disassembling Sbl.bin please share your experiences.

- See if it's possible to fix (and possibly expand) the firmware dumping functionality in Sbl.bin.
[Galaxy S I9000 Android Development] legend_wok:
I'm getting an Unauthorised access error when I try to access the download link... :(
[Galaxy S I9000 Android Development] Benjamin Dobell:
Thanks for reporting that. It's fixed now.
[Galaxy S I9000 Android Development] razze76:
One flashing-related question:

Does someone know if the dfferent parts (or how should I say it) of the rom (cache, dbdata, etc) are images or files. In other words: is it files being copied over to an already existing partition with file system, or is it an image (compare command dd on linux) containing the file system, location of files, data etc etc being written to a partition?

This has an impact for the need of repartitioning/formatting: if the flashed file is an image (I don't know if this is the correct term, hopefully you still understand me) the there is really no need for the repartitioning unless you explisitly wants to repartition (say PIT512-PIT803), the filesystem will still be fresh after the flash.
[Galaxy S I9000 Android Development] Benjamin Dobell:
dbdata.rfs and cache.rfs aren't images in the sense that a partition will be created matching their size. The contents of dbdata.rfs and cache.rfs however are flashed to NAND. The NAND is partitioned according to the PIT file. There is no immediate need to repartition (as 10,000+ Heimdall users will confirm) and you can still use the original 512 PIT with the latest Froyo. Repartitioning is mostly just a matter of tweaking and personal preference.
[Galaxy S I9000 Android Development] lasersocks:
Any chance of a GUI for the osx version?
[Galaxy S I9000 Android Development] razze76:
I still didn't quite understand you. I'm asking in relation to the /system corruption bug related to some custom kernels which to my understanding corrupts specifically the filesystem. I would therefore like to understand if flashing a new complete rom (using Heimdall, therefore without repartitioning) copies the files to an existing (possibly corrupt) file system, or if the flashing also includes a fresh filesystem eliminating the possible problem of a corrupt filesystem.
[Galaxy S I9000 Android Development] dirk1978:
I just reflashed factoryfs with heimdall and it sorted my (possible) corruption.
[Galaxy S I9000 Android Development] Benjamin Dobell:
I don't know too much about the details of the file system corruption. However it is my understanding that the partition table is not damaged, instead the files themselves become corrupt (file names change case). As such repartitioning is not required to fix the problem, so a Heimdall flash should restore the filenames.

Yes the GUI I release will run on all platforms that Heimdall runs on.
[Galaxy S I9000 Android Development] JeremyNT:
Phew, Heimdall just saved my bacon after a FS corruption issue. This is a killer utility, I just wanted to say thanks for the work!
[Galaxy S I9000 Android Development] tytdfn:
Yeah make sure people know that there is no progress bar like when you flash with odin ;) Basically If you have a GUI up and running soon people will use it a lot more. And just having a GUI will bolster people's confidence in themselves and the program

Thanks again for the hard work. BTW I realize now that you might be able to help me with a lil problem I have when hooking up my captivate my comp. Ill pm you to see what your thoughts are.
[Galaxy S I9000 Android Development] jscurtu:
Hi, will the GUI be Qt based? :-)
[Galaxy S I9000 Android Development] Benjamin Dobell:
Yeah it will be.
[Galaxy S I9000 Android Development] mali100:
Hi,

can someone please explain how i can use heimdall on ubuntu whitout su-rights? Couldn't find an answer to that.

b.r.
[Galaxy S I9000 Android Development] jscurtu:
You dont have sudu rights? No need to use root(su) as it is disabled,.. Just do : sudo heimdall flash. ..... And type in your user account password..
[Galaxy S I9000 Android Development] mali100:
Sorry for the bad description of my problem: actually I meant: how can I use heimdall without sudo. I read somewhere that its possible to access libusb with user-permissions if you use udev, but I couldn't figure out, how the udev-rule should look like.

br. Peter