Closed voreisthescore closed 2 years ago
Thanks for the log ! I will have a look.
Please try commit a5fdf09. I think the usb buffer size isn't able to cope with the usb speed due to packet oversizes. Also using a better usb cable might solve the issues (I experience issues like this often on usb-c cables, oneplus usb cable works best so far).
Your error is caused as it tries to read more data than expected, so the last commit might help solve your issue :
UsbClass
UsbClass - [LIB]: [95mRX:<?xml version="1.0" encoding="UTF-8" ?><data><log value="Finished sector address 0" /></data>[0m
UsbClass
UsbClass - [LIB]: [95mcmd_read:0x100000[0m
UsbClass
UsbClass - [LIB]: [95m[0m
Trying with the latest commit, still yielding the same results unfortunately. Took your suggestions about the cables too, no luck, tried USB 2 and 3 ports as well. I wish I could be more help but I know very little about lower level firehose stuff. log.txt
Actually it looks pretty good, but for some unknown reason it stalls trying to read the data.
TX:<?xml version="1.0" ?><data><read SECTOR_SIZE_IN_BYTES="512" num_partition_sectors="65536" physical_partition_number="0" start_sector="206912"/>
The num_partition_sectors value looks very weird to me. Can you let me know which command you are running and upload the gpt of that device ?
Sure thing, command running is ./edl.py r boot boot.img
and here's the output from printgpt
printgpt.log.
Running with the other abandoned project emmcdl seems to yield a full read to file with the same programmer, however, I've yet to verify the integrity of those images.
Please try with commit ff372c3. I think that will solve your issue. It's kind of weird. According to the specs, for reading it should use MaxPayloadSizeToTargetInBytes, but for a unknown reason, only the size of the sector is allowed, which is much smaller. I need to seek deeper into this, but hopefully it does work for you now (even though it might be slow as hell)
it does no correct output with tee cmmnd and sorry. maybe, you can utilize it to your working!
└─$ python3 ../edl.py peekqword 0x3000000 --loader=./loaders/0090b0e100040000_9764995d53559360_fhprg_peek.bin
Qualcomm Sahara / Firehose Client V3.3 (c) B.Kerler 2018-2021.
main - Using loader ./loaders/0090b0e100040000_9764995d53559360_fhprg_peek.bin ...
main - Waiting for the device
main - Device detected :)
main - Mode detected: firehose
firehose - Nop succeeded.
firehose - No supported functions detected, configuring qc generic commands
firehose -
firehose_client - No --memory option set, we assume "eMMC" as default ..., if it fails, try using "--memory" with "UFS","NAND" or "spinor" instead !
firehose - TargetName=MSM8936
firehose - MemoryName=eMMC
firehose - Version=
firehose_client - Supported functions:
-----------------
configure,program,firmwarewrite,patch,setbootablestoragedrive,ufs,emmc,power,benchmark,read,getstorageinfo,getcrc16digest,getsha256digest,erase,peek,poke,nop,xml
firehose - Peek: Address(0x3000000),Size(0x8)
Progress: |██████████████████████████████████████████████████| 100.0% Complete
0x0
@bkerler After 79.9%, zero values started to appear in the entire block in TX values.
Actually, My cpu code is MSM8939
Sure thing, command running is
./edl.py r boot boot.img
and here's the output fromprintgpt
printgpt.log. Running with the other abandoned project emmcdl seems to yield a full read to file with the same programmer, however, I've yet to verify the integrity of those images.
UUIDs can also be a problem. the printgpt log on my solid-working phone!
@CyberMan571 You are trying to write the critical partitions like tz while it's still active, this will of course fail, as the tz will crash on writing due to security reasons. Once you write tz, you need to reboot the device and then start writing the other partitions.
Dear, @bkerler I downloaded live_re ubuntu and I come across a few bug(about running python and edl in terminal ) you said before and I download a few gptmain0.bin when I using your MR app, it's show warning that no detect 9008 port! thanks and regards
Stack (most recent call last):
File "./edl.py", line 358, in <module>
base.run()
File "./edl.py", line 340, in run
fh.handle_firehose(cmd, options)
File "/media/ubuntu/Seagete_Expansion_Drive/ali/telefon-flash/edl/edl3.51.2/edl/edl/Library/firehose_client.py", line 749, in handle_firehose
if self.firehose.cmd_program(lun, start, filename):
File "/media/ubuntu/Seagete_Expansion_Drive/ali/telefon-flash/edl/edl3.51.2/edl/edl/Library/firehose.py", line 460, in cmd_program
self.cdc.write(b'')
File "/media/ubuntu/Seagete_Expansion_Drive/ali/telefon-flash/edl/edl3.51.2/edl/edl/Library/usblib.py", line 368, in write
self.verify_data(bytearray(command), "TX:")
File "/media/ubuntu/Seagete_Expansion_Drive/ali/telefon-flash/edl/edl3.51.2/edl/edl/Library/usblib.py", line 111, in verify_data
self.debug("", stack_info=True)
TX:
wait_for_data:0x1000
Timed out
bytearray(b'')
wait_for_data:0x1000
Timed out
bytearray(b'')
wait_for_data:0x1000
wait_for_data:0x1000
wait_for_data:0x1000
Error:
Read back verify failed at sector 1746944274,num sectors 0
Finished sector address 0
Error on writing ./../aboot_0.img to sector 0
The problem has been due to the wrong firmware install to phone then it is locked
I not in charge of
this mistake has not been due to me :)
Get time outs consistently when reading partition to file, full speed to a certain point then timeouts. Tried multiple USB ports.
Command used:
./edl.py r boot boot.img
Log for reference: debug.log