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 @re_di)
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
1. EXTRACT
This is a "sub" tutorial or how-to on extracting the necessary image files from an LG G3 firmware (KDZ or TOT)
In this example, we are extracting Lollipop system.img, boot.img, and modem.img based on the "Kitkat Downgrade" method.
For the "No Downgrade" (Manual and/or "Imageprep) method, it's the same procedure...only different files to extract.
1. Extract “system.img”, “boot.img”, and “modem.img” from your Android Lollipop firmware via the “KDZ and TOT Extractor”.a. Download the KDZ and TOT Extractor from @bullghost’s thread.
b. The file is in .zip format. Extract/uncompress it to a folder/location of your choice. This will be your working folder.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
c. Put a copy of your Android Lollipop firmware in the working folder. At this point, the working folder should look like this:
d. IMPORTANT!!!! Make sure that your File Explorer is set up to show “File Name Extensions”. In Windows 8, click on “View” and check “File name extensions”.
e. Run the Extraction Program and select the Android Lollipop firmware.
f. Extract the contents of the KDZ file. Basically, we want to get the DZ file from within it.
g. Now we will extract the contents of the DZ file. Notice that your working folder will be filled with files, ending in “.bin”.
h. Next is to merge the “system” partial files to create “system.img”.
i. The resulting “system.img” file is inside a newly-created sub-folder named “merge-output”.
j. Copy boot_xxxxxx.bin and modem_xxxxx.bin and paste them inside the “merge_output” sub-folder.
NOTE: the numbers may vary on different LG G3 variants. It doesn’t matter; just do it!
k. Rename those files to “boot.img” and “modem.img”. You’re done with Step 1!
NOTE: If you missed Step 1.d, you will end up renaming only the file name as boot.img or modem.img but the file extension will still be “.bin”. That’s why you need to follow Step 1.d!!!
2. Transfer
March 15, 2015 Update: these are the steps from the original "No Downgrade" Manual Approach. There is now an automated script called "Imageprep" that makes the process more convenient for you by entering only a single command in the Android Terminal Emulator. Head over to Post #153 for the details!
2. Transfer Needed Filesa. Save original copies of the files in your External Storage (removable microSD).i. Android Lollipop system.img, boot.img, and modem.img
ii. Sharpening Mod script
iii. “Bump’d” TWRP
iv. Tools for flashing the extracted .img filesb. Using a File Manager, create a folder named “flash2” (without the quotes) in your Internal Storage.
c. Place a copy of Android Lollipop system.img, boot.img, and modem.img inside “flash2” folder.
d. Place a copy of the following to your Internal Storage:i. The “tools for flashing the extracted .img files” (Flash2Boot.zip, Flash2Modem.zip, and Flash2System.zip)
ii. “Bump’d” TWRP
iii. Sharpening Mod scripte. Last chance to install “bump’d” TWRP recovery! Please make sure you do this!
3. Flashing
March 15, 2015 Update: these are the steps from the original "No Downgrade" Manual Approach. There is now an automated script called "Imageprep" that makes the process more convenient for you by entering only a single command in the Android Terminal Emulator. Head over to Post #153 for the details!
3. Flashinga. Power off the device
b. Boot to TWRPi. Press/hold volume down and power.
ii. At the “LG Life’s Good” boot screen, release for 1 second and then press/hold volume down and power again. You will see a “Factory Reset” screen.
iii. Select “Yes”. You will do this twice.
iv. Device will boot to TWRP custom recovery.c. Flash the “.img” filesi. In TWRP, select “Install”. Look for Flash2System.zip and flash it. This will take some time.
ii. Repeat for Flash2Boot.zip.
iii. Repeat for Flash2Modem.d. Flash the Sharpening Mod script. Select your preferred sharpening level. At the end of the wizard, the script will “bump” your Android Lollipop boot.img.
e. At the screen where it says “Finished”, click “Next”.
f. In this screen you will be asked to reboot. Un-select the box for rebooting and exit the script! If you do not un-select, it’s possible that TWRP will skip the prompt to install SuperSU!
g. Exit the TWRP custom recovery by selecting “Reboot” and then “System”.
h. You will be prompted that “SuperSU is not installed” and you will be offered to install it. Swipe the slider found at the bottom to install it.
i. It might take a while for the first reboot especially if you have a lot of user apps installed prior.
j. You’re done. Congratulations!
Troubleshooting and Q&A
Q: No radio signal (wifi, 2G/3G/4G/LTE)
A: The Lollipop modem.img was not flashed because you forgot to rename the modem_XXXXX.img as modem.img. Or, you forgot to put modem.img in the "flash2" folder. Remember, the Flash2Modem.zip script is programmed to look for modem.img in the "flash2" folder.
A: You have various versions (Kitkat and Lollipop) of boot.img, modem.img, and system.img and you accidentally mixed them up. Make sure that you organize your files properly (put them in folders) and then try the process again.
Q: I get the “certificate verify” error when booting to Android.
A: The Lollipop boot.img was flashed successfully, but was not “bump’d” because you forgot to flash the Sharpening Script Mod BEFORE booting to Android as per the tutorial. Also, make sure as well that at the end of the Sharpening Mod Script, un-select the box for rebooting. You should reboot from TWRP’s main reboot menu and not from the Sharpening Script Mod.
A: You have various versions (Kitkat and Lollipop) of boot.img, modem.img, and system.img and you accidentally mixed them up. Make sure that you organize your files properly (put them in folders) and then try the process again.
A: You got adventurous and flashed the Lollipop aboot.img to the device.1. Hopefully you had a “bump’d” TWRP before you followed this procedure.
2. Extract the Kitkat aboot.img from your Kitkat KDZ (the Kitkat version that you were on prior).
3. Power off the device.
4. Boot into TWRP (yes you can boot to TWRP even with that error – as long as you had TWRP installed prior).
5. Plug the device to your computer. The device will open/show in Windows File Explorer. Transfer the Kitkat aboot.img to your Internal Storage.
6. Power off and then boot to TWRP again, and then reflash aboot.img.
7. You may end up booting properly to Android but losing “bump’d” hence, you will lose TWRP. That’s fine.
8. Assuming you are able to boot properly to Android, install Android Terminal Emulator.
9. While in Android, install the “bump’d” TWRP via Terminal Emulator, following the steps from the “Bump” thread.
10. Power off the device and boot into TWRP.
11. Flash the Sharpening Mod Script. It will “bump” your Lollipop boot.img properly.
12. Reboot to Android.Q: After following the procedure, the phone boots to LG "Life's Good" but after that, I don't see the splash screen/boot animation. Instead, I just see a black screen with "security error" written in the middle of the screen.
A: The Lollipop boot.img was not flashed because you forgot to rename the boot_XXXXX.img as boot.img. Or, you forgot to put boot.img in the "flash2" folder. Remember, the Flash2Boot.zip script is programmed to look for boot.img in the "flash2" folder.
Q: I seem to go into a “boot loop” to TWRP.
A: Common mistake is that people accidentally flash recovery.img to the “Boot” partition, or flashing boot.img to the “Recovery” partition. Reflash the proper Image file to the appropriate partition. If the problem persists, @autoprime created a flashable zip that will fix this problem.
Q: I get the “certificate verify” error when booting to Download Mode, or I can’t boot to Download Mode.
A: You got adventurous and flashed the Lollipop aboot.img, laf.img, or sbl1.img (or other partitions that were not covered in this tutorial) to the device. See long answer from above.
Q: How do I "bump" my custom recovery (TWRP)?
A: D858HK users: you can download a copy from the "Requirements" section in Post #1. Popular variants: the more popular variants (like the D855 - International variant) are very well supported; please search for TWRP as a keyword under the LG G3 section. Less popular variants: there are two (2) tools that you can use. One is "Bump Windows version" and another is "Open Bump". It's easy; just drag-and-drop your custom recovery image (TWRP) to bump.exe (for Bump Windows) or open_bump.py (for Open Bump).
Q: Okay, now I have "bump'd" my custom recovery. How do I install it? I obviously can't flash it via TWRP because I don't have it installed yet.
A: There are two ways to do it. One is done manually. You need to be rooted (Kitkat) and should have Android Terminal Emulator installed. And then you will have to enter some commands. The other way is to do it via "Flashify" (it's an app). For details and instructions, please visit the official "Bump" thread; Post #1.
Q: Do I need to have a custom recovery (TWRP) installed? There are not a lot of custom ROMs for the D858HK anyway so it doesn't make any sense.
A: Yes, you do. Even if you do not intend to install custom ROMs. Installing custom ROMs is just one of the features of a custom recovery such as TWRP, but remember - its main purpose is to provide you with advanced options of recovering your device in the event of a "brick" situation. I have had many instances when I totally "bricked" my device and was saved because I created a full system backup using TWRP. Oh, and make sure that you have installed TWRP and created a full system backup while you are in Android Kitkat!
Q: Do I need to "bump" my current (Kitkat) boot.img and flash it to the device too, before I follow this tutorial?
A: So I downgraded back to Kitkat and tried upgrading again. One with a Kitkat "bumped" boot.img, and another without (stock). In both scenarios, the device was upgrade properly (with root, "bump'd" boot.img, and "bump'd" TWRP). I therefore conclude that it doesn't matter. When you update to Lollipop as per this tutorial, you will end up overwriting the Kitkat boot.img with the Lollipop boot.img and "bumping" anyway (at the part where you flash the Sharpening Script Mod).
Q: There are new threads for rooting Lollipop without downgrading. Here and here. How is your method different?
A: Yes I have read them as well. Great guides, actually. However, those are strictly for rooting only. No custom recovery, no "bump". If you want to maintain "bump'd" boot.img and "bump'd" recovery.img (custom recovery such as TWRP), you will still end up having to follow the steps in this guide - downgrade to Kitkat first, extract Lollipop KDZ firmware, and flash only system.img, boot.img, and modem.img. If you are not tinkering around and are confident enough that you won't do adventurous things with your device, it's okay not to have a custom recovery. Therefore, merely rooting your device would be sufficient. In my case, I have "bricked" my device multiple times and was saved by custom recovery, so I would say I need it.
I asked the question in one of the threads: http://forum.xda-developers.com/showpost.php?p=59328257&postcount=9
But eventually, I already saw the answer. Fellow XDA member (Recognized Contributor) @6ril1 also confirms this: http://forum.xda-developers.com/showpost.php?p=59325441&postcount=55
6ril1 said:
Bumps (kernel and recovery) needs KK bootloader (aboot partition and maybe others little partitions that constitute bootstack in KK version :aboot,tz,sbl1,rpm,persist,laf,dbi) for booting. And if you downgrade bootstack you have to bump kernel too for being able to boot firmware from KK bootsack.
You can extract LP recovery(with kdz extractor tool) and reinject it for returning to LP rooted , as you were before trying to inject bumped TWRP, or you can try to downgrade bootstack and bump kernel for being able to use custom recovery on the stock LP.
Click to expand...
Click to collapse
So, I created another guide (within this thread - see First Post for the link) on how to achieve that.
Q: After following the how-to guide, I lost my Download Mode! Whenever I try to go to Download Mode, it just hangs and show a "Certificate Verify" error!
A: This happens when you followed the "No Downgrade" approach and did not flash Kitkat versions of the "Boot Stack" (persist.img, dbi.img, laf.img, sbl1.img, rpm.img, and tz.img). The how-to guide for "No Downgrade" approach has been updated accordingly to include this step. Those who followed the "Kitkat Downgrade" approach do not need to flash these image files anymore because they are already on Kitkat version.
There is an easy way to do this. XDA member @6ril1 created a TWRP-flashable zip file to automate it. The zip file was originally created for the D855, but you can replace its contents with ".img" files for your LG G3 variant. Just follow the instructions in the link provided.
Well done, topet. Very very much appreciated your hard work, it must took you long time to finish the write up, sacrifice your weekend joyful time. Again, thanks a lot.
Sent from my LG-D858HK using XDA Free mobile app
supralex said:
Well done, topet. Very very much appreciated your hard work, it must took you long time to finish the write up, sacrifice your weekend joyful time. Again, thanks a lot.
Sent from my LG-D858HK using XDA Free mobile app
Click to expand...
Click to collapse
Thanks for your appreciation! If you get this to work please let me know.
topet2k12001 said:
Thanks for your appreciation! If you get this to work please let me know.
Click to expand...
Click to collapse
sure, I will probably do it after the weekend
Sent from my LG-D858HK using XDA Free mobile app
You're simply the best...
Thank you for your fine, hard work and very detailed documentation. :good::good::good:
My D858HK is "Lollipop-Rooted" now.
Thank you, thank you, thank you!!!
mystery007 said:
Thank you for your fine, hard work and very detailed documentation. :good::good::good:
My D858HK is "Lollipop-Rooted" now.
Thank you, thank you, thank you!!!
Click to expand...
Click to collapse
Glad to hear that, @mystery007!
Can't wait for feedback if this baby will accept CM12.
ch4dwick said:
Can't wait for feedback if this baby will accept CM12.
Click to expand...
Click to collapse
Hi @ch4dwick,
CM12 has already been out for the LG G3: http://forum.xda-developers.com/lg-g3/orig-development/rom-cyanogenmod-12-official-nightly-t2995524
...that's for the D855 variant (the International variant).
I believe that the D858HK variant will also work, but it won't have the dual-SIM functionality. See this thread for an explanation: http://forum.xda-developers.com/showthread.php?t=2297570
I tested your solution on D855 euro 32go + 3 Go ram and I have android L but no wifi work
i tried this process about a week ago without the sharpening zip bit at the end. Everything goes smooth, system img takes 5 min to flash, but it flashes successfully along with the modem and boot zips. I get prompted to install SU prior to rebooting and do so. the addition of the sharpening zip seemed to change nothing as the i get the same outcome as i did without it . when rebooting, i get a small reddish *security error* logo in the middle of the screen for 3 seconds and then the phone shuts off. any idea why ? im on the d852 variant
Has anyone tried this for AT&T?
jac10000 said:
I tested your solution on D855 euro 32go + 3 Go ram and I have android L but no wifi work
Click to expand...
Click to collapse
Hi @jac10000,
Let's try to troubleshoot: can you try 3G/4G/LTE instead and see if it works? If it does, then it means you were able to flash modem.img properly and the problem is probably the Internet connection. If you still can't go online with 3G/4G/LTE, please try reflashing the modem.img. Also please make sure you are flashing the modem.img that you extracted from your firmware, and not a modem.img that you got somewhere else.
tmjm28 said:
i tried this process about a week ago without the sharpening zip bit at the end. Everything goes smooth, system img takes 5 min to flash, but it flashes successfully along with the modem and boot zips. I get prompted to install SU prior to rebooting and do so. the addition of the sharpening zip seemed to change nothing as the i get the same outcome as i did without it . when rebooting, i get a small reddish *security error* logo in the middle of the screen for 3 seconds and then the phone shuts off. any idea why ? im on the d852 variant
Click to expand...
Click to collapse
Hi @tmjm28,
I did encounter this particular error when I was discovering everything, so I have an idea. Based on my experience, it is caused by one or all of the following:
1. Having a full Lollipop firmware flashed to the device. So even if you "bump" the boot.img (for example, via the Sharpening Script Mod), it won't work. You must flash ONLY system.img, modem.img, and boot.img (which will be "bump'd" when you flash the Sharpening Script). In technical terms, the reason why this process is done manually is so that some other key partitions will stay as "Android Kitkat" (laf.img, aboot.img, sbl1.img, tz.img, rpm.img and some others). If you happened to flash a full Lollipop firmware/OS before you tried this procedure a week ago, then those key partitions were already overwritten and will now become "Android Lollipop", whereby "bump" can't work. So I would propose a full downgrade to be sure that everything will be back to Kitkat and when you follow this process again, you will have assurance that you are flashing only the Image files specified in the guide.
2. The boot.img of D852 can't be "bump'd" properly by the Sharpening Script Mod. You may try other methods of "bumping" your boot.img (please search for Open Bump, or try the Bump Windows version that I used to bump my TWRP 2.8.4.0 - I put a hyperlink to that thread in the first page, under "Requirements").
3. You might have had multiple copies of boot.img and you got confused which one you flashed. It happened to me when I was experimenting - sounds dumb, I know, but it happens.
Now, the thing is I don't know how exactly you flashed your device a week ago. Therefore I won't be able to trace the actual cause. I would suggest starting from scratch (full downgrade to Kitkat, and then start over and follow the procedure).
I'm expecting someone to have actually done it in the future. I'd do it myself but I'm still busy at the moment to be actually redoing stuff from scratch if I fail to succeed in flashing CM12 on the D858HK. Oh, well, maybe later this year.
Wow, very much appreciate the time and effort you put not only into answering my question but also all the other ones! I'm almost positive I did a full factory reset using the LG flash tool ( tot dll) last week when I attempted to flash the zips, but I will try it again and see if it works. I believe your response labeled number 2 is what is holding me back. As of right now I have no idea what bumping TWRP means, therefore I will look into it further and attempt the process again after I understand what you mean by number 2?
just finished upgrading, and its work.. thanks dude for your hard work, really appreciate.....
but still confuse, what is sharpening mod for? and whats the best value number? sorry for my stupidity, just newbie in smartphone...
thanks again, and keep up the good work.
Wow thanks for this howto, I can confirm this worked on my D852G! Everything looks good so far!
OK Please note (4-25-17) this message is a work in progress, as I slowly restore my system.
This is a listing and hopefully helpful listing of what I did (right and wrong)
in upgrading my Systemless-rooted (suuser) phone from 6.01 to 7.00 (nougat)
# 1. it did not work, and I went back to 6.01 successfully using the twrp recovery
I have previously used Bender's guid (here) to get the system-less root on 6.01.
essentailly, here's the best plan. Use the Minimal ADB and Fastboot package (MADB &F) (here)
(Explanation: the MADB&FB package will allow you do do LOTS of stuff related to updating your phone, with very little grief.)
it also includes the ability to automatically "push" a package over your usb connection if the ZIP file doesnt load right. **THIS will come in handy later!
Once MADB&F is installed, make note of your directory, and then make sure you start your dos window (for pc users) as an administrator!
BTW, if I HADN'T made the "TWRP backup" of my system, I'd be Sh*t out of luck right now...", because I screwed up the 7.0 upgrade.
the technical problem was that I had no data, no modem, no way of getting data/voice in/out.
SIMPLY using the TWRP restore fixed me!!!
(so far, we have MADB&FB, downloaded and bender's (chainfire) rootless guide.
Next you want to download the current firmware image for your phone. This will be a lifesaver, I promise!
3) Download a TWRP image (this will MAGICALLY load on your pc when you tell it you need help! Look HERE
(Athene is the Motorola Codename for the motoG4+)
3) copy the athene TWRP image into your madb&FB directory to make it easy to load
4) next, (you still haven't touched your phone yet, you realize: (skipping some basics here, you can search here on XDA to find more info)
a) plug your phone into your pc
b) make sure you are a developer
c) make sure your phone shows you are connected to your pc for file transfers, NOT for charging
5) in your MADB&FB directory, (aka a dos/(admin) window) type the following:
all commands at this point will take place in whatever directory you installed Minimal ADB & Fast boot (MADB&FB)
Connect your phone to your PC and open MADB&FB, check the connection with:
adb devices
return should include your "serial-no" and "device".
6) next, on pc, tell the system to reboot your phone to the bootloader!
Reboot into bootloader with:
adb reboot-bootloader
and check again with:
fastboot devices
7) Next you are going to download TWRP to your phone (not permanently, just for a bit!)
fastboot. flash recovery twrp-3.0.2-0-athene.img
Now you have TWRP (Team Windows RECOVERY PROJECT) loaded.
SO.. THIS is where you create a backup of your current stuff using the backup options.
NEXT:
take the suUser2.78 (stateless rooting), and once your backup is done, install it from TWRP
Then (I was) back to 6.01 rooted.
NEXT: 7.0 and then rooting... (will update tomorrow)
did a successful upgrade to 7.0,
then unsuccessfully tried to sideload supersu2.78, which bricked loader
then downgraded again to 6.01 (and rooted again, ok)
will continue tomorrow.
need working phone for now..
cheers to all, and to all, a happy spelunking!
You can't root factory Nougat as is, it is well encrypted.
You need to replace first the kernel with the ElementalX one, or you will end up with bootloops.
Only after that you can do SuperSU, but only with the latest beta.
A few pointers from your story:
1)As you've found out the hard way, you won't be able to update to Nougat if you have root and/or TWRP, because the update requires a stock system - stock recovery, system and no modifications (bootloader status doesn't matter). In other words, you'll need to unroot and restore your stock recovery - might be easier to reflash the stock system, probably the quickest way to flash a stock ROM (and update to Nougat) is to use the fastboot ROM. https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369 Of course, this will remove root and TWRP, as well as potentially wipe your data, so back up accordingly. This should flash the NPJ25.93-14 build on your device, which appears to be the latest global build.
1a)Also, if you flash Nougat this way, your bootloader and GPT partitions will be updated, so if you wish to downgrade to Marshmallow at any point, when flashing do not flash these partitions from the Marshmallow ROM. Fastboot should stop you, but a brick may occur if these get flashed.
1b) You may find in the Guides section TWRP backups of Nougat builds, I don't recommend using these to update your system with. Granted, they have most of the Nougat system in a TWRP backup, but some crucial firmware (e.g. the baseband) is not included, and may cause you issues if your device is not formally flashed to Nougat.
2) As SoNic67 has already mentioned, the stock kernel security will cause your device to bootloop should you choose to try to root following the Marshmallow method. If you wish to use SuperSU, follow this guide: https://forum.xda-developers.com/mo...de-root-moto-g4-plus-supersu-android-t3587918 You may wish to use a more up to date TWRP than the official 3.0.2 (I recommend shrep's TWRP 3.0.3 n4 here:https://forum.xda-developers.com/mo...covery-twrp-3-0-2-r3-moto-g4-g4-plus-t3494337) Whatever you do, ensure you flash first the ElementalX kernel before you flash the SuperSU v2.79 SR3 beta (https://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133), or apply the systemless fix with earlier SuperSU versions as directed in the aforementioned rooting with SuperSU guide. Else you'll be having bootloops or your device will not boot whatsoever. Here's my steps in successfully rooting Nougat: https://forum.xda-developers.com/showpost.php?p=71817346&postcount=225. Good luck either way.
echo92 said:
A few pointers from your story:
[...]
1b) You may find in the Guides section TWRP backups of Nougat builds, I don't recommend using these to update your system with. Granted, they have most of the Nougat system in a TWRP backup, but some crucial firmware (e.g. the baseband) is not included, and may cause you issues if your device is not formally flashed to Nougat.
[...]
Click to expand...
Click to collapse
After updating my US retail xt1644 to nougat, by restoring totally-stock marshmallow then taking the OTA, I wiped data and made a *complete* TWRP backup using @Shreps' unofficial 3.1 TWRP build (https://moto.shreps.fr/Moto G4 (athene)/recovery/twrp-3.1.0-athene_shreps.img).
This version of TWRP allows backup/restore of the full set of firmware partitions including baseband, DSP, etc.
In other words, I believe the TWRP backup folder in the following .zip file provides a one-stop path to the latest xt1644 USRET firmware by doing a restore from TWRP 3.1.0.
https://drive.google.com/file/d/0B4XobQzgZVHyRTlmSDMtYkdZeUU/view?usp=drivesdk
My only uncertainly is if the ota process modified the partition table in a way that might make this backup image incompatible with the xt1644 still in the marshmallow state.
I've often wondered if I (or a more skilled enthusiast) couldn't build a TWRP-flashable .zip that would setup the partition table, update the baseband, etc. This is what I've grown used to from devs on other phones I've had, but perhaps there's something about the way moto does things that makes this problematic.
Sent from my Moto G4 Plus using Tapatalk
bmeek said:
After updating my US retail xt1644 to nougat, by restoring totally-stock marshmallow then taking the OTA, I wiped data and made a *complete* TWRP backup using @Shrep's unofficial 3.1 TWRP build (https://moto.shreps.fr/Moto G4 (athene)/recovery/twrp-3.1.0-athene_shreps.img).
This version of TWRP allows backup/restore of the full set of firmware partitions including baseband, DSP, etc.
In other words, I believe the TWRP backup folder in the following .zip file provides a one-stop path to the latest xt1644 USRET firmware by doing a restore from TWRP 3.1.0.
https://drive.google.com/file/d/0B4XobQzgZVHyRTlmSDMtYkdZeUU/view?usp=drivesdk
My only uncertainly is if the ota process modified the partition table in a way that might make this backup image incompatible with the xt1644 still in the marshmallow state.
I've often wondered if I (or a more skilled enthusiast) couldn't build a TWRP-flashable .zip that would setup the partition table, update the baseband, etc. This is what I've grown used to from devs on other phones I've had, but perhaps there's something about the way moto does things that makes this problematic.
Sent from my Moto G4 Plus using Tapatalk
Click to expand...
Click to collapse
Nice one, hopefully that'll help more XT 1644 users I'm still not sure if TWRP can backup/flash the baseband by itself, but I don't have a XT 1644 to test. I imagine your backup will need a clean flash (wipe data/cache/Dalvik) to work?
The OTA process does update the partition table, but as far as I know, that should not prevent you from flashing back to Marshmallow/Nougat as you wish, so long as you did not try to downgrade the GPT/bootloader.
There was an effort to create TWRP flashables of the stock ROMs a little while ago (you can see the thread here: https://forum.xda-developers.com/moto-g4/development/fxz-athene-twrp-flashable-fastboots-t3562147) which if I understood it created flashable radios and ROMs from the firmware files we have. We can't touch the GPT/bootloader since, as I recall, you need a signed stock firmware to do so (and besides, downgrading GPT might be asking for a brick). I recall some users mention they were able to run Nougat TWRP flashes on the MM bootloader/GPT without issue.
There were issues with simply flashing the Nougat 93-14 radio baseband files for some US users, losing LTE in the process and appears the only resolution was to flash the stock ROM - I don't know what the cause was (perhaps no/incorrect CDMA support in the radio files?). Your TWRP flash is from a US based phone so may have better luck in that department, and will likely behave on your device since that OTA has updated all the firmware on your device that TWRP isn't able to touch. I still am not sure if we can use this TWRP backup to update on a MM device without issue, but only one way to find out...
Hey there,
I need help, hope you have some for me . I want to use the 6.0.1. OpenKirin OmniROM on my phone and struggle even figuring out a way to get there.
I just bought a used ALE-L21 DualSIM phone with the B602 Build and EMUI 4.0.3 installed. The device is not rooted, nor has its bootloader been unlocked. The EMUI update service does not offer me any patches.
Could someone please line out to me which steps I have to take in order to root my ALE-L21 and get this ROM to work?
Disclaimer: No, I'm not just a lazy moron who does not want to read other topics on this forum - I'm a mere user with less-than-average knowledge of Android development or stuff like that. And I just can't make complete sense of the various posts I've found, since English is not my mother tongue and there seems to be a whole bunch of ways to do certain things with a phone. Well, since obviously I don't want to brick my new phone, I'm not too sure how to best puzzle together the pieces this Forum offers me. It would be insanely helpful if I could get a list that reads out something like:
1. Action - Source (for needed files, e.g.) - Result, on to step 2
2. Action - Source (for needed files, e.g.) - Result, on to step 3
3. ... and so on...
Okay, just so you see that I'm not entirely lost, I'm gonna show you the picture which is currently in my mind.
From what I understand so far, there's the following steps to get there (please rectify or rearrange steps as far as needed):
1. Update the device to Vanilla EMUI 4.1, Build B895 or B896 (I am currently downloading the B896 Build from this forum - which one is recommended? My phone is DualSIM)
2. Unlock Bootloader (What's the best way to do it? Huawei CS? Heard it's not even sure you get an answer. DCUnlocker? Wants money... Please help me clarify)
3. get TWRP 3.1.1.0 (I already have the IMG file, how do I get it to run on my phone?)
4. Root the device (I'd like to go with MAGISK, does anyone have a link for a MAGISK build confirmedly working on ALE-L21?)
5. Do some magic with TWRP (Which steps exactly?)
6. Flash the ROM Zip file via TWRP
7. Flash Gapps via TWRP
Is that about it?
As I said, please feel free to add to/adjust my list!
Thanks in advance,
Pako
If you haven't already install minimal adb tools on computer (windows) found here :
http://bit.ly/2jxX4ya
You then need to unlock bootloader using minimal adb tools and the unlock code
Unlock Code:
http://bit.ly/2z9EFhV
Unlock Bootloader Method in this thread here:
http://bit.ly/2oIASBs
After you are done unlocking the bootloader
Install twrp find that here :
http://bit.ly/2ok9BTi
There was a tool that was here somewhere to install twrp but I will link to my copy here
http://bit.ly/2ATBgRP
What you do is put the twrp image file in data folder
then change the name of the twrp file to TWRP_3.1.1-0_ALICE.img or
edit the install.bat file line data\fastboot.exe flash recovery data\TWRP_3.1.1-0_ALICE.img to the name of your twrp file
Once twrp is installed then you can pick which rom you want
The 6.0 roms arent going to be supported anymore so i suggest going for 7.0 ROM
I'm on AOSPA which is the cleanest and has good battery life
To install 7.0 rom you need B895 or B896 found here on the first post:
http://bit.ly/2jypIij
this is installed through twrp (which is accessed when Phone is off by holding volume up + power then let go once it vibrates or connect the phone to the computer and then type adb devices then adb reboot recovery in minimal adb tool)
once in twrp you need to install the B895.zip or B896.zip file then reboot your phone will boot into emui
you need to install twrp again as B895 or B896 wipes it
After installing twrp you can then install any custom rom of your choice
let the rom boot and then go back into twrp and install gapps found here: "http://bit.ly/1JOWjUqi recommend nano or even pico pick am64 7.1
I would also recommend installing Galactic forced deepsleep http://bit.ly/2ANVdbS
Hey there,
thank you very, very much for your comprehensive walkthrough! (Almost*) everything worked to perfection and I am now a happy user of OpenKirin's OmniROM 6.0.3. mod! Yeah, no 7.x... but I'd prefer to wait with that until the "issues" section of AOSPA does not contain any relevant things anymore. OmniROM seems to have no issues anymore, so I'm content with my choice. I will now follow your last advice and flash the Deep Sleep Mod to improve my device's battery life, and then I'm just happy.
* = The only issue I encountered was when having flashed TWRP, the device booted to the crappy EMUI eRecovery instead of TWRP. I solved this issue using this advice from another thread.
So, once again, thank you! All you xdaDevs, keep on developing ways to improve people's lives with their android devices!
Cheers,
Pako