[G4 General] hackarchive:
Hi everyone. As I found out there's root for the G4 but doing this isn't easy especially if your variant is hard to find or has less users. This may result in you waiting for longer than you should. This thread is for those who can take things into their own hands and do it themselves. The tools are available everywhere but I'll give you the best order and steps. I'm using the China LG G4 H818 Dual SIM variant but this method is UNIVERSAL FOR ALL LG G4s.

The process will involve extracting a system image, injecting root and reflashing this image. Most of the steps are effortless and need just copy and paste with keen eyes. Do it slowly. You need an

Ubuntu

installation for step 2 of this 3-step tutorial. I used universal USB installer and put in on my 8GB USB. Anywhere will do so far as it boots&works. Beware this thread is not dumb-proof but this will not wipe your data or void your warranty if done successfully.

Step 1 -> Getting the proper system image.

Check here and skip to step 3 if you have your rootedsystem.img

>Don't worry because this doesn't require searching. It is from your device. Every device has a system partition and this method will pull it out as an image without root required.

1--Make sure all drivers are installed properly. I'll not be talking about this. We're on XDA not kindergarten.

2--Download the LG_root file or send command file from here and extract it. US Carrier specific check here

3--Put your device in download mode and connect it to your PC.

4--Open(double-click duh) port.bat and make sure to write down the number after com. There maybe different com numbers but choose the com on the DIAG1 line and write down that number. This is important.

5--Hold shift and right-click in any empty space in the extracted folder. Choose open command windows here.

6-- In that copy and paste this

[FONT=Lucida Console][COLOR=#ff8c00]Send_Command.exe \\.\COM[/COLOR][COLOR=#00ff00][*insert your number here][/COLOR][/FONT]

7--Now you're in send command mode. Nothing looks different on your phone but that's ok. It should just remain in download mode.

8-- On the computer screen in the window you now see #.

9--Now in this post copy the Backup system to internal storage command specific to your device model number. Check in you settings >general >about if in doubt. This is the most important step. Copy the whole line of code. Highlight with your mouse, select everything on the line and copy.

10--You didn't come all this way to fail so do it. Remember it is device model specific.

11-- Paste it in the command window and hit enter. It should take a while so wait until you see#reappear.

12--Now typeLEAVEall in capital letters. Your device will reboot. Check using the file manager if you have a file called system.img in your internal storage. If yes step 2 is next and you did well. If no repeat it and follow the steps properly. Make sure drivers are installed especially windows 10/8/8.1 users. Check device manager

Step 2 -> Root injection.

1--Prepare your Ubuntu USB or virtual machine or computer.

2--Download inject_root zip from here and extract.

3--Copy the system.img from your phone to the extracted inject_root folder on your PC.

4-Reboot into Ubuntu.

5--Here open a terminal.

6--Gain root access on Ubuntu by typing or copy and paste sudo -i

7--You should either be asked for your password which you have to enter or if you used a USB drive like me you'll see the name change toroot@Ubuntu....

8--Navigate to the inject_root folder by using cd commands. This can also be done by typing cd then [space] then dragging and dropping the folder into the terminal and hitting enter.

9--You'll now see the name in the terminal become longer with the name of the folder in it.

10--Now type chmod +x autoroot.sh

11--Hit enter then sudo ./autoroot.sh

12--If you get any thing like command not recognized or something of the sort use sudo sh autoroot.sh

-That worked for me.

13--If you're successful the name of the file should change from system.img torootedsystem.img

-Please note don't rename the files. Leave them as they are.

14--Now go back to Windows let's finish this.

Step 3 ->Root

1--Transfer the rootedsytem.img to your phones internal storage.

2--Put your phone in download mode and connect it to your PC.

3--Get into send command mode as in step one.

-Put your device in download mode and connect it to your PC.

-Open port.bat and make sure to write down the number after com. There maybe different com numbers but choose the one that has DIAG1 on the same line as it. Note it down this is important.

-Hold shift and right click in any empty space in the extracted folder. Choose open command windows here.

- In that copy and paste this

Send_Command.exe \\.\COM[*insert your number here]

-Now you're in send command mode. Nothing looks different on your phone but it's find. It should just remain in download mode.

4-Now grab your command to flash system.img line of code from this post. It isn't the same as step one. Copy that an paste in the command window. Make sure it is for your device. They are model specific.

5--This should take a while so wait until you see the # again.

6--After thatLEAVEand upon reboot you should have root.

To Un-root just flash a KDZ file compatible with your device here.

Testimonies

Marshmallow and root situation read here

Hit thanks if you appreciate. Hope I helped.

Credits to them whom without this won't be possible :good:

Thecubed

Team Codefire

ManhIT