edl icon indicating copy to clipboard operation
edl copied to clipboard

(MDM9207) Write failed to NAND.

Open ElectroBoy404NotFound opened this issue 4 months ago • 12 comments

Hi!

I have a MDM9207-based 4G hotspot. I was able to read the boot partition out form the device but I'm unable to write the modified or even the original (read from NAND) file back to the NAND partition. Running with --debugmode, the error seems to be:

<log value="Attribute 'PAGES_PER_BLOCK'=2048 must be equal to disk pages per block 64"/>

and

<log value="ERROR 21: Line 2459: HANDLE_PROGRAM_FAILURE"/>

Also, without debugmode, it fails silently and just says 0% flashed

What could it possibly be?

The log file is here log.txt.

P.S.: The command I ran is edl w boot image-new.img --memory=NAND

ElectroBoy404NotFound avatar Mar 25 '24 14:03 ElectroBoy404NotFound

P.S.S: The image image-new.img is a valid image; I can flash it through fastboot and it does work.

ElectroBoy404NotFound avatar Mar 27 '24 02:03 ElectroBoy404NotFound

Yes, PAGES_PER_BLOCK must be specified in Firehose erase commands. Curiously enough, that info comes from PAGES_IN_BLOCK.

RenateUSB avatar Apr 12 '24 07:04 RenateUSB

Hmmm. Could patching the firehose client code fix it?

ElectroBoy404NotFound avatar Apr 12 '24 10:04 ElectroBoy404NotFound

Hmmm. Could patching the firehose client code fix it?

No. Don't be retarded

ghost avatar Apr 20 '24 03:04 ghost

Hmmm. Could patching the firehose client code fix it?

Probably. (We are talking about EDL client code here, not Firehose loaders.)

My understanding of flashing NANDs is not complete. I know that there is the "streaming protocol" but I have no experience using it. I have flashed NANDs (also on a hot spot) using a normal Firehose loader and a different EDL client.

RenateUSB avatar Apr 20 '24 12:04 RenateUSB

retarded

Never asked you.

ElectroBoy404NotFound avatar Apr 22 '24 14:04 ElectroBoy404NotFound

Hmmm. Could patching the firehose client code fix it?

Probably. (We are talking about EDL client code here, not Firehose loaders.)

My understanding of flashing NANDs is not complete. I know that there is the "streaming protocol" but I have no experience using it. I have flashed NANDs (also on a hot spot) using a normal Firehose loader and a different EDL client.

By firehose client I meant the firehose client code...

What do you think the change might look like?

ElectroBoy404NotFound avatar Apr 22 '24 14:04 ElectroBoy404NotFound

Actually, I think the confusion is that the device might actually be the firehose client and I just never knew that.

ElectroBoy404NotFound avatar Apr 22 '24 14:04 ElectroBoy404NotFound

Some definitions so that we're talking the same.

PBL = read-only memory in Qualcomm devices that speaks Sahara protocol SBL/XBL = normally what the PBL loads from eMMC/UFS Firehose loader = custom SBL/XBL loaded over USB/Sahara with the secret sauce to speak Firehose protocol EDL client = desktop code that speaks Sahara and Firehose protocol

Can you read the entire flash? It's normally only 536,870,912 bytes in a hot spot. But... without adjusting for bad blocks you will get either less data or else the end will be all garbage.

RenateUSB avatar Apr 22 '24 14:04 RenateUSB

Some definitions so that we're talking the same.

PBL = read-only memory in Qualcomm devices that speaks Sahara protocol SBL/XBL = normally what the PBL loads from eMMC/UFS Firehose loader = custom SBL/XBL loaded over USB/Sahara with the secret sauce to speak Firehose protocol EDL client = desktop code that speaks Sahara and Firehose protocol

Can you read the entire flash? It's normally only 536,870,912 bytes in a hot spot. But... without adjusting for bad blocks you will get either less data or else the end will be all garbage.

I'm able to read but not able to write

ElectroBoy404NotFound avatar Apr 23 '24 15:04 ElectroBoy404NotFound

In short, this EDL client has a long way to go to be able to read/write NAND memories using Firehose.

"Streaming protocol" may be a solution, but I know nothing about that.

RenateUSB avatar Apr 23 '24 16:04 RenateUSB

In short, this EDL client has a long way to go to be able to read/write NAND memories using Firehose.

"Streaming protocol" may be a solution, but I know nothing about that.

Got it, will keep this issue open till it's resolved ig

ElectroBoy404NotFound avatar Apr 25 '24 13:04 ElectroBoy404NotFound