[TUT/GUIDE] [/COLOR][U]Step by Step Guide[/U] in Rooting any H818P and H818N.

makwell24

Senior Member
Sep 11, 2012
60
26
0
[TUT/GUIDE] Step by Step Guide in Rooting any H818P and H818N.
From Own STOCK .KDZfile >> Own stock system.img >> Own ROOTED system.img>> Flashing/rooting your LG G4 H818P/N


This is compatible with H818P and H818N versions. Do this with confidence. Read and understand carefully, type codes as it is(sensitive case). Do it slowly. No need to rush!

Method 1: Involves the downloaded .kdz file to extract system.img (Desktop only)
Method 2: Involves Desktop and LG G4 to extract the system.img


Requirements.
1.) Windows Drivers

Download the content here if your want to DOWNLOAD the Latest KDZ file and use Method 1 (Safer method in my opinion).
2.) a.) VC_redistinstaller this is needed for windows lg firmware extract to work
__b.) Windows LG Firmware Extract.zipTo get the system.img from kdz file using method 1
__c.) H818P V10F <COUNTRY> )the .kdz file. (i think the country name in the version automatically adjusts base from where your location is. Mine became ESA (same as previous downloaded from philippines kdz link) although I download it from the other country kdz link.
__d.) For H818N and H818P (I don't know the site where the latest firmware can be found, but pluging your IMIE here(in the url) will give you link for your latest kdz file) http://csmg.lgmobile.com:9002/csmg/b2c/client/auth_model_check2.jsp?esn=YourIMEIGoesHere
This option "d.)" In my case I found it link starting in. "pkg03" but it does not continue to download, so I change that to "pkg02" and it worked.

3.) LG_Root.zip

4.) Ubuntu and universtal USB installer (to install ubuntu into a 8GB USB Drive -> These will be used to in step inject root.

5.)Inject Root.zip the file that contains the root.


Method 1 (If you download the kdz file)
Step 1. Getting the system.img (using Windows Desktop)

1. ) After Downloading all requirements, Install the drivers and the VC_redistinstaller.
2.) Create one folder and name it "adb" folder in "C:". This will be our working folder. Copy all the files you have downloaded there and UnZip LG_Root.zip, Inject_Root_G4.zip and windows LG firmware Extract.zip into that folder.
3.) Plug in LG G4, then Double click "ports.bat" look for the "COM<number>" of the same line of LGANDNETDIAG1 . it is the second COM, mine is COM4 ( just also to check if LG G4 is recognized and is installed properly)
4.)a.) Open the WindowsLGFirmwareExtract.exe.
4.b.) 1. Click Open > select the kdz file. b.) check all
4.b.) 2. Click Extract KDZ ---processing--- b.) check all
4.b.) 3. Click Extract DZ ---processing--- b.) check all
4.b.) 4. Click Merge System.bin --- processing---
5.) a.) go back to the "adb" Folder that you created in step 2. then open "merge_ouput" folder., you will now see there the Stock System.img
5.) b.) Copy System.img from the merge_ourput to the adb folder (C:\adb)


Method 2 (if you already have stock H818P V10F and don't want to download the kdz file)
Step 1. Getting the system.img (using Windows Desktop and LG G4)

1.) After Downloading all requirements, Install the drivers.
2.) Create one folder name it "adb" folder in "C:". This will be our working folder. Copy all the files you have downloaded there and Unzip LG_Root.zip and Inject_Root_G4.zip into that folder.
3.) Plug in LG G4, then Double click "ports.bat" look for the "COM<number>" of the same line of LGANDNETDIAG1 . it is the second COM, mine is COM4 ( just to check if LG G4 is recognized and is installed properly)
3.) Put your phone to download mode: turn it off. then hold the volume up(+) button then plug the LG G4 to the Desktop.
4.) Double click "ports.bat" find and remember the "COM<number>" of the same line of LGANDNETDIAG1 . it is the second COM, mine is COM4.
5.) Hold shift and right click in any empty space in the "adb" folder. Choose open command windows here.
6.) Type: Send_Command.exe \\.\COM[*insert your number here] mine is Send_Command.exe \\.\COM4
7.) Then nothing will happen to the LG G4 phone. It is normal.
8.) Copy and paste to command window: dd if=/dev/block/mmcblk0 bs=8192 skip=55296 count=529920 of=/data/media/0/system.img
9.) Notice the # is gone. Wait for it to Come back. this takes a few minutes.
10.) Once the # is back. Type: LEAVE
11.) The device will automatically reboot. Now go to your file manager and see if system.img is in phone's internal storage. Copy the system.img from phone'sinternal memory to the folder we created. (C:\adb)



Step 2. Setting up Ubuntu (using Windows Desktop)

1.) Plug in the 8GB USB Drive
2.) Open the universal USB installer follow the installation , select Ubuntu, then browse and select the Ubuntu .iso file you download in the requirements, select your USB drive , and just continue normal install without selecting any other options until Finish. (now your USB will be named "Install Ubuntu")
3.) Open the USB flash drive folder. open wubi.exe, select "demo and full installation" select "help me boot from CD" click finish and then restart.
3.) After the restart, there will be option to boot on Ubuntu. and select it to boot.


Step 3. Injecting root to system.img (using Ubuntu from step 2)

1.) On Ubuntu. Click the ubuntu logo on the upper right. then type "Terminal" then select the Terminal application
2.) On the terminal type: sudo -i and then you will see [email protected]
3.) Then type: cd C:\adb or cd then drag the "adb" folder you created where the inject_root_g4.zip and its unzip files is located.
3.) Now, the name in the terminal will be longer. type: chmod +x autoroot.sh
4.) Then, type: sudo ./autoroot.sh
5.) If the "command is invalid" appears or something like that...
6.) Type: sudo sh autoroot.sh -this worked for me.
7.) If you are successfull, you will see that the system.img is changed to rootedsystem.img DO NOT RENAME THIS.
8.) Close the terminal. Then turn off the Desktop. Then remove the USB drive.
9.) Turn on and boot on Windows


Step 4. Flashing the rooted system.img (using Windows Desktop and LG G4)

1.) Copy the created "rootedsystem.img" to your phone's internal storage.
2.) Put your phone to download mode: turn it off. then hold the volume up(+) button then plug the LG G4 to the Desktop.
3.) Double click "ports.bat" find and remember the "COM<number>" of the same line of LGANDNETDIAG1 . it is the second COM, mine is COM4.
4.) Hold shift and right click in any empty space in the "adb" folder. Choose open command windows here.
5.) Type: Send_Command.exe \\.\COM[*insert your number here] mine is Send_Command.exe \\.\COM4
6.) Then nothing will happens to the LG G4 phone.
7.) Copy and paste to command window: dd if=/data/media/0/rootedsystem.img bs=8192 seek=55296 count=529920 of=/dev/block/mmcblk0 this is DIFFERENT CODE from method 2 step 1.
8.) Notice the # is gone. Wait for it to Come back. this takes a minute or a few minutes. mine was 2 minutes.
9.) Once the # is back. Type LEAVE
10.) The device will automatically reboot. and just wait for it to boot. It will take a bit longer than usual. It will do Optimizing apps screen. and now you are rooted!


Hit thanks if you appreciate. Hope I helped!

All of this was compiled and written (method 1 and Step 2) by me, @makwell24, for the H818P and H818N Users. The method 2 step1, step 3 and step 4 was guided and base from this post by @hackarchive