[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Phoenix591:
Inspired by Backcheck building for the VS995, I've decided to build the latest TWRP for the US996 and now most other V20 variants as well. I'm an amateur, but so far in my own use it seems to be working fine (flashes Open Gapps, Lineage, and Magisk fine, and tested a small backup and restore). That being said, use at your own risk. Any advice and contributions are welcome.

My device tree

Made possible by:

The TWRP team

Jcadduono for the kernel and initial device tree

[MENTION=6814590]askermk2000[/MENTION] for continuing work on stock based kernels

[MENTION=6984210]emdroidle[/MENTION] for creating Kdzwriter: a useful tool for flashing all or part of a kdz (stock firmware file) without a pc.

Known Issues

Occasionally the battery will incorrectly display 50% usually after rebooting from recovery into recovery

Decryption doesn't work on stock based Oreo roms

Please post and let me know anything else!

Changelog

2019-10-25

Changed one last thing to try to fix stock Oreo decryption.

There were an upstream TWRP change that should fix the issue where formatting was still leaving /data encrypted as well (this was actually in the last build, but I didn't notice it then)

2019-05-17-NOT Beta

Made sure the decryption process is setup exactly like it used to be in the past so it should hopefully work if the BETA builds don't (do try the beta build first if you're using encryption, it would be so much easier going forward if the beta way of doing decryption would work), and fresh build for 3.3.1

2019-05-17-ENC Beta

Added a few other services to try to fix encryption again, if someone using encryption would give today's builds a try I'd appreciate it.

2019-04-22-ENC Beta

Redid how encryption is handled so its much more like the older builds.. still can't handle stock oreo encryption unfortunately, but should have less issues with /system mounting, and might work with something x86cpu is working on for lineage 16.

Basically if you're having issues with 3.3.0 try this one

2019-04-07

Not a whole lot, but TWRP officially decided to tag version 3.3.0 along with some small changes, such as being able to check zip integrity using .sha256 sum files in addition to .md5 and .md5sum files

2019-04-01

Updated kernel

Updated kdzwriter to latest version

2018-10-18

Fixed crash on startup (by updating the kernel again)

2018-10-16

Properly updated H990 build

Hopefully fixed F800 build

Minor kernel update for all variants

2018-10-06

Fixed crash/reboot on stock Oreo so that it doesn't take 10 tries to get in (by changing to an oreo kernel), /data decryption still broken.

2018-09-30

Enabled quota features in the kernel to fix stock based oreo

2018-08-17

/vendor partition support, x86cpu and I got it working and setup so that if a split vendor partition exists we'll be able to back it up or flash to it in TWRP, and of course keep /data decryption working. For those without a /vendor partition it will only show up on the twrp mount page.

Adjustments to the time so that it will be correct with Lineage 15.1

Adjustments to scripts to prevent things from getting confused and mounting and unmounting /system repeatedly as has been reported by some.

Provided nothing crazy happens with these builds, this will likely be the revision we go official with.

Older Changelogs

2018-08-05

F800* build

Refactored time script: now the date and time is closish to accurate with a lineage 15.1 rom, there is a lineage bug keeping it from being totally accurate.

Twrp 3.2.3: twrp once again recognizes .md5sum files and not only .md5.

2018-07-17

Fixed encryption in Lineage which 3.2.2-0 broke

2018-07-13

Added LAF/Download mode as a target for flashing images and creating backups, you may replace laf/download mode with a second twrp install if you so choose.

Updated to 3.2.2 , not many changes for us since I was the author of most of the time/date fixes mentioned.

2018-05-05

Adjusted time fix script

Added support for multipartition USB OTG devices such as external hard drives

2018-04-24

Adjusted encryption support script to be more reliable: a bad password would break decryption until restarting the script manually.

2018-04-21

Kdzwriter by [MENTION=6984210]emdroidle[/MENTION] is now included: no symlink needed

Adjusted an encryption support service for Oreo compatibility.

These are important enough to merit finally going from 3.2.1-0 to 3.2.1-1.

2018-04-15

Added experimental /data image backup, itl save everything on/data including internal storage but requires a lot of space.

Transitioned from kernel level exfat driver to the twrp bundled fuse based driver to hopefully resolve some backup corruption issues.

Refactored fixdate script to always produce the correct year at the cost of hardcoding the accurate year.

Suddenly had issues rebuilding previous kernel, transitioned to a mk2000 based kernel.

2018-04-06

The date fix script now always checks every six seconds (was running 22 seconds after the last time it had adjusted the date) and fixed an issue where the date may end up as 2017 instead of 2018 (observed in a us996 10o based rom).

Diagnostic script runs for 90 seconds now.

2018-03-24

Stock ROMs date really should be fixed now.

Made date diagnostic script run for 1 minute instead of 30 seconds because I'm adjusting the date later and 30 seconds cuts it close getting /data decrypted to copy the log to internal storage

2018-03-23

Trying harder to fix the date on stock ROMs by having the script run twice

Added diagnostic script that writes a 1Kb file to (Internal Storage)/TWRP/twrp-date.log Help me get the date right on stock ROMs especially H918 users

2018-03-21

Adjusted H918 clock to hopefully be more accurate

Keep the feedback coming

2018-03-20

Fixed date for those on stock ROMs by adding an init script to check and fix the date.

This makes the us996-noadj version redundant since now its all handled in the same build.

Feedback requested

I'd like confirmation the year is correct from those running stock roms

as well as any H918 users of either stock or aosp based ROMs( please specify which)

To do so simply hit advanced then terminal and then type date(enter).

2018-03-16

Full /data decryption now works! Can now decrypt /data when encrypted by Lineage's encrypt phone option as well as stock! (Stock tested 3-19 by flashing the us99610n flashable zip without immediately rooting and selecting the require pin at boot option .)

2018-03-14

Fixed Lineage OTAs (the updater can now properly reboot into twrp apply the update and reboot back into lineage on its own now) by adding misc partition to fstab

Further Upstream TWRP Changes since 3.2.1-0 in these builds

Mar 09, 2018

Dees-Troy

Don't rename twrp.fstab to recovery.fstab

committed by Dees-Troy ⋅ 53273ecc

Mar 08, 2018

invisiblek

install: ignore build dates for A/B installs

committed by invisiblek ⋅ e7b66e10

Dees-Troy

FBE: Decrypt spblob v2 (February security patch)

committed by Dees-Troy ⋅ c5dd5791

Feb 26, 2018

FatihFIRINCI

Languages: Update Turkish translation.

committed by FatihFIRINCI ⋅ 90765a20

2018-02-13

Fixed US996 no offset build to actually have no offset

2018-02-08

Initial H990 build

Added second US996 build with no offset (if the date comes back as 1972 on the other build use this one)

2018-02-06

Made clock offset configurable per model (changed TWRP patch)

Fixed screen offset (at some point I added the kernel second screen fix but left the twrp level fix active too)

2018-02-04

Fixed the clock to actually have the correct time most of the time (two patches I created applied to twrp itself, see my device tree for source)

Upstream TWRP Changes since 3.2.1-0

Merge "Add Portuguese (Portugal) translation." into android-8.1

bigbiff authored and Gerrit Code Review committed 10 days ago

Commits on Jan 23, 2018

Add Portuguese (Portugal) translation. …

ElTifo committed 18 days ago

Commits on Jan 18, 2018

Merge "Fix typo in Micro SD to have a consistency" into android-8.1

bigbiff authored and Gerrit Code Review committed 16 days ago

Merge "Added missing translation in Turkish translation" into android… …

bigbiff authored and Gerrit Code Review committed 16 days ago

Merge "There are a few typos and bugs in the French translation, for … …

bigbiff authored and Gerrit Code Review committed 16 days ago

Merge "Typo / Uppercase-Lowercase in German translation compared to a… …

bigbiff authored and Gerrit Code Review committed 16 days ago

Merge "Typo and bug fixing in Dutch(NL) translation, for example wher… …

bigbiff authored and Gerrit Code Review committed 16 days ago

Merge "Fix minor inconsistency in Czech translation" into android-8.1

bigbiff authored and Gerrit Code Review committed 16 days ago

Merge "Added missing translation(s) in Portuguese(BR)" into android-8.1

bigbiff authored and Gerrit Code Review committed 16 days ago

Merge "Added missing translations in Swedish language file" into andr… …

bigbiff authored and Gerrit Code Review committed 16 days ago

Merge "Added 2 translations in Italian language file" into android-8.1

bigbiff authored and Gerrit Code Review committed 16 days ago

Merge "There's a missing translaton in the Greek language file." into… …

bigbiff authored and Gerrit Code Review committed 16 days ago

Commits on Jan 17, 2018

Use /persist as Qualcomm time fix source during early boot …

nkk71 authored and Dees-Troy committed on Dec 16, 2017

Commits on Jan 16, 2018

Merge "Relink adbd needed in android 8.1" into android-8.1

bigbiff authored and Gerrit Code Review committed 18 days ago

Commits on Jan 4, 2018

Use libdrm_platform for minuitwrp in 8.x trees …

Dees-Troy committed on Jan 4

Add spblob decrypt for secdis method (Pixel 1 non-weaver) …

Dees-Troy committed on Dec 15, 2017

Commits on Dec 21, 2017

Fix typo in Micro SD to have a consistency …

pr030880 committed on Dec 21, 2017

Typo and bug fixing in Dutch(NL) translation, for example where a tra… …

pr030880 committed on Dec 20, 2017

Added missing translation in Turkish translation …

pr030880 committed on Dec 21, 2017

Fix minor inconsistency in Czech translation …

pr030880 committed on Dec 21, 2017

Added 2 translations in Italian language file …

pr030880 committed on Dec 21, 2017

Added missing translations in Swedish language file …

pr030880 committed on Dec 21, 2017

Added missing translation(s) in Portuguese(BR) …

pr030880 committed on Dec 21, 2017

Typo / Uppercase-Lowercase in German translation compared to all othe… …

pr030880 committed on Dec 21, 2017

Commits on Dec 20, 2017

There are a few typos and bugs in the French translation, for example… …

pr030880 committed on Dec 20, 2017

Commits on Dec 19, 2017

Relink adbd needed in android 8.1 …

nkk71 committed on Dec 19, 2017

There's a missing translaton in the Greek language file. …

pr030880 committed on Dec 19, 2017

Commits on Dec 15, 2017

Merge up to android-8.1.0_r1 and fix conflicts …

Dees-Troy committed on Dec 14, 2017

Commits on Dec 12, 2017

Fix build error in AOSP 8.1.0 r1 tree …

Dees-Troy committed on Dec 12, 2017

Fix android.hidle.base@1.0 rule for various 8.0 trees …

Dees-Troy committed on Dec 12, 2017

If the clock and/or date (check by going to advanced->terminal then typing date(enter)) is wrong, first try rebooting to normal Android for a while, then if its still wrong after rebooting into recovery let me know your model, and the time/date it claims to be and the correct time (or just the difference)

Download

TWRP-3.3.1-1: 2019-10-25

(Is linking just the folder alright for ya'll? If enough people say something I'll go back to direct links to each device, but copy and pasting individual links for each device gets to be kind of a drag)

Optional: DO NOT USE THIS OPTIONAL ENCRYPTING ZIP WITH LINEAGEOS

Since Magisk and supersu disable mandetory encryption by default unless installed with an already encrypted /data and stock and stock based roms have no ui option to encrypt, I've created a flashable zip encrypt-v2.zip (uses the anykernel template by osm0sis ) that makes encrypts /data without data loss. Requires a charged battery (if the power is cut during encryption you could lose all data!) and it checks if you're using one of my twrp builds since afaik none of the others work with encryption.

Stock users it will stay on the LG boot animation while encrypting! Do not even think about pulling the battery unless you didnt want your data anyway.

DO NOT USE THIS OPTIONAL ENCRYPTING ZIP WITH LINEAGEOS, it has it's own option to encryption in settings under security.

Old versions

TWRP-3.3.1-0: 2019-05-17

TWRP-3.3.0-0: 2019-04-07

3.2.3-5: 2019-04-01

F800

H910

H918

H990

LS997

US996

VS995

3.2.3-4: 2018-10-18

F800

H910

H918

H990

LS997

US996

VS995

3.2.3-3 and 3.2.3-2 not listed due to being particularly broken

3.2.3-1 : 2018-09-30

F800

H910

H918

H990

LS997

US996

VS995

3.2.3-0 : 2018-08-17

The links for this version will soon point to the latest version with the new changes but these will be labeled 3.2.3-0 and yet have all the new changes.

F800

H910

H918

H990

LS997

US996

VS995

3.2.3-0 : 2018-08-05

F800

H910

H918

H990

LS997

US996

VS995

3.2.2-1 : 2018-07-17

H910

H918

H990

LS997

US996

VS995

3.2.1-3 : 2018-05-05

H910

H918

H990

LS997

US996

VS995

3.2.1-2 2018-04-24

H910

H918

H990

LS997

US996

VS995

3.2.1-1 2018-04-21

H910

H918

H990

LS997

US996

VS995

3.2.1-0 2018-04-15

H910

H918

H990

LS997

US996

VS995

3.2.1-0 2018-04-06

H910

H918

H990

LS997

US996

VS995

3.2.1-0 2018-03-24

H910

H918

H990

LS997

US996

VS995

3.2.1-0 2018-03-23

H910

H918

H990

LS997

US996

VS995

3.2.1-0 2018-03-21

H918

(Only the H918 changed)

3.2.1-0 2018-03-20

US996

H910

H990

LS997

VS995

H918

3.2.1-0 2018-03-16

US996 (if date shows as 1972 use US996-noadj )

H910

H918

H990

LS997

VS995

3.2.1-0 2018-03-14

US996 and if the date shows as 1972 use US996-noadj

H910

H918

H990

LS997

VS995

3.2.1-0 02-06-18

US996 If the date comes back as 1972, use this build instead

LS997

H910

H918 if clock is incorrect on H918, try this build

VS995

H990

3.2.1-0 02-04-18

LS997

H910

H918

VS995

US996

3.2.1-0 for the US996