bkerler / edl

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

"--genxml" not working for NAND device #486

Open stich86 opened 9 months ago

stich86 commented 9 months ago

hi @bkerler,

i'm trying to generate rawprogram0.xml for a device instead of do it manually. This module is using NAND, but when you upload the programmer and using --genxml flag, it throws this error:

edl gpt . --genxml
Capstone library is missing (optional).
Keystone library is missing (optional).
Qualcomm Sahara / Firehose Client V3.61 (c) B.Kerler 2018-2023.
main - Using loader prog_firehose_mf289f.mbn ...
main - Waiting for the device
main - Device detected :)
sahara - Protocol version: 2, Version supported: 1
main - Mode detected: sahara
sahara -
------------------------
HWID:              0x000960e100000000 (MSM_ID:0x000960e1,OEM_ID:0x0000,MODEL_ID:0x0000)
CPU detected:      "SDX24"
PK_HASH:           0xd40eee56f3194665574109a39267724ae7944134cd53cb767e293d3c40497955bc8a4519ff992b031fadc6355015ac87000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Serial:            0x043ab917

sahara - Protocol version: 2, Version supported: 1
sahara - Uploading loader prog_firehose_mf289f.mbn ...
sahara - 32-Bit mode detected.
sahara - Firehose mode detected, uploading...
sahara - Loader successfully uploaded.
main - Trying to connect to firehose loader ...
firehose_client
firehose_client - [LIB]: No --memory option set, we assume "eMMC" 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=eMMC
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
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:
-----------------
firehose - Nand storage detected.
firehose - Scanning for partition table ...
Progress: |██████████| 100.0% Scanning (Sector 0x400 of 0x400, ) 0.00 MB/s
firehose - Found partition table at sector 640 :)
oneplus
oneplus - [LIB]: No module named 'qrcode'
firehose - Nand storage detected.
firehose - Scanning for partition table ...
Dumped GPT from Lun 0 to ./gpt_main0.bin
Dumped Backup GPT from Lun 0 to ./gpt_backup0.bin
Traceback (most recent call last):
  File "/opt/homebrew/bin/edl", line 4, in <module>
    __import__('pkg_resources').run_script('edlclient==3.60', 'edl')
  File "/opt/homebrew/lib/python3.11/site-packages/pkg_resources/__init__.py", line 722, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/opt/homebrew/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1561, in run_script
    exec(code, namespace, namespace)
  File "/opt/homebrew/lib/python3.11/site-packages/edlclient-3.60-py3.11.egg/EGG-INFO/scripts/edl", line 399, in <module>
    base.run()
  File "/opt/homebrew/lib/python3.11/site-packages/edlclient-3.60-py3.11.egg/EGG-INFO/scripts/edl", line 394, in run
    fh.handle_firehose(cmd, options)
  File "/opt/homebrew/lib/python3.11/site-packages/edlclient-3.60-py3.11.egg/edlclient/Library/firehose_client.py", line 217, in handle_firehose
    guid_gpt.generate_rawprogram(lun, self.firehose.cfg.SECTOR_SIZE_IN_BYTES, directory)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'nand_partition' object has no attribute 'generate_rawprogram'

Looks like nand_partition is not supported. Do you think is it possible to add it?

Thanks in advance

ElectroBoy404NotFound commented 5 months ago

Facing the same problem here.