bkerler / edl

Inofficial Qualcomm Firehose / Sahara / Streaming / Diag Tools :)
GNU General Public License v3.0
1.59k stars 372 forks source link

Oneplus 7T - USBError 19 ERROR: Failed to initialize (open whole lun) UFS Device slot 0 partition 0 #489

Open mercurytoxic opened 8 months ago

mercurytoxic commented 8 months ago

Trying to get two different main boards for Oneplus 7T to work with EDL. I get the same error with both, which is quite surprising.

$ edl printgpt
...
.......main - Device detected :)
sahara - Protocol version: 2, Version supported: 1
main - Mode detected: sahara
sahara - 
Version 0x2
------------------------
HWID:              0x000a50e100514985 (MSM_ID:0x000a50e1,OEM_ID:0x0051,MODEL_ID:0x4985)
CPU detected:      "SM8150"
PK_HASH:           0x2acf3a85fde334e2e28d64cbc416b2474e0e95cad4698f143e27479d67e92d995a20da04e40395b61a140f3db7c32720
Serial:            0xe1191f0e
...
firehose - End of supported functions 23
firehose_client
firehose_client - [LIB]: No --memory option set, we assume "UFS" as default ..., if it fails, try using "--memory" with "UFS","NAND" or "spinor" instead !
firehose
firehose - [LIB]: Couldn't detect MaxPayloadSizeFromTargetinBytes
firehose
firehose - [LIB]: Couldn't detect TargetName
firehose - TargetName=Unknown
firehose - MemoryName=UFS
firehose - Version=1
firehose - Trying to read first storage sector...
firehose - Running configure...
firehose
firehose - [LIB]: Memory type UFS doesn't seem to match (Failed to init). Trying to use eMMC instead.
firehose
firehose - [LIB]: Couldn't detect MaxPayloadSizeFromTargetinBytes
firehose
firehose - [LIB]: Couldn't detect TargetName
firehose - TargetName=Unknown
firehose - MemoryName=eMMC
firehose - Version=1
firehose - Trying to read first storage sector...
DeviceClass - USBError(5, 'Input/Output Error')
DeviceClass - USBError(19, 'No such device (it may have been disconnected)')

Running a similar command in debug mode results in: edl printgpt --memory=UFS --loader=/usr/lib/python3.11/site-packages/Loaders/oneplus/000a50e100514985_2acf3a85fde334e2_fhprg_op7t.bin --debugmode

Full log : http://p.luis.im/index.php?x8@raw

Interesting parts of the full log:

firehose
firehose - [LIB]: Couldn't detect MaxPayloadSizeFromTargetinBytes
firehose
firehose - [LIB]: Couldn't detect TargetName
firehose - TargetName=Unknown
firehose - MemoryName=UFS
firehose - Version=1
firehose - Trying to read first storage sector...
...
DeviceClass - [LIB]: RX:<log value="ERROR: Failed to initialize (open whole lun) UFS Device slot 0 partition 0" /></data>
...
DeviceClass - [LIB]: RX:<log value="ERROR: Failed to open the device:3 slot:0 partition:0 error:0" /></data>
...
DeviceClass - [LIB]: RX:<log value="ERROR: OPEN handle NULL and no error, weird 344404620" /></data>
...
DeviceClass - [LIB]: RX:<log value="ERROR: Failed to open device, type:UFS, slot:0, lun:0 error:3" /></data>

I assume that the UFS flash is damaged? In both motherboards?