[Android Q&A, Help & Troubleshooting] grolsch77:
Here's how to access partitions without rawprogram0.xml or patch0.xml

Hi,

If you have the correct prog_emmc_firehose_xxxx.mbn file for your QualComm SoC, you can extract the partition table and all partitions without having access to any rawprogram0.xml or patch0.xml.

The basics are in the excellent guide at https://xdaforums.com/android/general/guide-how-to-dump-write-storage-t3949588

Summary:

- trigger EDL mode, which you have if your phone shows up as USB vendor 05c6, product 9008. Make sure you have "Qualcomm HS-USB QDLoader 9008" as the active driver, giving you a virtual COM port.

- use QFIL to load the prog_emmc_firehose_xxx.mbn file - chose Flat Build

- use QPST's fh_loader.exe to talk to the firehose to read or write the emmc at arbitrary sector offsets

With all that working, you can start by reading the GPT partition table, 34 sectors starting from sector 0:

"C:\Program Files (x86)\Qualcomm\QPST\bin\fh_loader.exe" --port=\\.\COM8 --search_path=C:\my\extract\path --convertprogram2read --sendimage=gpt.bin --start_sector=0 --lun=0 --num_sectors=34 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=emmc

Replace COM8 with whatever COM port that Qualcomm HS-USB driver providers according to Windows Device Manager, and ensure that whatever you choose as C:\my\extract\path exists.

When the tool is done, you'll have a C:\my\extract\path\gpt.bin that you can examine to get the sector offsets and counts for each of your partitions. I used Linux' gdisk for that:

$ gdisk -l gpt.bin

...

Number Start (sector) End (sector) Size Code Name

1 131072 294911 80.0 MiB 0700 modem

2 294912 296959 1024.0 KiB FFFF bluetooth

3 296960 297215 128.0 KiB A01E pmic

4 297216 297471 128.0 KiB A01E pmicbak

5 297472 297473 1024 bytes A040 limits

6 297474 299521 1024.0 KiB A01A DDR

7 299522 299777 128.0 KiB A01D sec

8 393216 393727 256.0 KiB A022 apdp

9 393728 394239 256.0 KiB A023 msadp

10 394240 394241 1024 bytes A024 dpo

11 524288 527359 1.5 MiB A02A fsg

12 655360 655361 1024 bytes A029 fsc

13 655362 655377 8.0 KiB A02C ssd

14 655378 658449 1.5 MiB A027 modemst1

15 658450 661521 1.5 MiB A028 modemst2

16 661522 663569 1024.0 KiB A012 sbl1

17 663570 665617 1024.0 KiB A012 sbl1bak

18 665618 665809 96.0 KiB A019 sdi

19 665810 667857 1024.0 KiB A016 tz

20 667858 669905 1024.0 KiB A016 tzbak

21 669906 670905 500.0 KiB A018 rpm

22 670906 671905 500.0 KiB A018 rpmbak

23 671906 672929 512.0 KiB A017 hyp

24 672930 673953 512.0 KiB A017 hypbak

25 673954 740801 32.6 MiB FFFF splash

26 786432 796671 5.0 MiB A015 aboot

27 796672 806911 5.0 MiB A015 abootbak

28 806912 937983 64.0 MiB A036 boot

29 937984 1069055 64.0 MiB A025 recovery

30 1069056 7360511 3.0 GiB A038 system

31 7471104 10616831 1.5 GiB A039 cache

32 10616832 10682367 32.0 MiB A026 persist

33 10682368 10684415 1024.0 KiB A01F misc

34 10684416 10685439 512.0 KiB A02D keystore

35 10747904 10747905 1024 bytes A021 devinfo

36 10878976 10879999 512.0 KiB FFFF config

37 10880000 61071326 23.9 GiB A03A userdata

From there, you have enough information to back up each of your partitions, write a custom recovery, etcetera.

In my case, a Gigaset ME, both the system and userdata partitions were normal, unencrypted ext4 partitions with ample opportunities for forensics and data recovery.

Needless to say, there was no need to unlock bootloaders, install custom recovery, root the phone, or whatever.