Skip to content

"press any key to shutdown" after successful flash #185

@adeebshihadeh

Description

@adeebshihadeh

We've had two cases now of good devices getting flashed all the way to the success screen, then end up on "press any key to shutdown."

#1 trey during EPHOT

  • flashed an EPHOT mici with 435fa2d
  • ended up with "press any key to shutdown"
  • changed cable, flashed again, and it was fine

#2 Apolloyaya on Discord

  • flashed a good comma four with 4e577e1
  • immediately ended up with "press any key to shutdown"
  • flashed 2x more time with same version
  • tried this a few things on bump qdl.js #184, same result
  • debug dump after a few attempts on the branch dump.txt
    • slot is marked as unbootable, unclear why it's not reproducible or deterministic though
  • update: fixed after changing cables and reflashing with bump qdl.js #184 on b3186ab
Alright we got it successfully flashed. It was the usb-c cable but it was not the data one. Turns out my pc usbc doesn't supply sufficient power for the comma four to survive the reboot after flash. after I plug the power source into a 30w charger and reflash, it went through and boot into setup screen.

Similarities between both cases:

  • comma four (though this shouldn't make a difference)
  • core flashing code is the same for the initial bad flash
  • fixed with a reflash, though case replace zero chunks with ChunkType.skip #2 had different flashing code on the good reflash

First order of business is to add a bunch of local and remote logging:

  • setup sentry (or some other platform)
  • log GPT headers and other metadata before any write ops
  • log same metadata right after flashing but before reboot

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions