[LG G8 Guides, News, & Discussion] netmsm:
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

Spoiler content hidden.

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

Spoiler content hidden.

Creating Backup of Vital Partitions (FTM, Modemst1, Modemst2, FSG, FSC)

Spoiler content hidden.

Restoring Partitions

Spoiler content hidden.

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 ;)