[G3 General] topet2k12001:
OWNERS OF OTHER LG G3 VARIANTS ARE WELCOME TO TRY!

IMAGEPREPGUI: AUTO-SCRIPT (GUI) FOR LG G3

Tested on: LG G3 D858HK
​

FEATURES:

1. Rooting of your LG G3

2. Automatic (no-touch) extraction of aboot.img and laf.img from your KDZ or TOT firmware via the KDZ and TOT Extractor Tool by @bullghost

3. Download and installation of "bump'd" TWRP custom recovery for certain LG G3 models/variants

4. Sharpening Mod Script of Skin1980 included (to be manually flashed upon reboot to TWRP Custom Recovery) - this will "bump" your Kernel (boot.img) and will apply your desired sharpening level of the LG G3's display

5. "Bump" your boot.img (as part of the TWRP installation process of ImageprepGUI)

6. (Experimental): optionally "bump" your "un-bump'd" TWRP custom recovery.img

REQUIREMENTS:

1. Installed LG G3 Drivers for your device

2. Enabled Developer Options and USB Debugging on your LG G3

3. Backed up all your important files to your external storage or computer

4. Downloaded a copy of your KITKAT Firmware (in KDZ or TOT format)

5. Your custom recovery (TWRP) for your respective LG G3 model (Imageprep has download feature but only for certain models)

DOWNLOAD LINK:

ImageprepGUI v2.6: "installer" format. Double-click it to run. It will detect any previous installations of ImageprepGUI and delete them (as in ALL files within).

Imageprep Folder in Google Drive: this contains sub-folders of various LG G3 variants/models where you can manually download aboot.img, laf.img, and "Bump'd" TWRP custom recovery (recovery.img). Users can also download previous versions from here as well as corresponding video tutorials.

Downloadable Video Tutorial

Video Tutorial on YouTube

HOW TO USE:

1. Navigate to C:\ImageprepGUI and you will see ImageprepGUIvx.x.exe (where x.x is the version number). Run this app. It is recommended that you create a shortcut to your desktop or Windows taskbar for easy access.

2. Follow the step-by-step instructions.

DETAILED STEP-BY-STEP (HOW TO USE):

At the first screen with selections (radio buttons):

1. Acquire aboot.img and laf.img: you can choose to...

a. download from my Google Drive, or

b. have the full KDZ or TOT firmware handy and let ImageprepGUI extract them for you, or

c. manually run the KDZ and TOT Extractor tool and manually extract them

IMPORTANT: DO NOT SKIP THIS STEP IF YOU'RE GOING TO INSTALL TWRP. YOU MUST MAKE A SELECTION. SKIPPING THIS STEP IS OKAY IF YOU ARE ONLY ROOTING THE DEVICE.

2. Acquire "Bump'd" TWRP (recovery.img): you can choose to...

a. download from my Google Drive, or

b. have your own "bump'd" TWRP (recovery.img) handy

IMPORTANT: DO NOT SKIP THIS STEP IF YOU'RE GOING TO INSTALL TWRP. YOU MUST MAKE A SELECTION. SKIPPING THIS STEP IS OKAY IF YOU ARE ONLY ROOTING THE DEVICE.

At the next page:

1. You can choose to...

a. root ONLY (there are 2 methods available), or

b. skip rooting (if you are already rooted prior) and then proceed to TWRP installation, or

c. root+install TWRP in one go (there are 2 methods available, since there are 2 ways to root)

What's new:

June 24, 2015:

1. Fixed: COM Port not detected completely (reported by [MENTION=4048733]re_di[/MENTION])

2. Fixed: pushing of BusyBox and Sharpening Script Mod happens only if user selects rooting, so those who select to ONLY install TWRP will not get BusyBox and Sharpening Script Mod (and without BusyBox, boot.img will not be "bump'd")

Older versions:

June 10, 2015:

1. There's a new rooting method by @digital-bug. It's supposed to address an issue for newer Lollipop firmwares that don't work well with rooting methods that make use of a Linux Shell Script. The effect is the same though. As the author notes, if you are already rooted prior, please DO NOT re-root. If you want to try this new method of if you want to switch between rooting methods, please back up your files and re-flash your device.

2. ImageprepGUI version 2.5 already includes the new rooting method. Users now have two choices of rooting.

3. Re-enabled the option for users to try and "bump" their un-"bump'd" TWRP Custom Recovery (recovery.img). This is not a 100% guarantee, but choice is always good so I put it back there.

June 08, 2015:

1. GUI Enhancement: added "Select Options"

2. GUI Enhancement: search for file window (no longer need to navigate to Windows File Explorer to copy-paste Image Files)

3. Additional options for acquiring KITKAT Image Files (aboot.img, laf.img): users are not tied to only one method of acquiring these Image Files. They can choose to download them or use their own copy

4. Users can now open a new session of the KDZ and TOT Extractor Tool (for manual operation)

5. Users can select various options to manipulate how ImageprepGUI will behave to their liking, such as skipping certain sections of the process

June 01, 2015:

1. Changed the order of steps. Extraction of firmware (for aboot.img and laf.img) and recovery.img (TWRP "bump'd" custom recovery) come first before rooting and TWRP installation.

2. Put back "installer mode".

3. Pushing of files is in GUI mode. Only the actual booting to Download Mode and rooting are the ones that remain in DOS (command line) mode.

May 26, 2015:

1. Rooting portion of the script is non-GUI for the moment (GUI is not rooting the device properly and is currently being investigated)2. Disabled "installer" and delivering the file via "zip" file instead (after downloading, extract the entire "ImageprepGUI" folder to your Drive C:\)

2. Disabled "What do you want to do today?". This means that users will have to go through the entire "complete" process, start-to-finish

May 22, 2015: addressed (hopefully) an issue where the LG G3's COM port is not detected, causing ImageprepGUI to quit/exit. Please test and let me know if this release works now.

Update Notes:

June 10, 2015 Update: ImageprepGUI v2.5 Released

Thanks to @digital-bug for sharing the new method of rooting the LG G3. This new approach has the same end-result and effect as the existing methods. Where it's different is how it is being executed. Instead of a Linux Shell Script, it makes use of an "indirect" input (like "piping"), as if the user manually entered the command via a keyboard.

AS ALWAYS, BACK UP FIRST BEFORE TRYING!

Update Notes for Previous Versions:

June 08, 2015 Update: ImageprepGUI v2.4 Released

Thanks for all your feedback and support!

This new release has some GUI Enhancements as well as an added window: "Select Options". This way, users can now influence how they want ImageprepGUI to behave. For example, if users only want to root their device, they can simply select "Skip this step" under "Image Files Acquisition" as well as "TWRP Custom Recovery Download". Mix-and-match to your liking!

There is also a new rooting method, which aims to address rooting issues for LG G3's that sport the newer firmware versions. We'll see if this new method can be added to ImageprepGUI.

Video tutorial is still in the works for this new version. I inadvertently deleted a copy of my LOLLIPOP KDZ firmware so I have to download it again in order to reflash and record a new video.

June 01, 2015 Update: ImageprepGUI v2.3 Released

Again thanks for those who have tried and provided feedback!

Some users reported that the rooting phase/portion of the script will continue towards completion, even if the device was not booted to Download Mode properly. I have tested since version 2.2 and didn't encounter the issue. Nevertheless, I modified it a bit so that only the rebooting to Download Mode, and the actual rooting, will be run in MS-DOS (command line) mode.

Also, I have reversed the order of steps. Extraction of image files (from a full KDZ or TOT firmware) as well as TWRP download (or manual copy-paste to the "twrp" sub-folder) will come first. Once these two steps are done, then "Rooting" and "TWRP installation" will be the next steps. This seems to be a more logical order: prepare the needed files first, and then run the rest automatically.

May 26, 2015 Update:ImageprepGUI v2.2 Released

Thanks for those who tried ImageprepGUI (a.k.a. Imageprep v2.0) and for reporting issues with it.

The rooting script does not run properly in GUI mode. Since I don't want you guys to wait, I stripped down the GUI piece of the "rooting" stage for the meantime until I get it all figured out. There's a lot going on (personal life) at work so I anticipate my progress to be slow.

Also, I momentarily removed the option of running only portions of the "complete" process. In version 2.2, users will have to go through the entire process from start to finish. I'm going back to the drawing board to design a better flowchart of events so as to further reduce problems that may inadvertently be caused by human error.

In version 2.2, there is no "installer" mode. It's just going to be a plain ".zip" file. When you open the ".zip" file, you will see a folder named "ImageprepGUI". Extract the folder itself to your Drive C:\ (so effectively, all the contents will go along with it).

May 11, 2015 Update: Back on Track: ImageprepGUI (Imageprep v2.0)

I've been out for quite a while due to family (personal matters) and work (gunning for a promotion!) and would like to apologize for my absence. But rest assured I continuously worked on Imageprep whenever I had the time. And so, I now present to you ImageprepGUI. This is my first attempt at programming for a GUI app/software so please go easy on this. :)

DISCLAIMER:

This product is not an official LG software and is therefore not endorsed by LG Electronics in any way. As such, this is a 'try-at-your-own-risk' approach. Please make sure to back up your important files when trying this for the first time. I take no responsibility for any undue outcomes resulting from the use of this software.

ABOUT IMAGEPREPGUI:

Imageprep is NOT a one-click application, and it is intentionally created to be so. Because its objective is to support multiple models/variants of the LG G3, it is developed in a way that the process will pause or exit if something is "off", so expect that there will be pop-up messages every now and then. Think of them as "security measures" to reduce the mistakes from a user point-of-view. In other words, Imageprep takes a balanced approach to automation, features, and "mistake-proofing" in order to provide a virtually seamless experience.

In order to support multiple LG G3 models/variants, Imageprep involves the ability to download TWRP Custom Recovery (recovery.img) for your specific LG G3 model/variant. If you are not comfortable with what is being downloaded, or if your device is not listed, there is an option to place a copy of your TWRP custom recovery (recovery.img) manually. Other image files (aboot.img and laf.img) will be extracted via the "KDZ and TOT Extractor Tool" which will be done automatically.

Outside of downloading and/or extracting, the rest of the actual rooting process is done automatically, just like how Imageprep was in its early stages.

FINAL WORDS:

Having no prior background in programming, this is my first-ever attempt to create a GUI application. While I have tested this application extensively and to the best of my abilities, nothing is perfect. Hence as a general rule: always back up your important data before embarking on activities such as this!

Imageprep is continuously evolving and is therefore a work-in-progress so I am open to suggestions, requests to add more LG G3 models/variants, and even small talk via chat or forums. I always strive to visit the XDA forums to respond to queries or Private Messages whenever time allows me.

I hope this application helps you in every simple way. Enjoy!

With kind regards from the Philippines,

- topet2k12001 @xda[/URL]

CREDITS:

@Chainfire for SuperSU.

@autoprime for his tutorial on “Manual Firmware Update” to keep root/”bump’d”, and for guiding and giving clarity by explaining what happens in the background when I conducted my experiment.

@Skin1980 for allowing me to use the commands from his Sharpening Script Mod (for sharpening options) as well as the commands for "live bumping" ("bumping" on-the-fly) of the boot.img.

@jcase for putting up the the “Stump” thread. Without “Stump” we would not have enjoyed “root” functionality of the LG G3.

@thecubed for “Bump”. Such a wonderful tool. It opened the doors of customization for the LG G3.

@bullghost for the “KDZ and TOT Extractor” tool. This nifty tool allowed us to extract the important components (partitions) of the LG G3’s firmware.

@mronly1love for “Bump Windows version”. It is through this tool that I was able to “bump” my TWRP 2.8.4.0.

@hoangnova for his post about the partition layout of the LG G3. It helped me confirm how I should flash aboot.img.

@itsbighead for his post that helped me understand what aboot.img, laf.img, and sbl1.img meant, and for the same post that explains what causes the LG G3 to boot into an error screen that says “certificate verify”.

@gzkenny from bbs.gfan.com for “D858HK TWRP 2.8.4.0”. It is a purely Chinese website and I actually spent time understanding everything even with Google Translate. I’m not sure if he/she will able to read/understand this but I thank him/her too.

@6ril1 for sharing to me how to "bump" a boot.img. Also thanking him for sharing a secret/tip, which actually inspired me to start learning how to program (I'm starting with simple scripts for now). This is the reason why I was able to come up with "imageprep".

@Unjustified Dev for sharing a method of rooting the Android Lollipop without downgrading to Kitkat.

@zurny for proof-reading the guide and pointing out clerical errors or any other errors that may cause future problems for the readers.

@DE52 and @ ravi.vydianathan for spreading the word about this thread and helping to explain the logic to fellow XDA members

@avicohh for automating the rooting commands via a script

@jac10000 for modifying the scripted rooting commands to add TWRP

@somboons for One Click ROOT+TWRP Recovery for Lollipop Stock Firmware