yashsingh1/xdaforums huggingface dataset:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] wp007:
Yep, 3.2.1.0 works perfectly for me. Restoring is possible again. :good:
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] megatron_lives:
Great news, I will try this now too!
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Voldemort13:
reboots always to twrp

I have now formated system, data, internal storage and both cache.

When ever i try to flash something with twrp (like RR) Iit says itz successfull but when i reboot it will just reboot back to twrp. Nothing helps. Tried to pull battery, flash again, twrp3.1.1 and 3.2.1-1 please help
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] totalnoob34:
Stop right there. That's called TWRP loop, and it has fooled me once.

Boot to TWRP, and run this command from Advanced>Terminal:

dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc

If you prefer, you can plug the phone into a computer and run

adb shell

dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc

one command at a time. Then you can reboot to system.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Voldemort13:
Thanks! I could reboot again with it but then it said in the rom boot "decryption unsuccessful " and "please reset device" when i clicked it it went back to twrp and same problem again. I tried to flash the DM-Verity zip but didint help.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] totalnoob34:
You probably didn't do a 'Format Data' in TWRP, right after flashing it. Did you?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Voldemort13:
Fixed! Thanks!

After i formated data in twrp where you need to write "yes" for data formating and did what you told everything worked!
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] totalnoob34:
Glad it did. That was because stock encrypts data, and custom roms can't decrypt it, thus you need to format it first.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] poruid:
As of yesterday LineageOS supports FDE (full disk encryption) on the H850.

Now, although TWRP (3.2.1-0-h850) prompts for the password (in my case a pattern in 4x4), the data file system cannot be decrypted.

Any suggestions (better not including wipes etc.) ?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] dabrowsk:
Trying to backup, I have the error at the end of the process as follow:

I:Error writing destination fd (No such file or directory)

Any idea, what is wrong?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] EtenNewbie:
decrypt data and

In my case I set a PIN for FDE, but this doesn't work also.

I would also like to include /data in the Nandroid backup but it wont allow it. I don't care if its encrypted as long as it is backed up.

I know I can backup all my apps and data with Titanium (and I do) but would prefer the nandroid backup to include the data partition.

Ian

--
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Nimueh:
After 2 years we finally have a TWRP version for the H850 that doesn't have that annoying date/time bug :victory:

[MENTION=5809849]shunjou[/MENTION] posted it HERE and if you check my reply you'll see it's working :highfive:

So everybody that has the bug where time + date don't stick might want to give his version a go ... just flash in TWRP as always (select .img to show it) :good: :)
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] viktor92:
The last version works fine, but after setting the time, the backup was made with 1971 as the year !!
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Nimueh:
Weird, it worked fine for me :confused:

It already had the correct time as soon as I flashed the new version though, maybe something went wrong on your end?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] viktor92:
I had to adjust the time, and the backup was generated with the correct time, day and month, but with 1971 as year...
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Nimueh:
Odd ... idk what to tell you, maybe ask in the other thread?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Skynet30:
Same here, day and month are correct (and stay correct) but the year is 1971.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
Strange, as this isn't an issue on the H830 or for Nimueh who has a H850. It might depend on the rom you have installed. Are you running something based on los or stock?

Either way, I can't see what's going on without a log. In TWRP, go to Advanced > Copy Log and check include kernel log for good measure. In the recovery.log file, the lines that adjust for time offset are prefixed with "I:TWFunc::Fixup_Time" and look like this.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Skynet30:
I first noticed the error when I was backing up my stock boot partition (ergo still running a H850 stock rom) before upgrading to LOS 15.1 which I am running now.

I just created a log (now running LOS 15.1 as ROM) and here is the relevant excerpt:

I:TWFunc::Fixup_Time: Pre-fix date and time: 1970-02-05--22-51-22

I:TWFunc::Fixup_Time: Setting time offset from file /sys/class/rtc/rtc0/since_epoch

I:TWFunc::Fixup_Time: will attempt to use the ats files now.

I:TWFunc::Fixup_Time: no ats files found, leaving untouched!

I:TWFunc::Fixup_Time: Setting time offset from twrp setting file, offset 69864009535

I:TWFunc::Fixup_Time: Date and time corrected: 1972-04-24--13-31-31

Apparently I am missing ats files. I have no clue what these are, to be honest.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Nimueh:
Looks like I have those ats files ... whatever they are :confused:

I:TWFunc::Fixup_Time: Pre-fix date and time: 1970-03-10--07-51-11

I:TWFunc::Fixup_Time: Setting time offset from file /sys/class/rtc/rtc0/since_epoch

I:TWFunc::Fixup_Time: will attempt to use the ats files now.

I:TWFunc::Fixup_Time: Setting time offset from file /data/time/ats_2, offset 1518681181630

I:TWFunc::Fixup_Time: Date and time corrected: 2018-04-24--15-44-11

I'm guessing that's why it works for me - but please don't ask me how/where I got them from :laugh:

I initially came from stock (obviously) 2 years ago, then briefly used some custom stock rom and then only proper custom roms. I've been on RR for the longest time and am still on Nougat since there's no decent Oreo roms for our device yet.

I hope that helps you to narrow down the issue for those that have the wrong year :fingers-crossed: :)
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] viktor92:
In my case, this is what the recovery.log file says:

I:TWFunc::Fixup_Time: Pre-fix date and time: 1970-05-11--21-05-05

I:TWFunc::Fixup_Time: Setting time offset from file /sys/class/rtc/rtc0/since_epoch

I:TWFunc::Fixup_Time: will attempt to use the ats files now.

I:TWFunc::Fixup_Time: Setting time offset from file /data/time/ats_2, offset 30030524818

I:TWFunc::Fixup_Time: Date and time corrected: 1971-04-24--10-53-48
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
I ran a build with some additional qcom flags and a minor source change, but I'm not sure it will have any effect. Link

Otherwise, I don't think there's much I can do since it doesn't seem to be kernel related. The qcom time service, a proprietary vendor library, is responsible for generating the ats files but what's strange is that only the year is failing to be accounted for in the offset and only on certain devices. Skynet's lack of ats files is likely due to the time service framework not being ported to O but that doesn't explain why viktor, running a stock N based rom, has the same issue even with the ats file found.

Another variable might be baseband/modem; what version are you currently on [MENTION=5965175]Skynet30[/MENTION], [MENTION=4649623]Nimueh[/MENTION], [MENTION=5192335]viktor92[/MENTION]?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Skynet30:
996faaaanazm-1.101802.1.109832.1

The bug isn't really a big deal because the back ups do get sorted correctly (day and month are fine). I don't want to take up too much of your time for something so minor.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
Yeah, like I said there isn't much I can do outside of the minor changes I made in the build I posted above. So if that has no effect then it isn't a huge issue since the year is an almost cosmetic defect in this case.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] viktor92:
M8996FAAAANAZM--1.101802.1.109832.1

I've just tried the modified version, and year still is fixed in 1971...

Don't worry, doesn't matter ?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Nimueh:
Mine is the same as viktor92, M8996FAAAANAZM--1.101802.1.109832.1

What I did do was flash the LG-H85020A-Flashable Bootloader + Modem last year and then LG-H85020S-Flashable Bootloader + Modem in January this year. But no idea if that would have anything to do with it?

Since the last one works for me I probably won't flash todays version [MENTION=5809849]shunjou[/MENTION] ... never change a running system and all that :cool: :laugh:

Thanks for all your effort though :good: :)
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] wolflie:
hello, after installing the twrp i try to fastboot boot twrp-3.2.1-0-h850img but it won't work

so i must use the adb command (obviously after restarting the phone= then i keep getting the "dead adroid screen"

my volume down is broken so i can't just dc everything and enter the recovery mode manually. what can i do?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
Try to pull out baytery and then boot normaly. May help. You can flash kdz, but you will loose your data.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] azia1:
Hello, I have the same problem and pulling out the battery didn't solve it. As I'm not that experienced, could you please explain how flashing kdz would solve it ?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] 2be3_80:
Hello, I just got h850, unlocked bootloader flashed Twrp and bang: encryption.

I did format internal data with 'yes' confirmation and than flashed Fulmics. And than to my surprise when booted to Twrp that annoying encryption screen is still there. I just can't make full backup with Twrp including data because of it. When I restored Fulmics backup I have received clean rom to setup with all settings and data missing.

Any solution to get rid of encryption and be able to make full ROM backups?

Right now I'm on Fulmics 5.5 with magisk installed and latest official Twrp (3.2.1.0).
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Faerloss:
Latest version is 3.2.1.1

I had problems when i tried install something with version, which you are currently using. Boots only to twrp, problems with encryptions - especially with new released roms.

Dunno if it will help you, but you may try.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] 2be3_80:
I'm on 3.2.1.0, should I upgrade or flash 3.1.1.0? Which version do you recommend?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] totalnoob34:
I recommend that you update to the latest version.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Faerloss:
Install the latest version of TWRP. You'll find it on official TWRP site.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] 2be3_80:
Did this thanks, I have fulmics installed and when booting into recovery data partition is encrypted. Should I format data, install Fulmics again to gain access to data partition for backup purposes?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Faerloss:
I always make a "clean installation" but maybe someone wtih greater knowledge can clarify your doubts.

Do't wanna make trouble :P
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Pphish20:
This is completely normal when you install a new version TWRP or upgrade firmware. And yes you should format data and reinstall Fulmics; even if you have backups it is possible they won't boot correctly with new recovery...a clean installation should take only 30min and is your best option for a working ROM
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Nimueh:
I have never had to re-install the rom when after updating TWRP or even after flashing modem/bootloader.

Then again I was always on LOS based custom roms, but I can't imagine Fulmics being any different.

When flashing TWRP for the very first time yes - you have to format data ... but not after a TWRP update ;)
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
Can someone with h850 run this script (right click, save link as) and share the resulting txt files?

Just place it at root of internal storage and from twrp terminal do:

cd /sdcard
sh ./info.sh
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
Did my best

Files attached.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
Thanks for this. Based on your screenshot, I'm guessing you haven't updated to twrp 3.2.1-1 that was released recently (also guessing you have a third party battery)? Do you mind flashing the update and running this (slightly revised) script again?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
I did have latest 3.2.1-1 but modified to work with g5. For you i flashed the official and broken the time and date in recovery. Also the official has no access to my internal storage. Had to modify the script 3 times for it to work.

Any way. I'll try to attach files to this post.

Edit: could not attach here. Attached in next post.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
Files with data.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
Not sure what you mean by "modified" to work with g5, but the screenshot you showed must have been a build prior to 3.2.1-1 official since tzdata is missing and your cpu temp is actually (fake) battery temp. Also, for whatever reason, the files you posted before had no "h850" device prefix in filename, meaning that getprop was either missing or broken which might have been an issue in 3.2.1-0.

By no access to internal storage, do you mean you can't decrypt your data partition or the entry that mounts it in fstab is wrong?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
That version declared 3.2.1-1 on startup screen. I got it from this thread few posts earlier. Yes I can't decrypt my not encrypted data partition with official version. And it saves no settings.

Edit: the previous version was also made by you (@shunjou) and worked great! Thanks for that.

Thank you for your effort and time.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
That old version I posted before is the same as official, just missing a few changes. Other h850 users haven't reported this issue either, so I'm not sure what could be wrong for you. Can you try this build and see if it's different for you? If not, copy recovery log from advanced menu options and post it here.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
For me this version still shows incorrect time and doesn't save settings. Sorry. I'm glad to test any version you post. Thanks!
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
You need to post the recovery log, Advanced > copy log. You might also want to try wiping your settings file at /sdcard/TWRP/.twrps
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
It doesn't mount data partition because the default password doesn't work. Copy logs don't work and I cant take a screenshot. Deleting the settings didn't help since it can't access the folder any way. Only root + subfolders and external_sd are accessable.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
You should be able to copy /tmp/recovery.log to external sd or use "adb pull" if connected via usb.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
Didn't know were it is. Log attached.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
I think I understand now. Try this build.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
Yes. That build works. Takes some time to load, not that much but still. Very good. Thanks! Log attached. Year is 1971 for me.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
The few second delay is there because of TW_SCREEN_BLANK_ON_BOOT to make sure that the touch screen is ready and battery percent is correct.

Thanks for testing this since I can't do it myself and I haven't seen anyone else report this issue yet. After making a backup, could you also try flashing something to the system partition as a test? Even re-flashing the same rom you're using right now is fine.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
[MENTION=5809849]shunjou[/MENTION], I've flashed supersu and seemed to be ok. Log attached. Can i help you fix the date?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
The date issue was already reported and only affects the year. Two h850 users mentioned it while another mentioned it was fine. I have a h830 and the year is fine for me as well. I'm not sure what causes just the year to be calculated incorrectly from the ats offset, but I haven't looked into it any further since. It really just amounts to a cosmetic defect that partially affects backup timestamps since month/day/time is otherwise correct. Considering time fixup was completely broken before, having only the year be wrong for just some users isn't too critical an issue.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] viktor92:
There's the new version 3.2.2-0 for the G5. I've flashed it but not tried yet

Update: just tried and the 1971 year bug is still present.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] karma0321:
I'm having the same encryption issue, I was on Fulmics with no problems (TWRP 3.2.1-0) but now on XenonHD (8.1.0) I can't decrypt data partition anymore. I tried with my pin, changing to a text password, using "default_password" but no luck. I saw in previous posts there was some other people with the same issue and I tried to download the builds linked but AFH gives a 404.. can you guys reupload so I can test too? Thanks!
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] ilyadan:
I'm on stock ROM. Internal storage works for me. Except the year 1971 (not an issue) all is good.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
Is anyone running los 15.1 or another oreo rom with encryption that can test a new build? G5 variant doesn't matter.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Spaceboy60:
Having all sorts of problems with TWRP on my H850. Running twrp-3.2.3-0. Main thing is that after restoring any ROM my pattern isn't recognised although I can unlock via fingerprint still. Second thing is after restoring one with a pattern I get a number of issues, can't install some apps via Play Store, some apk files I've downloaded won't install (keep getting an error message saying they're corrupt: they're not because if I do a clean install of a ROM they install), and there were even a load of apps that were missing on restore (I only backed up today one ROM and did a wipe and restore straight after just to test). Any ideas on any of the issues mentioned?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] shunjou:
The first issue you mentioned is universal (got it on a different device myself) and has existed for awhile. For a fix, see here.

For the second issue, what rom are you using and what partitions are you backing up/restoring? Is your data partition encrypted? I haven't seen anything like that myself.

Also, you should update to twrp 3.2.3-2 that was just put up for the h850 which improves performance a bit and supports los 15.1 better. If you still have issues, consider posting a log next time.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Spaceboy60:
Ok,thanks for the link regarding the first issue. With regards the other details:

Running H-Rom V30 v3.0

Backing up data,system, boot and efs.

Not sure if data is encrypted, although i did select format rather than wipe in TWRP as i kept getting a password encryption screen coming up asking me to enter a password every time i tried installing a new ROM. That would have removed encryption right?

Will try installing the latest twrp you mentioned to see if any difference.
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Aragami84:
Hi, I'm new to this and trying to root my Rs988. I explored and read a lot.. but I'm at a point where I'm not sure what to do..

I explored and typed the "adb fastboot" and saw the phone reboot and saw the command line on the phone and some text... so I assume I have done everything right up to that point for installing adb and fastboot..

But I was hesitant to fast boot on the TWRP Rs988 img.. because I didn't know what to do next because I'm not sure I understand...

I downloaded the "no-verity-opt-encrypt-6.0.zip" and "UPDATE-SuperSU-v2.82-20170528234214.zip" and put them in my SD card root.

So I assume when I will do the "fastboot flash recovery C:\adb\twrp-3.2.3-0-rs988.img" in my command line it will flash or load the img...

Then I'm told to not let it reboot on android... but there is no explanation of what it it will do or what I will see once I type the command?

Does it will say "Now you can close you phone?" or something... ?

I saw in another place that I needed to remove the battery then put it back...

Then I continue the process with ->

a. Using 2 hands.. use one hand/finger to press/hold volume down.. and use the other hand for the power button. Press n hold both buttons.

b. As soon as you see the LG logo on the screen.. let go of the power button then quickly press it again (never letting go of volume down).

c. Keep holding until you see the Factory Reset screen. Click thru the factory reset screens.. Yes.. Yes...

Then I also don't know what to do exactly.. ?

Do I need to Flash "UPDATE-SuperSU-v2.82-20170528234214" or "no-verity-opt-encrypt-6.0" ?

Are they the same thing ?

They both root the system? or I need to apply one after the other and by which do I start first ?

Also I need to do a backup before apply Su

Can anyone expand aon the actual steps I need to do ? and questions I have ?
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] KickerTom:
Did you unlock your bootloader? If yes, you did everything right up to this point.

Yes, that command flashes and overwrites the original recovery with twrp. There is unfortunately no way to load twrp on LG without flashing, AFAIK.

Yes, you should not let the phone reboot to Android, but should boot to twrp first. I am not clear on the exact details, but I understand it that Android would somehow overwrite the freshly flashed twrp back to stock, if you boot to twrp first, it would prevent that from happening.

When you flash twrp, you should see something like "OK" or similar on the twrp prompt (PC). It's quite fast, couple of seconds. I don't think there is anything specific on the phone screen, but I haven't done it for a while... Basically, when you get the PC prompt back, it's done (unless there is an error).

As there is no fastboot command to boot to recovery, you need to pull the battery to turn it off, put the battery back and use the buttons combo to enter recovery. Your description is correct, you may try it before flashing twrp to get the hang of it. Just don't press yes/yes with standard recovery, unless you are ready for factory reset :).

SuperSU and no-verity are different beasts. If you want root, flash SuperSU (or magisk, or whatewer) from twrp. If you want to decrypt the internal storage, the no-verity is what you want. But TWRP now supports encryption, so it should not be necessary. Also, flashing no-verity will delete all your data, so do backup first. (SuperSU will not delete any data, but backup is always good :) ).
[LG G5 ROMs, Kernels, Recoveries, & Other Developme] Aragami84:
OKay cool thanks for all the information and answers... I'll do it and try this weekend. :good: Ill probably use SuperSU and if I really like it I might unse the other one. another time when i'll be knowing more about the process and other things I can do.