yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] Benjamin Dobell:
Hmm, I'm reasonably confident I know exactly what the invalid connection string message means. In saying that I can't see why it's any different on Linux.

The message is a result of Heimdall's new functionality that allows it to resume a flashing session after using the --no-reboot functionality. Basically before trying to handshake Heimdall sends the device a test command. If the device doesn't respond then Heimdall knows it needs to handshake again.

I thought I'd tested all this stuff and it seemed to be working on my PC. Although it's quite possible I missed something. Anyway, a good way for you to test if that error message is the root of the problem would be to do the following:

1. Using Heimdall 1.3.0 from command line:

Version 1.3.0 doesn't probe the connection so you won't get the bad connection string error.

2. Then using Heimdall 1.3.1 run any command that was previously failing.

Version 1.3.1 does probe the connection, but the connection will be initialised so it won't be a problem.
[Galaxy S I9000 Android Development] Benjamin Dobell:
Ah man. Okay I'll try recompile and e-mail you another version when I get home tonight and see if that helps. I'll include the latest libusb-1.0 and the latest drivers.
[Galaxy S I9000 Android Development] pietro_spina:
I have a general question. I know Heimdall is set up so file names can be whatever the dev wants. but if we are flashing from and odin package...

In Heimdall 1.3.1 the options are

IPL+PBL

SBL

SBL2

PARAM

KERNEL

RECOVERY

FACTORYFS

DBDATAFS

CACHE

MODEM

EFS

So presumably

param.lfs ----> PARAM

Sbl.bin ----> SBL

boot.bin ----> ??

can someone clarify?
[Galaxy S I9000 Android Development] gehzumteufel:
boot.bin = pbl if I remember correctly. I could be wrong though. So wait for others to respond.
[Galaxy S I9000 Android Development] AdamOutler:
Boot.bin=IBL+PBL.
[Galaxy S I9000 Android Development] jerome.d:
That's strange, I have always used

BOOT -> boot.bin

and everything works fine.

See my previous post on this subject:

http://xdaforums.com/showthread.php?p=16383287#post16383287

EDIT: OK, I see, I use heimdall 1.3.0, not 1.3.1, the name has probably been changed.

RE-EDIT: nope, not changed. I have just installed 1.3.1 and no partition "IBL+PBL" for me, only "BOOT".

I assume this must depend on the device you consider (mine is a galaxy s2).
[Galaxy S I9000 Android Development] pietro_spina:
Does Heimdall change the options based on the pit file provided?
[Galaxy S I9000 Android Development] Benjamin Dobell:
Yeah all the partition names are retrieved directly from the PIT file selected (in Heimdall Frontend) or from the device itself when using the command line tool. The named command line options are hard-coded in a sense. Each named command line parameter is mapped to one or more "known partition names" which are used to find the corresponding partition in a device's PIT file.
[Galaxy S I9000 Android Development] pinsb:
Guys

I'm trying to install CM7 Beta onto a Samsung Galaxy Tab (7" 3G Euro version)

I mainly run a FC14 x64 bit environment and after messing around trying to do a build from source for a couple of hours gave up and thought I'd use my Dual Boot machine which also has Win 7 x64.

I downloaded the binaries from the

http://www.glassechidna.com.au/products/heimdall/

link for

Heimdall Suite 1.3.1 (Binaries)

Windows

I unpacked the zip and put the contents into a folder on my desktop

I read the README and followed the procedure to install the driver using zadig this seemed to work and reported it had installed.

I then open a command prompt and go to the path where I have heimdall and the associated files from the CM7 package.

When I try the Heimdall

heimdall flash --repartition --pit gt-p1000_mr.pit --primary-boot boot.bin --secondary-boot sbl.bin --kernel zImage --factoryfs factoryfs.ext4 --cache cache.ext4 --dbdata dbdata.ext4

command line command I get a "The program can't start because libusb-1.0 is missing from your computer" error

I've googled around for this error and can't find a fix.

Could anyone please point me at the obviously incredibly stupid thing I'm not doing as I've spent 6 hours on this now reading assorted threads and googling and frankly am getting ready to do the three storey bounce test.

Thanks in advance
[Galaxy S I9000 Android Development] AdamOutler:
install libusb. it's included in the windows suite package.
[Galaxy S I9000 Android Development] pinsb:
I'm sorry I don't wish to appear dense but where does it tell you how to install libusb? It talks about installing the libusb library using zadig which I've done (and stated above) but I still get the same error.

The libusb website doesn't appear to have a windows installer but does have source to do a compilation.

So can we clearly differentiate here, when you say reinstall libusb are you talking about using zadig to install the driver or are you talking about some other installer that I've somehow missed?
[Galaxy S I9000 Android Development] AdamOutler:
You must install zadig per USB port you wish to use it on. It wont work if you switch ports. You can use some USB ports for Odin and some for heimdall this way.

Also, all files must remain in their original file structure... Benjamin should look at making an installer for windows. If you remove the libusb file and try to execute only the binary, it will not work. The files must all be there.
[Galaxy S I9000 Android Development] AdamOutler:
Hey, is anyone getting any errors or bad flashes with Heimdall 1.3.1 or might it be something that was on my computer?
[Galaxy S I9000 Android Development] eBug:
no PIT file on i9001

I'm desperately trying to download the PIT for my SGS+ with no success so far. I keep getting this error:

root@pico2:/home/eric/it/android/i9001# heimdall print-pit --verbose
Heimdall v1.3.1, 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...

length: 18
device class: 2
S/N: 0
VID:PID: 04E8:6601
bcdDevice: 0100
iMan:iProd:iSer: 1:2:0
nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
Class.SubClass.Protocol: 02.02.01
endpoint[0].address: 82
max packet size: 0010
polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
Class.SubClass.Protocol: 0A.00.00
endpoint[0].address: 81
max packet size: 0200
polling interval: 00
endpoint[1].address: 01
max packet size: 0200
polling interval: 00
Claiming interface...
Setting up interface...
ERROR: Setting up interface failed!

dmesg also shows 2 USB mass storage devices and a cdc_acm modem:

[662646.807002] scsi24 : usb-storage 1-5:1.2
[662647.804994] scsi 24:0:0:0: Direct-Access SAMSUNG GT-I9001 Card 0327 PQ: 0 ANSI: 2
[662647.805481] scsi 24:0:0:1: Direct-Access SAMSUNG GT-I9001 Card 0327 PQ: 0 ANSI: 2
[662647.807153] sd 24:0:0:0: Attached scsi generic sg7 type 0
[662647.808503] sd 24:0:0:1: Attached scsi generic sg8 type 0
[662647.813105] sd 24:0:0:1: [sdh] Attached SCSI removable disk
[662647.814926] sd 24:0:0:0: [sdg] Attached SCSI removable disk
[662650.592991] usb 1-5: USB disconnect, address 28
[663737.868070] usb 1-5: new high speed USB device using ehci_hcd and address 29
[663738.001874] cdc_acm 1-5:1.0: This device cannot do calls on its own. It is not a modem.
[663738.002055] cdc_acm 1-5:1.0: ttyACM0: USB ACM device

What's going wrong?
[Galaxy S I9000 Android Development] AdamOutler:
It would appear that Heimdall-Frontend requires a bit of tweaking. I was working with Galaxy Tab firmware and lib-pit sees two partitions: Hidden and MoviNAND. Heimdall-Frontend sees an extra IBL+PBL and an extra SBL. I believe MoviNAND and Hidden are being enumerated wrong in Heimdall-Frontend.
[Galaxy S I9000 Android Development] melliwuk:
did you post instructions on this? as i have need to retrieve stuff from a phone to repair mine, but have no idea how to go about it...
[Galaxy S I9000 Android Development] AdamOutler:
You cannot retrieve pbl from a device. Loki modifies the PBL by removing IBL. If you flash it, you will kill your device.
[Galaxy S I9000 Android Development] eBug:
But I'm not using heimdall-frontend, I'm just with heimdall command line.
[Galaxy S I9000 Android Development] SupraLance:
Help!

**edit** crisis averted, whew

I almost bricked my phone after Heimdall wasn't able to bring it out of download mode after a failed flash, but this same great program has saved the day in the end...

I was using Heimdall 1.3 from command line and forgot to capitalize the S in Sbl.bin so got: ERROR: Failed to open file "sbl.bin". So I capitalized the S in Sbl.bin and tried again. This time (right after handshaking with Loke) I got: ERROR: Failed to receive response.

I tried it again with the same response, then used the "Heimdall detect" command, which said "device connected". So I tried "Heimdall close-pc-screen" and got the same "ERROR: Failed to receive response" after the "Handshaking with Loke..."

I typed "lsusb" and my phone was listed, so after a couple more tries to "close-pc-screen" I unplugged my phone and pulled the battery (couldn't find any other way to get it out of download mode). This was a bad idea and led to a phone that wouldn't boot (fixed now). If I run into this again, is there a better way out of this?
[Galaxy S I9000 Android Development] pietro_spina:
From your use of lsusb I'll presume you are using Linux. (not in a VM?)...

I had similar pattern of errors once or twice. It has to do with the computer in my case. So I just reboot the computer. Leave the phone in DL mode and plug it back into the computer once I'm back up and running.

My logic for resetting the computer first is that if something has gone wrong with the phone I

I want to keep it in it's current state until I have either fixed it or exhausted all other possibilities.
[Galaxy S I9000 Android Development] AdamOutler:
I started a thread on how to make Heimdall One-Clicks here: http://xdaforums.com/showthread.php?t=1348392

Heimdall One-Click is a controlled environment which a single java jar file will deploy everything needed and then flash a Heimdall package on Linux, Windows, or Mac. Everything is automated, several safety features were implemented over Heimdall's integrated safeties and a Heimdall One-Click is a self-contained installer/dependency manger/flashing utility with an overhead of just 20MB over that of a Tar.Gz file.

Heimdall One-Click is not a replacment for Heimdall Frontend. It's just a method to keep flashing easy, compacted to a single file, and cross-platform.

Check out the One-Click here: http://xdaforums.com/showthread.php?t=1348392
[Galaxy S I9000 Android Development] Entropy512:
I finally had an opportunity to try and collect some data from an attempt to talk to a Galaxy Tab 10.1.

I have attached a text file with the results - this was generated using Heimdall 1.3.1 on a Linux machine.

The device is a Wifi Tab 10.1 (GT-P7510), and the command that generated the attached output was:

heimdall print-pit --verbose --stdout-errors > heimdall_errors_tab10_1.txt
[Galaxy S I9000 Android Development] AdamOutler:
If you can repeat while running wireshark, then open a Windows virtual machine and run wireshark while using Odin it would be infinately more helpful.To keep size small, it would be best to only flash a kernel.

so...

1. Launch "sudo wireshark"

2. begin monitoring USB (verify you're monitoring the proper USB by connecting and disconnecting the device)

3. flash a kernel with Heimdall

4. stop wireshark

5. save the wireshark dump

6. launch a Windows virtual machine

7. launch Odin in the Windows virtual machine

8. connect device to Windows Virtual machine

9. Begin monitoring USB

10. flash a kernel with Odin

11. stop wireshark

12. save the wireshark dump

13. compress and upload both dumps to mediafire and post them here.

Wireshark is a protocol analyzer. You can't use it for monitoring USB under Windows. However, if you use Linux as a base, you can monitor the Linux device while Odin uses it.

A protocol analysis is the first step to supporting newer devices.. It is the next best thing to having a device in hand.
[Galaxy S I9000 Android Development] Entropy512:
I'll have to take some time to get a Windows VM up and running. I haven't done it in years.

Quite familiar with Wireshark although I have never used it for USB before, just Ethernet.

I used to use qemu + kvm, but at least back in 2007-2008 that didn't work well for USB - what would you recommend these days?
[Galaxy S I9000 Android Development] AdamOutler:
Virtualbox works great under Linux. install vbox, create a new machine, stick your CD in the drive, click the "Local cd rom drive" checkbox in the menu and start the VM. Install windows as usual. Virtualbox is free. get the PUEL version not the OSE version so you will have access to the USB drivers.
[Galaxy S I9000 Android Development] Entropy512:
OK, finally got VirtualBox with Win7 installed and took some caps of Heimdall trying to talk to my Tab 10.1 (GT-P7510) and Odin talking to it.

Captures are at: http://www.multiupload.com/HETAOSR4TU

notes.txt in that zip describes the situations in which each capture was obtained.
[Galaxy S I9000 Android Development] N00B_IN_N33D:
Damn, I was hoping I could ship you my baby in one of those nifty Flat Rate Boxes... It would have only cost me a couple bucks too... lol :D
[Galaxy S I9000 Android Development] AdamOutler:
I think Benjamin was referring to sex when he made that comment. I think he practices abstainence..

It says you can pm him to make arrangements for that sorta thing. I was thinking about sending him mine for a firmware upgrade. It keeps making this irretating whiney noise and it wont enumerate on USB.
[Galaxy S I9000 Android Development] N00B_IN_N33D:
Mine has a similar issue. It will just start whining out of no where and I have to wipe it clean, which a lot of people say that will clear the issue, but it doesn't! Cause an hour or so later it will start whining and I have to wipe it again...

Edit: I think I made the issue worse. I loaded Heimdall up on my computer and stuck the one end of the USB cable in its mouth. Flashed back to stock firmware and after a light buzzing sound it stopped making the whining noise! The only thing is I think that I think it's bricked because it won't move... or really do anything... But the whining stopped at least! :D
[Galaxy S I9000 Android Development] lambgx02:
Hello everyone! :)

I'm working on rooting the new Captivate Glide (SGH-I927).

I did manage to get the source from Samsung and build a test (stock) kernel, properly stamped, but ODIN failed to flash it. Nearly bricked my device (wouldn't boot until I entered 3e recovery to clear the bad-flash flag).

In searching around for more information on ODIN, I ran across this thread.

A nice, open source, cross-platform flashing utility? Sweeeeeet.

Is there anything I should know before I start playing with this? Is it likely to work on a new device, or does Samsung tend to change their protocol on a per-device basis?

I'm slowly chewing my way through this thread but if anyone feels like offering advice / words of wisdom, please do. :)

I must admit I'm new to Android (though I have rooted my Iconia A100); I'm coming from the n900 world, where I was an active developer, and have been a kernel hacker / Linux admin for >15 years, so I hope there's something useful I can contribute to this community.
[Galaxy S I9000 Android Development] Entropy512:
Samsung doesn't change their protocol often, however - they DO change it. See earlier this page/last page with discussion of trying to implement Heimdall support for the Tab 10.1

Since the Glide is Tegra2 based, there's a chance that your device's protocol may be the same as for the Tab 10.1 - It does seem that the protocol either varies with processor family, or non-Samsung CPUs were the first to start using a "newer" version of the Odin protocol. Most new Samsung devices without Samsung CPUs are unable to communicate with Heimdall. (Such as the T-Mobile T959 and the SGH-I727, both use Snapdragons and Heimdall won't talk to them.)

Try ZombieROM. It should stop the whining and will even install on bricked devices, however it will cause the device to emit a moaning sound - usually while disturbing, it is less intrusive than the high-pitched whining stock devices usually emit. Also, when running ZombieROM, the device will need frequent access to a brain supply, and will attempt to install ZombieROM on nearby devices.
[Galaxy S I9000 Android Development] Benjamin Dobell:
Woh, what happened to my thread? :p

Sorry I haven't been around much lately. I've been extremely busy developing enterprise Android applications so I haven't had much free time. I've got quite a few unanswered e-mails (and PMs) to churn through and a lot of forum posts to catch up on. But I'll try get back to you all as well as give you all an update on an initiative that myself and Adam Outler are starting that will hopefully allow us (and other developers) to better support a wider range of devices.
[Galaxy S I9000 Android Development] asci:
Hi,

download link doesn't work. Please can you check it?

Is Heimdall compatible with Galaxy Note?

THX!
[Galaxy S I9000 Android Development] dcorn619:
Links down!!

This ^^

Thanks for your great work :)
[Galaxy S I9000 Android Development] s0unds:
ACM

Hi Benjamin, Adam,

The USB spec lists Class-specific data, so e.g. for modems the USB CDC (communications device class) includes Abstract Control Management devices in section 5.2.3.3 (of the CDC spec).

In other words, it looks like odin mode is just a standard USB serial adapter using the ACM driver.

I've taken a look at the heimdall code because I'm trying to add support for the Samsung Exhibit II. It doesn't use the same protocol, but it's close. Can you please PM me? The easiest thing to do would be to make a fork of heimdall that just supports the Exhibit II but I'm not in such a hurry :) I'd rather send you a pull request, let you look it over, see what you think.
[Galaxy S I9000 Android Development] jenablinsky:
thanks.....
[Galaxy S I9000 Android Development] thunderteaser:
Hello, there!

I think there are some issues with Heimdall and the SGSII. Remember the procedure to remove the yellow triangle? After flashing CF-Root, we need to flash a stock kernel back and then use CWM to flash CF-Root again. After flashing CF-Root for the first time with Heimdall, I have CWM Recovery. But after flashing a stock kernel back with Heimdall, it doesn't keep CWM Recovery, thus I can't flash CF-Root again through the CWM app because it reboots me to the standard Android recovery. I repeated the same procedure with Odin and it worked.

I noticed that Odin was not rebooting to recovery mode after flashing, while Heimdall is. I haven't tried checking "No Reboot" to see if it kept the CWM Recovery, but I don't think that's the problem.

I don't know if I explained it well, though.

EDIT: Since it's mandatory to specify a pit file on Heimdall, I guess it's trying to read something from it even if we don't select Repartition. I could (and had to) choose to NOT add a pit file on Odin, so maybe that's the reason.

My 2 cents.
[Galaxy S I9000 Android Development] Entropy512:
Um, it's not mandatory to specift a pit file on heimdall, I've never specified one when flashing a kernel

heimdall flash --kernel zImage

Always works for me on the GS2.

And you never have CWM using a stock kernel - heimdall is working exactly as intended. Flashing a custom kernel over a stock kernel with a rooted device requires using dd on the device, not CWM.

dd if=zImage of=/dev/block/mmcblk0p5

for GS2.

If you somehow entered CWM instead of stock recovery after flashing a supposedly stock kernel with Odin - Odin failed, not Heimdall.
[Galaxy S I9000 Android Development] Freeride:
your program could know IMEI repair broken and would be perfect ... but it is probably impossibly :(
[Galaxy S I9000 Android Development] thunderteaser:
I forgot to say I'm using the frontend on Linux. Both main binaries and frontend are up-to-date. I can't select partitions to flash without specifying a pit file (I remember older command line versions required that too). The buttons to add and browse are greyed out and become clickable once entered a pit file. I admit I haven't understood the Odin failing thing you said but I'm glad I was wrong about the pit issue. Thanks!

EDIT: Oh, now I got it! AFAIK it's the standard procedure for removing the yellow triangle. You are supposed to flash back a stock kernel with Odin and that would keep CWM Recovery. It's possible that Odin is failing in doing what it's pretended to do, but that would mean that this procedure is based on an Odin issue and only works if Odin is failing. Heimdall is superb, I wrote this just because I was sick of having to run Odin again!
[Galaxy S I9000 Android Development] LordManhattan:
I'm only getting this when i try to install it. Running Ubuntu 11.10

The following packages have unmet dependencies:
heimdall-frontend : Depends: heimdall (>= 1.3.0) but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Btw, does it support Galaxy Note? It's good to know before i do something stupid.
[Galaxy S I9000 Android Development] watchpocket:
I'm getting a very similar error message when I attempt to open (with the GDebi Package installer) the Heimdall Frontend 1.3.1 binary for Debian Linux (AMD64 / Intel 64):

Error: Dependency is not satisfiable: heimdall (>= 1.3.0)

(And I do get it in blood-red type.) I originally assumed that this was because I'm still running Ubuntu 9.10 Karmic, and that things are getting old and stale in Karmic, and that I need to upgrade (which I do, but I'm still hoping to do this one last thing -- root my unbranded international SGS2 -- before sitting down to uprgrade my desktop box (a System76 Wild Dog).

But if others are getting the same kind of error message on Ubuntu 11.10, then there are clearly other factors at work.

I also get an error message when I try to open (again with the GDebi Package installer) the Heimdall 1.3.1 Command Line binary for Debian Linux (AMD64 / Intel 64):

Error: Dependency is not satisfiable: libusb-1.0-0 (>= 2:1.0.8)

Any ideas why?
[Galaxy S I9000 Android Development] watchpocket:
At least in my case, I think it's basically time to upgrade the OS and go from there.
[Galaxy S I9000 Android Development] LordManhattan:
I'm getting the same error, and i'm on 11.10, so it can't be that the distro is old.
[Galaxy S I9000 Android Development] AdamOutler:
Apt-get install libusb
[Galaxy S I9000 Android Development] LordManhattan:
Done it, but i'm still getting the same error.
[Galaxy S I9000 Android Development] watchpocket:
What is the PIT file?

http://xdaforums.com/showthread.php?t=999097
[Galaxy S I9000 Android Development] Untouchab1e:
Heimdall is awesome, however I was struggling to find .rpm packages for version 1.3.1, so I converted the .deb package (32 bit Linux) to rpm.

Ive attached it to the post. Hope thats okay.

Enjoy
[Galaxy S I9000 Android Development] DaNaRkI:
I have a question about the nature of a PIT file. When pulling the PIT from a phone is it simply copying a reference file, or is it reading the current partition sizes and building the table one section at a time?

The question stems from a recent foray into CyanogenMod ROMs which don't use Samsungs partitions. So I can't rely on any of the PIT files I have now, and CM does this re-partitioning from the kernel. So I can't pull it out of anything.

leaked from my FUSED SGS I897 contaminating you via XDA app.