Skip to content

TypeError in firehose.py is back #740

@agrecascino

Description

@agrecascino

Attempting to EDL my TCL Flip 3 to get postmarket on it. Loader gets into firehose successfully, but attempting any command results in the dreaded

if "value" in rsp.data and rsp.data["value"] == "NAK"

I added a print above the response here for reference of what it contains.

bash-5.3$  ./edl --loader ~/Downloads/tcl/T435/BIN102.bin --memory=eMMC printgpt
Keystone library is missing (optional).
Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2025.
main - Using loader /home/catherine/Downloads/tcl/T435/BIN102.bin ...
main - Waiting for the device
main - Device detected :)
main - Mode detected: firehose
bytearray(b'EFI PART\x00\x00\x01\x00\\\x00\x00\x00\x9b\xcf\xb94\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\xff\xef\xd1\x01\x00\x00\x00\x00"\x00\x00\x00\x00\x00\x00\x00\xde\xef\xd1\x01\x00\x00\x00\x002\x1b\x10\x98\xe2\xbb\xf2K\xa0n+\xb3=\x00\x0c \x02\x00\x00\x00\x00\x00\x00\x00<\x00\x00\x00\x80\x00\x00\x00\x12\xcd{{\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00<?xml version="1.0" encoding="UTF-8" ?><data><log value="Finished sector address 0" /></data><?xml version="1.0" encoding="UTF-8" ?><data><response value="ACK" rawmode="false" /></data>')
Traceback (most recent call last):
  File "/home/catherine/Downloads/edl/./edl", line 409, in <module>
    base.run()
  File "/home/catherine/Downloads/edl/./edl", line 398, in run
    if self.fh.connect(sahara):
       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/catherine/Downloads/edl/edlclient/Library/firehose_client.py", line 114, in connect
    if self.firehose.configure(0):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/catherine/Downloads/edl/edlclient/Library/firehose.py", line 1017, in configure
    rsp = self.cmd_read_buffer(0, 1, 1, False)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/catherine/Downloads/edl/edlclient/Library/firehose.py", line 710, in cmd_read_buffer
    if "value" in rsp.data and rsp.data["value"] == "NAK":
       ^^^^^^^^^^^^^^^^^^^
TypeError: a bytes-like object is required, not 'str'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions