yashsingh1/xdaforums huggingface dataset:
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] dwasifar:
There are apps that do that, if you want. Not sure which one to recommend, but you can search Play for them.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Eldoka:
I tried some of them, but none work, so if someone made it to work properly, can share please
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] BigBrad75:
Ive been looking for an app to do this properly for a long minute. So yea, off topic for sure, but if anybody knows an app that does this properly plz let us know
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
It won't add it to the power button menu, but if that is okay, and you are just looking for a way to easily get back to other modes without the key combo crap, check out Power Menu on Google Play. It needs root though.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] pwnerman:
Alright I just want to be clear so this is why I'm posting this. I'm currently on 14a with TWRP and Magisk installed. So do I just download this rom, wipe cache, system and data and then flash it? Will I need to reinstall TWRP or will it be fine? I know I'll need to reflash root. I'll do that in fastboot mode.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
Yes, that should work. The optimal method would be to first flash the 17a KDZ, as that is the proper upgrade path. Not sure if it is required though.

As for TWRP, depends on which TWRP you are using if you have to reinstall. If you are using 3.1.1, no, if you are using Melina TWRP nougat, yes.

No need to wipe system though. Won't hurt but we are overwriting it at the image level anyway.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] pwnerman:
worked great with no issues, thanks a bunch.

I'll be finally able to connect my Oral B 8000 toothbrush to the phone app.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] rmedure:
I was thinking ... the only non-stock system app I have (on 17a) is supersu. So easiest path might be:

Delete TWRP app

Flash stock bootloader

Take OTA stock update

Reboot phone

ADB flash TWRP, dm-verity, supersu, etc

Profit ...

Am I missing anything?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] cheerleone:
Chances of you getting the OTA are slim to none if the bootloader was unlocked via LG's site.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
SuperSU modified system therefore OTA won't apply. You'd have to reflash all of 17a, not just the bootloader.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] BigBrad75:
Unlocked bootloader, especially officially, should never effect OTA, only the things you can do once bootloader is unlocked
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] tamkhanh:
This still not compatible with us997 uscellar right? I have us99716c stock
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] rmedure:
I always get the the OTAs, but have until now opted to flash the Westwood? updates without wiping data. This 20a update has downloaded OTA. So in theory with the stock bootloader this 20a update should work right? (and perform whatever fixes it does to data partition)?

Speaking of having the OTA 20a ... would that download be useful to anyone here for figuring out what exactly it does?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
It's encrypted.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] BigBrad75:
It would be compatible in thoery but requires an unkocked bootloader, which uscellular, along with all carriers, (exploits aside) have locked down tight
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] rmedure:
Drat ... but of course.

So do you think the OTA will work? I could even use the supersu unroot function just in case. I think re-flash twrp and root should be simple. Re-configuring everything after data wipe is a pain. I'm official LG unlock bootloader FYI.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
Not sure TBH, to get the contents of this ZIP I did the proper OTA path. I flashed v15a, let it OTA to v17a, let it OTA to v20a, booted once, rebooted to fastboot, flashed TWRP, ripped partitions.

This is the only OTA path I can suggest, although you can start at v17a since we have that KDZ (i did v15a because thats what LG Bridge offered).

The only thing you'll get from OTA though is LG's recovery, literally every other partition should match the hashes in this one. Except boot which is patched against anti-root, and except system due to it being a system dump, your dump would have resonant data you deleted from /system before, whereas my dump had the free space zero-wiped.

It is up to you which path to choose. This zip would save time, but if you don't trust it, then start with v17a KDZ and do OTA without TWRP or root.

If you have rooted v17a and TWRP, and don't want to lose data, use this zip.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] rmedure:
Well my main concern is with the data partition ... TIBU does not properly restore many of the app data for apps I have/use. If the OTA will seemlessly keep everything, then that's what I'd prefer.

Are you thinking that the OTA may detect that sys has been modified and then refuse to update?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Ergo-Proxy:
The stock rom has a service called rtcd that detects and logs the presence of root, if logged it blocks the OTA from downloading. Flashing a KDZ removes those logs. FWIW & IMO going back to 100% stock prior to an OTA upgrade is the least painful. Also replacing app data with Titanium after a major upgrade is asking for trouble. Look in any update thread with people saying things are acting weird after an update, where the solution is to wipe data.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
My best suggestion would be flashing this zip in TWRP, and making sure to wipe dalvik/cache before rebooting into the System.

This should retain your data like an OTA would.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] rmedure:
I thought an earlier post in this thread said that for this OS major version update (not just security update like previous ones) ... the stock bootloader does some post install stuff to clean up data and things for compatibility?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Tool Belt:
I backed up data via bridge and the restore was straight forward.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] jjohn7293:
I really just want to say thanks to zefie for uploading and for creating an awesome colonel!

Currently running with kernel auditor, maximizing my CPU potential lol
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
Good point, it is untested but for the most part it should work. You are in a tough spot right now with backups not working right on TWRP :(

Okay honestly this is my recommended path then:

1) Boot TWRP, wipe dalvik

2) Reboot to LAF/Download

3) Flash the v17a KDZ (kdz does NOT touch userdata!)

4) You'll be clean unrooted stock with your data. it should work (tho anything needing root will fail)

5) OTA to oreo

6) reinstall twrp and root
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] NCU1980:
Deleted
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] COMI80:
deleted
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
Any chance of converting 20B KDZ to TWRP flashable zip? Pleeeeze?

https://drive.google.com/file/d/1XCLzKnQ4AFjsiLbFMdYsG_owZuOWs10O/view
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Sobek5150:
Hmm I didn't think there was a KDZ out yet for US997 Oreo. Good to know. Where did you find it? LG Bridge?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] antmachine:
Works on US Cellular US997 version

It worked on my US Cellular device.

I used LGUP + Uppercut + the KDZ file in this post. I chose the "Upgrade" option and it left all my data intact.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Tool Belt:
This is how I did it. Ended up backing up and restoring data via Bridge.

https://xdaforums.com/showpost.php?p=76764116&postcount=24

No problems whatsoever.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
[MENTION=759634]zefie[/MENTION] Would you happen to know where I could find a guide for converting KDZ files to flashable TWRP zips? I'd love to create one for the 20B KDZ, but all the guides I can find are old.

Thanks!
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
I used the LG G2 guide to KDZ to zip using LGFirmwareExtract 1.2.6.1 (latest one I could fine), used Zefie's zip file as a guide, used Zefie's boot.img and bootloader (already edited to not force encrypt and allowed TWRP to persist), and replaced all 20A files with 20B files and it worked great (see what you think, unrooted so needs Magisk 16.7 to root):

https://mega.nz/#!IYh3RBBI!siGBjbNyCXJiC5xcknBVPjl2dpg6IvvfDJ2ReNdhaOc
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
This worked, but it broke my SD card. I was able to backup my data from the SD card in Windows, but no matter how many times and different ways I formatted my card, Android wouldn't read it.

I'm going back to a backup of 20A to see if my card will work again. :(
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
That's weird as shouldn't mess with external SD card:silly:
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
Indeed, it shouldn't. But it does. I'm using a Samsung 128GB and it works fine in TWRP and 20A.

Oh well, on 20A I stay.

Appreciate your efforts though. :)
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
Works fine with my 32gb SanDisk Ultra :good:
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] cold tortilla:
Can this be flashed on the tmobile lg g6?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
No. Carrier-tied G6s are unable to unlock the bootloader. Thus unable to flash anything.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] monark88:
Bro, you should so totally post this in it's own thread. I'm glad I found it. Thanks so much for sharing!
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
Couldn't have done it without Zefie as I used his template so figured it belonged here
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] chakchak:
Hi, if I flash the unmodified patch, so I cant get in the recovery? Or I still?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
Correct, forced encryption and lose TWRP after reboot
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] rdy105:
I used your zip to update to 20b and it worked great! I just saw that 21b was posted on lg-firmwares today...any chance you'll be doing a zip for that one?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
I'll try but not sure if it'll work for non-US-Cellular US997. Anyone tried this version yet? I don't want to crash anybody's phone (I'll try on mine before posting of course)

Can't merge system.bin files into system.img :( using LGfirmwareextract 1.2.6.1 software (probably too old to support newer LG phones). I asked the software dev to update it to support US997 latest KDZ but development stopped years ago so I'm not hopeful. Maybe Zefie can do it old school :)
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] rdy105:
I downloaded the kdz and installed it on my unlocked US997 and everything seems to be fine so far.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
OK, progress. Turns out it'll merge the system.bin files correctly if I only extract the system.bin files (54 of them) and NOT extract the other files yet. I got the 6.2 gigabyte system.img files after merging all the system.bin files (54 of them). Only then did I extract the other files needed to make the zip :good:

Have to build the zip and tested on my phone before releasing into the wild (to make sure it's safe first).

OK, 21B Stock Rom, unrooted, No Force Encrypt, TWRP flashable zip, tested fine with US997, Magisk 17.1 beta, and VZW with 32gb SD card. Here's the link (August Security Update mainly):

https://mega.nz/#!YFgFXYqY!NOI6SDYwa-m0PT34qX-KM_ijHjUgghqiS1cU-Rm5G98
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
Thanks, [MENTION=5803877]HueyT[/MENTION]. Going to install this shortly and see if my SD card issues persist and report back.

Thanks again!

Edit: Nope. Same thing ... corrupts my SD card. I guess it could be the card, but it works in 20A and everywhere else. Oh well. I'm looking to buy a larger card, so maybe I'll go with SanDisk instead of Samsung this time.

2nd edit: It must be my card. I installed Eliminater74's AOSP Extended and it said I had an unsupported Samsung card. Damn. New SanDisk card on the way...
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] chocolote4444:
/data partition and even internal storage refuses to mount even after flashing the melina kernel. The only fix is when I do a full wipe which I don't want to keep doing that. What's going on???? I can't browse any files through twrp. What could be the possible issue??? Anyone else experiencing this issue??
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
Are you using this TWRP?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
G6 and TWRP have issues decrypting data. Keep your ROMs decrypted by backing up internal storage and data and then "formatting data", using no-forced encryption kernel, boot.IMG, or Roms, to allow access to data and internal storage
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] chocolote4444:
I installed it and It fixed it. But now certain magisk modules are cause my phone to stay at the boot logo. I recently installed Dnscrypt module and that's when the phone won't boot. I'm litterally getting sick of this phone. It's one thing after another lol. What could be the issue now? I noticed that when it installs the module it shows that it shrinks the boot img from 96m to 64m. That's the only thing I can think of that maybe this boot image doesn't work when shrunken?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
Bought a 256GB SanDisk card and the upgrade to 21B still corrupts my card. Can't blame my card for this one. *shrug*
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
KDZ (force encryption) 21B and see if new card OK?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
Yeah, that would probably be my next step if I do anything at all.

May move to AOSP Extended at some point or just stick with 20A.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] interestor:
I flashed this 20A on a new phone with unlocked bootloader. Wiped Dalvik and all whenever asked. Then SuperSU. When trying to boot to system, I get errors saying Failed to decrypt data. Unable to decrypt with default password... Then it sends me to Secure Start-Up screen and wants a password. I can't get past this, except to twrp. Tried reflashing many times. How do I get past this?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
Backup data and internal SD to laptop or ext.SD card, format data in twrp, flash ROM, restore data and internal SD; only then will you unencrypt data. TWRP can't decrypt data or internal SD. This ROM only prevent forced encryption but prior ROM already encrypted data.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] interestor:
Thank you. Well, I checked all options for backup, but backup runs and runs and eventually says backup failed.

This is a new phone, I just unlocked the bootloader and installed twrp, then flashed this 20A. I never chose encryption in the previous rom. I didn't back it up initially because it fresh, I made no options or changes, and I read that this 20A is complete and will overwrite everything.

What do I try next?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
"backup" just means hooking your phone up to a laptop via USB-C cord and dragging photos, docs, TWRP backup files to your laptop hard drive (or external SD card which is easiest way to "backup"). It's not meant as TWRP backup.

New phone comes with encryption so you need to rid of encryption by "format data" in TWRP. Encryption can't be decrypted by TWRP reliably.

Once decrypted then you can install custom roms which include 20A file in O.P. This file allows installing 20A easily without using KDZ (which install encryption back to the phone and rid of TWRP recovery). This file has a modified boot.img to allow TWRP to remain intact, no force encryption (but does not rid of current encryption which your new phone already have out-of-the-box).

"Format data" will wipe your phone data and internal sd so back that stuff up or it'll be gone forever.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] interestor:
In the middle of our conversation is the answer. Format Data.

works
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
I solved the "corrupted SD" card by formating the card with my PC to Fat32 using guiformat.exe program. The sdcards > 32gb are formatted in ExFat and not compatible with G6 US997. My generic SP (silicon-powered) 128gb microsd card works great with 21B :good:
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
boot.img and system.img must be updated together in the kdz zip otherwise kernel modules (such as exfat) will not be updated (stored in system.img). Alternatively flash a custom kernel after the KDZ ZIP to update the modules.

that said in order to have the forceencrypt patch you need to modify the initrd of the boot.img.

extract boot.img, extract initrd, look for fstab files, replace "forceencrypt" with "encryptable", repack initrd, repack boot.img
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
Yeah, didn't know how to do all that so just used your old boot.img from 20A and just format FAT32 to use my SDcard 128gb :) Now if you give us the modded 21B boot.img then we're set :D
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
Sadly I don't have time, but I can give you a hint as to how I did it. Plus, if I just state how to do it here, you won't have to depend on me for future updates. :)

When I did it, westwood was releasing the kdz zips, but a KDZ wasn't out yet, so I made one from available system files.

As I extracted his boot.img I figured out the differences and applied them to 20A.

You can do the same for 20B and onwards.

1) Get my old 20A and stock 20A

2) Extract boot.img and initrd from both and compare differences

3) place differences from (in 20A stock vs modded) in 20B boot.img initrd (such as forceencrypt, and removing rtcd from .rc files..)

4) repack initrd and 20B boot.img

5) now have modified 20B boot.img

As for extracting and repacking, I used abootimg for the img (other tools can cause issues), cpio and gzip for the initrd. (google "repack initrd" it doesnt use anything special)
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Crazy Chuckster:
[MENTION=5803877]HueyT[/MENTION] I am using your 21B version with the latest Magisk v17.2 and I am experiencing some slowdowns coming from Nougat. The way I updated was I flashed Eliminater74's TWRP from here then I formatted data, system, cache, dalvik.... then I flashed your zip, rebooted to recovery then flashed Magisk.

Phone seems laggy compared to nougat and the battery use is definitely higher than nougat. Any thoughts? Do you think flashing Melina kernel would help and if so should I just flash the latest oreo version from TWRP?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
https://www.androidfilehost.com/?w=files&flid=283212

Flash this kernel, then Magisk 17.2
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Crazy Chuckster:
Thanks HueyT, any need to reboot in between flashing kernel and magisk?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
Nope. Good 2 Go. I also use dual speaker Magisk mod, Adreno v18 drivers, and busybox zip
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Crazy Chuckster:
I downloaded the Adreno V@313 REV20 drivers from that thread and upon reboot I got a black screen only. I had to dirty flash my rom/kernel/magisk again to get her back. I did not mount system before I flashed the .zip, you think that was it or do you have the v18 drivers handy?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
V20 works fine with 21B also for US997 VZW
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Crazy Chuckster:
Gotcha, do you think the issue I had (booting to black screen) was due to not mounting system before I installed the drivers?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] HueyT:
Yep
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Crazy Chuckster:
I assume you meant yep to mounting system when flashing the new adreno drivers but it still does not work, I keep getting stuck on the lg g6 logo and it will not go further.

Had to re flash the rom and everything else to get it back. Just going to leave it for the time being.

One last question for you HueyT, even after using your 21b rom, magisk and the new kernel...... When I reboot I have to enter my pattern to open android after reboot. Does that mean forecencrypt is still enabled?

I dont have to enter a pattern in twrp at all, just when I reboot and go to open the phone for the first time.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] jsyd9:
Any plans for 21c?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] rmedure:
17a KDZ

Finally getting around to this ... I cannot find that 17a KDZ anywhere! Do you happen to have a link?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
https://archive.midnightchannel.net/zefie/files/cell/LGG6/US997/ROMs/stock/kdz/
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] rmedure:
Flash KDZ

Thanks much! Bookmarking that ... :)

I thought I'd be able to flash that KDZ with fastboot ('fastboot flash system US99717a_00_0104.kdz') ... but got this error:

target reported max download size of 536870912 bytes
Invalid sparse file format at header magi
error: write_sparse_skip_chunk: don't care size 2946888530 is not a multiple of the block size 4096
erasing 'system'...
OKAY [ 1.001s]
sending sparse 'system' 1/1 (0 KB)...
error: write_sparse_skip_chunk: don't care size 2946888530 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 2946888530 is not a multiple of the block size 4096
OKAY [ 0.098s]
writing 'system' 1/1...
FAILED (remote: buffer overreads occured due to invalid sparse header)
finished. total time: 1.180s

And of course ended up with no system. Was able to recover using uppercut, but was wondering if you know why fastboot didn't work?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] cheerleone:
It's not a fastboot compatible [zip] file, it's an LG Propretary encrypted file.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] rmedure:
Well go figure ... that's what I get for trusting non-xda site saying you can fastboot KDZ. Lol
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Sobek5150:
Anyone have issues getting into download mode? Mine acts like it wants to then just reboots normally.

It's kinda pissing me off. Lol. Trying of KDZ back to get a fresh stock backup (lost my previous one to a corrupted SD card).

Any/all help appreciated. Thanks!

UPDATE: Turns out my issue was that I was trying to access this mode from a custom ROM setup. Now, I have no idea if this should matter or not - but the moment I flashed a stock ROM (most recent from HueyT up above) and got it loaded, I was able to get into download mode - no problems. Again - not sure if it's coincidence, but glad I tried.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] interestor:
Possibly a silly question, but do I need to flash gapps on here after this rom?

If I do, can I just flash it on now after the phone has been run a bit? Or should I reflash rom then immediately put gapps?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] jsergan:
Gapps already included in the ROM
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
This is a stock ROM, no need for GApps.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] interestor:
Thank you for the confirmation.

Ah yes, that is true.

Excellent.