yashsingh1/xdaforums huggingface dataset:
[G4 Android Development] n01z:
I used this one:

Universal SafetyNet Fix | Universal Hide [v2 Beta 5]

So, I could pass Safetynet with a module downloaded from the Magisk in-app repo??

Sorry for being so uninformed here. This is my first time rooting with Magisk, I'm used to Clockworkmod (then TWRP eventually) SuperSU and CM11 on an SGS5.. I have read hundreds upon hundreds of pages here, searched to the best of my ability. Things used to be so much easier.. I miss the ICS, Jellybean and KitKat days.. I would totally rock a port of CM11 or 12 on this device. Lineage has moved so far away from the CyanogenMOD formula that we all fell in love with. Now, we can't even change the font easily. *two thumbs down* for pulling a Google and abandoning their principles and what made them great. NO THEME ENGINE?? weak.

NOTE: I AM being hyper critical because this is my daily driver. Still, super thankful to even be able to UsU and get back into custom ROMs. Plus, having a system around 500megabytes in size always works to CM/Lineage's advantage.
[G4 Android Development] ThePiGuy:
At least you are used to rooting ;) I have never bothered as I normally find a custom rom is enough for me.

So I tried magisk now, and through a combo of installing magisk and altering the device signature (which for the H815 and H811 I have now changed back to their stock values in the device trees so we don't need to do that in the future - I'd need help from [MENTION=5545101]steadfasterX[/MENTION] to be able to do the same for the UsU models) I got it to pass safetynet (both CTS and basic integrity) without any additional modules.

Also, we have changed the format that the current build fingerprint has in the device trees. Maybe that will solve the problem.
[G4 Android Development] sdembiske:
I wouldn't say well but

somewhat

OK - it works but buffering creates lags, freezes on longer plays for me ... best if you just let it play at lower resolution/quality ... for fewer issues. It depends very much as well on the quality of the recording as to how well it plays right off the bat.
[G4 Android Development] glenrocks:
I can wait till Mon. as I am not sure which modemst1/2 files to use. Cant say it enough- Appreciate all your help.

lol..thanks.. you need your off-time for sure

I used h810_21y_modem.zip from your MM download site (first post) - https://androidfilehost.com/?w=files&flid=239970
[G4 Android Development] steadfasterX:
Ok and which modem image?
[G4 Android Development] sdembiske:
There seems to be noticeably a bit more battery drain on the June 19th H812 LineageOS O build relative to the H811 June 02 build.

I've attached a link to a screenshot of the kernel wakelocks to highlight the top two that seem to be on for a lot of time. Bluetooth is not turned on and I still seem to get quite a bit of battery drain on very light use when screen is mostly asleep.

Link: https://mega.nz/#!8X4kmYrA!BPcfvmOQClMm-2MtFPe1NpnH5zWkbhHPiPyu68KaiI8

PowerManagerService.Display and bluesleep seem to be at the top of the list for amount of time active.

Anyone else noticing a bit more battery drain, over and above for example, the H812 AOSCP N latest build or over the H811 LineageOS O June 02 build?

Thanks,

S.
[G4 Android Development] vsTerminus:
You know, I was just about to come in here and ask about battery life, because I had 30% drain in 5 hours last night while I slept. WiFi and Bluetooth were enabled (with wifi connected), but that's still excessive. I will test again tonight with wifi and bluetooth disabled.

BBS and Amplify couldn't really paint anything as the primary cause other than a bunch of time with the CPU running at 1.44GHz. I have a Better Battery Stats dump I am attaching in case anyone else wants to look at it.
[G4 Android Development] ThePiGuy:
Are you both running the h811 build? No idea whether this could affect anything but have you tried the H812-usu builds
[G4 Android Development] vsTerminus:
We are both running the H812 build currently.

[MENTION=6302635]sdembiske[/MENTION] came from the H811 LOS build and I came from the AOSCP Nougat H812 ROM. Both of us had better battery life on our previous builds.
[G4 Android Development] sdembiske:
This is the H812 UsU thread, so yes. As I noted in my post, I was comparing the H812 (UsU implied) June 19th uploaded rom battery drain to the battery drain on the H811 June 02 version (assert line removed) that I had previously installed and the H812 (UsU implied) AOSCP N rom. There are no H811 UsU roms or H812 non-UsU roms ...
[G4 Android Development] ThePiGuy:
Sorry. My bad. I mis-read it and thought you said you were running the H811 build (as UsU users used to do).

I'll have a look at the logs tomorrow
[G4 Android Development] bdasmith:
I've been back on lineage h812 since sat and my battery stats and drain seem to be excellent to me.
[G4 Android Development] sdembiske:
Mine did initially as well but have noticed a bit sharper drop-off now over the last few days - 8 days installed now ... keep an eye on it.
[G4 Android Development] vsTerminus:
Do me a favor tonight, if you will:

1. Install Better Battery Stats

2. Charge the phone up to full battery in the evening

3. Unplug it right before you go to bed and don't touch it until you wake up. Leave WiFi and Bluetooth enabled.

First thing when you wake up, open Better Battery Stats and use the "Share" button to save a dump file. Share it here if you are willing.

Now look at Better Battery Stats and note things like your % drain per hour, and if you have any major wakelocks or alarms that seem unusually high for the phone being idle all night.

Thanks!
[G4 Android Development] bdasmith:
Can do! Post it tomorrow ?
[G4 Android Development] steadfasterX:
Blue sleep etc is kernel related not UsU related btw. (just to make that clear)

Same has been reported on newer aoscp builds using the same kernel sources

https://xdaforums.com/g4/development/g4-cypheros-t3680102/post76937616
[G4 Android Development] sdembiske:
Right, I was aware of that - it's why the screenshot I linked was of the 'kernel wakelocks'. Seems it's been a well reported issue on a number of different sites across a number of different phone models. Not sure if it can be throttled down somehow, though.
[G4 Android Development] steadfasterX:
If someone can solve this then [MENTION=5461026]kessaras[/MENTION] :)
[G4 Android Development] bdasmith:
Hey sorry guys, been busy and forgot to get the screenshot of better battery stats after a full charge etc etc...

Will try to remember this weekend.

But from what I've read the last few posts, its the Bluetooth being on that's causing some drain? Normaly I only have bluetooth on when I intend to use it to play music. Must be why I didn't see unusual drain?
[G4 Android Development] vsTerminus:
So, today I had absolutely outstanding battery life, and I'm very confused. In 15.5 hours I've only lost 14% battery, and I've been using the phone - specifically bluetooth in my truck - several times throughout the day. Granted that's only about 38 minutes of screen-on-time, but lots of background usage.

The only thing I actually *changed* was disabling the persistent notification in my music player (DSub) and allowing Greenify to hibernate that app as well.

I'm going to try letting it sit again tonight to see how it goes. I'm still very much at a loss, because yesterday I saw 5-10% per hour drain and today it's <1.

Edit so I lost 4% of my battery while typing this message. My screen brightness is only at maybe 33%. BBS shows a lot of alarms for WiFiConnectivity Manager scanning for networks (even though it is connected.) That makes sense, as on Nougat (AOSCP) I had major battery drain if WiFi was on, and excellent life when it was off.
[G4 Android Development] bdasmith:
Something's causing a glitch for ya. I'm sitting here for 1 hours screen on time and on wifi and web browsing and music playing with viper4android with convolver active and have gone from 99 to 88....but bbs shows no alarms causing issues of any sort.

Edit: time stood still....thought I was sitting longer....only 1 hour sot
[G4 Android Development] sdembiske:
No, although related, it's the 'bluesleep' kernel wakelock that is on even with Bluetooth turned off in my case.
[G4 Android Development] bdasmith:
That wakelock doesn't show in my bbs kernel wakelocks at all. Only have 2. Powermanagerservice.display and powermanagerservice.wakelocks.
[G4 Android Development] sdembiske:
With Bluetooth off?
[G4 Android Development] bdasmith:
[MENTION=6302635]sdembiske[/MENTION] bluetooth was off, but even when playing music yesterday at work it didn't show. Here link for bbs log

https://drive.google.com/file/d/1upWBlQYvkiyVeuJ9YafnAqSi7pbdhbGf/view?usp=drivesdk
[G4 Android Development] sdembiske:
Interesting, just checked my Better Battery Stats app as well and it (bluesleep) doesn't show there ...

but

... on Wakelock Detector Free it is at the top of the list. Install that app from Play Store and let it run for a bit and check your Kernel Wakelocks.

In BBS PowerManagerService.display is the only one I show right now.
[G4 Android Development] bdasmith:
I've never used that one before....in all my years only ever used bbs. I will check that app out later today.

---------- Post added at 09:36 AM ---------- Previous post was at 09:33 AM ----------

@sdembiske just noticed that wakelock detector has not had any updates since 2016. Can it be trusted i wonder?
[G4 Android Development] sdembiske:
I have used both for many years - Wakelock Detector Free gives a much more comprehensive listing of the kernel wakelocks and the time they are active ... suggest you check it out ... before making judgements.
[G4 Android Development] sdembiske:
Ha ... figured it out - in BBS go to Raw Stats and bring up Kernel Wakelocks - you'll see it there.
[G4 Android Development] bdasmith:
I wasn't making a judgment. Just was asking a question. Sorry bout that.
[G4 Android Development] vsTerminus:
Well, my battery life in use and on standby has been pretty solid the last couple days, even with wifi and bluetooth enabled the whole time.

At this point I am inclined to think my previous battery drain was some app's fault and not the rom itself. Sorry for the wild goose chase everyone.
[G4 Android Development] steadfasterX:
Thx for the update [MENTION=4256326]vsTerminus[/MENTION]

For any ROM it is important to let it run a couple of days / some power cycles first before beginning to compare

Caches get build in the background the first days (not just the deodexes) and so the drain can be a bit more at the beginning and should get less over time.

.
[G4 Android Development] sdembiske:
I had a much better day yesterday with less battery drain (bluetooth off, wifi on) but will give it a few more days to see if it is stabilizing or whether it was an anomaly.

It has crossed my mind that with some initial seemingly random irregular firings of battery saver, airplane mode etc., that there are still some sensor issues (reported already with respect to double-tap to wakeup with a fix already committed), and that some of these battery drain issues could be related and may be resolved further on the next build.
[G4 Android Development] sdembiske:
Well so much for that. Charged my phone up to 100%, went for a bit of a hike with phone in sleep mode. Lost 5% in an hour and 1/2 and had random turning on of battery saver; do not disturb and bluetooth - something is definitely off with sensors IMO.
[G4 Android Development] obvious:
I've had battery saver come on in my pocket a few times using los15.1 when there's plenty of juice left. Dirty workaround is to disable dt2w
[G4 Android Development] sdembiske:
Yes, already aware - as I stated in my previous post, the fix has been committed, just need a new build to put it into effect. Annoying, as one doesn't always remember to disable it - interesting to see if it takes care of all the random firings of system apps or whether more work is needed.
[G4 Android Development] adam_s_459_:
So I searched this thread and many people are saying that video recording is working with a third party app, but I was wondering, what is causing the stock camera app to not work? And is it an easy fix or a really hard one?
[G4 Android Development] sdembiske:
The camera function is one of the most complicated in your phone's operating system. The problem mostly stems in adapting to the LG G4's hardware - the original camera app software is all proprietary coded (i.e., closed source) by LG and unless LG makes it open source it makes it

very difficult

to properly code something akin to the original that will mesh properly to the hardware using the latest google drivers.
[G4 Android Development] bdasmith:
None of those issues....never have had battery saver come and no dt2w issues. My phone is always in my pocket as I'm working (drywaller/painter always on the move) Battery life is great for me.

?

---------- Post added at 05:22 PM ---------- Previous post was at 05:20 PM ----------

Video recording with the stock app works fine for 780p and 1080p....just not UHD.
[G4 Android Development] vsTerminus:
I disabled dt2w because it was waking my phone and doing all kinds of **** in my pocket while I was cycling. I miss it, but it wasn't worth the chaos and confusion it was causing lol.

So at this point my list of issues is

- Video recording works with some but not all apps, and the video comes out very choppy

- HD video playback is ok up to 1080p30 for the most part, but anything higher resolution or higher framerate stutters and skips and freezes

- Still can't connect to Wireless AC (though I haven't looked into this one too much yet.)

- Bluetooth calling (obviously)

Otherwise all seems to be good. I'm rooted with Magisk 14.3 and running Xposed 90 beta 3.

(Oh, Netflix 5.x and 6.x refuse to launch, claiming my device is not supported. I tried Magisk Hide, but I'm wondering if maybe it's because of Permissive SELinux. 5.x worked fine on my AOSCP Nougat ROM before this. Downgrading to 4.x works.)
[G4 Android Development] kessaras:
ah wireless ac must be enabled in kernel level. i did enable it locally but i never enabled it for the public as i got some bad comments about it and they told me that i should focus on more important stuff.

So wireless ac is not enabled. But it can be enabled.
[G4 Android Development] vsTerminus:
Interesting...

What kind of comments? I wonder if that would explain the battery drain I had on AOSCP Nougat with WiFi enabled...
[G4 Android Development] kessaras:
there is no drain with wifi on and besides exfat which is different in these roms nothing else is different.

You must understand that we have equal development. The rom is a framework, a vold and a system.

everything else is in the device tree and proprietary.

Everything comes from Google and then we add our functions that make us different from the other roms. Such as small mods that make a small difference.

How is it possible then to see battery drain with wifi on in a rom and not in another rom ?

Did ThePiGuy or steadfasterX change the hal ? no.

The bad comments i already said what they are. They told me to focus on more important stuff.
[G4 Android Development] sdembiske:
bdasmith - If dt2w wasn't a problem, a fix wouldn't have been committed - it is an issue reported many, many times.

vsTerminus - dt2w is a proximity sensor issue and the fix has been committed but we will have to wait for the next build to get rid of the annoyance. Refer to post # 572 and 586 in the [ROM][UNOFFICIAL][TITAN][H815/H811] LineageOS 15.1 for LG G4 thread.
[G4 Android Development] steadfasterX:
New build up

happy leeching..
[G4 Android Development] n01z:
Awesome, thanks!!

Do we need to clean flash the new builds?? e.g. Factory Reset/Format Data/Wipe Cache and Data or will a dirty flash work??
[G4 Android Development] steadfasterX:
Dirty should be okay but as usual do a TWRP backup before and if you encounter any issues do a clean flash
[G4 Android Development] sdembiske:
The proximity sensor issue does not seem to have been fixed in the July 05 build (clean flash including 'format data'.). Yesterday, had the same issues with battery saver, do-not-disturb etc. spontaneously turning on while on a short hike.

I thought the fix had been committed as per [MENTION=8699949]ThePiGuy[/MENTION]'s post # 572 and 586 in the [ROM][UNOFFICIAL][TITAN][H815/H811] LineageOS 15.1 for LG G4 thread.

Did the build include the fix from what you understand? My concern is that if it did, it does not seem to have solved it, at least in my case.
[G4 Android Development] ThePiGuy:
Did you turn it on? I left it off by default as it has the potential to slow d2w slightly
[G4 Android Development] steadfasterX:
yes its included.

.
[G4 Android Development] sdembiske:
Ahh .. OK, thanks, I assumed it would be in the 'on' position already. Prevent accidental wake-up, now turned on in Settings > Display > Advanced. Will test it out now.
[G4 Android Development] n01z:
Maybe I just needed to hold the back button down longer or it got fixed in the last build, but the Kill App Back Button feature works for me, sometimes. It just needs to be held for about 2 to 3 seconds.

I noticed that it doesn't work with Expanded Desktop enabled hiding the navbar in apps (Expanded Desktop seems to hide the navbar before the kill app command gets picked up??)
[G4 Android Development] grantdb:
Using the latest version I am very happy. Coming from stock nougat this is a pleasant surprise after trying Lineage a couple months ago. No issues as of yet and many things work better than stock!

Thank you to the devs and especially [MENTION=5545101]steadfasterX[/MENTION] for this UsU build and server hosting.

Cheers!
[G4 Android Development] grantdb:
Wierd battery stat, anyone else get this?

Last full charge was about 9 hrs ago lol

Edit: Seems to be fine with a full charge and reboot so far.
[G4 Android Development] grantdb:
Noticed that the Soc thermal throttle is off. On stock nougat Titan kernel it was enabled by default along with core control. Do I need to enable? [MENTION=5461026]kessaras[/MENTION]
[G4 Android Development] steadfasterX:
New build up :

- Offline charging animation is back!

- Improved RIL SIM detection script

- DRM is now included as well. So Netflix, etc should work now

- Other small improvements
[G4 Android Development] sdembiske:
No issues now with the Lineage0S O July 20th upload for the H812 UsU with respect to sim card recognition - now seems equivalent to the July 12th AICP O H811 upload.

Thanks for the RIL SIM detection script improvement. I understand from [MENTION=8699949]ThePiGuy[/MENTION], full credit to you for the improvement.

Regards,

S.
[G4 Android Development] steadfasterX:
thx for the report, yes RIL improvements are made by me as I switched my productive device to LOS 15.1 now.. and that was annoying me a lot ;)
[G4 Android Development] ericlnu:
Oh sweet, TYSVM dude :)
[G4 Android Development] plumsinus:
Thank you so much for all your work on the G4 steadfasterX! I have lots of Linux experience but ZERO android experience before now. However thanks to your great tools and instructions I'm running LOS on my H812, no problem! Couldn't be happier!
[G4 Android Development] n01z:
One quick question:

What is the best version number of Magisk to use with this ROM??
[G4 Android Development] steadfasterX:
I don't use magisk. Lineageos root add-on is all I need ;)
[G4 Android Development] n01z:
Cool, I hadn't heard about that!!

I like Magisk because of the Magisk Hide feature hiding root from certain apps. Does the LOS root addon have anything similar??

THANKS for these build updates and all your help with this device [MENTION=5545101]steadfasterX[/MENTION] !!!!
[G4 Android Development] steadfasterX:
You're welcome..

No the LOS root add-on just gives root.. I guess Xposed modules may exists for hiding root but no idea how good they are as I don't use / need them. Tbh I don't use Xposed anymore either..

So maybe stick with magisk but no idea which version would be the best. I suggest to always do a full TWRP backup including boot, system, firmware, EFS and data (keep in mind that internal storage never gets backed up in TWRP though).

Then just test. If something goes wrong you can go back if needed.. Report back then to help others ;)
[G4 Android Development] n01z:
Ok. Well, right now I have used Magisk 16.0 and everything seems fine. I do get a Vendor Error popup on my lockscreen at boot but that appears to be cosmetic and seems to be caused by the Universal Safetynet Fix Magisk module .zip

I'll report back when I try newer versions.
[G4 Android Development] ThePiGuy:
Do you need the safety net fix thing on the latest version.

Signatures should mean CTS passes and doesn't Magisk already hide permissive selinux without any modules (I'm not a Magisk user so forgive me if I got it wrong)
[G4 Android Development] n01z:
Do you mean the latest Magisk version or the latest ROM version??

With the latest ROM and Magisk 16.0 it did not pass CTS without the Universal Safetynet Fix .zip

I'm not sure if this had something to do with Magisk addon.d survival script which activated when I dirty flashed the latest 07/20 ROM over a clean flash of the previous ROM version. However, I still had to flash the Universal Safetynet fix .zip to fully pass Safetynet.

This phone is my daily driver, so I need to find the time to try a clean flash and use a more recent version of Magisk. They are at version 16.7 or something in the changelogs, but the OP on the Magisk thread still shows 16.0 as the latest stable version. That's why I asked everybody here what version of Magisk was the best that they have used.
[G4 Android Development] ThePiGuy:
Ah yeah I see the UsU H815 still has the wrong fingerprint. I'll fix that for the next update and then CTS should pass with Magisk and nothing else
[G4 Android Development] n01z:
Awesome, THANKS!!
[G4 Android Development] ThePiGuy:
All done!

https://github.com/Suicide-Squirrel...mmit/a1fed748a2a728126060d3a977d9e9f92de66524

When the next build comes out, try only using Magisk and see if CTS passes
[G4 Android Development] n01z:
Ok, but I have the H812 not the H815. Does that matter??

The lockscreen warning that I get says:

"..Please ensure that your vendor image matches NMF26X"
[G4 Android Development] ThePiGuy:
Ah...sorry my bad

Yes it turns out the signature was already correct for the H812
[G4 Android Development] grantdb:
This is very small detail but I was wondering about the two entries in build.prop that are contradictory:

ro.telephony.default_network=9

and

ro.telephony.default_network=12

I found the first entry in

https://github.com/Suicide-Squirrel/android_device_lge_h812/blob/lineage-15.1/system.prop

I cannot find where the second entry comes from.

Does this make any difference? I don't think there should be both of these entries. I noticed this in LOS 15.1 and CypherOS 6.0

Cheers
[G4 Android Development] ThePiGuy:
Well done! You are right there are contradictory values there

The other is https://github.com/Suicide-Squirrel...S/blob/lineage-15.1/product/qcom-radio.mk#L28

I think maybe we need to remove all the device specific ones and use the G4-common but I'll wait until [MENTION=5461026]kessaras[/MENTION] or [MENTION=5545101]steadfasterX[/MENTION] can confirm
[G4 Android Development] grantdb:
Well as far as I understand 12 is 'unknown' and 9 is 'LTE/GSM auto'. So in my opinion 9 is preferred setting but changing the source in common might be more of a pain in the butt. In the end I think either is fine but only one entry for default.
[G4 Android Development] ThePiGuy:
This commit changed it

https://github.com/Suicide-Squirrel...mmit/e611508156df52955406c1d09d1a01622c163a73

But yeah, a lot of devices on Lineage set it to 9 so we will see
[G4 Android Development] grantdb:
Lol finally I was helpful! I really appreciate you guys doing all this hard work!

Cheers!

EDIT: [MENTION=8699949]ThePiGuy[/MENTION] I was thinking you could use:

ro.ril.def.preferred.network=9
[G4 Android Development] ThePiGuy:
I'm not sure tbh. I'm not great with the build props so I'd like to wait for [MENTION=5545101]steadfasterX[/MENTION] or [MENTION=5461026]kessaras[/MENTION]