yashsingh1/xdaforums huggingface dataset:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
From fastboot mode you can not reboot directly to recovery. flash again the twrp recovery with fastboot then reboot the phone by pressing volume - and power button in the same time for 10 seconds​ after pres volume - 1 time and wait that screen with 4 options : reboot, fastboot, recovery, of . When you see this pres volume- 3 times and hit power button
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
For my problem? Can you help me?

when I format data, then android say che encryption is not working

can you give me your rom to test it?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] OdinsBiceps:
Factory reset your phone in stock recovery and THEN flash twrp
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
From setting in phone?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] OdinsBiceps:
Guys correct me if i forgot something pls,

So the steps:

1.Go to settings and enable ADB-Debugging

2.Connect the phone to the computer and write:

"adb reboot bootloader"

3.press your volume down button 3 times (the recovery is on the 3rd position and press the powerbutton

4.now you're in the recovery this is the place where u also use the volume buttons to navigate to the line where "factory reset" is written and press the powerbutton

5.now after the process finished. Navigate in the recovery to "reboot bootloader" and press the power button

6.now u have to write:

"fastboot flash recovery

-nameofyourtwrpimage-.img

7. if finished -> take out the battery

8.press the volume down and the power button at the same time (when the lg logo appears release the power button for a half of a sec and press again) but dont release the volume down button!!!

9.1. screen that appears, press yes

10.2.screen that appears. press yes

11. format data in twrp (confirm with "yes")

12. install your desired root zip like supersu

13. reboot to system

14.enjoy
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
Can't boot into os if I format data help!

Encryption failed!

where must I flash encryption-h840.img? in boot or recovery partition?

I think encryption-h840.img isn't working becouse after flash in recovery partition, same error occours.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
I think is not working...
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] jeffsga88:
If you format data in TWRP, you remove encryption on data partition. If you have encryption removed, you must install em verity or SuperSU (as it installs dm verity too) or it will try and fail to encrypt on every boot.

Download the following and install from TWRP after formatting data from TWRP:

https://build.nethunter.com/android-tools/no-verity-opt-encrypt/no-verity-opt-encrypt-5.1.zip
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Juniiiors:
Can someone help me in the step by step? I want to unblock, twrp and root, help?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
If any of you want to write a post with every step from unlocking your bootloader to flashing tvrp and everything else I will update the first poste with all the needed information. Sorry But I don't have time for this
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
not work!
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] jeffsga88:
Maybe you want to explain what didn't work and what it says or does? Saying "not work" doesn't really help anyone be able to help you. Give details exactly what you tried now and what phone is doing.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
Sorry. Installed fresh os with lgup. Installed twrp. Format data and installed no verity opt encrypt. But when i boot in os the system say encrypt failed. Password is right but the files are corrupted.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] jeffsga88:
Did you format data from within twrp and then install no verity zip? After formatting data partition from twrp and installing no verity it shouldn't try to encrypt on reboot and should no longer ask for password when entering twrp. You could also try formatting data from within twrp, reboot to recovery using twrp reboot option, then install no verity zip and reboot. If that doesn't work, I'm not sure then.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
encrypt failed again!

yes, I format data with twrp. data is mounted correctly in twrp ad internal storage is ok. but no boot into os. say encrypt failed
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] jeffsga88:
Not sure then. Hopefully someone with h840 can help you then. On h830 / h850 once you format data from within twrp and flash no verity, it doesn't try to encrypt anymore which is what you want (no encryption). Sorry couldn't help more.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
Like I said before this is the reason why stock recovery image is needed for wiping data (factory reset your phone) I'm still trying to understand why this is happening but until then this is the only solution
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
How can I wipe data from stock recovery?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
=Flash recovery-> boot into recovery-> wipe data[] as simple as this
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
stock recovery say me only no commands

Ok now works! :highfive:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
After you flash stock recovery as an alternative factory reset with fastboot

fastboot erase userdata

Or

fastboot -w
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
The date and hour is wrong in twrp. How Can I set right?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] OdinsBiceps:
Hold the power button for 3 sec and then press the volume up at the same time, had the same problem
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
I fix my issue
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] YassGo:
Wait H840 got root and still no H860 ? :(

I want Fulmics on my phoooone :(
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
How fix clock and date in twrp?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] jeffsga88:
You can't currently. Just ignore it. It's like that on every version of twrp for every G5 that has TWRP.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] svetloslav:
Date in TWRP was fixed on the G4 H815 very fast by the now official maintainer steadfaster. As far as I know he pooled the date from the device memory. If asked he will certainly help us out. Can some one with more knowledge do it for our device?

The TWRP thread for the G4 is at following link:

https://xdaforums.com/g4/development/recovery-twrp-3-touch-recovery-t3442424
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Tehrtap:
I spent half an hour wondering why I couldn't get LGUP and uppercut to work (the phone didn't show up as a com port, but only as a serial device); turns out all I had to do was change the usb setting from charging to file transfer. I hope this helps anybody that might encounter the same problem
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] obol2:
if you are in download mode how oyu change the setting ? :confused:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] svetloslav:
[MENTION=5082633]synescu[/MENTION] - as per my findings the only version that would enable rooting in the new devices/firmwares is the one with encryption support. The other one is just as a reference and possibly for older devices/firmwares. However in the first post you state that encryption is not supported and you sort of imply that ppl. should use the regular one. It took me long to find that out, so maybe you would like to update the first post and make it more clear.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] pichulo:
When I tried to log in to unlock the bootloader, the lg site kept sending me to the sign in page. I think I'll just wait for a easier way to do this...
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] jeffsga88:
Try again later or use a different web browser to try it. Waiting for another method most likely will mean you will be waiting forever. Only way to unlock the h840 is through lg website. Unfortunately, at least with LG in the past few years, it's either been T-Mobile or officially unlocked devices using lg official unlock website that babe got unlocked bootloader's and TWRP, root, custom ROMs, etc. Also not sure but you may have to create an account first on lg Dev website (pretty sure you have to) before they allow you to unlock through them. Anyways good luck hopefully you get it working :)

Edit: Just re-read the instructions, you need to create an account and be logged in to use the lg unlocking website.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Tehrtap:
What if my phone keeps rebooting to TWRP?

Edit: figured it out, idk how to delete a post though.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] pichulo:
Yep! I have an LG account but when I try to log in, the website says there is a problem and doesn't let me in to complete the process.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] OdinsBiceps:
Did you also tried a different browser?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] anigooner:
Try IE
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] alvin_83:
Hey, how did you manage to fix that? i've followed the instructions, but now my phone keeps booting just in twrp.

Can anyone help me please?

EDIT: some(rare)times it does boot, but it says "cypher error" "factory reset", by clicking which the phone reboots..

but i installed also no-verity-opt-encrypt-5.1.zip, and the twrp_encryption-h840.img so it shouldn't..
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] pichulo:
Thank you guys for your suggestinons. Sooo I did try using a different browser, (MS Edge) and finally I could log in into the LG developer's website. After following the steps I got a pop up screen that said: Unfortunately, your device (Panama, (MIAMIOPEN(PANAMA)) ) does not support unlocking the bootloader. OMG... this is so frustrating, because according to LG's website the LG H840 is supported, I have an LG H840 (at least, that's what it says in the device's info screen)...

Anyway if someone have any other suggestions, they are very welcome.:good::good:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] jeffsga88:
Sorry, currently nothing you can do but wait and hope they add your device or someone still finds a way around it. This is how LG likes to do things, only certain specific versions of a model number are allowed to unlock (i.e. h850 for EU open market only, even though there are a lot of other h850 versions, but they can't unlock).
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] g40q90:
Is possible to have encryption and twrp data working at same time? I'd like to have encryption on but also be able to backup data. Thank you
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] GAttuso77:
I have exactly the same problem. Does anyone have a solution?

The only way to render the phone back usable again for me was to reinstall the firmware with LGUP, but, as expected, I have no root access.

P.S. Ok, I have finally managed to solve it.

It took me many times to try different combinations. I was confused because of this "5 second screen" that appears all the time and you never sure what will happen next: either it will start normal boot or will do some other action such as erasing or booting TWRP. So I'll post my sequence that finally allowed me to obtain root access.

Here are the steps that I have made after burning new firmware with LGUP (step 2 from [MENTION=5045079]svetloslav[/MENTION] post):

1. Make stock recovery: turn on the phone (holding volume down + power) and agree to delete all data on that white screen.

2. After it restarts for the first time don't do anything on the "5 second screen", the "Erasing" screen should appear afterwards and it will restart once again.

3. This time in the "5 second screen" push volume up/down and go for fastboot. Plug USB into PC and do "fastboot flash recovery twrp_encryption-h840.img" (it should be really quickly). Detach USB cable from PC and take the battery off from the phone.

4. Turn on the phone, in the "5 second screen" go for recovery (third option), it will restart once again and this time will load TWRP

5. In TWRP I have just burned SuperSu (I used 2.82 version) and simply rebooted

6. Don't push anything, it should restart two times and launch everything fine now

Great thank you to all who contributed into this topic, and especially to [MENTION=5045079]svetloslav[/MENTION] for the very detailed description!
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ayaromenok:
official LG page say's LG G5 SE: H840 for the European market

and looks like not all EU H840 can be counted - some from local operators can't be unlocked
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
If I link the source with I'm working for some time any of you with a decent PC (8Gb of ram minimum) can try to build lineage os 14.1? I give up trying to compile L.os 14.1 with 4Gb ram and jdk 1.8
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] scaltro:
Does this work also for H845 (EU market) ? is not listed on LG website, but it has same HW as H840...
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
First of All you must be able to unlock your bootloader. If your phone is not listed on LG website in the list of phones eligible for bootloader unlock then you'll never know.[emoji20] sorry.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] scaltro:
yep you are right, I also got official confirmation by LG :crying:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
Any chance to get lineage os on lg h840?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] msedek:
I have the H840 SE for south america.. went to the site and when submitted the IMEI and the device ID I got from the fastboot step, it says that my device from claro(peru) can not be bootloader unlocked.. is there any workaround this? this is like my last hope before I end up putting the device into the trash can... android is barely usable without root.. what a mistake I made buyind this device thinking that in 2016, locked devices wasnt a thing anymore.. and even less ina a flagship
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] OdinsBiceps:
As far as I know there's no way around it. Maybe u will find another way to use it instead throwing it into trash^^
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ghenarys:
[Help Request]

Hello !

For the first time I failed to have TWRP on a phone (H840).

I succeed to unlock the bootloader but not to install TWRP.

I tried this in cmd

- fastboot devices

- adb reboot bootloader

- fastboot flash recovery twrp3.1.1-0-h840.img

but it failed. Now I have just an awfull message on start and no custom recovery.

I'm very frustrate !

Thanks for helping !
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
When you try to to flash the new recovery make sure you are in fastboot mode. It will take just one second you might think that was failed. And for the new recovery to stick (if not It will be overwritten by stock recovery) first you need to boot into twrp recovery There are two ways for booting into recovery just read the first post carefully
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ghenarys:
It's works with the second file (twrp_encryption) !

Even if i have some error message on twrp about (un)mount.

Supersu, rootexplorer work too
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
I can't mount or twrp not recognize my usb stick connect with otg cable to the phone why? thx usb stick is in fat 32 format
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] mr.alakulihal:
Please I need you

Anyone please i need twrp for G5 US992 i cant see in anywhere
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ghenarys:
Hello

Because of lot error with twrp, I flash stock recovery but when I try to get in I only have a killed droid with no command error message

help !
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
Reflash the rom
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ghenarys:
it's the stock one coming with the phone
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Wire1122:
Can anyone add support for otg cable in this build of twrp?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] jeroen79:
wich roms are availible for the H840?, any clean asop ones?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Diomorgan:
after a lot of lines the last says:

FAILED (remote: cannot flash this partition in unlocked state) so I'm afraid is about unlocked bootloader , that is a nonsense because we almost need readable data partition to backup and flash....

Am I Wrong?

P.s.:I have h850 unlocked
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] askermk2000:
Anyone tried the new 3.2.0 for H850 ?

Work well?

Edit:

...oops, I see this is for H840, nvm
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] matteo0026:
Guys I have a g5se that at the boot asks me a password and removes me 2 tries of 30 total... How I can repair this?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] totalnoob34:
Did you buy the phone used?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] matteo0026:
Nope... I only unlocked bootloader, flashed TWRP with encryption support and formatted data in fat and after in ext4. Flashed no verity and supersu and after rebooted normally...
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] totalnoob34:
No idea, but could be related to encryption. If this is your first storage-encrypted phone, you may have confused

TWRP>Format>Advanced>(tick 'data')>Swipe

with

TWRP>Format>Format Data>(type 'yes')

Which are two different things I mixed when first tinkering with the device.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] matteo0026:
I tried either with the 2 methods... Nothing worked... And the phone before wasn't crypted
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] matteo0026:
Ok guys, issue resolved flashing stock ROM another time, finishing the tries and when phone told me that can't crypt the phone I pressed factory reset and phone booted well. The owner of the phone told me that wouldn't root anymore it because it's too difficult and I think that there aren't so much tools to recover a situation as this... For example I didn't find a tot file for this device, or I can't extract kdz for flashing userdata.img by fastboot (I had the same problem with Lenovo P2 and after flashing userdata I resolved the problem)
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] pseiko000:
Very useful and helped me a lot.

Just to take care, imo it's better to use always the not encrypt zip...

I took this howto for my LG G5 SE (H840) and all worked fine (after 3 runs :D)
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] bbracer16valver:
alanhttps://xdaforums.com/lg-g5/development/twrp-3-0-2-0-lg-g5-h840-t3604778/page12
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Darkitcgs:
Thank you very much - thanks to your detailed instructions I was able to ressurect my phone again. Only difference is that I haven't reburned the firmware but rather just flashed the stock bootloader via Fastboot.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
Hello guys please I need your help my phone it's In a total Brick State and maybe someone of you with an unlocked bootloader and TWRP can help me

Download terminal emulator app from Play Store or with ADB shell end past/type this Command and after this upload the image to some place

dd if=/dev/block/mmcblk0 of=/sdcard/h840.img bs=512MB count=1
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Kye2000:
From what i read, G6 and G5s can't be recovered in total brick by a user and LG sorts it out but they fix it free of charge if you just tell them my device switched off and didn't come back on. But I'm sure someone over in the V20 forum managed to unbrick a hard brick
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
Sending my device to

LG is not a option for me because my phone is out of warranty
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Kye2000:
Ah I see. Someone had the issue with their G6 earlier and an experienced dev said there was no way to fix it because certain files aren't available only lg have them
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
Yeah I know without a emmc_firehose from LG it's almost impossible but it's worth to try
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Snelfo:
Hello everyone, i'm triyng to follow the procedure but i can't find the file "twrp_encryption-h840.img" that i need...where are they? please help
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] synescu:
So please I am asking you again a big favour it will only take you 2 minutes and the resulting file it will be somewhere to 150 megabytes if you have a rooted device just install a terminal app (termux) is a good choice and just copy and paste this commands

su

dd if=/dev/block/mmcblk0 of=/sdcard/Loader.img bs=1024 count=168960

Thank you
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Snelfo:
Hy synescu i've done the procedure to provvide help for your problem

i have uploaded the result file on my google drive account and you can download it for your pourpose!

i really hope this will help you, as you helped us unlocking our devices

let me know if there is something else we can do to help you!

https://drive.google.com/file/d/1bIgmSDmCIOQ1sq2_jMfAEhBt47iTlWA0/view?usp=sharing
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Rooksx:
I must be being blind, but can't seem to see the links to the TWRP img files in the OP. Please help anyone? Thanks
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] slavomes:
Yes. [MENTION=5082633]synescu[/MENTION] can you tell us where we can find "twrp_encryption-h840.img"?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] slavomes:
I flashed TWRP.3.1.1.0-h840.img and succesfully rooted my G5 SE EU☺

encrypted version of recovery wasn't needed
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] zak_43:
img not found

Thank you for this tutorial, I just can't find the twrp encryption.img

Could you please send me the link to download it, I would be grateful.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Act7:
SORRY . Please help me.

I can't find a Link to download “twrp3.1.1-0-h840.img” or “twrp_encryption-h840.img"

Here i found a Link: https://mega.nz/#!qdQX2BwS!QdDvRk2UBXz1dVYSXYn5swxt7lOx8uJnPUUZ6T02-l0
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] luckana:
I have a question but I am not sure if it's been answered here, i couldn't find. If I manage to complete the rooting proccess, will I be able to recieve OTA updates from LG from then on and if not, is there a way to flash OTA images or something ?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] RichardBeaudelaire01:
Twrp unofficial file

Hi everyone

i'm using lg g5 h840 since a month, i bought it thinking it was the h850 in order To install lineage os.

Unfortunatly the h840 doesn't seems To be used that much. Like others i can't find the twrp file on this thread, and synescu is the only dev for this device.

The source code is still avaible on github, maybe someone could compile a new file from the source?

I don't have the skills, and the computer neither.

Rooting my h840 is the only way To clean my stock rom from the google and lg ****...
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Thatos3:
I still can't find the "twrp_encryption-h840.img". Has the attachment been removed??

---------- Post added at 09:51 PM ---------- Previous post was at 09:34 PM ----------

Sorry but that links to the standard "twrp3.1.1-0-h840.img" which can't read the files from your phone or sdcard
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] luckana:
were you on the latest EU build prior to rooting ? i am hesitant to try and flash twrp because the link for the encrypted img is nowhere to be found