Remove All Ads from XDA

[HOWTO][H815] Complete Guide to Unlock Bootloader + TWRP + Root + Xposed + ViperFX

312 posts
Thanks Meter: 205
By htr5, Senior Member on 1st May 2016, 12:35 PM
Post Reply Email Thread

Disclaimer and Warning: By attempting any of the processes outlined below, you accept full responsibility for your actions. Neither the contributors of this thread or XDA are responsible for any damage caused. Some of the actions may void your warranty.

I recently went through all of this and it took me quite a while to dig through dozens of threads so I decided to make a new one bringing all of these great things together specifically for the H815. Brace yourselves for the Android right of passage...

LG G4 H815 Marshmallow 6.0 Guide.
1. Unlock the Bootloader
2. Install the custom recovery: TWRP
3. Root
4. Install Xposed
5. Install Viper4Android
6. Unbrick Guide
7. Debloat
8. Battery Optimisations

- First make sure you backup any files you've accumulated already as everything will be deleted! Also make sure you have a good amount of battery remaining. -
(I had 17% because I like to live on the edge)

- Quicklinks:
1. Unlocking the bootloader officially
This is the first step in voiding your warranty so is the point of no return. I've read in some places that you may be able to do this without voiding your warranty but I did not look into this.

i) Visit the official LG website to obtain a bootloader unlock file. First click the 'How to Unlock the Bootloader' tab and then the button 'Starting Unlocking the Bootloader' at the bottom of the page:
ii) Sign up to a free developer account using a real email address (it's needed)
iii) Enter your IMEI number which you can find on your box, under the battery or by dialing *#06# on the phone. Keep this tab open
iv) On your phone, go to settings -> About phone -> Software info and then tap on Build number 7 times. Go back to Developer options under general settings and enable 'USB debugging' and 'Enable OEM unlock'.
v) Install the LG G4 drivers from here:
vi) Download and install minimal adb 1.4 from here:
vii) Browse to where you installed this and then right click and select 'Open command window here'. By default, this is in C:\Program Files (x86)\Minimal ADB and Fastboot
viii) Plug in your phone to your computer using a reliable USB port and cable (USB 3.0 doesn't seem to work). Enter "adb reboot bootloader" into the command window without quotations. Wait for it to reboot and then type "fastboot oem device-id"
ix) This fastboot command will return a character string. This is the Device ID which is needed to generate your unique unlock key. It will look like this:
Example Device ID (PC User)$ fastboot oem device-id
(bootloader) Device-ID
(bootloader) CD58B679A38D6B613ED518F37A05E013
(bootloader) F93190BD558261DBBC5584E8EF8789B1
To generate your unlock key, you will need to paste together the 2 lines of output into one continuous string without "(bootloader)" or white spaces. In the example above, the Device ID would be:
CD58B679A38D6B613ED518F37A05E013F93190BD558261DBBC 5584E8EF8789B1
Paste this into the LG website form and confirm. It will email you an unlock.bin file which you need to put in the same folder as your adb.exe file.
x) Now enter "fastboot flash unlock unlock.bin" into the command window. This should take seconds.
xi) Now check it is unlocked. By entering “fastboot reboot” and waiting for it to reboot. Then enter "adb reboot bootloader" again and then "fastboot getvar unlocked" and verifying that the response is "unlocked: yes".
Your bootloader should now be unlocked.Keep this command window open for the next step.

Thanks to shimp208 for minimal adb

2. Installing TWRP Custom Recovery
This will install a custom recovery allowing you to make backups and flash zip files.

i) With your bootloader freshly unlocked, you can boot up the device and set it up. Go through the startup guide thoroughly without skipping as these settings are going to stay.
ii) Download the latest TWRP img file from and place it in the same folder as your adb.exe file and unlock.bin. Now rename it to lgg4-twrp.img without changing the file extension!
iii) Now also copy the lgg4-twrp.img file to your phone's SD card using a USB cable.
iv) Enable USB debugging again
v) Open up a command window again by Shift+Right clicking in the folder with adb.exe.
vii) In the command window, type "adb reboot bootloader". Wait to enter the bootloader and then type "fastboot boot lgg4-twrp.img" and hit enter. The device should now restart in TWRP but it is not installed yet.
vii) Once TWRP starts, select 'install' and then tick 'images' at the bottom.
viii) Find the lgg4-twrp.img file and select it. Then in the next menu select 'recovery' and swipe the bar at the bottom to confirm flash.
ix) You should then see 'Image Flash Complete' so can select back then reboot and system.

(If installing from an external SD card, go to 'mount' from the main screen and then tick to mount your ext SD card. Go back and continue as normal)

Thanks to TeamWin for TWRP
Thanks to Adam Myczkowski for TWRP install corrections.

3. Root
By now, you should have an unlocked bootloader and a custom recovery installed.

If you use snapchat, you won't be able to log in with a rooted phone. So it would be a good idea to install it now and log in. You remain logged in rooting and installing Xposed. Quicklink:

i) Download SuperSU from and place it on your phones internal storage.
(this works fine but you can get the latest from here:
ii) Make sure you have USB debugging enabled again.
iii) Now with your phone on and plugged in, enter recovery by opening adb as before and entering "adb reboot recovery".
If you have problems, see the end of this section
iv) Once in the recovery, hit install and browse to the SuperSU file we just downloaded.
vii) Swipe flash and then reboot into the system.
The phone should now boot and be rooted. If not, see the notes at the end of this section.
You can use to verify if you have root.
• If your phone does not turn on then pull out the battery and USB cable and then put just the battery back in. Now Press and hold the volume down and power buttons together. Then first LG logo should appear. Now continue holding the down button but release the power button for one second and then press it again and hold.
You should now see a screen asking you to wipe everything. Navigate with the down arrow and press the power button for both screens. This should now take you to TWRP recovery and NOT actually wipe the phone.
• If you had a bootloop then follow the above steps to get into the recovery and then you will need to download the following onto the phone: [1.5GB]
Once in the recovery, you are able to connect the phone to the computer for regular data transfer in order to transfer the file. (I had problems with the microSD card so I would avoid it).
This system image seems to be missing the FM Radio, LG Remote and SmartSettings, Voice Recorder and Quickmemo apps. To get these back, go to general settings -> About phone -> Update centre -> App updates and download/install as necessary.
• If you still could not get into the recovery at all then follow the unbrick steps below in section 6.
Thanks to autoprime for the system images [url[[/url]
Thanks to Chainfire for SuperSU

4. Installing Xposed

i) Download Xposed from here: and place it on your phone or SD card
ii) Enter recovery using the methods shown before. And flash this zip file. Reboot.
iii) Download and install the Xposed installer app XposedInstaller_3.0_alpha4.apk from the post attachment here:

Thanks to rovo89 for Xposed and Follow_and_Feel for sharing the G4 Xposed link

5. Installing Viper4Android (this breaks FM radio!)

i) Download Viper4Android from here:
ii) Place the zip file on your phone or SD card and flash it in recovery. Reboot.
iii) Open the ViperFX app. From the menu and install the driver.
iv) You need to get Viper4Android to run in enforcing mode so flash this zip in recovery:
Install it. Open the app and set selinux to permissive. Reboot.
v) Install BusyBox from here:

Thanks to the ViperFX developers and zhuhang for Viper4Android
Thanks to Choristav for the Viper4Android file
Thanks to maximumentropy for the SElinux enforcing zip

Once all this is done and you're happy. It would be a good idea to enter recovery and make a full backup.

6. Unbrick Guide

If something messed up while flashing something and can't boot. Open up the recovery and restore your backup. If you don't have one, flash the v20d system image from an external SD card [1.5GB]. Download here:

If you cannot get to the recovery then follow these steps:
i) Make sure you have the LG Drivers installed from here:
ii) Download the LG Bridge software from here:
iii) Remove the battery and reinsert it so the device it is fully off.
iv) While holding the up volume button, insert your USB cable.
v) You should enter download mode. Go to the Software Update tab of the LG Bridge. It will say connecting and then should say your device is up to date. Click on the recovery text on the bottom right and then follow the instructions. The software will download the system image for you and this is roughly 1.6GB so make sure your firewall doesn't block this connection.

This shouldn't delete your data (no guarantees) but you will have to grant app permissions again and reapply any changes to system files e.g. root, viper4android, xposed ect.

If you have problems try this method instead:

7. Debloat

Here is a list of apps and services you can remove from the phone

Removing these won't break the phone but of course be smart about it; removing Weather will mean you don't have the weather app. I only removed Google apps I don't use and redunadant apps from LG.
You can remove bloat apps using the Titanium Backup app from here:
I would advice you to make a backup of them first in case you want them back. It's the easiest way to get the apps back.
If you do need a guide for using Titanium Backup, head over to this excellent guide:

8. Battery Optimisations

The aim is to get maximum battery life without compromising speed, user experience, features or notifications.
(I'm just going to use the following space as a log of things I've done. I will tidy this up when complete. Please do suggest if any of these things are ineffective or detrimental.)
Read through this guide:
1. Disable Activity Logs: General Settings -> About phone -> Activity Logs at the bottom.
Also try following the steps on here; users report better battery life:
2. Disable Smart Settings under General Settings
3. Disable Bluetooth and Wi-Fi scanning location service: General Settings -> Location -> Menu -> Scanning -> Untick both. (I honestly can't believe these exist. I wondered why I have bluetooth wakelocks)
4. Disable Open Wi-Fi scanning: Network Settings -> Wi-Fi -> Menu -> Advanced -> Untick Wifi notification. Toggle this on and off as it should also fix random white LED blinking.
5. Greenify 2.9 beta to enable aggressive doze.
6. Follow this guide for processor tweaks

Please note that this is my first thread and I'm not a developer. I hope the instructions are as complete and accurate as possible and they are what I followed for my H815 602. If there are any things I forgot or updates, please do let me know.
Attached Files
File Type: zip - [Click for QR Code] (7.81 MB, 1222 views)
The Following 41 Users Say Thank You to htr5 For This Useful Post: [ View ] Gift htr5 Ad-Free
2nd May 2016, 08:51 AM |#2  
Senior Member
Thanks Meter: 138
Superb guide. Thanks. Should be stickied.
The Following 3 Users Say Thank You to obvious For This Useful Post: [ View ] Gift obvious Ad-Free
2nd May 2016, 03:33 PM |#3  
Junior Member
Thanks Meter: 0
Official LG don't unlock bootloader for H815P
Only europe is eligible for service
6th May 2016, 04:15 PM |#4  
Flag Galati
Thanks Meter: 9
when i try to get my device id it just hangs at:
C:\ADB>adb reboot bootloader

C:\ADB>fastboot oem device-id
< waiting for any device >
any ideas?
running win10, with the drivers installed.

found out the problem. usb3.0 does not work used usb2.0 and work flawlessly
The Following User Says Thank You to whitenoise2007 For This Useful Post: [ View ] Gift whitenoise2007 Ad-Free
6th May 2016, 04:49 PM |#5  
Senior Member
Flag Telford
Thanks Meter: 297
Donate to Me
On 6.0 Android is more secured and so to install recovery you have to either boot the recovery, flash custom kernel, then flash recovery or unpack boot.img from a custom kernel, flash it via fastboot, then flash recovery and lastly full kernel package in recovery. Better if you include this in your guide because many people will be asking "why my recovery is not booting?" and that's what we don't want. I've repeated this about 50 times or more and finally I will not have to. :P
The Following User Says Thank You to Adam Myczkowski For This Useful Post: [ View ] Gift Adam Myczkowski Ad-Free
7th May 2016, 05:09 PM |#6  
Flag Lindesberg
Thanks Meter: 7
Hi! Thanks for this guide!
Just found a "typo"
ii) Now with your phone on and plugged in, enter recovery by opening adb as before and entering "adb fastboot recovery". (You will need to enable USB debugging again)
I'm sure it should say "adb reboot recovery" : )
It could be worth saying that after installing root, there will be a boot loop or two, it even say so when you install the latest SuperSU.

I am also interested in your battery optimization, the most I've done so far is to disable NFC and location and disable some of my google account syncs that I don't use or use very rarely.
The Following User Says Thank You to Redgoblin For This Useful Post: [ View ] Gift Redgoblin Ad-Free
7th May 2016, 06:23 PM |#7  
htr5's Avatar
OP Senior Member
Thanks Meter: 205
Originally Posted by Redgoblin

Hi! Thanks for this guide!
Just found a "typo"
ii) Now with your phone on and plugged in, enter recovery by opening adb as before and entering "adb fastboot recovery". (You will need to enable USB debugging again)
I'm sure it should say "adb reboot recovery" : )
It could be worth saying that after installing root, there will be a boot loop or two, it even say so when you install the latest SuperSU.

I am also interested in your battery optimization, the most I've done so far is to disable NFC and location and disable some of my google account syncs that I don't use or use very rarely.

Thanks for the correction.

In addition to what you've done, I have installed greenify and hibernated Snapchat, Viber and Facebook apps. WhatsApp isn't hibernated.

I have the donate version and xposed so till gcm push notifications.

I haven't done anything else. I had better battery stats installed for a few days and I kept checking it and was annoyed that I'd always have ~30% awake time with the screen off. There were no kernel wake locks, it was just app alarms mainly from android and Google.
8th May 2016, 03:44 AM |#8  
htr5's Avatar
OP Senior Member
Thanks Meter: 205
I was getting 4 hours SOT and 20 hours use out of the box. Now I'm down to 3 hours 30.
I really wish the Autostarts app would work but it has no effect:
This would allow me to stop many apps from waking up everytime the connectivity changes or the screen is unlocked.

I have Greenify with the donate Xposed settings. Coalescing, Deep Hibernation and GCM push enabled only. Here are the apps I have greenfied:
  • Maps
  • Skype
  • Viber
  • Messenger
  • Snapchat

Gmail with 1 Google and 1 Yahoo account
Lux Autobrightness
Viper4Android in High quality mode. Enabled are playback gain control; Equalizer; Dynamic System; Fidelity Control; Auditory System Protection and gain limiter.
8th May 2016, 03:46 AM |#9  
htr5's Avatar
OP Senior Member
Thanks Meter: 205
Is anyone else not getting any sound from the radio app? It starts and even tunes to frequencies with channel name and now playing I hear no sound through headphones or speakers.
I've tried removing the app and installing from the update centre again.

The NextRadio app is incompatible (even when sideloading the apk)
8th May 2016, 11:37 PM |#10  
Ejecutor Hanzo's Avatar
Junior Member
Thanks Meter: 2
Well, I tried to unlock the H815 Taiwan version (bought on Amazon as a USA unlocked cellphone... ) but is not supported.

Damn it!
9th May 2016, 12:31 PM |#11  
Junior Member
Flag İstanbul
Thanks Meter: 0
Post Reply Subscribe to Thread

h815, lg g4, root, twrp, xposed

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes