• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[RS988][RECOVERY][OFFICIAL] TWRP 3.3.1-0 for LG G5 RS988 [05/21]

Search This thread

NextDroid

Senior Member
Dec 25, 2013
292
246
home.png
backupname.png


Thank you @shunjou for helping RS988 to go official!

This is the official support thread for TWRP for RS988.

Installation from Stock:

**If your bootloader isn't already unlocked, go to the LG Developer website. You'll need to create an account. You can get the necessary ADB and fastboot tools from the Android SDK Platform Tools.**

If you wish to flash a stock ROM, you MUST flash a root .zip such as SuperSU to disable dm-verity and storage encryption! If you later decide to install a custom ROM, and didn't disable dm-verity on stock, you will have to COMPLETELY FORMAT your internal storage. Don't risk it.

1. Reboot into the bootloader with the command "adb reboot bootloader" and issue the command "fastboot flash recovery twrp-x.x.x-x_rs988.img", replacing "twrp.x.x.x..." with the location of the TWRP image on your drive.

2. Once it is done writing the image and says "finished," detach all power sources and remove the battery. This step is important—if you reboot into the system instead, TWRP will be overwritten by the stock recovery.

3. Reinsert the battery. Then start the phone, holding down both the Volume Down and Power button. When the LG logo appears, quickly release and re-press the Power button, continuing to hold Volume Down. This should bring you to a Factory Data Reset screen.

4. Confirm "Yes" on the two prompts (don't worry, no data will be deleted—we've overwritten the stock recovery) and you will be in TWRP.

Make sure to follow these steps as written, and make backups if necessary. You wouldn't want to risk saying "Yes" and actually wipe your data, right?

Working:

It works. If there are any problems, report them here.

Downloads:

Builds may be downloaded from the TWRP website.
Production builds: twrp.me/lg/lgg5rs988.html.
Test builds will depend on the current version of TWRP. For example, for v3.2.3.0 : http://build.twrp.me/twrp-3.2.3-0-rs988.img


XDA:DevDB Information
[OFFICIAL] TWRP 3.3.1-0 for LG G5 RS988, Tool/Utility for the LG G5

Contributors
NextDroid, shunjou
Source Code: https://github.com/TeamWin/android_device_lge_rs988


Version Information
Status: Stable

Created 2018-06-14
Last Updated 2019-06-11
 

djskribbles

Senior Member
Feb 25, 2011
305
125
If you wish to flash a stock ROM, you MUST flash a root .zip such as SuperSU to disable dm-verity and storage encryption! If you later decide to install a custom ROM, and didn't disable dm-verity on stock, you will have to COMPLETELY FORMAT your internal storage. Don't risk it.

@NextDroid, Can you elaborate on this a little more? I'm not sure I fully understand.

Do you mean if you're on a stock ROM, you should root your device by flashing a root .zip file (magisk/supersu) to disable dm-verity and storage encryption before you install a custom ROM?

I just unlocked the bootloader and installed this version of TWRP on my RS988. I also installed x86cpu's unofficial 15.1 lineageOS ROM.

What I did was:
1. Unlock the bootloader
2. Installed TWRP
3. *Flashed SuperSU zip
4. Installed LineageOS/Gapps

*I think I may have flashed the wrong file for SuperSU because I tried flashing the same SuperSU .zip file after installing LineageOS and it didn't appear to do anything. Apps weren't giving me root access and there was no SuperSU app in my app drawer. I fear that my device wasn't actually rooted before installing LineageOS. Am I screwed? What do you mean that you will have to format your internal storage?

The SuperSU zip file I flashed was: UPDATE-SuperSU-v2.82-20170528234214

Sorry, I'm not the most educated in this kind of stuff. But everything as of now seems to be working fine. TWRP functions properly. I have since installed magisk and my device appears to be properly rooted. LineageOS 15.1 is working with no issues so far.
 
Last edited:

NextDroid

Senior Member
Dec 25, 2013
292
246
@NextDroid, Can you elaborate on this a little more? I'm not sure I fully understand.

Do you mean if you're on a stock ROM, you should root your device by flashing a root .zip file (magisk/supersu) to disable dm-verity and storage encryption before you install a custom ROM?

I just unlocked the bootloader and installed this version of TWRP on my RS988. I also installed x86cpu's unofficial 15.1 lineageOS ROM.

What I did was:
1. Unlock the bootloader
2. Installed TWRP
3. *Flashed SuperSU zip
4. Installed LineageOS/Gapps

*I think I may have flashed the wrong file for SuperSU because I tried flashing the same SuperSU .zip file after installing LineageOS and it didn't appear to do anything. Apps weren't giving me root access and there was no SuperSU app in my app drawer. I fear that my device wasn't actually rooted before installing LineageOS. Am I screwed? What do you mean that you will have to format your internal storage?

The SuperSU zip file I flashed was: UPDATE-SuperSU-v2.82-20170528234214

Sorry, I'm not the most educated in this kind of stuff. But everything as of now seems to be working fine. TWRP functions properly. I have since installed magisk and my device appears to be properly rooted. LineageOS 15.1 is working with no issues so far.

Hey @djskribbles,

As I prefaced them, these instructions only apply when you wish to flash a stock ROM. This implies that you are coming from a custom ROM. The current LG stock ROMs, when flashed, encrypt the internal storage, and TWRP is currently not able to decrypt it. This is why one should flash Magisk to disable storage encryption beforehand.

Also, you'll be better off if you use Magisk instead of SuperSU. Flash Magisk before LineageOS, because the script used to flash it automatically wipes the /system partition, which is where SuperSU, for example, makes its changes to enable root access.
 

shunjou

Senior Member
Apr 7, 2014
83
60
As I prefaced them, these instructions only apply when you wish to flash a stock ROM. This implies that you are coming from a custom ROM. The current LG stock ROMs, when flashed, encrypt the internal storage, and TWRP is currently not able to decrypt it. This is why one should flash Magisk to disable storage encryption beforehand.

Actually, decryption should be working for stock now since the last builds. At least that's what was confirmed by someone that made me realize that building with omni 8 broke the old decryption fix. I think someone else mentioned cm14.1 worked too, so any nougat rom should be fine.

The issue now, as mentioned by x86cpu above, is that decryption isn't working with oreo roms. This seems common for a large number of devices (eg 1, 2, 3). It looks like codeworkx's fix for the zl1 here might resolve it, though I haven't tried it since I'm not currently able to test decryption myself.
 

NextDroid

Senior Member
Dec 25, 2013
292
246
Actually, decryption should be working for stock now since the last builds. At least that's what was confirmed by someone that made me realize that building with omni 8 broke the old decryption fix. I think someone else mentioned cm14.1 worked too, so any nougat rom should be fine.

The issue now, as mentioned by x86cpu above, is that decryption isn't working with oreo roms. This seems common for a large number of devices (eg 1, 2, 3). It looks like codeworkx's fix for the zl1 here might resolve it, though I haven't tried it since I'm not currently able to test decryption myself.

All right, that's great to hear! I'll admit, I wasn't sure when I made that second comment... it had been a while since I'd heard anything on stock encryption.

I actually just finished cooking up a fix for Oreo encryption from work on the G6... I'll head over to zl1 if it doesn't work out.

We'll see what happens... --fingers crossed--
 

Awkydee

Senior Member
Oct 24, 2016
113
29
Largo, FL
On the website the only TWRP version is 3.2.1-0. Is this different from the unofficial version I'm currently running? Has the wrong battery percentage bug been rectified?
 

NextDroid

Senior Member
Dec 25, 2013
292
246
On the website the only TWRP version is 3.2.1-0. Is this different from the unofficial version I'm currently running? Has the wrong battery percentage bug been rectified?

The latest unofficial build is the same as the official in terms of functionality. The battery life percentage should now display accurately.
 

NextDroid

Senior Member
Dec 25, 2013
292
246
Last edited:

Ascii3

Senior Member
Sep 17, 2015
221
62
Hello NextDroid, I noticed that the 3.3.1-0 version TWRP has been released.

According the the release's changes information provided by the TWRP website for the release:
https://twrp.me/site/update/2019/05/22/twrp-3.3.1-0-released.html said:
* Fix selinux issues during formatting - dianlujitao
...
* Flash both A and B partitions when installing a recovery ramdisk - Dees_Troy

I have noticed that while using x86cpu's UNOFFICIAL LineageOS-15.1 for G5 (lineage-15.1-20190516-X86CPU-rs988.zip) build, the SELinux status is usually "Enforcing", by sometimes changes to "Permissive". Do you think that the change would be due to the formatting bug corrected by this new TWRP build? If so, can a fix be applied after the buggy formatting from a previous TWRP release has happened and in such a way as to not have to reinstall the operating system? Are TWRP backups done raw, file-based, or differently?
 
Last edited:

NextDroid

Senior Member
Dec 25, 2013
292
246
Hello NextDroid, I noticed that the 3.3.1-0 version TWRP has been released.

According the the release's changes information provided by the TWRP website for the release:


I have noticed that while using x86cpu's UNOFFICIAL LineageOS-15.1 for G5 (lineage-15.1-20190516-X86CPU-rs988.zip) build, the SELinux status is usually "Enforcing", by sometimes changes to "Permissive". Do you think that the change would be due to the formatting bug corrected by this new TWRP build? If so, can a fix be applied after the buggy formatting from a previous TWRP release has happened and in such a way as to not have to reinstall the operating system? Are TWRP backups done raw, file-based, or differently?

That is a good question. Actually, I am not sure. If you are willing to research that, report your findings to us here :) I'm interested to know.

I have been very busy for the past couple of months, but the G5 hasn't left my mind... I use it every day :p I'll see when I can update TWRP and my other builds.

Thanks for keeping us updated, @Ascii3!
 

Ascii3

Senior Member
Sep 17, 2015
221
62
That is a good question. Actually, I am not sure. If you are willing to research that, report your findings to us here :) I'm interested to know.
Maybe, if I have some time, myself. It is looking like something for August 2019.

I have been very busy for the past couple of months...I'll see when I can update TWRP and my other builds.
I am glad to see that you your are still around.

Thanks for keeping us updated, @Ascii3!
Sure.
 

Ascii3

Senior Member
Sep 17, 2015
221
62
Are TWRP backups done raw, file-based, or differently?
I can and shall answer this question that I posed before:
TWRP allows for both RAW and file-based backups. Usually, however, the GUI provides few items for RAW backup; there is typically a backup option for "System Image" which is a RAW backup.
@NextDroid - I noticed that more recent versions of your TWRP do not have the System Image backup option despite it being in your older TWRP 3.2.3-0 build. The System Image backup functionality from TWRP 3.2.3-0 seemed to work OK. Did you deliberately exclude the "System Image" backup option? I the option missing for good reason?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    home.png
    backupname.png


    Thank you @shunjou for helping RS988 to go official!

    This is the official support thread for TWRP for RS988.

    Installation from Stock:

    **If your bootloader isn't already unlocked, go to the LG Developer website. You'll need to create an account. You can get the necessary ADB and fastboot tools from the Android SDK Platform Tools.**

    If you wish to flash a stock ROM, you MUST flash a root .zip such as SuperSU to disable dm-verity and storage encryption! If you later decide to install a custom ROM, and didn't disable dm-verity on stock, you will have to COMPLETELY FORMAT your internal storage. Don't risk it.

    1. Reboot into the bootloader with the command "adb reboot bootloader" and issue the command "fastboot flash recovery twrp-x.x.x-x_rs988.img", replacing "twrp.x.x.x..." with the location of the TWRP image on your drive.

    2. Once it is done writing the image and says "finished," detach all power sources and remove the battery. This step is important—if you reboot into the system instead, TWRP will be overwritten by the stock recovery.

    3. Reinsert the battery. Then start the phone, holding down both the Volume Down and Power button. When the LG logo appears, quickly release and re-press the Power button, continuing to hold Volume Down. This should bring you to a Factory Data Reset screen.

    4. Confirm "Yes" on the two prompts (don't worry, no data will be deleted—we've overwritten the stock recovery) and you will be in TWRP.

    Make sure to follow these steps as written, and make backups if necessary. You wouldn't want to risk saying "Yes" and actually wipe your data, right?

    Working:

    It works. If there are any problems, report them here.

    Downloads:

    Builds may be downloaded from the TWRP website.
    Production builds: twrp.me/lg/lgg5rs988.html.
    Test builds will depend on the current version of TWRP. For example, for v3.2.3.0 : http://build.twrp.me/twrp-3.2.3-0-rs988.img


    XDA:DevDB Information
    [OFFICIAL] TWRP 3.3.1-0 for LG G5 RS988, Tool/Utility for the LG G5

    Contributors
    NextDroid, shunjou
    Source Code: https://github.com/TeamWin/android_device_lge_rs988


    Version Information
    Status: Stable

    Created 2018-06-14
    Last Updated 2019-06-11
    2
    @NextDroid, Can you elaborate on this a little more? I'm not sure I fully understand.

    Do you mean if you're on a stock ROM, you should root your device by flashing a root .zip file (magisk/supersu) to disable dm-verity and storage encryption before you install a custom ROM?

    I just unlocked the bootloader and installed this version of TWRP on my RS988. I also installed x86cpu's unofficial 15.1 lineageOS ROM.

    What I did was:
    1. Unlock the bootloader
    2. Installed TWRP
    3. *Flashed SuperSU zip
    4. Installed LineageOS/Gapps

    *I think I may have flashed the wrong file for SuperSU because I tried flashing the same SuperSU .zip file after installing LineageOS and it didn't appear to do anything. Apps weren't giving me root access and there was no SuperSU app in my app drawer. I fear that my device wasn't actually rooted before installing LineageOS. Am I screwed? What do you mean that you will have to format your internal storage?

    The SuperSU zip file I flashed was: UPDATE-SuperSU-v2.82-20170528234214

    Sorry, I'm not the most educated in this kind of stuff. But everything as of now seems to be working fine. TWRP functions properly. I have since installed magisk and my device appears to be properly rooted. LineageOS 15.1 is working with no issues so far.

    Hey @djskribbles,

    As I prefaced them, these instructions only apply when you wish to flash a stock ROM. This implies that you are coming from a custom ROM. The current LG stock ROMs, when flashed, encrypt the internal storage, and TWRP is currently not able to decrypt it. This is why one should flash Magisk to disable storage encryption beforehand.

    Also, you'll be better off if you use Magisk instead of SuperSU. Flash Magisk before LineageOS, because the script used to flash it automatically wipes the /system partition, which is where SuperSU, for example, makes its changes to enable root access.
    2
    Hello NextDroid, I noticed that the 3.3.1-0 version TWRP has been released.

    According the the release's changes information provided by the TWRP website for the release:
    https://twrp.me/site/update/2019/05/22/twrp-3.3.1-0-released.html said:
    * Fix selinux issues during formatting - dianlujitao
    ...
    * Flash both A and B partitions when installing a recovery ramdisk - Dees_Troy

    I have noticed that while using x86cpu's UNOFFICIAL LineageOS-15.1 for G5 (lineage-15.1-20190516-X86CPU-rs988.zip) build, the SELinux status is usually "Enforcing", by sometimes changes to "Permissive". Do you think that the change would be due to the formatting bug corrected by this new TWRP build? If so, can a fix be applied after the buggy formatting from a previous TWRP release has happened and in such a way as to not have to reinstall the operating system? Are TWRP backups done raw, file-based, or differently?
    1
    The latest unofficial build is the same as the official in terms of functionality. The battery life percentage should now display accurately.

    Yippie! Flashing now!
    1
    Hmm, I ought to keep up with this thread a bit more...

    I've made some updates today and created a test build. Here is the link for anyone who wishes to test: http://build.twrp.me/twrp-3.2.3-0-rs988.img