[G3 General] topet2k12001:
HI [MENTION=2464043]rk2612[/MENTION],

ImageprepGUI already has the Bump script built-in. The way ImageprepGUI works is that it does the extraction, unpacking, repacking, and bumping of boot.img "on-device" (meaning, it does the whole thing on the device itself - it extracts/dumps the actual boot partition as "boot.img" onto the device itself, and does the unpack/repack/bump while the "boot.img" file is in the device).

Before I eventually came up with ImageprepGUI the way it is today, I started out with simple Shell (Linux Command Line) scripts. And yes, I came across open_bump.py before. I did notice though that open_bump.py does not completely (or properly?) bump the "boot.img" if it is being applied on an extracted boot.img from a KDZ. The "on-device" method was the one I got to work properly. You can actually open the "open_bump.py" script in a text editor (e.g. Notepad++ or similar) if you want to study it further.

There's also a KDZ/TOT Extractor Tool here in XDA and it has a nice GUI interface - no need to fiddle with scripts (in case you're not comfortable with them)...there's actually one here in XDA that's script-based and it's using Python. I have a hunch that that's what you used when you attempted to extract the image files. Anyway, the KDZ/TOT Extractor is based off that same Python script - just that this one has a GUI. And that GUI Tool is also integrated into ImageprepGUI (which has some cool automation added to it, by the way :) )

That said, someone already created a TWRP-flashable zip of Marshmallow 30A firmware (for the D858HK) and that is the one by [MENTION=5565972]Artshell[/MENTION]. Just check few posts above this (by [MENTION=224742]danzel[/MENTION]) for the direct download link.

I was actually trying to make one as well but since [MENTION=5565972]Artshell[/MENTION] already beat me to it, I didn't have to reinvent the wheel. I have personally tested his TWRP-flashable zip and I can confirm that it is an "untouched" (meaning no mods) 30A Marshmallow firmware for the D858HK. Still, I am pursuing my own attempt to also create a TWRP-flashable zip. For my own learning. :)

Since it's a TWRP-flashable zip, then the assumption is that you are currently running stock Lollipop that's already rooted (and therefore, assumption includes your current device has boot.img already bumped).

So the way to go about it, as an overview, is:

1. Flash device to stock Lollipop

2. Root/install TWRP/Bump the boot.img. Remember, in the "Lollipop" sense of LG G3, the concept is that the Android Bootloader (aboot.img) and LG's "Download Mode" (laf.img) are Kitkat version. And then the boot.img is Lollipop version, but "bumped" (i.e. "signed" or "patched" with a Kitkat signature). So in effect, the rest of the system (aboot.img and laf.img) will recognize boot.img because it is signed as Kitkat (that's what "bump" does, in a crude way of explaining). ImageprepGUI does all of that for you; just make sure you already have a Kitkat version of laf.img and aboot.img handy because these files will be asked when you use ImageprepGUI.

3. Now that your device is ready ("bumped" boot.img, laf.img and aboot.img are Kitkat version, TWRP already installed), you can simply flash [MENTION=5565972]Artshell[/MENTION]'s TWRP-flashable Marshmallow 30A zip.

Bonus: There's a thread for "unofficial" TWRP version 3.0. You can download it and use that version during the ImageprepGUI procedure. Just choose to download the D856 model/variant (yes, D856 and D858HK have the same Kernel Source Code - you can verify it from LG Opensource website).

In closing, your D858HK setup is running like this:

1. System partition: Marshmallow 30A version (such as [MENTION=5565972]Artshell[/MENTION]'s TWRP-flashable zip)

2. Boot partition (boot.img): Lollipop version. That's the one that was "bumped" via ImageprepGUI (or other methods available)

3. Android Bootloader (aboot.img): Kitkat version

4. "Download Mode" (laf.img): Kitkat version

5. all other partitions (modem.img, etc.): Lollipop version