[Android Software/Hacking General [Developers Only]] tecknight:
I thought I would post this here as I thought that several LG devices do not have .kdz files available, making it very problematic to restore the firmware to a stock state.

I originally encountered this problem with the LG Aristo 2 plus, a mid-range T-Mobile phone.

Apparently, T-Mobile does not want any .kdz files available, so I designed a flash utility capable of flashing an image just like LGUP does. Originally, I was writing multiple custom scripts to do different things to the phone.

Then I decided, why not write one script and have it interpret different "flash profiles" to do just about anything you might want to do to the phone. What I arrived at seems generic enough that I am sure it could be used on any LG phone and probably even non-LG phones.

My utility does require root to be able to flash partitions, but fortunately LG has enabled bootloader unlocking on the cv1 series of devices (Aristo 2, Aristo 2 plus, K8+), so root is easily obtainable.

The source images for the stock device can be easily obtained in either of 2 ways:

1. Running a firmware backup using the NoKDZ utility itself.

or

2. Running LGUP in developer mode and selecting the DUMP option. This will provide images of any partition even w/o root.

Details on installing LGUP developer mode are here:

Install LGUP Dual Mode(Dev/User) on your Windows PC

Here are some example "flash profiles":

@ Aristo 2 plus root suite

% Flashes Magisk patched boot image and TWRP recovery all other partitions are stock Aristo 2 plus

M LG

$ Aristo 2 plus

# LM-X212TA

* cv1

< boot recovery

+ TWRP.img recovery
+ RB_M17.1_EVD_A2P.img boot
+ miscnull.img misc
+ fotanull.img fota

> modem aboot abootbak tz tzbak sbl1 sbl1bak rpm rpmbak devcfg devcfgbak cmnlib cmnlibbak cmnlib64 cmnlib64bak keymaster keymasterbak dsp sec rct apdp msadp laf lafbak recoverybak factory raw_resources raw_resourcesbak persist system OP

= This utility will flash your phone to stock except for boot and recovery
= This is firmware version X212TA-10j, Android 7.1.2, the current release as I type this (10/27/2018).
= A backup of your current boot and recovery will be saved prior to any partitions being flashed
= TWRP will then be flashed to recovery and a patched boot image will be flashed to boot.
= The boot image is patched for systemless root by Magisk. It has also been patched to
= disable encryption and verity and to remove/disable the LG root checking tool
= The firmware images included with this install package are for the LG Aristo 2 plus device
= and should only be used on an Aristo 2 plus or a variant using identical hardware such as the Aristo 2 or K8 plus.
= Note that using this utility on an Aristo 2 or K8 plus will effectively change the device into an Aristo 2 plus
= By typing a y at the next prompt, you accept full responsibility for anything that may happen to your device.

? Press Y to accept and flash or any other key to abort.

@ cv1 wipe misc and fota

% Nulls out misc and fota partitions possibly fixing TWRP boot loop

M LG

$ Any cv1 device

# Various

* cv1

+ miscnull.img misc
+ fotanull.img fota

= This utility will zero out your misc and fota partitions
= If your phone boots only into TWRP, this may remedy the problem.
= By typing a y at the next prompt, you accept full responsibility for anything that may happen to your device.

? Press Y to accept and flash or any other key to abort.

As you can see, the flash profiles are relatively short and powerful and do not require any real coding skill.

I will post more details soon, in the mean time you can see some practical application of NoKDZ here:

Restore some or all of your rooted LG Aristo 2 plus partitions to stock 10j firmware w/o LGUP