bkerler / edl

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

(MDM9207) Write failed to NAND. #522

Open ElectroBoy404NotFound opened 3 months ago

ElectroBoy404NotFound commented 3 months ago

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 commented 3 months ago

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

RenateUSB commented 2 months ago

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

ElectroBoy404NotFound commented 2 months ago

Hmmm. Could patching the firehose client code fix it?

ghost commented 2 months ago

Hmmm. Could patching the firehose client code fix it?

No. Don't be retarded

RenateUSB commented 2 months ago

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.

ElectroBoy404NotFound commented 2 months ago

retarded

Never asked you.

ElectroBoy404NotFound commented 2 months ago

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 commented 2 months ago

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

RenateUSB commented 2 months ago

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.

ElectroBoy404NotFound commented 2 months ago

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

RenateUSB commented 2 months ago

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.

ElectroBoy404NotFound commented 2 months ago

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