New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flashing on Droid Charge fails with "Expected file part index" error #14
Comments
As you've noted. This is currently a known issue. The Droid Charge seems to use the protocol slightly differently than other Galaxy S devices. A big thanks to Dave Mueller who has tried a few different things to get this working, we have made some progress. However, if anyone is able to get me a USB log of flashing in Odin or Kies then that would immensely helpful. |
Existing progress notes: Setting SendFilePartPacket::kDefaultPacketSize = 65536, allows expected file part indices to be received however the following error is then encountered: Failed to confirm end of file transfer sequence! One potential solution I had in mind would be, in BridgeManager.cpp, set: kMaxSequenceLength = 1600 Those of you interested in testing it's recommended you don't test with any files involved in the boot process, i.e. steer clear of boot.bin, Sbl.bin and param.lfs. |
I made both the aforementioned changes (to
The upload went very slowly, and as soon as it started, a red |
Distortedloop offered to get a log using Odin if instructions showing how to do so could be posted. |
Just for the hell of it, I tried:
... but that doesn't seem to make a difference; I get the red I'm willing to try testing other Heimdall modifications as suggested. |
I managed to get Odin working under a VirtualBox install of Windows XP, and successfully flashed images that way to my Droid Charge. I'm willing to experiment as necessary to help get Heimdall working. |
It would be great if you could get a USB capture for me whilst flashing within Odin. The process is actually fairly straightforward with VirtualBox and Linux as the Linux kernel has the necessary functionality built in. WireShark should make the process even simpler: |
How's this? http://tomxtobin.com/odin-recovery-flash-log I started the Wireshark capture before starting Odin, flashed imnuts's CWM recovery image to my Charge, and then stopped capture once the phone was rebooting following the successful flash. If there's anything else I can get you, please let me know. |
Okay, I've had a quick look over the log. It looks like Samsung are still transferring 131072 bytes of data before expecting a response from the mobile phone. However, instead of sending the data as one big bulk transfer it's instead being sent as 16 transfers of 8192 bytes. Try the following source modification with the current official source (so remove any other modifications). Replace BridgeManager.cpp lines 808 - 817:
with:
|
I got the |
Hmm, the steps performed by Heimdall should be the same as those that were being performed by Odin in that log. Is there any chance you'd be able to get a failed flash log with an unmodified master build of Heimdall and then again with the most recent mentioned modification included? Thanks for going to all this effort! |
Strange, they're pretty much identical up until the time when the phone responds to Heimdall with an incorrect file part index. The only two differences are that Heimdall requests some extra data from the device just after initialising the connection and the other thing is simply that the transfer timing is different. If you comment out lines 349 - 377 of main.cpp:
then Heimdall will no longer request the additional data from the device. If that doesn't solve the issue then the only difference left should be the timing. In which case it's probably worth trying to flash with the --delay parameter set to a value of 15 (or perhaps 7), i.e.
Let me know how you go. |
I get the same error with those lines commented out. I'm also having trouble with the
Do you want to create a temporary Git branch for me to test from, just to make sure I'm working with the correct set of modifications? (e.g., at the moment I do not have |
The --delay argument issue should be fixed if you pull the latest update: I'm actually surprised it was even compiling with the missing commas in the commonArgumentNames array initialiser. |
I won't create a separate branch just yet as I don't believe any of the modifications I've suggested have really had any impact. The original kDefaultPacketSize value seems correct. Whilst the 8192 loop modification does bring Heimdall more in line with how Odin functions on your PC, I have a feeling it's not actually a requirement. If adding a delay does fix the problem then I'm going to be a bit annoyed at the fact the device requires such an inefficient flashing mechanism. However if it doesn't work I'm going to be scratching my head as I'm pretty much out of ideas. |
Here's the output:
|
Hmm, I'm at a bit of a loss for now. If the issue is timing related then it's going to require a bit of coding to sort it out. Although it would be quite unusual if it was timing related. I'm going to be pretty busy for next couple of days (maybe longer) but I'll definitely look into this as soon as I get a chance. Thanks for all the testing and getting me those logs, you've been extremely helpful! |
Thanks for looking into this; I definitely appreciate it! At least I have Odin for the time being; it's a minor hassle to fire up a Windows VM, but it works as a stopgap solution. Definitely let me know if there's anything else you'd like me to try. |
I too experience the rx_timeout while trying to flash anything. Oddly enough, if I download an ed1 file, which shipped with the phone, it will flash perfectly fine as long as it's a fresh download. Any other file, regardless of when it was downloaded will not flash... If there's anything I can do to help, just let me know. |
There is some new software for flashing the charge called "samsungPST" |
any progress on this? i have no access to a windows machine and am currently trying to unbrick my charge with heimdall and getting the same errors. |
I know this issue is way old - but got this same issue on ArchLinux yesterday, but was able to reboot the phone pass the message mentioned in the first post. Just making sure that Droid Charge is just un-flashable with Heimdall at this point? I'm kinda a freetard, so I don't want to set up a Windows virtual machine just to root my phone. :D If it's a lost cause, I'll just deal with it until I get a newer droid. Thanks! |
NVM, I set up a trial version of Windows & used ODIN to flash my phone. Thanks anyways! |
I've run into the same exact issue here with v1.3.1. Is there anything I can provide that would help move this forward? |
Could someone please run v1.3.2 and confirm whether this problem still persists? |
$ sudo ./heimdall flash --recovery ~/Downloads/recovery.bin This software is provided free of charge. Copying and redistribution is If you appreciate this software and you would like to support future Initialising connection... This software is provided free of charge. Copying and redistribution is If you appreciate this software and you would like to support future Initialising connection...
iMan:iProd:iSer: 1:2:0 interface[0].altsetting[0]: num endpoints = 1 interface[1].altsetting[0]: num endpoints = 2 Checking if protocol is initialised... |
Please try the Heimdall 1.4 release candidate to ensure this is fixed. If not, you can let me know if the problem still persists by re-opening the issue. |
The issue still exists with the latest Git build. (I don't seem to have a "reopen" option for the ticket.) I'm seeing this a lot, too, when I try to flash; nothing seems to happen:
|
Here's an attempt today with heimdall from git on fedora 18. Heimdall v1.4 RC1 Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna This software is provided free of charge. Copying and redistribution is If you appreciate this software and you would like to support future Initialising connection...
iMan:iProd:iSer: 1:2:0 interface[0].altsetting[0]: num endpoints = 1 interface[1].altsetting[0]: num endpoints = 2 Checking if protocol is initialised... Initialising protocol... Beginning session... Downloading device's PIT file... Uploading LTEMODEM File Part #0... Response: 0 0 0 0 1 0 0 0 ERROR: Expected file part index: -689023200 Received: -1 Ending session... ERROR: Failed to unpack received packet. |
I've stopped using my Droid Charge entirely and "downgraded" to a Droid X that seems to give me fewer overall problems. I wouldn't mind lending the Charge out for the purpose of fixing this bug, but I want to get my hands on another spare/backup phone first in case my Droid X dies on me. |
The exact same original issue is still present in
Red |
I'm seeing the following issue when attempting to flash my Droid Charge using Heimdall under Arch Linux:
I've had to run the
close-pc-screen
command afterward to successfully reboot my phone.This is a brand new Droid Charge that I just received today, and hasn't had any system updates applied yet.
I noticed someone with a similar issue on XDA-Developers in this thread (username "distortedloop").
I'm using Heimdall built from the latest GitHub commit on master (ab4073b).
The text was updated successfully, but these errors were encountered: