[Tutorial] Full Flash Backup And Restore

Search This thread

ghani mal

Senior Member
Nov 30, 2015
57
7
31
Algeria
LG V60 ThinQ
I did rewrite the IMEI with lgup pdm,but didn't fix it still null, leronex say's he can't do anything.....
I have a second lg v60, what if i copied all his lun's to my broken phone?
Or what should I restore (partitions) ?
Update: finally I did it 🥰🥰
I got my imei back, thank you all for you help
 

Attachments

  • 0310232121_HDR.jpg
    0310232121_HDR.jpg
    1.5 MB · Views: 33
  • 0310232122_HDR.jpg
    0310232122_HDR.jpg
    1.3 MB · Views: 33
  • 0310232121.jpg
    0310232121.jpg
    2.5 MB · Views: 32
Last edited:

XX_GGBOIZ_XX

Member
Feb 14, 2023
15
2
On the vital parttition backup part there is the ftm line with the start sector just like the userdata, but your's ftm.bin start sector is 23816 but the one i have says 21894, do i need to subtract 1 from it? since other partition start sector are identical in both yours and mine
 

Surgemanxx

Senior Member
Jun 21, 2022
325
129
LG V30
LG G7 ThinQ
On the vital parttition backup part there is the ftm line with the start sector just like the userdata, but your's ftm.bin start sector is 23816 but the one i have says 21894, do i need to subtract 1 from it? since other partition start sector are identical in both yours and mine
You can leave that as is.It will still read it properly.You should be good!
 
  • Love
Reactions: XX_GGBOIZ_XX

XX_GGBOIZ_XX

Member
Feb 14, 2023
15
2
You can leave that as is.It will still read it properly.You should be good!
thanks, but just to be clear, this partition backing up will keep all of my data/accounts in it right?
im using android 12 and do the back up, do a refurbrish downgrade to 9, if i dont like 9 and i flash a new 12, then restore the back up it will be the same like before i did the downgrade right?
 

Surgemanxx

Senior Member
Jun 21, 2022
325
129
LG V30
LG G7 ThinQ
thanks, but just to be clear, this partition backing up will keep all of my data/accounts in it right?
im using android 12 and do the back up, do a refurbrish downgrade to 9, if i dont like 9 and i flash a new 12, then restore the back up it will be the same like before i did the downgrade right?
It will save userdata if you're rooted or not,but you may still experience on reflashing it still gives you an error that it's encrypted and you'll still have to erase(factory clear) for the device to boot.I would use a 3rd application and save everything off the device to be extra careful you don't lose anything you want to keep.It's better to have a safety net,than lose important data.Key thing,make a copy of all LUN 5 partitions for IMEI purposes of the device.Something goes wrong,you have a backup of your IMEI and simply flash it back!
 
  • Love
Reactions: XX_GGBOIZ_XX

XX_GGBOIZ_XX

Member
Feb 14, 2023
15
2
It will save userdata if you're rooted or not,but you may still experience on reflashing it still gives you an error that it's encrypted and you'll still have to erase(factory clear) for the device to boot.I would use a 3rd application and save everything off the device to be extra careful you don't lose anything you want to keep.It's better to have a safety net,than lose important data.Key thing,make a copy of all LUN 5 partitions for IMEI purposes of the device.Something goes wrong,you have a backup of your IMEI and simply flash it back!
much appreciated
 
  • Like
Reactions: Surgemanxx

shobuj1981

Member
Mar 20, 2023
21
0
This tutorial shows how to make a full backup of the phone flash and how to restore it. Codes fit LG G8 which with some minor modifications they can be used for any other Qualcomm based devices. If you provide me the "PartitionsList.xml" of other SDM855 devices maybe I'll modify codes for them too.

Be aware I'm not responsible if the phone gets harmed or backups get corrupted or harmful or any other jinx happens to the phone. You can just use the manual way to create backup, with the help of "partition manager".

Note 1: Phone must be in EDL mode. This is up to you to figure that out and get the phone into EDL mode. There are information in type of tubes and posts that tell how to do this.
Note 2: We can make backup of individual partitions or LUNs. In the process of restoring backup, the former can prove more efficient and I'd prepare such codes if OP partition didn't vary from one carrier/KDZ to another. So, thinking of a universal method, it will be concluded in making backup of LUNs. Since, some partitions are vital I prepared additional codes to create backup of them.
Note 3: There are 7 LUNs numbered from 0 to 6. The last LUN keeps FRP data and so is hidden; Qfil does not show any of this LUN. Be careful with that :D. There are some alignments and 4 other hidden partitions that are not shown in "partition manager". DevInfo and Limits in LUN4 whereas DDR and CDT in LUN3 are hidden. LUN3 itself is also completely hidden like LUN6. Anyway, in partition manager you can see what other LUNs are keeping. The provided codes make backup of all alignments and hidden partitions too.
Note 4: User data partition is not getting backed up due to the large size and yet not being necessary.
Note 5: The partition on the computer where QPST is installed should have at least 25GB free space.


Requisites
QPST and Qualcomm USB Driver (get)
LGE SM8150 Firehose (get)


Preparation
1. Install QPST and Qualcomm USB Driver.


Steps A
1. Open QFIL.
2. Change "Storage Type" to UFS.
3. Select "Flat Build".
4. Browse for "LGE SM8150 Firehose" and pick it.
5. Now, connect the phone to PC and boot into EDL mode.
6. Open "Select Port" and select the phone, press OK.
7. In "Tools" open the "Partition Manager". Keep the "Partition Manager" for the entire process.

Note 6: To dump partitions we use fh_loader which requires the "partition manager" to be opened so do not close it until after all get done, otherwise the phone may become bricked.
Note 7: In the following codes you need to add the port number of the phone right after "fh_loader.exe --port=\\.\COM". If yours is 3 then it should become "fh_loader.exe --port=\\.\COM3"

Steps B (Using fh_loader)
1. Go to QPST installation folder then go to bin folder.
2. Open CMD there.
3. In "partition manager" hit on "save partition file".
4. Go to "C:\Users\YOUR_USER_NAME\AppData\Roaming\Qualcomm\QFIL".
5. Open file named "COM#_PartitionsList.xml". (# is your phone port number)
6. Find the phrase "userdata" using search tool.
7. In this line, find "start_sector". There is a number in front of it, subtract 1 from this number and put it in place of "???????" in the code for LUN0.
For example: In VRZ a10, we see the number in front of "userdata" is 5285640 which we subtract 1 from it. The result will be 5285639 which we use in place of "???????" in LUN0 Code.
8. Put the following codes in CMD (make sure your phone's port number is added to codes).

Creating LUNs Backup
LUN 0
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --num_sectors=??????? --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN1
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN2
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN3
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN4
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --num_sectors=383995 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN5
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --num_sectors=3072 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN6
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --num_sectors=1024 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Note 8: Restoration process is the same as the making backup process, in preparation and all other stuff. All backup files should be placed in bin folder of QPST installation folder before running codes.

Restoring LUNs Backup
LUN0
fh_loader.exe --port=\\.\COM --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN1
fh_loader.exe --port=\\.\COM --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN2
fh_loader.exe --port=\\.\COM --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN3
fh_loader.exe --port=\\.\COM --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN4
fh_loader.exe --port=\\.\COM --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN5
fh_loader.exe --port=\\.\COM --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN6
fh_loader.exe --port=\\.\COM --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Creating Backup of Vital Partitions (FTM, Modemst1, Modemst2, FSG, FSC)
FTM
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=ftm.bin --start_sector=23816 --lun=0 --num_sectors=8192 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst1
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst1.bin --start_sector=32 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst2
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst2.bin --start_sector=544 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSG
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsg.bin --start_sector=1056 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSC
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsc.bin --start_sector=1568 --lun=5 --num_sectors=32 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Restoring Partitions
FTM
fh_loader.exe --port=\\.\COM --sendimage=ftm.bin --start_sector=23816 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst1
fh_loader.exe --port=\\.\COM --sendimage=modemst1.bin --start_sector=32 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst2
fh_loader.exe --port=\\.\COM --sendimage=modemst2.bin --start_sector=544 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSG
fh_loader.exe --port=\\.\COM --sendimage=fsg.bin --start_sector=1056 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSC
fh_loader.exe --port=\\.\COM --sendimage=fsc.bin --start_sector=1568 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Note 9: Where are the backup files stored? QPST installation folder/bin.
Note10: Can I restore my phone's backup to my friend's phone? Yes, but do not expect it to cure IMEI problems of the second phone.


And, that's it =)
I'll see you around ;)

Couldnot append (comport3.txt) showing on powershell how can i fix it pls help. I have lun file, gpt file, firehose every thing. I do the process by seeing this video
 

shobuj1981

Member
Mar 20, 2023
21
0
This tutorial shows how to make a full backup of the phone flash and how to restore it. Codes fit LG G8 which with some minor modifications they can be used for any other Qualcomm based devices. If you provide me the "PartitionsList.xml" of other SDM855 devices maybe I'll modify codes for them too.

Be aware I'm not responsible if the phone gets harmed or backups get corrupted or harmful or any other jinx happens to the phone. You can just use the manual way to create backup, with the help of "partition manager".

Note 1: Phone must be in EDL mode. This is up to you to figure that out and get the phone into EDL mode. There are information in type of tubes and posts that tell how to do this.
Note 2: We can make backup of individual partitions or LUNs. In the process of restoring backup, the former can prove more efficient and I'd prepare such codes if OP partition didn't vary from one carrier/KDZ to another. So, thinking of a universal method, it will be concluded in making backup of LUNs. Since, some partitions are vital I prepared additional codes to create backup of them.
Note 3: There are 7 LUNs numbered from 0 to 6. The last LUN keeps FRP data and so is hidden; Qfil does not show any of this LUN. Be careful with that :D. There are some alignments and 4 other hidden partitions that are not shown in "partition manager". DevInfo and Limits in LUN4 whereas DDR and CDT in LUN3 are hidden. LUN3 itself is also completely hidden like LUN6. Anyway, in partition manager you can see what other LUNs are keeping. The provided codes make backup of all alignments and hidden partitions too.
Note 4: User data partition is not getting backed up due to the large size and yet not being necessary.
Note 5: The partition on the computer where QPST is installed should have at least 25GB free space.


Requisites
QPST and Qualcomm USB Driver (get)
LGE SM8150 Firehose (get)


Preparation
1. Install QPST and Qualcomm USB Driver.


Steps A
1. Open QFIL.
2. Change "Storage Type" to UFS.
3. Select "Flat Build".
4. Browse for "LGE SM8150 Firehose" and pick it.
5. Now, connect the phone to PC and boot into EDL mode.
6. Open "Select Port" and select the phone, press OK.
7. In "Tools" open the "Partition Manager". Keep the "Partition Manager" for the entire process.

Note 6: To dump partitions we use fh_loader which requires the "partition manager" to be opened so do not close it until after all get done, otherwise the phone may become bricked.
Note 7: In the following codes you need to add the port number of the phone right after "fh_loader.exe --port=\\.\COM". If yours is 3 then it should become "fh_loader.exe --port=\\.\COM3"

Steps B (Using fh_loader)
1. Go to QPST installation folder then go to bin folder.
2. Open CMD there.
3. In "partition manager" hit on "save partition file".
4. Go to "C:\Users\YOUR_USER_NAME\AppData\Roaming\Qualcomm\QFIL".
5. Open file named "COM#_PartitionsList.xml". (# is your phone port number)
6. Find the phrase "userdata" using search tool.
7. In this line, find "start_sector". There is a number in front of it, subtract 1 from this number and put it in place of "???????" in the code for LUN0.
For example: In VRZ a10, we see the number in front of "userdata" is 5285640 which we subtract 1 from it. The result will be 5285639 which we use in place of "???????" in LUN0 Code.
8. Put the following codes in CMD (make sure your phone's port number is added to codes).

Creating LUNs Backup
LUN 0
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --num_sectors=??????? --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN1
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN2
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN3
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN4
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --num_sectors=383995 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN5
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --num_sectors=3072 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN6
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --num_sectors=1024 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Note 8: Restoration process is the same as the making backup process, in preparation and all other stuff. All backup files should be placed in bin folder of QPST installation folder before running codes.

Restoring LUNs Backup
LUN0
fh_loader.exe --port=\\.\COM --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN1
fh_loader.exe --port=\\.\COM --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN2
fh_loader.exe --port=\\.\COM --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN3
fh_loader.exe --port=\\.\COM --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN4
fh_loader.exe --port=\\.\COM --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN5
fh_loader.exe --port=\\.\COM --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN6
fh_loader.exe --port=\\.\COM --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Creating Backup of Vital Partitions (FTM, Modemst1, Modemst2, FSG, FSC)
FTM
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=ftm.bin --start_sector=23816 --lun=0 --num_sectors=8192 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst1
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst1.bin --start_sector=32 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst2
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst2.bin --start_sector=544 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSG
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsg.bin --start_sector=1056 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSC
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsc.bin --start_sector=1568 --lun=5 --num_sectors=32 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Restoring Partitions
FTM
fh_loader.exe --port=\\.\COM --sendimage=ftm.bin --start_sector=23816 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst1
fh_loader.exe --port=\\.\COM --sendimage=modemst1.bin --start_sector=32 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst2
fh_loader.exe --port=\\.\COM --sendimage=modemst2.bin --start_sector=544 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSG
fh_loader.exe --port=\\.\COM --sendimage=fsg.bin --start_sector=1056 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSC
fh_loader.exe --port=\\.\COM --sendimage=fsc.bin --start_sector=1568 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Note 9: Where are the backup files stored? QPST installation folder/bin.
Note10: Can I restore my phone's backup to my friend's phone? Yes, but do not expect it to cure IMEI problems of the second phone.


And, that's it =)
I'll see you around ;)
I delete the partition via qfil tool then reboot to edl mode try to flash lun0 to lun6 but powershell shows could not append port trace com3.txt.
How can i solve it pls help if you have solution
 

shobuj1981

Member
Mar 20, 2023
21
0
This tutorial shows how to make a full backup of the phone flash and how to restore it. Codes fit LG G8 which with some minor modifications they can be used for any other Qualcomm based devices. If you provide me the "PartitionsList.xml" of other SDM855 devices maybe I'll modify codes for them too.

Be aware I'm not responsible if the phone gets harmed or backups get corrupted or harmful or any other jinx happens to the phone. You can just use the manual way to create backup, with the help of "partition manager".

Note 1: Phone must be in EDL mode. This is up to you to figure that out and get the phone into EDL mode. There are information in type of tubes and posts that tell how to do this.
Note 2: We can make backup of individual partitions or LUNs. In the process of restoring backup, the former can prove more efficient and I'd prepare such codes if OP partition didn't vary from one carrier/KDZ to another. So, thinking of a universal method, it will be concluded in making backup of LUNs. Since, some partitions are vital I prepared additional codes to create backup of them.
Note 3: There are 7 LUNs numbered from 0 to 6. The last LUN keeps FRP data and so is hidden; Qfil does not show any of this LUN. Be careful with that :D. There are some alignments and 4 other hidden partitions that are not shown in "partition manager". DevInfo and Limits in LUN4 whereas DDR and CDT in LUN3 are hidden. LUN3 itself is also completely hidden like LUN6. Anyway, in partition manager you can see what other LUNs are keeping. The provided codes make backup of all alignments and hidden partitions too.
Note 4: User data partition is not getting backed up due to the large size and yet not being necessary.
Note 5: The partition on the computer where QPST is installed should have at least 25GB free space.


Requisites
QPST and Qualcomm USB Driver (get)
LGE SM8150 Firehose (get)


Preparation
1. Install QPST and Qualcomm USB Driver.


Steps A
1. Open QFIL.
2. Change "Storage Type" to UFS.
3. Select "Flat Build".
4. Browse for "LGE SM8150 Firehose" and pick it.
5. Now, connect the phone to PC and boot into EDL mode.
6. Open "Select Port" and select the phone, press OK.
7. In "Tools" open the "Partition Manager". Keep the "Partition Manager" for the entire process.

Note 6: To dump partitions we use fh_loader which requires the "partition manager" to be opened so do not close it until after all get done, otherwise the phone may become bricked.
Note 7: In the following codes you need to add the port number of the phone right after "fh_loader.exe --port=\\.\COM". If yours is 3 then it should become "fh_loader.exe --port=\\.\COM3"

Steps B (Using fh_loader)
1. Go to QPST installation folder then go to bin folder.
2. Open CMD there.
3. In "partition manager" hit on "save partition file".
4. Go to "C:\Users\YOUR_USER_NAME\AppData\Roaming\Qualcomm\QFIL".
5. Open file named "COM#_PartitionsList.xml". (# is your phone port number)
6. Find the phrase "userdata" using search tool.
7. In this line, find "start_sector". There is a number in front of it, subtract 1 from this number and put it in place of "???????" in the code for LUN0.
For example: In VRZ a10, we see the number in front of "userdata" is 5285640 which we subtract 1 from it. The result will be 5285639 which we use in place of "???????" in LUN0 Code.
8. Put the following codes in CMD (make sure your phone's port number is added to codes).

Creating LUNs Backup
LUN 0
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --num_sectors=??????? --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN1
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN2
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN3
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN4
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --num_sectors=383995 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN5
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --num_sectors=3072 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN6
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --num_sectors=1024 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Note 8: Restoration process is the same as the making backup process, in preparation and all other stuff. All backup files should be placed in bin folder of QPST installation folder before running codes.

Restoring LUNs Backup
LUN0
fh_loader.exe --port=\\.\COM --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN1
fh_loader.exe --port=\\.\COM --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN2
fh_loader.exe --port=\\.\COM --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN3
fh_loader.exe --port=\\.\COM --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN4
fh_loader.exe --port=\\.\COM --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN5
fh_loader.exe --port=\\.\COM --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

LUN6
fh_loader.exe --port=\\.\COM --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Creating Backup of Vital Partitions (FTM, Modemst1, Modemst2, FSG, FSC)
FTM
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=ftm.bin --start_sector=23816 --lun=0 --num_sectors=8192 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst1
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst1.bin --start_sector=32 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst2
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst2.bin --start_sector=544 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSG
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsg.bin --start_sector=1056 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSC
fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsc.bin --start_sector=1568 --lun=5 --num_sectors=32 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Restoring Partitions
FTM
fh_loader.exe --port=\\.\COM --sendimage=ftm.bin --start_sector=23816 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst1
fh_loader.exe --port=\\.\COM --sendimage=modemst1.bin --start_sector=32 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Modemst2
fh_loader.exe --port=\\.\COM --sendimage=modemst2.bin --start_sector=544 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSG
fh_loader.exe --port=\\.\COM --sendimage=fsg.bin --start_sector=1056 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

FSC
fh_loader.exe --port=\\.\COM --sendimage=fsc.bin --start_sector=1568 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

Note 9: Where are the backup files stored? QPST installation folder/bin.
Note10: Can I restore my phone's backup to my friend's phone? Yes, but do not expect it to cure IMEI problems of the second phone.


And, that's it =)
I'll see you around ;)
While flashing lun file it shows error pls help. See my attachment
 

Attachments

  • IMG_20230320_180854.jpg
    IMG_20230320_180854.jpg
    6.5 MB · Views: 12

XX_GGBOIZ_XX

Member
Feb 14, 2023
15
2
is there a way to dump the backup to another drive than the instalation drive of qfil? i tried using the commands but it gives the folowing error, and if i tried adding " > D:\V40" at the end of the comand it just says access denied
1679585626542.png

tried opening powershell and cmd with administrator but stitll get the error in the pic
 
Last edited:

Surgemanxx

Senior Member
Jun 21, 2022
325
129
LG V30
LG G7 ThinQ
is there a way to dump the backup to another drive than the instalation drive of qfil? i tried using the commands but it gives the folowing error, and if i tried adding " > D:\V40" at the end of the comand it just says access denied View attachment 5870243
tried opening powershell and cmd with administrator but stitll get the error in the pic
Try this!Extract this,and place your LUN files in the same folder with FH_Loader and run CMD inside that folder.Open Qfil,and open the partition manager.Leave it open,and then paste the write commands to restore.
 

Attachments

  • FH_Loader.zip
    254.3 KB · Views: 19
  • Love
Reactions: XX_GGBOIZ_XX

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Is it possible that I am using the wrong firehose file, its from the V60 unlock bootlooder thread?

    EDIT
    i found a other firehose file here in Post #742
    Hi =)
    Yes, it is possible.
    Also try executing Qfil and Partition Manager as quickly as the phone gets into EDL mode.
    1
    Hi netmsm, i try this guide
    my phone is in the correct edm mode, its a LG V60
    1684420490250-png.5913479


    i use the firehose file from this thread
    1684420728266-png.5913489


    i'm stuck here in A - 7
    1684420838334-png.5913491


    if i try to open partion manager
    View attachment 5913517

    Is it possible that I am using the wrong firehose file, its from the V60 unlock bootlooder thread?

    EDIT
    i found a other firehose file here in Post #742
    Try this firehose here.It includes the engineering Abl file as well.
  • 16
    This tutorial shows how to make a full backup of the phone flash and how to restore it. Codes fit LG G8 which with some minor modifications they can be used for any other Qualcomm based devices. If you provide me the "PartitionsList.xml" of other SDM855 devices maybe I'll modify codes for them too.

    Be aware I'm not responsible if the phone gets harmed or backups get corrupted or harmful or any other jinx happens to the phone. You can just use the manual way to create backup, with the help of "partition manager".

    Note 1: Phone must be in EDL mode. This is up to you to figure that out and get the phone into EDL mode. There are information in type of tubes and posts that tell how to do this.
    Note 2: We can make backup of individual partitions or LUNs. In the process of restoring backup, the former can prove more efficient and I'd prepare such codes if OP partition didn't vary from one carrier/KDZ to another. So, thinking of a universal method, it will be concluded in making backup of LUNs. Since, some partitions are vital I prepared additional codes to create backup of them.
    Note 3: There are 7 LUNs numbered from 0 to 6. The last LUN keeps FRP data and so is hidden; Qfil does not show any of this LUN. Be careful with that :D. There are some alignments and 4 other hidden partitions that are not shown in "partition manager". DevInfo and Limits in LUN4 whereas DDR and CDT in LUN3 are hidden. LUN3 itself is also completely hidden like LUN6. Anyway, in partition manager you can see what other LUNs are keeping. The provided codes make backup of all alignments and hidden partitions too.
    Note 4: User data partition is not getting backed up due to the large size and yet not being necessary.
    Note 5: The partition on the computer where QPST is installed should have at least 25GB free space.


    Requisites
    QPST and Qualcomm USB Driver (get)
    LGE SM8150 Firehose (get)


    Preparation
    1. Install QPST and Qualcomm USB Driver.


    Steps A
    1. Open QFIL.
    2. Change "Storage Type" to UFS.
    3. Select "Flat Build".
    4. Browse for "LGE SM8150 Firehose" and pick it.
    5. Now, connect the phone to PC and boot into EDL mode.
    6. Open "Select Port" and select the phone, press OK.
    7. In "Tools" open the "Partition Manager". Keep the "Partition Manager" for the entire process.

    Note 6: To dump partitions we use fh_loader which requires the "partition manager" to be opened so do not close it until after all get done, otherwise the phone may become bricked.
    Note 7: In the following codes you need to add the port number of the phone right after "fh_loader.exe --port=\\.\COM". If yours is 3 then it should become "fh_loader.exe --port=\\.\COM3"

    Steps B (Using fh_loader)
    1. Go to QPST installation folder then go to bin folder.
    2. Open CMD there.
    3. In "partition manager" hit on "save partition file".
    4. Go to "C:\Users\YOUR_USER_NAME\AppData\Roaming\Qualcomm\QFIL".
    5. Open file named "COM#_PartitionsList.xml". (# is your phone port number)
    6. Find the phrase "userdata" using search tool.
    7. In this line, find "start_sector". There is a number in front of it, subtract 1 from this number and put it in place of "???????" in the code for LUN0.
    For example: In VRZ a10, we see the number in front of "userdata" is 5285640 which we subtract 1 from it. The result will be 5285639 which we use in place of "???????" in LUN0 Code.
    8. Put the following codes in CMD (make sure your phone's port number is added to codes).

    Creating LUNs Backup
    LUN 0
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --num_sectors=??????? --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN1
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN2
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN3
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN4
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --num_sectors=383995 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN5
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --num_sectors=3072 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN6
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --num_sectors=1024 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Note 8: Restoration process is the same as the making backup process, in preparation and all other stuff. All backup files should be placed in bin folder of QPST installation folder before running codes.

    Restoring LUNs Backup
    LUN0
    fh_loader.exe --port=\\.\COM --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN1
    fh_loader.exe --port=\\.\COM --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN2
    fh_loader.exe --port=\\.\COM --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN3
    fh_loader.exe --port=\\.\COM --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN4
    fh_loader.exe --port=\\.\COM --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN5
    fh_loader.exe --port=\\.\COM --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN6
    fh_loader.exe --port=\\.\COM --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Creating Backup of Vital Partitions (FTM, Modemst1, Modemst2, FSG, FSC)
    FTM
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=ftm.bin --start_sector=23816 --lun=0 --num_sectors=8192 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst1
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst1.bin --start_sector=32 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst2
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst2.bin --start_sector=544 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSG
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsg.bin --start_sector=1056 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSC
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsc.bin --start_sector=1568 --lun=5 --num_sectors=32 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Restoring Partitions
    FTM
    fh_loader.exe --port=\\.\COM --sendimage=ftm.bin --start_sector=23816 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst1
    fh_loader.exe --port=\\.\COM --sendimage=modemst1.bin --start_sector=32 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst2
    fh_loader.exe --port=\\.\COM --sendimage=modemst2.bin --start_sector=544 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSG
    fh_loader.exe --port=\\.\COM --sendimage=fsg.bin --start_sector=1056 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSC
    fh_loader.exe --port=\\.\COM --sendimage=fsc.bin --start_sector=1568 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Note 9: Where are the backup files stored? QPST installation folder/bin.
    Note10: Can I restore my phone's backup to my friend's phone? Yes, but do not expect it to cure IMEI problems of the second phone.


    And, that's it =)
    I'll see you around ;)
    2
    Use the following codes to create backup of LG V60. You need more than 60GB of free space on the drive Qfil is installed.
    LUN0
    fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --num_sectors=5910055 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN1
    fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN2
    fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN3
    fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN4
    fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --num_sectors=383995 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN5
    fh_loader.exe --port=\\.\COM8 --convertprogram2read --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --num_sectors=4096 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
    2
    For the V60 I was pulling the same under the XML file.I've always used this under userdata,and the backups always work 100% for LUNS 0.This was pulled from an AT&T variant, and it starts at 5924904 and of course subtract 1?
    Subtract 1 from "start_sector" of the "user data" partition when creating a backup of LUN0 excluding the "user data" partition.
    2
    This tutorial shows how to make a full backup of the phone flash and how to restore it. Codes fit LG G8 which with some minor modifications they can be used for any other Qualcomm based devices. If you provide me the "PartitionsList.xml" of other SDM855 devices maybe I'll modify codes for them too.

    Be aware I'm not responsible if the phone gets harmed or backups get corrupted or harmful or any other jinx happens to the phone. You can just use the manual way to create backup, with the help of "partition manager".

    Note 1: Phone must be in EDL mode. This is up to you to figure that out and get the phone into EDL mode. There are information in type of tubes and posts that tell how to do this.
    Note 2: We can make backup of individual partitions or LUNs. In the process of restoring backup, the former can prove more efficient and I'd prepare such codes if OP partition didn't vary from one carrier/KDZ to another. So, thinking of a universal method, it will be concluded in making backup of LUNs. Since, some partitions are vital I prepared additional codes to create backup of them.
    Note 3: There are 7 LUNs numbered from 0 to 6. The last LUN keeps FRP data and so is hidden; Qfil does not show any of this LUN. Be careful with that :D. There are some alignments and 4 other hidden partitions that are not shown in "partition manager". DevInfo and Limits in LUN4 whereas DDR and CDT in LUN3 are hidden. LUN3 itself is also completely hidden like LUN6. Anyway, in partition manager you can see what other LUNs are keeping. The provided codes make backup of all alignments and hidden partitions too.
    Note 4: User data partition is not getting backed up due to the large size and yet not being necessary.
    Note 5: The partition on the computer where QPST is installed should have at least 25GB free space.


    Requisites
    QPST and Qualcomm USB Driver (get)
    LGE SM8150 Firehose (get)


    Preparation
    1. Install QPST and Qualcomm USB Driver.


    Steps A
    1. Open QFIL.
    2. Change "Storage Type" to UFS.
    3. Select "Flat Build".
    4. Browse for "LGE SM8150 Firehose" and pick it.
    5. Now, connect the phone to PC and boot into EDL mode.
    6. Open "Select Port" and select the phone, press OK.
    7. In "Tools" open the "Partition Manager". Keep the "Partition Manager" for the entire process.

    Note 6: To dump partitions we use fh_loader which requires the "partition manager" to be opened so do not close it until after all get done, otherwise the phone may become bricked.
    Note 7: In the following codes you need to add the port number of the phone right after "fh_loader.exe --port=\\.\COM". If yours is 3 then it should become "fh_loader.exe --port=\\.\COM3"

    Steps B (Using fh_loader)
    1. Go to QPST installation folder then go to bin folder.
    2. Open CMD there.
    3. In "partition manager" hit on "save partition file".
    4. Go to "C:\Users\YOUR_USER_NAME\AppData\Roaming\Qualcomm\QFIL".
    5. Open file named "COM#_PartitionsList.xml". (# is your phone port number)
    6. Find the phrase "userdata" using search tool.
    7. In this line, find "start_sector". There is a number in front of it, subtract 1 from this number and put it in place of "???????" in the code for LUN0.
    For example: In VRZ a10, we see the number in front of "userdata" is 5285640 which we subtract 1 from it. The result will be 5285639 which we use in place of "???????" in LUN0 Code.
    8. Put the following codes in CMD (make sure your phone's port number is added to codes).

    Creating LUNs Backup
    LUN 0
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --num_sectors=??????? --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN1
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN2
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN3
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN4
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --num_sectors=383995 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN5
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --num_sectors=3072 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN6
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --num_sectors=1024 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Note 8: Restoration process is the same as the making backup process, in preparation and all other stuff. All backup files should be placed in bin folder of QPST installation folder before running codes.

    Restoring LUNs Backup
    LUN0
    fh_loader.exe --port=\\.\COM --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN1
    fh_loader.exe --port=\\.\COM --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN2
    fh_loader.exe --port=\\.\COM --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN3
    fh_loader.exe --port=\\.\COM --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN4
    fh_loader.exe --port=\\.\COM --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN5
    fh_loader.exe --port=\\.\COM --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN6
    fh_loader.exe --port=\\.\COM --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Creating Backup of Vital Partitions (FTM, Modemst1, Modemst2, FSG, FSC)
    FTM
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=ftm.bin --start_sector=23816 --lun=0 --num_sectors=8192 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst1
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst1.bin --start_sector=32 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst2
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst2.bin --start_sector=544 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSG
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsg.bin --start_sector=1056 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSC
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsc.bin --start_sector=1568 --lun=5 --num_sectors=32 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Restoring Partitions
    FTM
    fh_loader.exe --port=\\.\COM --sendimage=ftm.bin --start_sector=23816 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst1
    fh_loader.exe --port=\\.\COM --sendimage=modemst1.bin --start_sector=32 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst2
    fh_loader.exe --port=\\.\COM --sendimage=modemst2.bin --start_sector=544 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSG
    fh_loader.exe --port=\\.\COM --sendimage=fsg.bin --start_sector=1056 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSC
    fh_loader.exe --port=\\.\COM --sendimage=fsc.bin --start_sector=1568 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Note 9: Where are the backup files stored? QPST installation folder/bin.
    Note10: Can I restore my phone's backup to my friend's phone? Yes, but do not expect it to cure IMEI problems of the second phone.


    And, that's it =)
    I'll see you around ;)
    I have edited your write up to make it more noob friendly. I hope I am posting this in a way it will not be annoying. I think some may find this usefull.

    Requisites
    QPST and Qualcomm USB Driver (get)
    LGE SM8150 Firehose.elf (get)


    Preparation
    1. Install Qualcomm USB Driver (QUD.WIN.1.1_Installer-10037.3_Setup.exe)
    2. Install QPST (QPST_2.7.496.exe)


    Part 1
    1. Open QFIL from start menu. (Using version 2.0.3.5 for this tutorial)
    2. Change "Storage Type" to UFS at bottom right corner of QFIL window.
    3. Up top in "Select Build Type" choose "Flat Build".
    4. In "Select Programmer" browse for "LGE SM8150 Firehose.elf" you downloaded and pick it.
    5. Now, connect the phone to PC and boot into EDL mode. Youtube how to boot into EDL mode for your phone.
    6. Up top click "Select Port" and select the phone, (Should read Qualcomm HS-USB QDLoader 9008 for LG G8) press OK.
    7. In "Tools" open the "Partition Manager". Keep the "Partition Manager" open for this entire process. Do not close it before finishing or you run the risk of a bricking your device.


    Part 2 (Using fh_loader from the bin folder)
    1. Open CMD. use "cd C:\Program Files (x86)\Qualcomm\QPST\bin" to navigate to the QPST/bin folder.
    2. Back in "Partition Manager" click on "Save Partition File".
    3. Go to "C:\Users\YOUR_USER_NAME\AppData\Roaming\Qualcomm\QFIL".
    4. Open file named "COM#_PartitionsList.xml". (# is your phone port number)
    5. Find the phrase "userdata" using search tool.
    6. In this line, find "start_sector". Subtract 1 from the number it ='s and put it in place of "???????" in the code for LUN0 below.

    *For example: In VRZ a10, we see the number in front of "userdata" is 5285640 which we subtract 1 from it. The result will be 5285639 which we use in place of "???????" in LUN0 Code.*

    *In the following codes you need to add the port number of the phone right after "fh_loader.exe --port=\\.\COM". If yours is 3 then it should become "fh_loader.exe --port=\\.\COM3"*

    7. Add your phone's port number to all the codes below and right click paste them into the CMD window pointed to the QPST/bin folder.


    --------------------
    Creating LUNs Backup
    --------------------
    LUN 0
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --num_sectors=??????? --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN1
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN2
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN3
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN4
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --num_sectors=383995 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN5
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --num_sectors=3072 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN6
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --num_sectors=1024 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs


    -----------------------------------------------------------------------
    Creating Backup of Vital Partitions (FTM, Modemst1, Modemst2, FSG, FSC)
    -----------------------------------------------------------------------
    FTM
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=ftm.bin --start_sector=23816 --lun=0 --num_sectors=8192 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst1
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst1.bin --start_sector=32 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst2
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=modemst2.bin --start_sector=544 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSG
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsg.bin --start_sector=1056 --lun=5 --num_sectors=512 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSC
    fh_loader.exe --port=\\.\COM --convertprogram2read --sendimage=fsc.bin --start_sector=1568 --lun=5 --num_sectors=32 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs


    ------------
    Backup Notes
    ------------
    *All backups will be created in the QPST/bin folder where CMD ran fh_loader.exe from.*

    *Their names will be: "LUN 0_Complete.bin", "LUN1_Complete.bin", "LUN2_Complete.bin", "LUN3_Complete.bin", "LUN4_Complete.bin", "LUN5_Complete.bin", "LUN6_Complete.bin", "ftm.bin", "modemst1.bin", "modemst2.bin", "fsg.bin", and "fsc.bin".*

    *You will also have a log file called "port_trace".*


    ---------------
    Restoring Notes
    ---------------
    *Restoration process is the same as the making backup process, in preparation and all other stuff.*

    *All backup files should be placed in bin folder of QPST installation folder before running codes.*

    *The codes to restore are different than backing up, be sure to use the correct codes.*


    ---------------------
    Restoring LUNs Backup
    ---------------------

    LUN0
    fh_loader.exe --port=\\.\COM --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN1
    fh_loader.exe --port=\\.\COM --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN2
    fh_loader.exe --port=\\.\COM --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN3
    fh_loader.exe --port=\\.\COM --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN4
    fh_loader.exe --port=\\.\COM --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN5
    fh_loader.exe --port=\\.\COM --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    LUN6
    fh_loader.exe --port=\\.\COM --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs


    --------------------
    Restoring Partitions
    --------------------
    FTM
    fh_loader.exe --port=\\.\COM --sendimage=ftm.bin --start_sector=23816 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst1
    fh_loader.exe --port=\\.\COM --sendimage=modemst1.bin --start_sector=32 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    Modemst2
    fh_loader.exe --port=\\.\COM --sendimage=modemst2.bin --start_sector=544 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSG
    fh_loader.exe --port=\\.\COM --sendimage=fsg.bin --start_sector=1056 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

    FSC
    fh_loader.exe --port=\\.\COM --sendimage=fsc.bin --start_sector=1568 --lun=5 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs


    ---------------------------
    Finishing Notes & Questions
    ---------------------------
    *You may close CMD, Partition Manager, and exit QPST when finished*

    *Hold power and vol- until your phone boots. It may take a moment, wait til the phone turns on and release.*

    *Can I restore my phone's backup to my friend's phone? Yes, but do not expect it to cure IMEI problems of the second phone.*
    2
    I wrote a small console app, based on your guide.
    QFIL Helper v1.0.0.61

    In its current state It’s capable of:
    • Making a fully automated backup of all visible partitions
    • Looking for hidden partitions (still in testing stages)
    • Making automated LUN backup for LUNs: 0,1,2,4,5
    • Making manual LUN backup for LUNs: 3 and 6
    I left the backup of LUN #3 and LUN #6 in the capable hands of the user, since there’s no way for me to calculate the exact sizes of those partitions based on the PartitionsList.xml alone, and because they’d probably differ for every Android version and phone model.

    The app was tested with:
    • Android 9 / LG v50 (V450PM Sprint)
    • Qualcomm USB Driver v1.00.37
    • QPST v2.7.496
    I haven't upgraded my phone yet, so I can't guarantee that this app will work with Android 10 or above.