tdm 2,322 Posted March 10, 2020 Author Share Posted March 10, 2020 @oliviersenn6 I am not sure what could be happening. The EDL package should replace most everything related to booting the device into Android. There are some exceptions (such as the Factory Reset Protection flag). But I don't see how flashing a Lineage boot image followed by another EDL flash should fix things. In any event, it looks like your device is working again. I will keep watch for this issue in the future. Thanks for the report. Quote Link to post Share on other sites
david 921 Posted March 19, 2020 Share Posted March 19, 2020 @tdm, on your web page for the tool, you wrote, "Please note that Qualcomm has an official EDL driver that will install by default. The official EDL driver is not compatible with this programming tool. It must use WinUSB." Can you explain more about why this is? I figured I'd test your tool to make sure I can connect to my phone properly *before* some future incident where I will need to use it. While I was waiting for the firmware to download, I grabbed some other tools online. For all of those, it *seems* like I have to leave the default Qualcomm EDL driver in place. I'm using Windows 7. In Device Manager, it shows the device under the Ports section and shows that it is on COM12 or COM13, etc. Those other tools require configuring them to tell them which port it is using. I've tried all 3 firehose files on your site, but the tools just hang after writing the programmer to the phone (at least I'm assuming they are able to do that) when having them do simple commands, like listing out the partitions, etc. If I use the zadig tool to change the driver to WinUSB, then those tools can't communicate with the device. I get errors like: Quote Failed to write hello response back to device Did not receive Sahara hello packet from device I don't know how to find the virtual com port being used when the WinUSB driver is being used, or if there is ever a concept of a virtual com port with that driver. With the default Qualcomm driver, your tool does show "Device detected" in the lower left corner, as it does when I change the driver to WinUSB. Is there something unique about this device that doesn't allow it to work with any other EDL tools, using the default Qualcomm EDL driver? Quote Link to post Share on other sites
david 921 Posted March 19, 2020 Share Posted March 19, 2020 The firmware download finished, so I tested your tool, selecting the "No Write" option, so that it wouldn't actually write anything to flash. I am using the 20191203 firmware. I got this error: That is with the driver changed to WinUSB: So maybe this is why the other EDL tools weren't working too. Maybe there is something wrong with my computer. Have you encountered this with any other users? Quote Link to post Share on other sites
david 921 Posted March 19, 2020 Share Posted March 19, 2020 Add on stupid question... These 3rd party tools mention possibly setting the virtual com port speed to a slower setting if you encounter problems. The *fastest* you can set it to is 128,000 bps (bits per second!). That seems like it would take a LONG time to transfer gigabytes of data. Is there something I'm missing there and it is only bound to that speed for certain handshaking, but not actual data transfers? And with WinUSB drivers, do you have these same speed limitations? Quote Link to post Share on other sites
VaZso 1,997 Posted March 19, 2020 Share Posted March 19, 2020 5 hours ago, david said: Maybe there is something wrong with my computer. Have you encountered this with any other users? I have experienced the same error message under Windows (using WinUSB) and "Connection timed out" under Linux. However, I was unsure if it is a problem with EDL state (as the phone falls back to EDL) or the phone itself. That phone is still with me (this is my friend's phone) so if you find something interesting, I would like to hear it. Also, I have tried to put my own phone to EDL mode using a home-made "deep flash" cable and it seemed to be not possible even though my phone has charging enabled when the phone is switched off so that icon has appeared and could not go to EDL that way... If anyone have any ideas, please share it with me. Quote Link to post Share on other sites
tdm 2,322 Posted March 19, 2020 Author Share Posted March 19, 2020 @david you had several posts with several questions so I'll answer them here. Why did I choose to use WinUSB instead of the Qualcomm driver? There are a couple of reasons: The Qualcomm driver exposes the device using a serial port. This is ancient and outdated technology that is difficult to use. At minimum you need to figure out the virtual "com" port number assigned to the device by the Windows device manager. This is unnecessary and confusing. The Qualcomm driver is not installed automatically for all versions of Windows. Finding it and installing it manually is a huge pain. Again, unnecessary and confusing. Why are the WinUSB driver and the Qualcomm driver incompatible? Because programs that are written for the Qualcomm driver use Windows' serial port API and WinUSB does not provide a virtual serial port. Conversely, my program uses the bulk USB protocol and the Qualcomm driver does not provide access to that. Could I modify my program to be compatible with the Qualcomm driver? Sure. But why move backwards just because Qualcomm is stuck in the 1980s? Why does the flash tool show "Unknown error" when it is done flashing? I don't know but if the flashing process completes, it should not affect the operation. If you are concerned about it, I can work with you to try to figure it out. Nobody else has reported this issue, except apparently @VaZso who has replied that he also sees it. WinUSB has no inherent serial speed settings or limitations, nor framing (bits and parity). These are serial port concepts, not USB concepts. USB speed is negotiated below the programming API and, as far as I know, cannot be changed programatically. Quote Link to post Share on other sites
tdm 2,322 Posted March 19, 2020 Author Share Posted March 19, 2020 3 hours ago, VaZso said: Also, I have tried to put my own phone to EDL mode using a home-made "deep flash" cable and it seemed to be not possible even though my phone has charging enabled when the phone is switched off so that icon has appeared and could not go to EDL that way... If anyone have any ideas, please share it with me. If xbl is functional this should always work. And if you can get to the point where you see a boot logo when turning on the device, xbl (and much more!) is functional. Try putting the cable in the other way (eg. upside down). @Sean McCreary was unable to get his device into EDL mode using a "deep flash" cable, so he disassembled it to fix it. A couple months later, he found that if he flipped the cable upside down, it worked. Quote Link to post Share on other sites
david 921 Posted March 19, 2020 Share Posted March 19, 2020 5 hours ago, VaZso said: Also, I have tried to put my own phone to EDL mode using a home-made "deep flash" cable and it seemed to be not possible even though my phone has charging enabled when the phone is switched off so that icon has appeared and could not go to EDL that way... Is your own phone having issues running android, or are you just trying to see if you can get it working with @tdm's EDL tool so that you know what might work with your friend's phone? What is the icon that appears and how is that related to EDL mode? Quote Link to post Share on other sites
david 921 Posted March 19, 2020 Share Posted March 19, 2020 1 hour ago, tdm said: @david you had several posts with several questions so I'll answer them here. Thanks for the answers. I wasn't questioning your decisions. I was just trying to understand how things were communicating one way or another. 1 hour ago, tdm said: Why does the flash tool show "Unknown error" when it is done flashing? I don't know but if the flashing process completes, it should not affect the operation. If you are concerned about it, I can work with you to try to figure it out. Nobody else has reported this issue, except apparently @VaZso who has replied that he also sees it. I didn't think it was when it was done flashing. It showed it immediately after I clicked the flash button. How long should it take to copy the file to the phone when the no write option is enabled? Is there some way to enable logging so I can give you a log file? Also, when I am in EDL mode, my LED light does not flash. I think I have read that others have had their light flash, but I don't know if that was for the Pro1 or other devices. 1 hour ago, tdm said: WinUSB has no inherent serial speed settings or limitations, nor framing (bits and parity). These are serial port concepts, not USB concepts. USB speed is negotiated below the programming API and, as far as I know, cannot be changed programatically. It seems like the serial over USB concept is a not very good concept. Lol. Using an online calculator, to make sure I wasn't making any math errors, here is how long transferring the file would take over the serial api: Quote Results: Speed: 128000 bps Size: 1.46 GB29 Hours, 56 Minutes and 16 Seconds That's crazy. 🙂 And some of the other EDL tool developers have said that you might need to set the speed to 16384 speed or less, so almost 10 times slower! So thanks for not using that method. Quote Link to post Share on other sites
tdm 2,322 Posted March 19, 2020 Author Share Posted March 19, 2020 1 hour ago, david said: Thanks for the answers. I wasn't questioning your decisions. I was just trying to understand how things were communicating one way or another. I didn't think it was when it was done flashing. It showed it immediately after I clicked the flash button. How long should it take to copy the file to the phone when the no write option is enabled? Several minutes, same as actual writing. 1 hour ago, david said: Is there some way to enable logging so I can give you a log file? Yes, I can give you a debug version. But a packet capture with eg. WinPCAP or wireshark would probably be just as useful. 1 hour ago, david said: Also, when I am in EDL mode, my LED light does not flash. I think I have read that others have had their light flash, but I don't know if that was for the Pro1 or other devices. Nope, the edl code knows nothing about led or screen or anything else. 1 hour ago, david said: It seems like the serial over USB concept is a not very good concept. Lol. Using an online calculator, to make sure I wasn't making any math errors, here is how long transferring the file would take over the serial api: That's crazy. 🙂 And some of the other EDL tool developers have said that you might need to set the speed to 16384 speed or less, so almost 10 times slower! So thanks for not using that method. That's the thing, USB does not have a programmatically settable speed. So you can set the virtual serial speed to whatever you like and the actual transfer speed will be the same. Quote Link to post Share on other sites
david 921 Posted March 19, 2020 Share Posted March 19, 2020 1 hour ago, tdm said: Several minutes, same as actual writing. This was immediate. 1 hour ago, tdm said: Yes, I can give you a debug version. But a packet capture with eg. WinPCAP or wireshark would probably be just as useful. I didn't know they could capture USB traffic. I will try to install one of those and see if I can capture the communication. 1 hour ago, tdm said: Nope, the edl code knows nothing about led or screen or anything else. Glad to hear that, since less chance it is something acting differently on my phone. Other brand phones do apparently blink the LED when in EDL mode. 1 hour ago, tdm said: That's the thing, USB does not have a programmatically settable speed. So you can set the virtual serial speed to whatever you like and the actual transfer speed will be the same. Are you saying for the serial over USB api, the virtual Com port speed doesn't affect the real speed? Quote Link to post Share on other sites
VaZso 1,997 Posted March 19, 2020 Share Posted March 19, 2020 (edited) 5 hours ago, tdm said: If xbl is functional this should always work. And if you can get to the point where you see a boot logo when turning on the device, xbl (and much more!) is functional. Try putting the cable in the other way (eg. upside down). @Sean McCreary was unable to get his device into EDL mode using a "deep flash" cable, so he disassembled it to fix it. A couple months later, he found that if he flipped the cable upside down, it worked. Somehow I could not get it work, although, theoretically the cable was built the way it should work. The other cable I have ordered is still not here and I think it will take a while because of current state here... Now I have tried the cable both ways with the same result. Maybe I should try it using another cable but I still did not want to destruct another cable and I am unsure if it may help... 3 hours ago, david said: Is your own phone having issues running android, or are you just trying to see if you can get it working with @tdm's EDL tool so that you know what might work with your friend's phone? What is the icon that appears and how is that related to EDL mode? My phone works well, so yes, I wanted to find out why it does not work using my friend's phone and found out it seems to be also not working on mine. I have a home-made cable so it may be something undocumented (maybe in connection with the additional pins at Type-C side) or these phones do not have this option (maybe earlier or later models have it anyway). This is my own phone booting to charge mode, so Pro1 logo appears, then a charging indicator: I feel it is related in a way that the phone has not switched to EDL mode (also can be seen the same way at USB connection anyway). 3 hours ago, david said: I didn't think it was when it was done flashing. It showed it immediately after I clicked the flash button. How long should it take to copy the file to the phone when the no write option is enabled? Exactly the same happened for me - I still hope that phone is not faulty but destructed its boot part somehow, thus falls back to EDL mode still before the first Pro1 logo appears (there is a delay of very close to 15 minutes anyway before entering EDL mode with that phone). Fortunately, charging works so time is not as limited as I thought first. I have mostly experienced with flasher under Linux because that is my main OS and I have the following experience looking at OS messages: When I press "Flash" button, it "immediately" disconnects at USB system then connects again... then waits a while, device disconnects again (I think it may not disconnect here), then for a very short time, program displays "Writing gpt_main0.bin to PrimaryGPT" message (remember phone is disconnected at this time) and when it comes up again on USB interface, program says the mentioned "Connection timed out" message. The "Writing gpt_main0.bin..." message is hardly noticeable because it immediately disappears and timeout message comes up. So I think maybe more delay or less delay (if any) may help somewhere. I mean I don't know what is the usual way how it should work, but I think the first disconnection may be expected behaviour (am I right?). I don't know what is the cause of second disconnection, but I think flasher program may wait too much here or too few after second disconnection. Maybe the above is completely wrong as it would be good to know what the program does when these disconnections happen. So if the program tries to reset connection or switch to other mode or upload something which reinitialize connection or anything else. What I find strange is the flasher seems to try writing gpt_main0.bin at a time the phone is not connected, which I am sure is wrong... but I have a feeling of the second disconnection is unexpected or if it is expected, flasher should wait till the device comes up again. 1 hour ago, tdm said: Yes, I can give you a debug version. But a packet capture with eg. WinPCAP or wireshark would probably be just as useful. If it is not too complicated, i may also happy to try a program which writes some debug outputs (may you compile a Linux version of it?). I haven't tried to examine it using wireshark but I may give it a try maybe this weekend. Edited March 19, 2020 by VaZso Quote Link to post Share on other sites
VaZso 1,997 Posted March 19, 2020 Share Posted March 19, 2020 9 minutes ago, david said: Are you saying for the serial over USB api, the virtual Com port speed doesn't affect the real speed? As far as I know, USB CDC-ACM has no baud rate option. So USB Virtual COM port (or ttyACM under Linux) is completely different than USB <--> RS232 converters like FT232, PL2303 and similar devices. 1 Quote Link to post Share on other sites
david 921 Posted March 19, 2020 Share Posted March 19, 2020 (edited) 1 hour ago, VaZso said: My phone works well, so yes, I wanted to find out why it does not work using my friend's phone and found out it seems to be also not working on mine. I have a home-made cable so it may be something undocumented (maybe in connection with the additional pins at Type-C side) or these phones do not have this option (maybe earlier or later models have it anyway). My phone is working fine (I'm able to boot into android and use the phone) and I don't have a special cable for EDL mode. I get into EDL mode by powering off the device, then holding down both volume up and volume down. Then pressing and holding the power button. The pro1 screen will show for a few seconds and then go off. I then release all 3 keys. That process is what @tdm documented on the tool web page for phones where the partitions involved in the early boot sequence haven't been corrupted. Quote This is my own phone booting to charge mode, so Pro1 logo appears, then a charging indicator: I feel it is related in a way that the phone has not switched to EDL mode (also can be seen the same way at USB connection anyway). I have set mine to allow charging when powered off too. I guess it is easy to undo that change and then see if there is any difference in behavior with the EDL tool. I'll probably try mine on another PC before I start looking at other variables. Edited March 19, 2020 by david Quote Link to post Share on other sites
VaZso 1,997 Posted March 19, 2020 Share Posted March 19, 2020 1 minute ago, david said: I have set mine to allow charging when powered off too. I guess it is easy to undo that change and then see if there is any difference in behavior with the EDL tool. I'll probably try mine on another PC before I start looking at other variables. Basically, I would like to flash the other phone which is not working and I think when it enters to EDL mode then it should work, so basically either the phone is faulty (it's flash) or there is some differences between phones which may result this tool to time out. I don't really wanted to enter EDL mode using my phone (I may do it using fastboot or the way you wrote anyways), just to check if the cable which should force the phone to enter EDL mode is working. However, it did not work even with my phone which is working. However, the phone I would like to flash using EDL does nothing if I try to enter EDL mode using the buttons you described. I think the phone hangs up during boot process before it would run the code which checks those buttons to enter EDL mode but it falls back to EDL after ~15 minutes. 1 Quote Link to post Share on other sites
david 921 Posted March 20, 2020 Share Posted March 20, 2020 @tdm, I got your tool to work. I was able to simulate flashing the phone with the No Write option. I think I have an idea what makes it work and not work, but I will play with it a bit more to be sure and then report back. In the meantime, which firehose is being used in the current version of the tool? Tulip, Crackling, or Bacon? 1 Quote Link to post Share on other sites
tdm 2,322 Posted March 20, 2020 Author Share Posted March 20, 2020 1 hour ago, david said: @tdm, I got your tool to work. I was able to simulate flashing the phone with the No Write option. I think I have an idea what makes it work and not work, but I will play with it a bit more to be sure and then report back. In the meantime, which firehose is being used in the current version of the tool? Tulip, Crackling, or Bacon? Glad you got it to work. Where did you get the idea that the firehose for any of those devices was used? None are, of course. The pro1 firehose is used. Quote Link to post Share on other sites
david 921 Posted March 20, 2020 Share Posted March 20, 2020 18 minutes ago, tdm said: Where did you get the idea that the firehose for any of those devices was used? None are, of course. The pro1 firehose is used. Poor guessing. 🙂 I thought I read that you were trying to find which one worked with older devices vs newer, so I thought there were multiple and that those were those multiple. I didn't see one with Pro1 in the name on the site, but I didn't look in all folders, so I could have missed it if it is out there. Quote Link to post Share on other sites
fredrick 36 Posted April 22, 2020 Share Posted April 22, 2020 (edited) Hello, I'm one of the unlucky ones who accidentally formatted the wrong drive in Sailfish OS, thought I was being careful, but alas... I've been trying to follow this thread and the guide by you @tdm. Here is my what I've done so far: Windows 10 pressing both volume buttons and power for 20 seconds. waiting 5 seconds. connecting usb cable through usb2 hub to windows 10 laptop. opening zadig with administrator permissions, selecting "show all devices" and "QUSB_BULK" shows up. I select it and set WINUSB driver and click install driver. (usb id: 05c6 9008, wicd: X), clicked install driver. Launching Q Flash Tool. It says "device detected" in the corner. I select the qgp firmware file from december, 2019-12-03. Then I click flash. After a second or two, I get "Unknown Error" Ubuntu 18 LTS Installed ubuntu 18 LTS on the same laptop. Installed libjpeg62. Followed your instructions on your site for the tool: http://files.nwwn.com/android/pro1/factory.html (added the rules file and made sure i was in the plugdev group, already was apparently) Plugged in the phone into a usb2 hub, connected to one of my 4 usb3 ports. Using a different port than last time. Launched the gui, device detected in the corner, selected the December package after which it verifies the package. When verification has finished, i click flash and it says "Connection timed out" after a second or two. I downloaded and tried the September package, no difference. Read everything in this thread. Tried the cli version, nice work, no difference though. Tried the cli with your smaller package from the same post, same message. Part of CLI output: Waiting for device Flashing ... sending programmer program failed: Connection timed out Failed. Please help me troubleshoot and fix this. :) Is it time to build one of those special cables you mention on your site? I'm "Fredrick | UTC+1 | sfos" in the fxtec discord Edited April 22, 2020 by fredrick Quote Link to post Share on other sites
fredrick 36 Posted April 22, 2020 Share Posted April 22, 2020 I also tried turning the usb c cable upside down, but I think I read that post wrong. Might not have been the standard cable that was turned in an earlier post in this thread. 😛 Anyway, made no difference. Quote Link to post Share on other sites
kbe 6 Posted April 22, 2020 Share Posted April 22, 2020 9 hours ago, fredrick said: Hello, I'm one of the unlucky ones who accidentally formatted the wrong drive in Sailfish OS, thought I was being careful, but alas... I've been trying to follow this thread and the guide by you @tdm. Exactly the same here. I also formatted something I should not have in Sailfish OS and now the phone seems to be completely dead. Nothing shows up on the screen. I can also see the QUSB__BULK device but flashing fails with the same unknown error. Help please 🙂 Quote Link to post Share on other sites
VaZso 1,997 Posted April 22, 2020 Share Posted April 22, 2020 (edited) 59 minutes ago, kbe said: Exactly the same here. I also formatted something I should not have in Sailfish OS and now the phone seems to be completely dead. Nothing shows up on the screen. I can also see the QUSB__BULK device but flashing fails with the same unknown error. Help please 🙂 Exactly the same here (with my friend's phone). It was running stock OS but after a reboot, it went to a state where it is unable to boot but it falls back to EDL mode after 15 minutes. I have tried flasher under Linux and got "Connection timed out" message, then tried under Windows and got "Unknown error" message. As I see, under Linux, the message appears at a point where the phone (as a USB device) disappears, then about the same point in time when it comes up again, flasher displays this message. I have tried to initiate EDL mode on this phone by shorting data pin to GND using a home-made cable but it also did not work with my own Pro1 which is working otherwise. What has changed so far in the last few days that the cable I have ordered earlier and officially supports entering Qualcomm's EDL mode also does not work even with my own phone - so I have a suspicion that this function may missing in appropriate part of the loader software in Pro1. Other than that, EDL mode seems to be okay (I think) in my firend's phone, however, I don't know if the phone's flash (the hardware) is corrupted or simply it has corrupted data. @tdm, could you please compile a version of the flasher which has some debug output (preferably compiled to run under Linux) - especially near the part where it would start flashing process and most importantly what it should done before it. I don't even know if it is normal for the device to disconnect for a short time then connect again (as it seems to do now for me) or it may be a result of some error handling (eg. unable to communicate, so try to reset connection) or something else. If this reset is correct, then the program may have to wait a bit longer, but I absolutely don't know what it does exactly. As it seems there are at least two other users experiencing the same problem, I think (and I hope) this may have a solution and I really hope it is not a hardware failure of all these phones. Also, there are several cases where a hardware works very well using a specific timeout value and other hardware (which is theoretically exactly the same hardware) does not. It is not a problem, just need some work to find out what is the cause of the problem (as practically the same electronics have some differences). (Typically hardware initialization possibilities and several timeouts can be different on the same hardware but different boards - but there is a tolerance which should be chosen to work on every boards. Also firmware level and also higher level software may run into small differences which may end up in a partly working solution and the simplest option if a developer receives a unit which is a bit different because developer will find a solution to make it work - but if a user experiences the same problem, developer can not be sure if the problem is at user's side and it is much more complicated to find out the cause if the phone is not at the developer's hand but in a 3rd party's hand.) So @tdm, could you please put some debug messages in the updater which I could use to get closer of the cause of this problem? Thank you in advance. Edited April 22, 2020 by VaZso Quote Link to post Share on other sites
belletrist 59 Posted April 24, 2020 Share Posted April 24, 2020 @fredrick@kbe@VaZso Using lsusb under linux, does the phone show up as something like: ... ID 05c6:9008 ... /dev/ttyUSB0 qualcomm modem? The other thing is to check if you have modemmanager installed. If so, remove it* as this is what could be causing the connection timed out issues. *modemmanager detects the phone and secures it for use as a modem I have been down this path and am now writing this on a resurrected Pro1 with Sailfish reinstalled. 1 Quote Link to post Share on other sites
VaZso 1,997 Posted April 24, 2020 Share Posted April 24, 2020 7 hours ago, belletrist said: @fredrick@kbe@VaZso Using lsusb under linux, does the phone show up as something like: ... ID 05c6:9008 ... /dev/ttyUSB0 qualcomm modem? The other thing is to check if you have modemmanager installed. If so, remove it* as this is what could be causing the connection timed out issues. *modemmanager detects the phone and secures it for use as a modem I have been down this path and am now writing this on a resurrected Pro1 with Sailfish reinstalled. Yes, it comes up as "05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL mode)" I have disabled modemmanager. I have not removed it anyway, because this is a laptop and it has an LTE modem which I use sometimes but it also caused me problems earlier when it catch my own USB device(s) after a few seconds (hardware / software under development). It is not a very well designed thing (basically because of the way these modems work and it comes from Windows / plug-and-play style strange solutions), so it tries to communicate with every USB-CDC devices to switch a potential modem to modem mode... Anyway, there is an option to "backlist" USB devices but I haven't seen "whitelist"-style setting to enable it only for a specific device, so usually I just completely disable it and re-enable when I need it. So when modemmanager does not try to communicate, my problem still exists (even after a full /HW/ restart of the faulty phone). I really would like to see what happening as currently I am being in the dark and I am sure some closer information could be collected.I still would be happy to see some messages what the program does or what it is going to do or if it has found some problems as timeout alone does not have much information. Quote Link to post Share on other sites
belletrist 59 Posted April 24, 2020 Share Posted April 24, 2020 The other thing to try is to either disconnect the battery or let it fully drain and try then. I had no luck with my phone until the battery completely ran dry. I was going to try the disconnect method but then rl got in the way for a couple of weeks, after which removing modemmanager worked for me. There is disassembly documentation around somewhere but otherwise I still have a copy if need be. The fact that it comes up as QDL mode is a good sign. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.