Jump to content

Press any key to shutdown after `fastboot devices`


Recommended Posts

Hi,

I started playing out with my new Pro1 and the bootloader is behaving a very weird way.

I boot into fastboot mode, connect the phone to the computer. Then I run`sudo fastboot devices`.

Sometimes the command succeeds and the device is listed by fastboot, but usually fastboot will not list any devices and the Pro1 will just display "Press any key to shutdown"

I'm running Arch Linux, fastboot version 30.0.2-6538114 from android-sdk-platform-tools. The same happens with fastboot version 30.0.0-2 from android-tools. (checked on two computers)
The issue seems specific to the Pro1, because it doesn't occur with OnePlus3 with the same setup.

What's going on with fastboot?

Edited by marmistrz
Link to post
Share on other sites

That is very strange.  I've never seen anything like that.  Out of curiosity, I searched the bootloader source code for that string, and found ... nothing.  😕

 

If you send me a wireshark dump of the usb traffic, maybe I can find a clue?

 

  • Like 1
Link to post
Share on other sites

Thanks a lot for the suggestion. The USB dump is attached.
66 is the last packet before connecting with USB.
142 is the last packet before the fastboot command.

I guess the bootloader has problems with USB autosuspend. When I played around, and executed the fastboot command immediately, it worked. If I kept executing it again and again, it was all ok, but if I waited for a longer while between the fastboot commands, the bootloader would enter the "Press any key to shutdown" state.

I disabled USB autosuspend with

echo -1 > /sys/module/usbcore/parameters/autosuspend

and I can confirm that the problem is gone with autosuspend disabled.

EDIT: However, flashing the LineageOS boot image is impossible even with autosuspend disabled. The command

sudo fastboot flash boot_a lineage-16.0-pro1-test13-boot.img

just does nothing. See the new USB dump
128 is the last packet after fastboot devices
165 is the last packet during fastboot flash. Afterwards I shut down the bootloader using the volume/power keys on the device.

dumpusb2.pcapng

dump-flash_a.pcapng

Edited by marmistrz
Link to post
Share on other sites
5 hours ago, marmistrz said:

Thanks a lot for the suggestion. The USB dump is attached.

Well, I'm afraid I don't know anything about the USB low level stuff.  I only know the various protocols involved, which use bulk transfers.  In your first capture, there are no bulk transfers at all.  So everything that is happening is low level.  In your second capture, I see the host sending a request (packet 157, "getvar:has-slot:boot_a").  The phone does not respond at all.  I'm working with another user who is seeing a similar issue with EDL.  Not sure if they are related, but it seems like it may be.  My current theory is that the host is incompatible with the phone in some way.  Can you perhaps try different host ports?  For example, avoid USB 3.0 ports, try with/without a hub, and even try different hosts?

 

Link to post
Share on other sites

I believe this one should be 2.0. See the attached dump. 70 before fastboot devices, 98 is before fastboot flash. The problem is the same (USB autosuspend is still disable, because fastboot devices failed on all ports). I have two root hubs on my laptop. I have also tried on another, older Dell laptop.

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0bda:5520 Realtek Semiconductor Corp. Integrated_Webcam_HD
Bus 001 Device 004: ID 0cf3:e009 Qualcomm Atheros Communications 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I tested one more thing on 2.0. I did fastboot flashing lock, but chose "do not lock the bootloader" with the volume keys on the device. fastboot output was:

$ fastboot flashing lock
                                                   FAILED (Status read failed (No such device))
fastboot: error: Command failed

notlock.pcapng contains the USB dump, 65 was before connecting the device, 82 was before not confirming the lock. I think I had a similar "failed" message when unlocking the bootloader.

dumpflash2.0.pcapng notlock.pcapng

Edited by marmistrz
Link to post
Share on other sites

I managed to flash the LineageOS recovery!
I found some USB hub, connected it to the USB 3.0 port, connected the device to the hub and fastboot flash worked. I have absolutely no idea why, but here's the USB dump.

Edited by marmistrz
added the usb dump
  • Like 1
  • Thanks 1
Link to post
Share on other sites
On 6/17/2020 at 11:50 AM, marmistrz said:

I managed to flash the LineageOS recovery!
I found some USB hub, connected it to the USB 3.0 port, connected the device to the hub and fastboot flash worked. I have absolutely no idea why, but you can find the attached USB dump. (will be uploaded later today)

We have had other reports that people have better luck connecting to a 2.0 than a 3.0 port.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms