yashsingh1/xdaforums huggingface dataset:
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] tempest64:
I used this TWRP image (Melina 3.2.1) when I rooted my US997 a couple of weeks ago, but now it refuses to load TWRP. It simply shows the TWRP logo for a few seconds, then reboots. Everything else seems to work fine. Is there any way to get any diagnostic information out of it to learn the cause? I am not against wiping everything and starting over, but if there is an easy way to avoid that, I would be grateful.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
No idea. Have not even booted the dev VM in over a week.

Just a heads up for everyone, I got injured during the week so don't expect the "July 6th" thing to be some kind of corporate release date or something.

I am just a broke person, who is now in pain. :P

Plus, no one even followed the directions in the Discord, so I have no testers.

One person joined, but did not read the #welcome rules.

Despite all this, I'll see what I can do in a couple of days.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
Thanks [MENTION=759634]zefie[/MENTION], best of luck to you. Wish I could help test, but can't afford to lose data. Might look into backing up via adb (I don't know much about it) and if successful, I can help test.

I wonder if following this guide would work, or would we still encounter the issues with TWRP and restoring?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
I was always of the assumption that TWRP ADB Backup is the same system, just that it streams the data over ADB rather than saving to local storage (sd/internal/usbotg), so I wouldn't trust that either.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] jimbomodder:
Opted in to test
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] mxaniac:
I tried flashing recovery_melina-TWRP_v3.2.1_18-06-08_zefie_LGUS997_rel_o2 on a stock Oreo US997 with an unlocked bootloader. Reboot to recovery showed the droid on its back so I reflashed via fastboot again and also formatted the cache. Now I'm stuck in a "secure start-up" screen, I'm down to 21 of 30 attempts to get in. It doesn't take the code I'd established for a screen lock. I have no cancel option, fastboot and adb no longer see the device. Since unlocking the bootloader I have no idea what keystrokes will attempt recovery mode either. I'm pretty screwed, any help would be appreciated.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
That reboot to droid was stock and you factory reset then, which encrypted it. Wipe data with TWRP.

Recovery is Vol Down + Power, until LG logo shows, then while still holding Vol Down, release briefly then hold it again until white factory reset screen.

Force off is Vol Down + Power for 10 seconds. Use this in combo with instructions above to get to recovery.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] mxaniac:
Thanks I eventually got a factory wipe with the stock recovery. I don't know how but somehow I got the option to come up. The usual recovery screen option of holding down the power and volume down until the LG logo comes up doesn't happen on any LG I've had with an unlocked bootloader. Instead a warning comes up about verification, then on this one a ThinQ logo, and then it starts all over. I was afraid to wipe because I'd read that if I didn't use the correct pin first, when I inserted the sim card even after a factory reset it would still leave me locked out. This wasn't the case.

I never did get the TWRP melina to install and my phone is not currently rooted.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
You missed the part where I said release power and hold it again at the LG logo, or in this case the ThinQ logo.

1) Press and hold Vol Down + Power until device shuts off

2) Continue holding until ThinQ logo appears

3) While still holding Vol Down, quickly release, and then press and hold again, the Power Button. The release and re-pressing and holding of the Power button should be done in under 1 second.

4) A white Factory Reset prompt should appear, instructions how to use it are on the screen. If the unlock warning you speak of appears, you did it wrong, start over at step 1.

5) Select Yes as if you wanted to factory reset.

6) If TWRP is properly installed, instead of the "droid on the back" and a factory reset, you should see TWRP.

7) You may get the verification warning. So long as you selected Yes both times at the white screen, recovery will boot.

Even with TWRP installed it will say Factory Reset on the white screen. This is in the bootloader and outside of our control.

It is a strange system and a pain in the rear. But steps 2 and 3 are important.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] mxaniac:
Yes sorry I did know about releasing the power button, just not exactly when. On my LG G4 phone it was at the colored LG logo when the audio is played, but then that never worked after bootloader unlocking. I jut got the G6. I tried it after thinQ logo yesterday but must have waited too long. I can reliably get in now, I suppose just knowing the exact sequence gives you the confidence to get it right.

I still don't know if TWRP is installed though, had the same problem with my G4. I used to have to use fastboot to boot from the bin file on my hdd and then use TWRP to flash the recovery before it would stick, i.e. fastboot boot twrp.bin but since that's no longer valid I can't use that method. Perhaps I just need to update my fastboot, I just looked and it's from 9Aug2015 so perhaps that's my problem. In any case I'm up and running and will have another go at all this when time allows. Thank you for your help.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
fastboot flash recovery recovery_file_name.img

should work. its what i used when testing.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
Builds will be attempted today, with test builds hopefully released soon on the discord. We have 2 H870 testers and 0 US997 testers, so only building h870 for now.

I'm not expecting much to be fixed on the TWRP end. They updated to newer Oreo revision and moved some repos around, but that was done on June 5th, then later on the 29th they released 3.2.2, but its literally just a version change to reflect the changes from June 5th. Full TWRP commit list. We already had the May updates. None of the June changes have anything to do with backups.

In other words, 3.2.2 likely won't fix anything. But we'll see.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] blackhawk_LA:
With latest official twrp I'm finally able to make backups of my encrypted data partition. The strange thing is that it can read the data without asking for any password. And I've checked via terminal, just in case, and the phone is surely encrypted.

I'm still on Nougat (fulmics rom) but planning to upgrade to oreo. Has anyone tried Melina recovery on Oreo with encrypted data?

Thanks!
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
Current versions do not have encryption support but I am working on it for o3.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Kiyoshiii:
Hey!

I formated data

flashed Melina kernel

rebooted recovery

flashed Magisk

rebooted recovery

Do I at one point need to flash you "anti-root removal tool"?

I didnt quite understand if thats still needed

I'm on Oreo Stock ROM

Thanks for your time!
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] crunchy_frog:
Well. I was wondering a lot about my G6. All the trouble with TWRP (the official one) not acting the way I expected it just drove me crazy.

Reading through this thread opened my eyes and that is just your credit. You're an incredible dev with much blood, sweat and tears - you dig deep into it. Thank you very much, [MENTION=759634]zefie[/MENTION].

I think I'll have a look at Discord since my new device (another H870) is about to arrive shortly.

Thanks a lot!
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] sun_is_shinning:
So, i finaly, finaly finaly was able to install this Kernel after try everything and get a black screen at boot.

Things really important to mention when flashing this:

1st: You need to flash a fresh ROM inside TWRP.

2nd: after that format data and reboot in TWRP again.

3rd: Flash Melina Kernel and reboot in TWRP again...

4th: Flash Magisk zip file, and reboot the phone to the system.

VOILÁ, Melina Kernel working really amazing.

Thank you, and hope for release 3 with better support. As for now im very very happy.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] error__404:
Hello, I have a rooting problem.

1. I unlocked the bootloader

2. Copied magisk.zip to internal storage

3. Through adb I installed twrp (I have tried different versions 3.1.1, 3.2.1)

4. I disconnected the phone and restarted it to recovery - everything was fine

5. The next step is flash magisk.zip, but unfortunately I can not install it - I do not see magisk.zip on the phone ....

When I look at the phone's storage, I see 0mb

Factory settings can not be done, magisk.zip would be deleted.

Where do I make a mistake?

thank you for answer

G6 (870) Oreo 8.0
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] blackhawk_LA:
I hope you get fully recovered soon! I've just upgraded to Oreo so I'm able to test (H870) both recovery and kernel
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] micgeb:
Maybe you don't see the magisk manager. Install the magisk apk. Have you any errors during install magisk.zip with twrp?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] error__404:
I can not install magisk.zip at any time. After installing twrp, I do not see the magisk.zip installation file. The internal memory is 0mb. I think the problem is Oreo.

Odesláno z mého LG-H870 pomocí Tapatalk
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] micgeb:
Format data again and install melinas lucye_oreo_anti-root_removal.zip from the first posting.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] sun_is_shinning:
So, the new v20b Oreo with ThinQ rebrand just came and now Melina Kernel works fine, but one thing i see is that RCTD is not working, i run into Hidden Menu and find it enabled, just to make things better for people who are oing to flash this.

waiting for a release 3 with RCTD fixed.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] error__404:
When I format the data, the magisk.zip will be deleted from the phone. how do i get magisk.zip back to my phone so i can make a flash? Sorry for my english #feelsbadman

edit: The same case is with lucye_oreo_anti-root_removal.zip
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
Purchase a MicroSD card. You should always flash from an external source.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] BlayDee:
Can't get it to work on H870 20b stock :( After reboot it goes back to stock recovery
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
USB OTG would also work.

---

Status update on o3:

Not looking too good right now. It seems that if we enable encryption, not only do we get the system read-only issue from official, but when you go to wipe data, it formats it instead (trashing /data/media).

Need more investigation, more testers, and most importantly, some devs to help me sort this out now that I don't have my own device to test on. I've spoken to J0SH1X (maintainer of official) and even he has no idea why mine is deciding to format instead of wipe. Tho he no longer has lucye anymore either.

Please join the testing discord for update and to help test. It can be found on the top of the OP now.

Please make a backup of all data (including /data/media, aka internal storage) before testing any Melina TWRP builds.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] blackhawk_LA:
I was going to join the testing but I had some issues with Oreo and needed to go back to Fulmics rom. However, if you think it may be useful to run any test on nougat, let me know.

Keep up the good work, it's really appreciated
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Kiyoshiii:
Hey guys!

A fast question, I'm on the Melina Kernel and have root with Magisk as well as the Melina TWRP installed.

Now the update v20b Oreo is here for Oreo, can you explain me how to install it?

I thought maybe just upgrade it with LG UP, but will the Kernel/Root stay or do I have to reflash them as well?

I really would appreciate your answers cause I'm kinda new to this stuff.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
Recommended way is to do it via LG UP, then reinstall TWRP, Kernel, Magisk .. in that order :)
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Kiyoshiii:
Thanks for that super fast answer!

Do I have to format Data in this progress again btw or can I just install everything?

Your Kernel is great, I always had a very hot phone when watching videos or using chrome, thanks to your kernel it stays cool and happy :victory:
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] blackhawk_LA:
I think yes, you have to format data again, but that will also make your data unencrypted.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
Most likely yes, data will have to be wiped due to forceencrypt. However, there may be a way.

I have not tested this and can't since I dont have the device, but if you want to try it:

1) Enter download mode and flash new version via LGUP

2) When the phone reboots, catch it and trigger fastboot before it as a chance to boot system

3) Flash TWRP and reboot recovery, before it has a chance to boot system

4) Flash Melina kernel or my anti-root removal zip (either or, both would be redundant)

5) Now you can boot system as we removed forceencrypt

This in theory would work, but not sure, especially if it does setup in stock recovery after the update.

But at the very least your data would still be un-encrypted.

If it does work, let the system fully boot and settle for a few min, then reboot and install magisk.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] bou87:
I upgraded to v20b by lgup, then put melina twrp again and did not have to format data, that is, I have not yet put the kernel melina, I will wait a few days with stock to test, flased magisk also, but if I saw that twrp again does not mount system, also happens in the official?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] dwasifar:
I received a phone back from LG warranty service with 20a already installed. This version of TWRP can't mount or format the encrypted partitions. That's okay for now because all I wanted to do was install Magisk, and I accomplished that by adb pushing the file to the phone with TWRP running. But eventually I might want to do more, so I'll keep an eye here to see if the encryption problem gets solved.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] micgeb:
Format data don't work?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] cory733:
I'm on 20A, after flashing this TWRP with fastboot, I can only get to TWRP for a second (just the TWRP loading screen), then it reboots back into android.

Using rel 02 US887

Any ideas?

Edit: used the other version rel01 and works fine.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] jimbomodder:
[MENTION=8554678]zelfi[/MENTION]e test O3 formatted internal too

Sent from my Nexus 6P

---------- Post added at 01:04 PM ---------- Previous post was at 12:53 PM ----------

Here's a video

[youtube]wgnqEVYIEf0[/youtube]
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Eliminater74:
If anyone cares, I see that [MENTION=759634]zefie[/MENTION] only created for US997 and H870, and I think I might have messaged [MENTION=759634]zefie[/MENTION] once to support h872, but I dont think I ever got an answer..

So, the fact that I might need to start supporting vendor parition soon and just wanted to build a recovery, I went ahead and built his recovery with H872 (T-Mo) Support.....

I did see that in his code he did add support for the H872, but no device tree on his github...

If [MENTION=759634]zefie[/MENTION] is willing to add device tree,

Here is my work: https://github.com/DevG6/android_device_lge_h872/tree/twrp-melina

If not, I will just continue to build it my self...........
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
That's because Melina TWRP is currently broken. I did add support to Melina Kernel.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Eliminater74:
Can I ask what might be the problem?
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
When I enabled encryption support, for some reason doing a data wipe formats instead, wiping /data/media.

Edit: You are welcome to take over the project (just name it something other than Melina) as I no longer have a lucye device.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Eliminater74:
Yeah, I noticed a few other things as well, Like saying key doesnt match and so on..........

I will look into it.. I got so much going on at the same time.. ill see what I can do..... I mainly wanna update for my device cause ill be converting the vendor to partition soon enough and need that updated..

and i just like newer things :) but if I get things working, ill build for all devices..
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
AFAIK nothing is really different enough between devices to break TWRP, even in the kernel. But for safety sake, I use configs for each device.

Once you get yours working, porting is easy (just clone all the config except KERNEL_DEFCONFIG).
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Eliminater74:
May I ask whats the trick getting MTP to work under Android 8.1(Oreo) ? I have tried many things and still doesnt see it................

can you enlighten me a bit on this issue?

NOTE: I mean while in TWRP:
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
Not sure, does it still work in Melina TWRP?

If so, it may be the fact that I use Melina Kernel (LG Stock Based Kernel) rather than LOS Kernel.

I never did finish porting Melina Kernel to LOS :(
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] jimbomodder:
Mtp works fine, at least on H870

Sent from my Nexus 6P
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Eliminater74:
I got it working, cant use TARGET_OEM_BUILD because it will disable the build of the MTP drivers as well as disable some other stuff tooo.. its just for a simple recovery nothing else.. removing that allowed it to build and everything worked.

I use my own kernel.... I was using stock for testing, then recentlly went to my own kerne.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] ehtisham ali:
Will this work on h872
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
Yes, it will.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] ehtisham ali:
Is this stable for backup and restore for h872
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] AlDollaz:
Yes.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] backslashV:
unable to download with the **** ton of ads you put in the link.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
So I am kinda back :) Is this still the latest TWRP for US997?

Yeah..... my server went to **** and started looping ads, sadly I don't get notifications from here, and I did not know about it until I needed a file for myself. I just disabled all that ad **** so links should just work. Sorry about that.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] TheWolfSVK:
Hey there, it has been surpassed by OrangeFox recovery https://xdaforums.com/lg-g6/development/recovery-orangefox-recovery-project-t3943594
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] evertking:
Can someone help me out here?

I have unlocked the bootloader and flash twrp but it wipes my SU and then lose all data and booting back into OS i lose twrp.

Im stuck
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
Assuming you are on Stock, after flashing TWRP, reboot to recovery BEFORE the OS can load.

This can be tricky, after sending "fastboot reboot", quickly press and hold Vol-down and Power while the screen is black, then when the bootlogo shows, release and press power again quick (as per normal), then choose factory reset (as per normal).

You will then be in TWRP, so then flash this file to disable the anti-root and anti-custom-recovery scripts LGE has.

https://archive.midnightchannel.net/zefie/files/cell/LGG6/common/lucye_oreo_anti-root_removal.zip
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] DuringSummer:
Is it possible to install it on H872? I tried flashing it in OrangeFox TWRP, but it keeps giving me error.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
The zip is not flashable. Extract it on PC and flash recovery via fastboot.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] DuringSummer:
Ah. Thanks. I hope this fixes the system mount issue.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] TimLGG6:
I think I'm doing something wrong. I have a H870, and flashed the image `fastboot flash recovery recovery.img`. When I reboot it does reboot into fastboot, then I press the volume down + power nothing is happening. When Pressing just power up its trying to do a firmware update.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Sobek5150:
You don't want to reboot into fastboot.

Do this - hold down the Volume Down button + Power button. After 10 seconds the phone will reboot. Keep holding the buttons. When the LG logo appears, release just the Power button, then press it in again and hold.

You'll be presented with a white screen asking if you want to wipe the phone. This is the stock LG entry into Recovery. As long as you have TWRP installed, select Yes. Then select yes on the next screen as well.

Again if you have twrp installed then it will boot twrp. If you don't LGs stock recovery will wipe the phone.

EDIT: Commit this button combo to memory. I call it the "Oh ****" switch. Pretty much anytime you have an issue and need to get back into Recovery this should work.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] MacLaughlin:
Thank you very much. Finally somebody with a good solution to fix this never-ending problem.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] mprovi_15:
Installed these version of twrp and got the decryption screen password. Tried also official twrp 3.1.1 and got these problem, tried official twrp 3.2.1 and didn't get these error but gave me /system error (device or resource busy). So finally installed these version and formated /data to get out of decryption error. Model european H870.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] zefie:
I have not tested Melina with encryption. But, from what I can see, even if I was to make encryption work, the same problem would happen as the official TWRP. It is using a file on /system to handle the decryption, which then prevents you from modifying system. I can look into this when I get some time, but not sure how to approach it.

Melina will work flawlessly without encryption, but I can also understand the desire to encrypt, since between an unlocked bootloader, and backdoors in LG LAF (ability to dump userdata even with locked bootloaders), there is really no other form of security on this device besides encrypting everything.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] K3V1991:
[MENTION=759634]zefie[/MENTION]

All works great :o

Keep up your work :highfive:
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] mats_youri:
Hi, could you advise me how to avoid data partition encryption. I have zefie twrp and I did format data before flashing fulmics 3.5. Now data is encrypted once again. Is it matter of making pin for screenlock? Thanks.
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] Moldeb:
Fulmics does not encrypt /data. If you use TWRP file manager you can probably read all files in /data without having to enter a password...
[LG G6 ROMs, Kernels, Recoveries, & Other Developme] mprovi_15:
Sir, could you solve the problem of encrypted data when installing these twrp please? It happens in LG G6 H870.