bkerler / edl

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

Couldn't find partition table, but command "rs" might still work ! #575

Open Z9044234820 opened 3 months ago

Z9044234820 commented 3 months ago

I erased the flash by edl es 0 $((0x102c0)) to reflash the partitions afterwards and when finished erasing, no edl commands work. I backed up partitions and partition table beforehand. Running any edl commands, even edl rs 0 1000 test.bin, results in Couldn't find partition table, but command "rs" might still work ! I restarted but same error. @bkerler

$ edl reset
/usr/local/bin/edl:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').run_script('edlclient==3.62', 'edl')
Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2024.
main - Trying with no loader given ...
main - Waiting for the device
main - Device detected :)
sahara - Protocol version: 2, Version supported: 1
main - Mode detected: sahara
sahara - 
Version 0x2
------------------------
HWID:              0x000cf0e100000000 (MSM_ID:0x000cf0e1,OEM_ID:0x0000,MODEL_ID:0x0000)
CPU detected:      "SDX55M:CD90-PH809"
PK_HASH:           0xd40eee56f3194665574109a39267724ae7944134cd53cb767e293d3c40497955bc8a4519ff992b031fadc6355015ac87000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Serial:            0xfd987cf6

sahara - Possibly unfused device detected, so any loader should be fine...
sahara - Possible loader available: /usr/local/lib/python3.10/dist-packages/edlclient-3.62-py3.10.egg/edlclient/../Loaders/qualcomm/factory/sdx55/000CF0E100000000_d9357db88795b5a8_fhprg.bin
sahara - Trying loader: /usr/local/lib/python3.10/dist-packages/edlclient-3.62-py3.10.egg/edlclient/../Loaders/qualcomm/factory/sdx55/000CF0E100000000_d9357db88795b5a8_fhprg.bin
sahara - Protocol version: 2, Version supported: 1
sahara - Uploading loader /usr/local/lib/python3.10/dist-packages/edlclient-3.62-py3.10.egg/edlclient/../Loaders/qualcomm/factory/sdx55/000CF0E100000000_d9357db88795b5a8_fhprg.bin ...
sahara - 32-Bit mode detected.
sahara - Firehose mode detected, uploading...
sahara - Loader successfully uploaded.
main - Trying to connect to firehose loader ...
firehose - INFO: Binary build date: Dec  6 2021 @ 22:50:15
firehose - INFO: Binary build date: Dec  6 2021 @ 22:50:15 
firehose - INFO: Chip serial num: 0 (0x0)
firehose - INFO: Supported Functions (15):
firehose - INFO: program
firehose - INFO: read
firehose - INFO: nop
firehose - INFO: patch
firehose - INFO: configure
firehose - INFO: setbootablestoragedrive
firehose - INFO: erase
firehose - INFO: power
firehose - INFO: firmwarewrite
firehose - INFO: getstorageinfo
firehose - INFO: benchmark
firehose - INFO: emmc
firehose - INFO: ufs
firehose - INFO: fixgpt
firehose - INFO: getsha256digest
firehose - INFO: End of supported functions 15
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 eMMC doesn't seem to match (Failed to init). Trying to use NAND instead.
firehose
firehose - [LIB]: Couldn't detect MaxPayloadSizeFromTargetinBytes
firehose
firehose - [LIB]: Couldn't detect TargetName
firehose - TargetName=Unknown
firehose - MemoryName=nand
firehose - Version=1
firehose - Trying to read first storage sector...
firehose - Running configure...
firehose - Storage report:
firehose - total_blocks:2048
firehose - block_size:262144
firehose - page_size:4096
firehose - num_physical:1
firehose - manufacturer_id:44
firehose - serial_num:0
firehose - fw_version:
firehose - mem_type:NAND
firehose - prod_name:
firehose_client - Supported functions:
-----------------
program,read,nop,patch,configure,setbootablestoragedrive,erase,power,firmwarewrite,getstorageinfo,benchmark,emmc,ufs,fixgpt,getsha256digest
firehose - Nand storage detected.
firehose - Scanning for partition table ...
Progress: |██████----|  62.5% Scanning (Sector 0x280 of 0x400, ) 0.00 MB/s                                                                                firehose
firehose - [LIB]: Couldn't find partition table, but command "rs" might still work !
RenateUSB commented 3 months ago

Apparently the software won't let you do even an rs without a "partition table". Does adding --memory=nand make a difference? UBI/MTD/NAND doesn't have GPT partition tables, it has volume tables.

bkerler commented 2 months ago

Once the gpt is erased, it has to be flashed first before partitions can be written. I need to have a look why rs does fail, normally it shouldn't require a partition table.