Install TWRP, Disable Forced-Encryption, and Root LG G5

Root LG G5

Earlier yesterday, we demonstrated how you can unlock the LG G5’s bootloader, officially on the European variant. And now that you can do it, you can also step further towards a more customized experience, including custom ROMs, tweaked kernels, and mods like ViPER4Android and Xposed Framework. In order to do that, you will require to have TWRP installed, to flash these mods, and root LG G5, for them to operate properly. This will work only on the LG G5 European variant since only the same offers an unlocked bootloader.

Root LG G5

There is another minor set of instructions below, which are there to guide to disable forced-decryption and finally decrypt the LG G5. To know more about encryption, and how it works, click this link.

“Why do I need to decrypt my LG G5?” — The answer is simple. If you want to make modifications to the system partition, including system root, and other tweaks, you will need to decrypt. And thanks to XDA member – jcadduono, we can now do that by flashing a boot patching flashable zip, that will disable dm-verity checks on the boot.img (kernel), and allow you to decrypt. As about TWRP, it is officially supported by TeamWin. We are going to use a bunch of fastboot commands to flash it through, followed by flashing SuperSU, for root.

So without further ado, let us begin with the instructions to root LG G5

Disclaimer

Making system modification may result in a soft-brick if done wrong. However, it is still recoverable. We shall not be held liable for any damage to your device.

Table of Contents

Before You Begin

  • The process of decryption will erase the complete internal storage and all the data on the device. Make sure that you take a complete backup of everything before stepping ahead.
  • Charge your LG G5 to a sufficient battery level, so that it doesn’t shut down during the process.
  • Make sure to install LG drivers on your PC: Download LG drivers
  • Enable USB debugging in Settings > Developer options. If you do not know how to, follow this tutorial.
  • Android SDK must be installed on your PC. It will be required for ADB and fastboot access.
  • You will need to unlock the LG G5’s bootloader first. Follow the instructions here.
  • Download: no-verity-opt-encrypt-6.0.zip (Thanks to jcadduono)
  • Download SuperSU flashable zip: Download Link
  • Download the latest TWRP recovery image file: Link

Install TWRP

TWRP could be easily flashed on the G5 using fastboot commands.

  1. While your LG G5 is booted into the OS mode, connect it to the PC using an appropriate USB cable.
  2. Open the folder/directory, where the TWRP image file (twrp-3.1.1-0-h850.img) was downloaded. In the same folder, press the SHIFT key and right-click on an empty space. Select Open command window here from the menu that appears.
  3. A new command prompt/CMD window will open. Enter the following command to reboot your device into bootloader mode:
    adb reboot bootloader
  4. Your phone should instantly boot into the bootloader mode. In case it doesn’t, make sure that you have setup Android SDK properly, or try switching to a different port on your PC.
  5. While your G5 is in bootloader mode and connected to the PC, flash the TWRP recovery using the following command:
    fastboot flash recovery twrp-x.x.x-x-h850.img

    Here, x.x.x-x resembles the version. Please make sure to replace it accordingly, while using the command. For example:

    fastboot flash recovery twrp-3.1.1-0-h850.img
  6. It will merely take a few seconds to flash.
  7. Enter the following commands in the CMD window:
    fastboot format userdata
    fastboot format cache
  8. Important: Do not boot into OS yet, if you want to disable forced-encryption. So power off the device completely and start by holding the Volume Down and Power buttons together. As soon as you see the LG logo, release the buttons and again hold on to them (Just like a tap) until you see the TWRP screen.

Decrypt and Root LG G5

  1. Once TWRP boots, it may ask for a decryption password, skip it and move forward to the main screen.TWRP Unmodified System Partition Warning
  2. Now, you have two options. If you only need to decrypt with no root, you should flash the “no-verity-opt-encrypt.zip”. Or if you need root along with decryption, flash the SuperSU package.
  3. So, go to Install. Browse the phone’s external storage and select the file of your choice. Swipe the “Swipe to confirm Flash” button on the bottom of the screen to start the flashing process.
  4. When everything is done, go to Reboot > System.

Congo! You have just installed TWRP, disabled forced-encryption, and rooted your newly bought LG G5. If you face any issues during or post the process, let us know through the comments.