bkerler / edl

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

AttributeError: 'NoneType' object has no attribute 'NAND_DEV0_CFG0' #571

Open Z9044234820 opened 1 month ago

Z9044234820 commented 1 month ago

Shorting two pins to enter EDL on E5788, and when I run a command edl --loader ENPRG9x55.mbn printgpt I get AttributeError: 'NoneType' object has no attribute 'NAND_DEV0_CFG0':

$ ls E5788
ENPRG9x55_e5788.mbn.signed  ENPRG9x55.mbn  partition.mbn
$ ./edl --loader E5788/ENPRG9x55.mbn printgpt
Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2024.
main - Using loader E5788/ENPRG9x55.mbn ...
main - Waiting for the device
main - Device detected :)
sahara - Protocol version: 2, Version supported: 1
main - Mode detected: sahara
sahara - 
Version 0x2
------------------------
HWID:              0x000320e10015005a (MSM_ID:0x000320e1,OEM_ID:0x0015,MODEL_ID:0x005a)
CPU detected:      "MDM9250"
PK_HASH:           0xf8007a99dd99ac53b734be80a664a5af560dec68dbb7210c9dd975fdaf0469ce
Serial:            0xc9342f46

sahara - Protocol version: 2, Version supported: 1
sahara - Uploading loader E5788/ENPRG9x55.mbn ...
sahara - 32-Bit mode detected.
sahara - Firehose mode detected, uploading...
sahara - Loader successfully uploaded.
Streaming - Successfully uploaded programmer :)
Streaming - Unpatched loader detected. Using standard QC mode. Limited methods supported: peek
Streaming - HELLO protocol version: 3
Streaming - Flash memory:  MT29F4G08ABBEA,  (vendor: 0x00 image_id: 0x00)
Streaming - Page size: 4096 bytes (0 sectors)
Streaming - The number of pages in the block: 64
Streaming - OOB size: 0 bytes
Streaming - ECC: R-S, 0 bit
Streaming - ЕСС size: 0 bytes
Successfully uploaded programmer :)
Traceback (most recent call last):
  File "/home/user/Documents/edl/./edl", line 393, in <module>
    base.run()
  File "/home/user/Documents/edl/./edl", line 373, in run
    sc.handle_streaming(cmd, options)
  File "/home/user/Documents/edl/edlclient/Library/streaming_client.py", line 101, in handle_streaming
    partitions = self.streaming.get_partitions()
  File "/home/user/Documents/edl/edlclient/Library/streaming.py", line 652, in get_partitions
    partdata = self.read_partition_table()
  File "/home/user/Documents/edl/edlclient/Library/streaming.py", line 639, in read_partition_table
    buffer, spare = self.flash_read(block, 0, 1, cwsize)
  File "/home/user/Documents/edl/edlclient/Library/streaming.py", line 495, in flash_read
    cfg0 = self.regs.NAND_DEV0_CFG0
AttributeError: 'NoneType' object has no attribute 'NAND_DEV0_CFG0'

I got ENPRG9x55_e5788.mbn.signed from this specific comment https://github.com/bkerler/edl/issues/231#issuecomment-1500187940 and I got ENPRG9x55.mbn and partition.mbn from this other specific comment https://github.com/bkerler/edl/issues/231#issue-1133639214 Trying to use Loaders/qualcomm/model_generic/mdm9x5x/000320e100000000_cc3153a80293939b_fhprg_nand_sim7080.elf or any file in Loaders/qualcomm/patched/mdm9x5x/ as loader would stuck on sahara - Firehose mode detected, uploading.... The same applies to using ENPRG9x55_e5788.mbn.signed and partition.mbn as loaders (I don't know what is the partition.mbn file for, it does not look like a loader).

Z9044234820 commented 1 month ago

Now my E5788 would not even boot at all after trying this, it would always go back to EDL mode. Maybe the loader bricked the device?

Z9044234820 commented 1 month ago

@bkerler

RenateUSB commented 1 month ago

There's the streaming protocol, but there is also the normal Firehose protocol too. I presume that this is NAND and Secure Boot is not enabled?

Z9044234820 commented 1 month ago

There is NAND on the E5788, the log in this issue says "MT29F4G08ABBEA" which is NAND (https://smh-tech.com/micron-mt29f4g08abbea/). The device is unfused according to https://github.com/bkerler/edl/issues/231#issuecomment-1076759449 which I assume means secure boot is not enabled.