bkerler / edl

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

Flashing boot #457

Open shashankx86 opened 1 year ago

shashankx86 commented 1 year ago
(base) root@d0xygen:/home/d0xu/DEv/edl# ./edl w boot boot.img
Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2023.
main - Trying with no loader given ...
main - Waiting for the device
main - Device detected :)
main - Mode detected: nandprg
Traceback (most recent call last):
  File "/home/d0xu/DEv/edl/./edl", line 386, in <module>
    base.run()
  File "/home/d0xu/DEv/edl/./edl", line 369, in run
    sc.handle_streaming(cmd, options)
  File "/home/d0xu/DEv/edl/edlclient/Library/streaming_client.py", line 358, in handle_streaming
    rpartitions = self.streaming.get_partitions(partitionfilename)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/d0xu/DEv/edl/edlclient/Library/streaming.py", line 654, in get_partitions
    with open(filename, "rb") as rf:
         ^^^^^^^^^^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not NoneType

Device INFO

Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2023.
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:              0x000480e100000000 (MSM_ID:0x000480e1,OEM_ID:0x0000,MODEL_ID:0x0000)
CPU detected:      "MDM9207"
PK_HASH:           0xcc3153a80293939b90d02d3bf8b23e0292e452fef662c74998421adad42a380f
Serial:            0x1ceb47e4

sahara - Possibly unfused device detected, so any loader should be fine...
sahara - Trying loader: /home/d0xu/DEv/edl/edlclient/../Loaders/qualcomm/patched/mdm9x07/000480e100000000_cc3153a80293939b_enprg_peek.bin
sahara - Protocol version: 2, Version supported: 1
sahara - Uploading loader /home/d0xu/DEv/edl/edlclient/../Loaders/qualcomm/patched/mdm9x07/000480e100000000_cc3153a80293939b_enprg_peek.bin ...
sahara - 32-Bit mode detected.
sahara - Firehose mode detected, uploading...
sahara - Loader successfully uploaded.
Streaming - Successfully uploaded programmer :)
Streaming - HELLO protocol version: 3
Streaming - Chipset: 9x07
Streaming - Base address of the NAND controller: 079b0000
Streaming - Sector size: 516 bytes
Streaming - Spare bytes: 4 bytes
Streaming - Defective block marker position: spare+6
Streaming - The total size of the flash memory = 2048 blocks (256 MB)
Streaming - Flash memory: Elite Semiconductor FM6BD2G1GA, NAND 256MiB 1.8V 8-bit (vendor: 0xC8 image_id: 0xAA)
Streaming - Page size: 2048 bytes (4 sectors)
Streaming - The number of pages in the block: 64
Streaming - OOB size: 64 bytes
Streaming - ECC: BCH, 4 bit
Streaming - ЕСС size: 1 bytes
Successfully uploaded programmer :)
shashankx86 commented 1 year ago

I want to flash new boot.img, and when trying to flash I am getting error

shashankx86 commented 1 year ago
(base) root@d0xygen:/home/d0xu/DEv/edl# ./edl printgpt
Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2023.
main - Trying with no loader given ...
main - Waiting for the device
main - Device detected :)
main - Mode detected: nandprg
Name            Offset          Length          Attr                    Flash
-------------------------------------------------------------
SBL                     00000000        00140000        0xff/0x1/0x0    0
MIBIB                   00140000        00140000        0xff/0x1/0xff   0
EFS2                    00280000        00B40000        0xff/0x1/0xff   0
foxNV                   00DC0000        00240000        0xff/0xff/0x0   0
TZ                      01000000        000A0000        0xff/0x1/0x0    0
RPM                     010A0000        00060000        0xff/0x1/0x0    0
aboot                   01100000        00060000        0xff/0x1/0x0    0
aboot_bak               01160000        00060000        0xff/0x1/0x0    0
boot                    011C0000        00720000        0xff/0x1/0x0    0
SCRUB                   018E0000        00420000        0xff/0x1/0x0    0
modem                   01D00000        03100000        0xff/0x1/0x0    0
modem_bak               04E00000        03100000        0xff/0x1/0x0    0
sec                     07F00000        00080000        0xff/0x1/0x0    0
misc                    07F80000        00120000        0xff/0x1/0x0    0
recovery                080A0000        00720000        0xff/0x1/0x0    0
fota                    087C0000        00060000        0xff/0x1/0x0    0
FWINFO                  08820000        000A0000        0xff/0xff/0x0   0
recoveryfs              088C0000        03FE0000        0x30/0x3a/0x43  65
shashankx86 commented 12 months ago

@bkerler help

shashankx86 commented 12 months ago

tried with

/Loaders/qualcomm/factory/mdm9x07/000480e100000000_cc3153a80293939b_fhprg_9x07.mbn
(base) root@d0xygen:/home/d0xu/DEv/edl# ./edl --loader=/home/d0xu/DEv/edl/Loaders/qualcomm/factory/mdm9x07/000480e100000000_cc3153a80293939b_fhprg_9x07.mbn w boot boot.img
Qualcomm Sahara / Firehose Client V3.62 (c) B.Kerler 2018-2023.
main - Using loader /home/d0xu/DEv/edl/Loaders/qualcomm/factory/mdm9x07/000480e100000000_cc3153a80293939b_fhprg_9x07.mbn ...
main - Waiting for the device
main - Device detected :)
sahara - Protocol version: 2, Version supported: 1
main - Mode detected: sahara
sahara - 
Version 0x2
------------------------
HWID:              0x000480e100000000 (MSM_ID:0x000480e1,OEM_ID:0x0000,MODEL_ID:0x0000)
CPU detected:      "MDM9207"
PK_HASH:           0xcc3153a80293939b90d02d3bf8b23e0292e452fef662c74998421adad42a380f
Serial:            0x1ceb47e4

sahara - Protocol version: 2, Version supported: 1
sahara - Uploading loader /home/d0xu/DEv/edl/Loaders/qualcomm/factory/mdm9x07/000480e100000000_cc3153a80293939b_fhprg_9x07.mbn ...
sahara - 32-Bit mode detected.
sahara - Firehose mode detected, uploading...
sahara - Loader successfully uploaded.
main - Trying to connect to firehose loader ...
firehose - Supported Functions: program configure power benchmark read getstorageinfo erase nop 
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 - TargetName=9x07
firehose - MemoryName=NAND
firehose - Version=
firehose - Trying to read first storage sector...
firehose - Running configure...
firehose
firehose - [LIB]: GetStorageInfo command isn't supported.
firehose_client - Supported functions:
-----------------
program,configure,power,benchmark,read,getstorageinfo,erase,nop

also tried with --debugmode

firehose - [LIB]: GetStorageInfo command isn't supported.
firehose_client - Supported functions:
-----------------
program,configure,power,benchmark,read,getstorageinfo,erase,nop
DeviceClass
DeviceClass - [LIB]: [Errno 110] Operation timed out
DeviceClass
DeviceClass - [LIB]: [Errno 110] Operation timed out
DeviceClass
DeviceClass - [LIB]: [Errno 110] Operation timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out
DeviceClass
DeviceClass - [LIB]: Timed out

is it loader problem or my device

@bkerler

shashankx86 commented 12 months ago

any other firehose loader i can use?

william-ng-ln commented 12 months ago

I think first you need to find out what kind of cpu in your device. For example, with my device, Boox Page from chinese vendor, it's Qualcomm Snapdragon 622. After some research, I found one. And luckly, I could use that to unbrick my device.

Don't give up!.

shashankx86 commented 12 months ago

I think first you need to find out what kind of cpu in your device.

It's MDM9207 (it don't have any cpu whole thing just runs on this) @william-ng-ln

shashankx86 commented 12 months ago

@william-ng-ln ???