yashsingh1/xdaforums huggingface dataset:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] oogli boogli:
I flashed twrp on my LG G5 in adb successfully and pulled out battery then held down power+volDown to enter twrp, but instead I entered the regular Factory reset window. I had LG G3 before and when I successfully flashed twrp on that one and directly after entered recovery mode I got into twrp but on this one I'm afraid I'll erase data to no avail.

now on my LG G5 (LGH850)

So I read you can also enter twrp in adb with 'fastboot boot twrp-version.img', which i tried and then it displayed the following:

downloading 'boot.img'...

OKAY [ 0.469s]

booting...

FAILED (remote: unknown command)

finished. total time: 0.495s

How do I get twrp as default recovery and go about my day to install SuperSU, custom rom etc ?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] KickerTom:
Booting image without flashing it is not supported by LG bootloader, unfortunately, that is the "unknown command" message.

When you say you booted into original recovery, what do you mean? You saw the warning about erasing data, or did the data actually got erased? If you flashed TWRP and there was no error, then it is safe to say yes (twice) to the warning, no data will be erased but TWRP will start.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] oogli boogli:
So I do the flash of twrp with adb, and enter power+volDown to enter recoverymode but its the regular factory reset page. On my older phones S2 and LGG3 directly after I flashed twrp on those and entered recoverymode, I instantly entered twrp. So it's a little bit different, the process have changed. But I don't want to press yes on factory reset if I dont know if twrp really is on there.

edit; isn't there a way to verify if twrp is the current recovery tool?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] KickerTom:
Well, the two questions come from bootloader (AFAIK), so there is no way around it. Also, AFAIK there is no way to know for sure if twrp is there or not (but it is highly probable, if flashing went without errors). So take a good backup, and risk pressing yes twice. That's what I always do :). Good luck...
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] iodak:
Reboot to recovery from adb, then it will go straight to recovery. "adb reboot recovery"
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] oogli boogli:
That's the problem, so I can flash twrp successfully but when I try to boot into twrp with adb the following happens:

C:\adb>fastboot boot twrp-h850.img

downloading 'boot.img'...

OKAY [ 0.469s]

booting...

**FAILED (remote: unknown command)**

finished. total time: 0.494s

C:\adb>fastboot devices

LGH850532cda26 fastboot

So I just have no way of verifying the current recovery, that's pretty much what I figured. I really dislike the change manufacturers adds in the development process with no direct input from them, with no changelog or similar.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] iodak:
I think bootloader doesn't support booting image. You can only flash it. You have to flash it, then pull battery out and reboot to recovery with buttons combination. It will "stick" then. If you boot directly to system, original recovery will be restored. On oreo mine didnt "stick" until i flashed magisk with it. When you first boot in recovery, ignore encryption and system ro warning. Later you can boot to recovery with adb, or terminal app. That way you bypass factory reset screen.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] askermk2000:
Seems we need an updated recovery with Oreo.

I was following the V20 forum, and there we had problem with disk quota not being enabled in the older nougat based kernel.

I've re-packaged the latest H850 twrp with my Oreo kernel, but there's still some problems.

Even after formatting data, after reboot and setup, going back into recovery I can't mount data.

I have a log.

Edit: this might be because of installing magisk while data was encrypted. It disabled forced encryption when trying again later.

[MENTION=5809849]shunjou[/MENTION] I'm running stock oreo, I'll test 4u
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] askermk2000:
Erhm, ok

I haven't quite grasped this encryption thing; I see the Oreo fstab has "forceencrypt", but so does Nougat...

So it seems Magisk disabled it on N, but not on O - for whatever reason.

Oh well, I do see "quota" being enabled in G5 Oreo fstab, just like V20 so that I suppose warrants an update at least.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Kye2000:
Can it still be used with normal recovery if I'm not encrypting?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] askermk2000:
I assume so since I haven't read any complaints about it, well I saw one in another thread but non-specific.

Anyway, I'm not sure what the trouble was with the V20, but it did seem to be something that needed

fixing promptly. So it's strange there haven't been any complaints here.

I didn't test myself the quota thing, I just noticed something unusual and assumed it was the same, heh.

Now I'm using a twrp with my kernel which has quota enabled, so if there is a problem, I'm not gonna

notice it :p

I can post the modified twrp image here if ppl think they need it.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Kye2000:
How do we go about installing twrp now on oreo since you cant boot it from fastboot?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] theviruz:
Have the same Problem cant Boot recovery with fastboot boot twrp.img ..... Any solution?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Kye2000:
Rookie mistake by myself. Take the battery out after flashing and boot ibto twrp with volume dowb + power
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] tremalnaik:
You should first use fastboot to flash TWRP (fastboot flash recovery twrp.img) and then reboot in recovery mode using Vol-/POWER.

If you do fastboot boot twrp.img you just boot once from TWRP, or at least that's what it should happen.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] MedBoy:
Hi everyone, I use lg g5 H850 and i am a master electronic engineer. my G5 volume down button does not work, because I broken volume down part of electronic pcb mistakely :( i can not repair this hardware problem.

Now i am using stock nougat and i want to root. before broken, i could open twrp and make root. bot now i can not do :crying:

I tried some adb commands but can not open via this commands (adb reboot recovery, fastboot boot recovery.img).

This is screen after "adb reboot recovery" https://hizliresim.com/pnZGYq

I can flash twrp.img but i can not open twrp menu without Volume Down button.

How can i open twrp menu without volume down button?????? :crying:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Kye2000:
AFAIK, you can't boot into recovery via fastboot. LG disabled that or something. I learnt this the hard way
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] MedBoy:
OMG!! can not i open twrp menu via fastboot? impossible? :crying:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] wulsic:
The screen tells me that the stock recovery is active. If you reboot once you flashed the recovery in fastboot it replaces the recovery with stock again (recovery-from-boot.p). I don't know which model LG G5 you have, but I that you have the H850? Backup data before doing this. You might need to flash KDZ/tot if things go wrong in LG's download mode(Volume up). Verify that your volume up works, else you're pretty much screwed. but you can try this:

1. Boot into fastboot with ADB reboot fastboot

2. fastboot flash recovery "recovery.img"

2. fastboot flash boot "recovery.img"

3. You can use fastboot reboot, but I'd rather always just pull out the battery (old habit)

4. Turn it on, it should boot into TWRP

4. You probably can't use your password in recovery for decrypting, just skip it since we don't need it anyway for this.

5. Mount system partition and open up File Manager, go to /system/ and rename recovery-from-boot.p to recovery-from-boot.p.bak

6. Sideload boot image with adb without wiping cache(Just use the stock bootimage from here if you have H850 https://xdaforums.com/lg-g5/development/stock-h850-30a-eu-rom-flashable-zips-t3850072.

7. Turn off the phone the normal way, it should now boot up and you should have the recovery still running :fingers-crossed:

8. Ofcourse you can also flash Magisk or some other kernel, but be careful with the boot.img ;)

Yes, sadly the LG's fastboot is limited, so things like continue and boot the image directly don't work. Since you have an engineer background, I would suggest to just buy a replacement volume rocker flex cable from AliExpress or some other place it isn't that expensive since they are just simple buttons. Hope this will help you :good:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] MedBoy:
Hello dear wulsic, thank you for your answer and interest.

1. i could not open fastboot via "adb reboot fastboot", but i can open fastboot via "adb reboot bootloader"

i flashed twrp recovery but phone can not open with twrp recovery. may be like your said, after flash twrp recovery, phone start normally, during this time, phone may replace recovery with stock recovery.

therefore, phone can not open with twrp recovery.

volume flex cable work correct, problem is electronic board. I broken mistakely :D i think, i have to repair volume down button. if i can not, i can not load twrp recovery :crying:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] udlp:
Yes, it's that way but what happens if TWRP says internal storage 0mb and sd card 0mb and it doesn't allow you to mount? I don't know how to continue. I just format data and it deletes TWRP.

It's exhausting....
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] wulsic:
I wrote it out of my head in the night, so my mistake :)

If you follow my steps, you should be able to boot into twrp since the recovery gets forced since it replaced the boot.img, and if you delete recovery-from-boot.p or rename it then it shouldn't restore it.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] MedBoy:
Hi again Wulsic :) Im sorry but i dont know how i can delete or rename "recovery-from-boot.p" file without root. I just make flash recovery twrp.img file :) can you explain a little bit? :confused:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] wulsic:
Hello, sorry for the late reaction. If you flashed TWRP to the Boot & Recovery partition you should be able to get into TWRP, if you are in TWRP then you have to mount the system partition so that you could see its contents. When you have mounted the system partition you have to go to the Advanced Menu, and open up File-Manager. From the file-manager you can go to /system/ and just move or rename the file. You don't have to do this in Android itself, you can just do it from the recovery itself without having it rooted at all.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] MedBoy:
Hi Wulsic. thanks. but, i can flash twrp.img file to phone, but my phone's volume down button can not work, so i can not open twrp menu. actually my problem is that i can not open twrp menu. :crying:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] wulsic:
You don't need the volume power down button. If you flash the recovery.img to the Boot, it will automatically boot into it. So you don't need the button at all. If you follow the steps, there shouldn't be any problems.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] MedBoy:
Hi again wulsic. my phone has not root access. therefore i can not change "recovery-from-boot.p" file name or delete. this process needs to root. as you can say, if i can change name of this file or delete, i can open twrp recovery via adb commands.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] CbIP:
Hello!

I have intalled a custom rom, which required to wipe data, system and cache partitions. After the rom has been intalled, I cannot acces data partition via TWRP - it says data partition decryption failed and shows size of 0mb.

I saw a few similar problems in this thread, but no solution.

Could anybody please help me with this problem?

Thank you!
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] totalnoob34:
You need to do a 'format data', in the 'wipe' section of TWRP, which requires you to type 'yes' to proceed. This removes encryption and lets you proceed.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] CbIP:
OK. I got it. I wiped data without formatting, which let the encryption enabled.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Abort Retry Fail?:
Trouble in Paradise

I recently flashed the latest KDZ file to bring my LG up to 20x. I then flashed the latest TWRP (twrp-3.2.3-2-h850.img) and proceeded to do what I had done many times before: carefully follow the directions in #5-#10 of the OP for the initial use of TWRP and the subsequent steps for unencrypting the data partition and rooting. Much to my surprise I got a failure message that I had never encountered before upon trying to wipe the data partition. Despite the fact that TWRP reports /data and /system as being mounted, the wipe function failed with a message that the data partition couldn't be mounted. Since I can't use "fastboot format userdata" with an unlocked bootloader, I'd be grateful for any advice on getting wipe to work.

SOLUTION: I carefully read the failure message, which said that \data couldn't be mounted because it was busy. So I rebooted into TWRP, after which the wipe function worked perfectly.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] s1k1:
Hiii, i want install twrp and root to my g5, so I dont understand this step

"6 Only if you want internal storage or data to work in TWRP:

Go to [Wipe] -> [Format Data] (not advanced wipe) -> type "yes".

WARNING: This will wipe your internal storage, disable encryption, and factory reset your phone!(is enyrption important what if type no) can i root my g5?

Go to [Reboot] -> [Recovery]."

can somebody explain me. If i want root my g5 i must swipe yes, that will wipe my data (not problem),but will it wife my rom and twrp so i cant boot my g5?

And can i put super su, and dm-verity and force encryption disabler on my inst storage couse i dont have sd card?

And what is dm-verity and force encryption disabler??
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Nadeem A.M:
[youtube]9YiFOYa2L9g[/youtube]

This video should clear up any questions. Any TWRP changes since this was released should be outline clearly in read me/guides on XDA. Anything further don't hesitate to ask.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] s1k1:
Hey thanks , i tried so I flashed twrp-3.2.3-2 but I cant get in recovery mode to acces twrp. I tried in cmd and pressing vol - and power but it only phone.

I am on 8.0 oreo , should i downgrade it?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wlaidimr_Necturia:
Develop_123

Dear I got the same issue while unblocking the bootloader with fastboot flash unlock unlock.bin

I got the evil error remote: 'cannot flash this partition in unlocked state

TWRP is neither installed not accessible. I am tired of and desperate !!!

Why LG G5 rooting is sot stupidly tricky ? Not to say about the way to get into the TWRP recovery which doesn't work at all !

:crying::crying::crying::crying::crying::crying::crying::crying::crying::crying:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wlaidimr_Necturia:
Well, solved by re-locking and unlocking. Now the next deep issue consist of TWRP that, even if flashed, doesn't appear after entering into the erase mode data.

After-that the system continues to load the Android software without entering the TWRP !!!
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Nadeem A.M:
There's a certain trick to it. Letting go and pressing the power button once the LG logo displays. The best way is to download TWRP or some other app and boot into recovery via Android itself.

If TWRP boots you know you just need to work on the timing.

If TWRP doesn't boot, recovery was not properly installed.

---------- Post added at 01:57 AM ---------- Previous post was at 01:56 AM ----------

What's the problem? You can't get into TWRP after first boot once the ROM has been installed?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wlaidimr_Necturia:
Not clear what you would like to mean

In addition once installed TWRP (all version 3.1. and 3.2 etct) and android 8: I can't find the zip files !

No ext sd card (oMb) and the internal memory doesn't show zip file. I lost 10hrs today !

I got mad !
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wlaidimr_Necturia:
Wll I've been successful after fighting with this awful device.

1) SD CARD issue: TRWP can read only small micro SD and not huge ones like mine (64GB). I used an old 2GB and everything worked smoothly

2) Oreo 8.0 is not compatible with TWRP zip flashes (only no-verity-opt-encrypt-3.1.zip; SuperSU-v2.82-201705271822.zip) proposed for nougat.

I had to install the following

H850_v2.0-mk2000.zip

Magisk-v18.0.zip

no-verity-opt-encrypt-3.1.zip

SuperSU-v2.82-201705271822.zip

xposed-v90-sdk26-arm64-beta3.zip

H850_v2.0-mk2000.zip is fundamental !!!

I hope somebody will enjoy my experience suggestions.

About the recovery mode procedure: it is absolutely crazy and meaningless !

I am still persuaded that LG Electronics is a sloppy brand (for everything). A wannabe horrible company, culturally customer careless all people worldwide should give up worldwide !
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] s1k1:
Guys any help with last 2 steps. I puted to files (super su and secound one) then go wipe format data then install super su and secound fileand reboot to system and i go this https://youtu.be/JbWyh6alWxY any help?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wlaidimr_Necturia:
follow my suggestion

I hope it helps
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Gold_Phenix:
What version use no-verity-opt-encrypt 3.1 or 6.0 or .... ? What it's better? If i don't use encrypt i must to flash it ?

Wysłane z mojego LG-H850 przy użyciu Tapatalka
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] SnowFuhrer:
Use the newest, 6.0.

I don't think it is necessary to flash it. I am not sure what it does exactly, but on some Samsung roms show an selinux permissive warning on boot if you don't have it installed. If you encrypt I would use it for sure, and I probably would anyway if you are on stock.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Gold_Phenix:
I have problem with latest twrp , they don't save settings i disable vibrations but when i make reboot vibrations is on , and data , time is wrong i have 1970... I use twrp 3.2.3.2 and Oreo 30f , H850 and kernel H850_v2.1-mk2000.

Wysłane z mojego LG-H850 przy użyciu Tapatalka
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Gold_Phenix:
I fix my problem . I change file system data partition just format exfat2 and back to exfat4 from recovery . Next format data and reset to factory . Now i can use inertial memory and i don't need microsd and i can make backup data partition .

Wysłane z mojego LG-H850 przy użyciu Tapatalka
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Skynet30:
What you did is at best redundant and at worst may cause problems. You are only supposed to install the no-verity.zip if you don't intend to use a compatible root solution. SuperSU is not recommended for root on a G5 running Oreo, only Magisk 18+. You shouldn't mix several root solutions (Magisk and SuperSU) and flash the no-verity.zip that is intended for people who don't want to root their phones.

So you only need the mk2000 Kernel and Magisk, nothing else. If you want Xposed, you install the systemless version from within the Magisk Repo.

I had no problems rooting my G5 using this method and I installed Oreo from a flashable .zip from XDA off my 64Gb micro SD card after I was using Lineage.

If at all possible, I would do a full wipe (system, data, etc) and reinstall from scratch, i.e. get the Oreo flashable zip from XDA + Magisk + mk2000 kernel and then only install these 3 things from TWRP.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] viktor92:
Recommended or not, I've rooted Oreo with latest SuperSU and had ZERO problems.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] theking88i:
:confused:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] SnowFuhrer:
:confused:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Gold_Phenix:
We have new version TWRP recovery 3.3.0.0.img [emoji6] .Pls OP to update first post.

Wysłane z mojego LG-H850 przy użyciu Tapatalka
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Ludodo:
Encryption in progress

Hello everyboody,

My first message on this forum !

First of all, I'd like to thank the entire xda community for sharing so much information, and special thanks to [MENTION=5672995]jcadduono[/MENTION] for the .zip he released.

I recently bought a reffurbed LG G5 H850 (european) delivered with Marshmallow 6.0.1.

Trying to root it I have followed all the steps to install SuperSU via TWRP.

Obviously something got wrong as I get several popular error messages when I boot my device :

- "Your device software can't be checked for corruption" immediately after le LG logo

- then a white page saying "Encryption in progress" and no other option than pressing a button that says "Reinitiate your phone"

I have paid attention to that answer by [MENTION=2835711]happyharrysco1[/MENTION] and [MENTION=2487502]RealLordK1[/MENTION]

I've done what is described by flashing no-verity-opt-encrypt-6.0.zip

but it is still the same :(

I have also tried to flash UPDATE-SuperSU-v2.82-20170528234214.zip ... same :(

I can boot my phone in TWR 3.3.0-0.

Can you advise any method to get my phone back ?

Is flashing a Custom ROM using TWRP the best way to get my phone back ? (I would also be happy with using a Stock ROM but I understood it cannot be installed using TWRP as only Odin reads .md5 files)

I am a beginner in flashing files. Can you recommend a ROM that is stable and easy to use ? Can you recommend a guide for installing it using TWRP on my G5 ?

Thank you so much in advance for your help,
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
The first message will always appear when bootliader is unlocked. It's normal behavior.

You can format data partition with TWRP if you don't want it encrypted. I suggest you to flash stock 30f rom to get latest stock. First boot can be very long (15-20min). You should wait it to finish. I cool my phone with a fan when it updates. Always update with battery over 70%. Remember that you loose all data when unlocking bootloader or formating data partition.

This is the post with 30f rom:

You can flash Magisk or Supersu to root it. If you do, flash latest mk2000 kernel after each Magisk re/flash.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Ludodo:
Thank you very much for your reply!

So I download the 30f.zip on my sd card then I flash it using "Install" in TWRP then reboot and wait 20 minutes and I should be done ?

To root it then do I only need to flash supersu with TWRP or should I do something else ?

(Sorry for asking so basic questions, I just want to avoid bricking my phone ...)
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
Bricking your phone is always a possibility, unlikely but possible.

If you have trouble with your data partition or if it's empty you should format it with twrp before next steps.

You should flash with twrp the rom, supersu/magisk (+ custom kernel if used magisk) and then reboot the phone.

First boot is long. You can't use your phone until it's done. Be patient! 20 minutes is personal experience, it can take 5 to 40 minutes.