[LG G8 Questions & Answers] netmsm:
note: I'm not responsible for any loss, damage, harm or anything at all.

use qfil.

1. extract any kdz you wanna flash using kdztools master with the "-c" command.

1-a. by this command you get the true GPT files needed for partitioning alongside other partitions but we just use these GPT partitions here.

2. again, extract the kdz this time using "-x" command.

2-a. running the command will give you "OP" and other partitions but we just use these OP partitions now.

2-a-a. search the forum and find the solution how to make a correct OP partitions. or use google translate on this link.

3. for the third time, extract kdz this time using "kdztools.exe". here, we use all partitions except GPT and OP the we got in steps 1 and 2.

4. go to dload.

5. run qfil and go to partition manager. (you need firehose and some settings, search for them you'll find them all in a breeze).

6. if I were you I'd back up all partitions, but for emergency just back up the ftm, modem, modemst1, modemst2, fsg and fsc partitions.

7. delete all partitions.

note: do not disconnect the phone, do not close qfil, even do not close the partition manager window or you will get into trouble.

8. now we need to re-partition the ufs flash using GPT files we got in step 1.

9. rename gpt files from the pattern "gpt_main#.anythin" to "lun#.bin". so gpt_main0.anythind will become LUN0.BIN and gpt_main1.anything will turn into LUN1.BIN.

10. copy LUN files into the qpst/bin directory.

11. go to the directory of qpst/bin and run cmd there. (hold shift button and then right click...)

12. go to device manager and find the port number of the phone connected in dload.

13. find "COM999" in codes in step 14 and then replace "999" with the port number of your device (you found in step 12) in below codes.

14. in the cmd line execute these codes:

LUN0
fh_loader.exe --port=\\.\COM999 --sendimage=LUN0_Complete.bin --start_sector=0 --lun=0 --num_sectors=4328072 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN1
fh_loader.exe --port=\\.\COM999 --sendimage=LUN1_Complete.bin --start_sector=0 --lun=1 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN2
fh_loader.exe --port=\\.\COM999 --sendimage=LUN2_Complete.bin --start_sector=0 --lun=2 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN3
fh_loader.exe --port=\\.\COM999 --sendimage=LUN3_Complete.bin --start_sector=0 --lun=3 --num_sectors=2048 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN4
fh_loader.exe --port=\\.\COM999 --sendimage=LUN4_Complete.bin --start_sector=0 --lun=4 --num_sectors=383995 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN5
fh_loader.exe --port=\\.\COM999 --sendimage=LUN5_Complete.bin --start_sector=0 --lun=5 --num_sectors=3072 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
LUN6
fh_loader.exe --port=\\.\COM999 --sendimage=LUN6_Complete.bin --start_sector=0 --lun=6 --num_sectors=1024 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

15. if everything goes right you will get "done" in the cmd window.

16. after getting "done", close partition window and re-open it to see your partitions are back.

17. now you need to restore partitions.

17-a. except op partitions you made in step 2, we use files for other partitions we got in step 3.

18. make sure all partitions have the "img" extension in their names.

19. use following codes in cmd (run in qpst/bin directory), remember to correct "COM999" before executing codes.

19-a. copy partition files you got from step 2 and 3 into qpst/bin directory.

fh_loader.exe --port=\\.\COM999 --sendimage=mpt.img --start_sector=6 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=drm.img --start_sector=8198 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=p_persist_lg.img --start_sector=11782 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=sns.img --start_sector=11782 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=ssd.img --start_sector=15366 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=persist.img --start_sector=15368 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=misc.img --start_sector=23560 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=ftm.img --start_sector=23816 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=power.img --start_sector=32008 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=encrypt.img --start_sector=43272 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=eksst.img --start_sector=43400 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=rct.img --start_sector=43528 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=fota.img --start_sector=43656 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=srtc.img --start_sector=46216 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=pstore.img --start_sector=48264 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=els.img --start_sector=48776 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=operatorlogging.img --start_sector=52872 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=eri.img --start_sector=56968 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=carrier.img --start_sector=59016 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=persdata.img --start_sector=71304 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=metadata.img --start_sector=87688 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=vendor_a.img --start_sector=91784 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=vendor_b.img --start_sector=526984 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=system_a.img --start_sector=962184 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=system_b.img --start_sector=1944200 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=product_a.img --start_sector=2926216 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=product_b.img --start_sector=3450504 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=OP_a.img --start_sector=3974792 --lun=0 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------LUN1--------------------------------------------LUN1--------------------------------------------LUN1--------------------------------------------LUN1-----------------------

fh_loader.exe --port=\\.\COM999 --sendimage=LUN1.img --start_sector=0 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=xbl_a.img --start_sector=6 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=xbl_config_a.img --start_sector=902 --lun=1 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------LUN2--------------------------------------------LUN2--------------------------------------------LUN2--------------------------------------------LUN2-----------------------

fh_loader.exe --port=\\.\COM999 --sendimage=LUN2.img --start_sector=0 --lun=2 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=xbl_b.img --start_sector=6 --lun=2 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=xbl_config_b.img --start_sector=902 --lun=2 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------LUN4--------------------------------------------LUN4--------------------------------------------LUN4--------------------------------------------LUN4-----------------------

fh_loader.exe --port=\\.\COM999 --sendimage=aop_a.img --start_sector=6 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=tz_a.img --start_sector=134 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=hyp_a.img --start_sector=1158 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=modem_a.img --start_sector=1290 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=mdtpsecapp_a.img --start_sector=57610 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=mdtp_a.img --start_sector=58634 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=abl_a.img --start_sector=66826 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=dsp_a.img --start_sector=67082 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=keymaster_a.img --start_sector=83466 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=akmu_a.img --start_sector=83594 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=boot_a.img --start_sector=83722 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=cmnlib_a.img --start_sector=108298 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=cmnlib64_a.img --start_sector=108426 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=devcfg_a.img --start_sector=108554 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=qupfw_a.img --start_sector=108586 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=laf_a.img --start_sector=108606 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=vbmeta_a.img --start_sector=120894 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=dtbo_a.img --start_sector=120910 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=uefisecapp_a.img --start_sector=127054 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=imagefv_a.img --start_sector=127566 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=raw_resources_a.img --start_sector=128078 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=core_nhlos_a.img --start_sector=130126 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=sid_a.img --start_sector=173646 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=secdata.img --start_sector=347542 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=devinfo.img --start_sector=347549 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=dip.img --start_sector=347550 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=apdp.img --start_sector=347806 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=msadp.img --start_sector=347870 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=spunvm.img --start_sector=347934 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=splash.img --start_sector=349982 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=toolsfv.img --start_sector=358339 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=logfs.img --start_sector=358595 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=cateloader.img --start_sector=360643 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=logdump.img --start_sector=361155 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=storsec.img --start_sector=377539 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=multiimgoem.img --start_sector=377571 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=multiimgqti.img --start_sector=377579 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=uefivarstore.img --start_sector=377587 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=catefv.img --start_sector=377715 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

fh_loader.exe --port=\\.\COM999 --sendimage=catecontentfv.img --start_sector=377843 --lun=4 --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs

19-a. some of the partitions I wrote code for them may be missing in your files, they are not necessary.

20. in partition directory find "modem_a" partition and right click on it, press read data.

21. go to "C:\Users\YOUR_USER_NAME\AppData\Roaming\Qualcomm\QFIL\COMPORT_#".

22. you will face some files, one of them has the size of 160-170MB. open it using a hex editor.

22-a. if it is empty so the process of restoring partitions has not done in a correct way. so find the problem and solve it.

22-b. if it is not empty, go to the step 23.

23. now, close partitions manager window, wait for 10 seconds. then, press power and vol-down for 10 second. you will here a sound of unpluging device from the computer.

24. wait for 10-3- seconds, the phone will boot up. if don't you are in trouble :)) and you need to restore the original partition files that I recommended to back up all of them in step 6.

25. if you get OPID Mismatched, then you need to modify OP then restore it. just restore OP after modification.

26. enjoy.

maybe I've missed sth...

for those who just try to flash their G8 (or other LG phones, just you need to find the right offset of partitions, which can be easily found by qfil partition manager, and modify my codes. as far as I know, most of paritions for sdm855 lg phones have the same characteristics) but they cannot because of OPID lock, they may follow the above instructions for any destination kdz, even Korean kdzs, then restore modemst1, modemst2 and fsg using qfil partition manager in the end.

that's all, have fun =)