edl icon indicating copy to clipboard operation
edl copied to clipboard

[Op6-enchilada] Sahara fails or times out

Open tiol11 opened this issue 2 years ago • 3 comments

Hi and thank you for developing this repo!

I've been trying to recover my op6 from EDL mode using your live DVD.

Two situations occur:

  • by pressing power button (device disappears from lsusb), edl seems to go further and stops with sahara - [LIB]: Unexpected error on uploading, maybe signature of loader wasn't accepted ? type object 'req' has no attribute 'image_id'
  • otherwise, it times out after main - Device detected :) line

I've already considered 44#issuecomment-782849842 but it seems to me that loader name 0008b0e10051459b_dd7c5f2e53176bee_fhprg_op6t.bin -even if for op6t- fits with both HWID: 0x0008b0e10051459b and PK_HASH: 0xdd7c5f2e53176bee[...].

Is there something I'm doing wrong?

user@livedvd:/opt/edl$ lsusb
Bus 002 Device 005: ID 1a2c:0044 China Resource Semico Co., Ltd Usb Mouse
Bus 002 Device 004: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 002 Device 003: ID 8086:0189 Intel Corp. Centrino Advanced-N 6230 Bluetooth adapter
Bus 002 Device 013: ID 05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL mode)
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1008 Silicon Motion WebCam SCB-1100N
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
user@livedvd:/opt/edl$ lsusb
Bus 002 Device 005: ID 1a2c:0044 China Resource Semico Co., Ltd Usb Mouse
Bus 002 Device 004: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 002 Device 003: ID 8086:0189 Intel Corp. Centrino Advanced-N 6230 Bluetooth adapter
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1008 Silicon Motion WebCam SCB-1100N
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
user@livedvd:/opt/edl$ ./edl printgpt --loader=Loaders/oneplus/0008b0e10051459b_dd7c5f2e53176bee_fhprg_op6t.bin --debugmode
Qualcomm Sahara / Firehose Client V3.60 (c) B.Kerler 2018-2022.
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'mprg8626'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'mprg8974'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'mprg8974'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
main - Using loader Loaders/oneplus/0008b0e10051459b_dd7c5f2e53176bee_fhprg_op6t.bin ...
main - Waiting for the device
DeviceClass
DeviceClass - [LIB]: Detaching kernel driver
main - Device detected :)
DeviceClass
DeviceClass - [LIB]: read:0x30
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 295, in run\n    conninfo = self.doconnect(loop)\n', '  File "/opt/edl/./edl", line 211, in doconnect\n    resp = self.sahara.connect()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 111, in connect\n    v = self.cdc.read(length=0xC * 0x4,timeout=1)\n']
DeviceClass
DeviceClass - [LIB]: RX:010000003000000002000000010000000004000000000000000000000000000000000000000000000000000000000000
sahara - Protocol version: 2, Version supported: 1
main - Mode detected: sahara
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 212, in cmd_info\n    if self.enter_command_mode():\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 155, in enter_command_mode\n    if not self.cmd_hello(sahara_mode_t.SAHARA_MODE_COMMAND):\n']
DeviceClass
DeviceClass - [LIB]: TX:020000003000000002000000010000000000000003000000000000000000000000000000000000000000000000000000
DeviceClass
DeviceClass - [LIB]: read:0x200
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 212, in cmd_info\n    if self.enter_command_mode():\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 157, in enter_command_mode\n    res = self.get_rsp()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 64, in get_rsp\n    data = self.cdc.read()\n']
DeviceClass
DeviceClass - [LIB]: RX:0b00000008000000
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 213, in cmd_info\n    self.serial = self.cmdexec_get_serial_num()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 173, in cmdexec_get_serial_num\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_SERIAL_NUM_READ)\n']
DeviceClass
DeviceClass - [LIB]: TX:0d0000000c00000001000000
DeviceClass
DeviceClass - [LIB]: read:0x200
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 213, in cmd_info\n    self.serial = self.cmdexec_get_serial_num()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 173, in cmdexec_get_serial_num\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_SERIAL_NUM_READ)\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 593, in cmd_exec\n    res = self.get_rsp()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 64, in get_rsp\n    data = self.cdc.read()\n']
DeviceClass
DeviceClass - [LIB]: RX:0e000000100000000100000004000000
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 213, in cmd_info\n    self.serial = self.cmdexec_get_serial_num()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 173, in cmdexec_get_serial_num\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_SERIAL_NUM_READ)\n']
DeviceClass
DeviceClass - [LIB]: TX:0f0000000c00000001000000
DeviceClass
DeviceClass - [LIB]: cmd_exec:0x4
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 213, in cmd_info\n    self.serial = self.cmdexec_get_serial_num()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 173, in cmdexec_get_serial_num\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_SERIAL_NUM_READ)\n']
DeviceClass
DeviceClass - [LIB]: RX:5606926a
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 215, in cmd_info\n    self.hwid = self.cmdexec_get_msm_hwid()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 177, in cmdexec_get_msm_hwid\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_MSM_HW_ID_READ)\n']
DeviceClass
DeviceClass - [LIB]: TX:0d0000000c00000002000000
DeviceClass
DeviceClass - [LIB]: read:0x200
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 215, in cmd_info\n    self.hwid = self.cmdexec_get_msm_hwid()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 177, in cmdexec_get_msm_hwid\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_MSM_HW_ID_READ)\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 593, in cmd_exec\n    res = self.get_rsp()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 64, in get_rsp\n    data = self.cdc.read()\n']
DeviceClass
DeviceClass - [LIB]: RX:0e000000100000000200000018000000
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 215, in cmd_info\n    self.hwid = self.cmdexec_get_msm_hwid()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 177, in cmdexec_get_msm_hwid\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_MSM_HW_ID_READ)\n']
DeviceClass
DeviceClass - [LIB]: TX:0f0000000c00000002000000
DeviceClass
DeviceClass - [LIB]: cmd_exec:0x18
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 215, in cmd_info\n    self.hwid = self.cmdexec_get_msm_hwid()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 177, in cmdexec_get_msm_hwid\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_MSM_HW_ID_READ)\n']
DeviceClass
DeviceClass - [LIB]: RX:9b455100e1b008009b455100e1b008009b455100e1b00800
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 216, in cmd_info\n    self.pkhash = self.cmdexec_get_pkhash()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 186, in cmdexec_get_pkhash\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_OEM_PK_HASH_READ)\n']
DeviceClass
DeviceClass - [LIB]: TX:0d0000000c00000003000000
DeviceClass
DeviceClass - [LIB]: read:0x200
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 216, in cmd_info\n    self.pkhash = self.cmdexec_get_pkhash()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 186, in cmdexec_get_pkhash\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_OEM_PK_HASH_READ)\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 593, in cmd_exec\n    res = self.get_rsp()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 64, in get_rsp\n    data = self.cdc.read()\n']
DeviceClass
DeviceClass - [LIB]: RX:0e000000100000000300000060000000
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 216, in cmd_info\n    self.pkhash = self.cmdexec_get_pkhash()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 186, in cmdexec_get_pkhash\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_OEM_PK_HASH_READ)\n']
DeviceClass
DeviceClass - [LIB]: TX:0f0000000c00000003000000
DeviceClass
DeviceClass - [LIB]: cmd_exec:0x60
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 216, in cmd_info\n    self.pkhash = self.cmdexec_get_pkhash()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 186, in cmdexec_get_pkhash\n    res = self.cmd_exec(exec_cmd_t.SAHARA_EXEC_CMD_OEM_PK_HASH_READ)\n']
DeviceClass
DeviceClass - [LIB]: RX:dd7c5f2e53176bee91747b53900ccec33dd30fa4ded0dfe9baf9156e6910862fdd7c5f2e53176bee91747b53900ccec33dd30fa4ded0dfe9baf9156e6910862fdd7c5f2e53176bee91747b53900ccec33dd30fa4ded0dfe9baf9156e6910862f
sahara - 
------------------------
HWID:              0x0008b0e10051459b (MSM_ID:0x0008b0e1,OEM_ID:0x0051,MODEL_ID:0x459b)
CPU detected:      "SDM845"
PK_HASH:           0xdd7c5f2e53176bee91747b53900ccec33dd30fa4ded0dfe9baf9156e6910862f
Serial:            0x6a920656

DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 334, in run\n    sahara_info = self.sahara.cmd_info()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 307, in cmd_info\n    self.cmd_modeswitch(sahara_mode_t.SAHARA_MODE_COMMAND)\n']
DeviceClass
DeviceClass - [LIB]: TX:0c0000000c00000003000000
DeviceClass
DeviceClass - [LIB]: read:0x30
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 336, in run\n    resp = self.sahara.connect()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 111, in connect\n    v = self.cdc.read(length=0xC * 0x4,timeout=1)\n']
DeviceClass
DeviceClass - [LIB]: RX:010000003000000002000000010000000004000003000000000000000000000000000000000000000000000000000000
sahara - Protocol version: 2, Version supported: 1
sahara - Uploading loader Loaders/oneplus/0008b0e10051459b_dd7c5f2e53176bee_fhprg_op6t.bin ...
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 341, in run\n    mode = self.sahara.upload_loader()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 511, in upload_loader\n    if not self.cmd_hello(sahara_mode_t.SAHARA_MODE_IMAGE_TX_PENDING):\n']
DeviceClass
DeviceClass - [LIB]: TX:020000003000000002000000010000000000000000000000000000000000000000000000000000000000000000000000
DeviceClass
DeviceClass - [LIB]: read:0x200
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 341, in run\n    mode = self.sahara.upload_loader()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 519, in upload_loader\n    resp = self.get_rsp()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 64, in get_rsp\n    data = self.cdc.read()\n']
DeviceClass
DeviceClass - [LIB]: RX:12000000200000000d0000000000000000000000000000004000000000000000
sahara - 64-Bit mode detected.
sahara
sahara - [LIB]: Unexpected error on uploading, maybe signature of loader wasn't accepted ?
type object 'req' has no attribute 'image_id'
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 370, in run\n    sc.handle_streaming(cmd, options)\n', '  File "/opt/edl/edlclient/Library/streaming_client.py", line 79, in handle_streaming\n    if self.streaming.connect(mode):\n', '  File "/opt/edl/edlclient/Library/streaming.py", line 779, in connect\n    resp = self.send(cmdbuf, True)\n', '  File "/opt/edl/edlclient/Library/streaming.py", line 996, in send\n    return self.hdlc.send_cmd_np(cmd, nocrc)\n', '  File "/opt/edl/edlclient/Library/hdlc.py", line 229, in send_cmd_np\n    return self.send_cmd_base(outdata, 0, nocrc)\n', '  File "/opt/edl/edlclient/Library/hdlc.py", line 218, in send_cmd_base\n    if self.send_unframed_buf(packet, prefixflag):\n']
DeviceClass
DeviceClass - [LIB]: TX:11001200a0e30000c1e50140a0e31eff2fe14bd97e
DeviceClass
DeviceClass - [LIB]: read:0x200
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 370, in run\n    sc.handle_streaming(cmd, options)\n', '  File "/opt/edl/edlclient/Library/streaming_client.py", line 79, in handle_streaming\n    if self.streaming.connect(mode):\n', '  File "/opt/edl/edlclient/Library/streaming.py", line 779, in connect\n    resp = self.send(cmdbuf, True)\n', '  File "/opt/edl/edlclient/Library/streaming.py", line 996, in send\n    return self.hdlc.send_cmd_np(cmd, nocrc)\n', '  File "/opt/edl/edlclient/Library/hdlc.py", line 229, in send_cmd_np\n    return self.send_cmd_base(outdata, 0, nocrc)\n', '  File "/opt/edl/edlclient/Library/hdlc.py", line 220, in send_cmd_base\n    return self.receive_reply_nocrc()\n', '  File "/opt/edl/edlclient/Library/hdlc.py", line 174, in receive_reply_nocrc\n    tmp = self.cdc.read(timeout=timeout)\n']
DeviceClass
DeviceClass - [LIB]: RX:04000000100000000d00000008000000
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
^CTraceback (most recent call last):
  File "/opt/edl/./edl", line 387, in <module>
    base.run()
  File "/opt/edl/./edl", line 370, in run
    sc.handle_streaming(cmd, options)
  File "/opt/edl/edlclient/Library/streaming_client.py", line 79, in handle_streaming
    if self.streaming.connect(mode):
  File "/opt/edl/edlclient/Library/streaming.py", line 779, in connect
    resp = self.send(cmdbuf, True)
  File "/opt/edl/edlclient/Library/streaming.py", line 996, in send
    return self.hdlc.send_cmd_np(cmd, nocrc)
  File "/opt/edl/edlclient/Library/hdlc.py", line 229, in send_cmd_np
    return self.send_cmd_base(outdata, 0, nocrc)
  File "/opt/edl/edlclient/Library/hdlc.py", line 220, in send_cmd_base
    return self.receive_reply_nocrc()
  File "/opt/edl/edlclient/Library/hdlc.py", line 182, in receive_reply_nocrc
    tmp += self.cdc.read(timeout=timeout)
  File "/opt/edl/edlclient/Library/Connection/devicehandler.py", line 84, in read
    return self.usbread(length, timeout)
  File "/opt/edl/edlclient/Library/Connection/usblib.py", line 373, in usbread
    extend(epr(resplen, timeout))
  File "/home/user/.local/lib/python3.10/site-packages/usb/core.py", line 423, in read
    return self.device.read(self, size_or_buffer, timeout)
  File "/home/user/.local/lib/python3.10/site-packages/usb/core.py", line 1029, in read
    ret = fn(
  File "/home/user/.local/lib/python3.10/site-packages/usb/backend/libusb1.py", line 846, in bulk_read
    return self.__read(self.lib.libusb_bulk_transfer,
  File "/home/user/.local/lib/python3.10/site-packages/usb/backend/libusb1.py", line 946, in __read
    retval = fn(dev_handle.handle,
KeyboardInterrupt

user@livedvd:/opt/edl$ lsusb
Bus 002 Device 005: ID 1a2c:0044 China Resource Semico Co., Ltd Usb Mouse
Bus 002 Device 004: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 002 Device 003: ID 8086:0189 Intel Corp. Centrino Advanced-N 6230 Bluetooth adapter
Bus 002 Device 014: ID 05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL mode)
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 2232:1008 Silicon Motion WebCam SCB-1100N
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
user@livedvd:/opt/edl$ ./edl printgpt --loader=Loaders/oneplus/0008b0e10051459b_dd7c5f2e53176bee_fhprg_op6t.bin --debugmode
Qualcomm Sahara / Firehose Client V3.60 (c) B.Kerler 2018-2022.
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'mprg8626'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'mprg8974'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'mprg8974'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
loader_utils
loader_utils - [LIB]: 'str' object has no attribute 'append'
main - Using loader Loaders/oneplus/0008b0e10051459b_dd7c5f2e53176bee_fhprg_op6t.bin ...
main - Waiting for the device
main - Device detected :)
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 295, in run\n    conninfo = self.doconnect(loop)\n', '  File "/opt/edl/./edl", line 211, in doconnect\n    resp = self.sahara.connect()\n']
DeviceClass
DeviceClass - [LIB]: TX:<?xml version="1.0" ?><data><nop /></data>
DeviceClass
DeviceClass - [LIB]: read:0x200
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 295, in run\n    conninfo = self.doconnect(loop)\n', '  File "/opt/edl/./edl", line 211, in doconnect\n    resp = self.sahara.connect()\n', '  File "/opt/edl/edlclient/Library/sahara.py", line 131, in connect\n    res = self.cdc.read(timeout=1)\n']
DeviceClass
DeviceClass - [LIB]: RX:04000000100000000d00000001000000
main - Mode detected: sahara
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 370, in run\n    sc.handle_streaming(cmd, options)\n', '  File "/opt/edl/edlclient/Library/streaming_client.py", line 79, in handle_streaming\n    if self.streaming.connect(mode):\n', '  File "/opt/edl/edlclient/Library/streaming.py", line 779, in connect\n    resp = self.send(cmdbuf, True)\n', '  File "/opt/edl/edlclient/Library/streaming.py", line 996, in send\n    return self.hdlc.send_cmd_np(cmd, nocrc)\n', '  File "/opt/edl/edlclient/Library/hdlc.py", line 229, in send_cmd_np\n    return self.send_cmd_base(outdata, 0, nocrc)\n', '  File "/opt/edl/edlclient/Library/hdlc.py", line 218, in send_cmd_base\n    if self.send_unframed_buf(packet, prefixflag):\n']
DeviceClass
DeviceClass - [LIB]: TX:11001200a0e30000c1e50140a0e31eff2fe14bd97e
DeviceClass
DeviceClass - [LIB]: read:0x200
DeviceClass
DeviceClass - [LIB]: ['  File "/opt/edl/./edl", line 387, in <module>\n    base.run()\n', '  File "/opt/edl/./edl", line 370, in run\n    sc.handle_streaming(cmd, options)\n', '  File "/opt/edl/edlclient/Library/streaming_client.py", line 79, in handle_streaming\n    if self.streaming.connect(mode):\n', '  File "/opt/edl/edlclient/Library/streaming.py", line 779, in connect\n    resp = self.send(cmdbuf, True)\n', '  File "/opt/edl/edlclient/Library/streaming.py", line 996, in send\n    return self.hdlc.send_cmd_np(cmd, nocrc)\n', '  File "/opt/edl/edlclient/Library/hdlc.py", line 229, in send_cmd_np\n    return self.send_cmd_base(outdata, 0, nocrc)\n', '  File "/opt/edl/edlclient/Library/hdlc.py", line 220, in send_cmd_base\n    return self.receive_reply_nocrc()\n', '  File "/opt/edl/edlclient/Library/hdlc.py", line 174, in receive_reply_nocrc\n    tmp = self.cdc.read(timeout=timeout)\n']
DeviceClass
DeviceClass - [LIB]: RX:04000000100000000d00000001000000
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
^CTraceback (most recent call last):
  File "/opt/edl/./edl", line 387, in <module>
    base.run()
  File "/opt/edl/./edl", line 370, in run
    sc.handle_streaming(cmd, options)
  File "/opt/edl/edlclient/Library/streaming_client.py", line 79, in handle_streaming
    if self.streaming.connect(mode):
  File "/opt/edl/edlclient/Library/streaming.py", line 779, in connect
    resp = self.send(cmdbuf, True)
  File "/opt/edl/edlclient/Library/streaming.py", line 996, in send
    return self.hdlc.send_cmd_np(cmd, nocrc)
  File "/opt/edl/edlclient/Library/hdlc.py", line 229, in send_cmd_np
    return self.send_cmd_base(outdata, 0, nocrc)
  File "/opt/edl/edlclient/Library/hdlc.py", line 220, in send_cmd_base
    return self.receive_reply_nocrc()
  File "/opt/edl/edlclient/Library/hdlc.py", line 182, in receive_reply_nocrc
    tmp += self.cdc.read(timeout=timeout)
  File "/opt/edl/edlclient/Library/Connection/devicehandler.py", line 84, in read
    return self.usbread(length, timeout)
  File "/opt/edl/edlclient/Library/Connection/usblib.py", line 373, in usbread
    extend(epr(resplen, timeout))
  File "/home/user/.local/lib/python3.10/site-packages/usb/core.py", line 423, in read
    return self.device.read(self, size_or_buffer, timeout)
  File "/home/user/.local/lib/python3.10/site-packages/usb/core.py", line 1029, in read
    ret = fn(
  File "/home/user/.local/lib/python3.10/site-packages/usb/backend/libusb1.py", line 846, in bulk_read
    return self.__read(self.lib.libusb_bulk_transfer,
  File "/home/user/.local/lib/python3.10/site-packages/usb/backend/libusb1.py", line 946, in __read
    retval = fn(dev_handle.handle,
KeyboardInterrupt

tiol11 avatar Apr 28 '23 20:04 tiol11

If the connection times out, there are only two reasons for that:

  1. The loader doesn't match the pkhash signature (not your case)
  2. The loader needs for some reason a lite loader instead of the ddr loader (or the reverse case)

For both parts, it's necessary to use another loader

bkerler avatar May 07 '23 10:05 bkerler

Thank you for your answer!

Excuse the ignorance: what do you mean for "another loader"? Is it worth trying any other loader from the "Loaders" folder? Or is it something to be extracted somewhere?

tiol11 avatar May 07 '23 18:05 tiol11

I think I have a similar issue with this device:

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 004: ID 5986:2113 Bison Electronics Inc. SunplusIT Integrated Camera
Bus 001 Device 007: ID 05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL mode)
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0bda:0316 Realtek Semiconductor Corp. Card Reader
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
$ git rev-parse --short HEAD # in edl dir
8573eba
$ edl printgpt --debugmode --loader=Loaders/oneplus/0008b0e10051459b_dd7c5f2e53176bee_fhprg_op6t.bin
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: list index out of range
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'mprg8974'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'mprg8626'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'mprg8974'
loader_utils
loader_utils - [LIB]: invalid literal for int() with base 16: 'prog'
main - Using loader Loaders/oneplus/0008b0e10051459b_dd7c5f2e53176bee_fhprg_op6t.bin ...
main - Waiting for the device
main - Device detected :)
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: [Errno 110] Operation timed out

I don't see any of the later errors, just the timeouts. How do I get a working loader? And any idea why the 6T loader that worked before is not working in my case?

rrrnld avatar Apr 30 '24 22:04 rrrnld