yashsingh1/xdaforums huggingface dataset:
[G4 Original Android Development] nitrous²:
I'm searching and asking around but can't get an answer. Why have all custom kernels for the G4 SELinux set to permissive? I'm asking this out of curiosity and also because of security concerns. I'd like to understand what the benefit of a permissive SELinux state is. I'd really like to use a custom kernel because the stock one is the worst in terms of battery life unless I'm connected to WiFi networks. I "need" SELinux in enforcing mode. Sadly, setenforce command does not work in any custom kernel around here. It'll always stay in permissive mode. Is it possible to have your kernel with adjustable SELinux mode?
[G4 Original Android Development] HorstiG:
Take that:

https://drive.google.com/open?id=0B7Mx2p0Jd24JMzBmMUY2QmR4VzQ
[G4 Original Android Development] nitrous²:
The option to revoke USB-Debugging authorization has always been in LG ROMs. I experienced the same issue when Chainfire's Systemless Root wasn't available and we had to flash repacked kernels that didn't match the ROM version.

Thank you, but your link is down with this message via Google Drive Web App: "We're sorry. You can't access this item because it is in violation of our Terms of Service."
[G4 Original Android Development] HorstiG:
Moment please, the Key is h815

https://drive.google.com/open?id=0B7Mx2p0Jd24JTGRFSEFtREgzdjQ
[G4 Original Android Development] nitrous²:
Oh, right. That's that app. They don't work. All custom kernels for the G4 are missing this particular line in their defconfig file "CONFIG_SECURITY_SELINUX_DEVELOP=y" (AFAIK!!). As a result, setenforce commands via ADB or apps like the one you posted have no effect on the SELinux mode.
[G4 Original Android Development] HorstiG:
Shi.., sorry. And now?

Don't work for me, Shi...
[G4 Original Android Development] HorstiG:
SELinux Mode Changer notification, the phone freezes after.

View attachment 3709992
[G4 Original Android Development] nitrous²:
Weird, it shouldn't freeze. It will execute "setenforce 1" if you press "Enforcing" or "setenforce 0" if you press "Permissive" and if the kernel has no developer mode, it will simply do nothing as it's the case with LuPuS Kernel. The fact that yours froze might be another issue. Maybe wedgess has an idea.

I'm going to stick to the stock kernel and maybe learn how to compile one of the custom kernels from source with SELinux in Enforcing mode.
[G4 Original Android Development] HorstiG:
Thanks, would be great.
[G4 Original Android Development] wedgess:
Basically some apps didn't work 100? with enforcing on for the full set of features they need to be ran in permissive mode. I agree it would be better to allow the user to switch to enforcing/permissive. Give me a bit and I'll try adding this.

OK, thanks for clarifying this just tested it myself. Going to try fix this also :good:

Edit: OK so the config flag u spoke of for selinux was already enabled in the config. Permissive was however hard coded so that's why u couldn't switch but u can now switch between modes on the fly. Also fixed the revoke USB authorization option not being there.

[MENTION=1987664]maddler[/MENTION] - was a problem with the kernel, revoking USB authorization is now fixed in v2.4... Good to see another person from Dublin here :D
[G4 Original Android Development] wedgess:
The app can't find root access. So I'm guessing ur using system-less root and the app checks for the SU binary in system. Which is the wrong way of checking for root access. Guessing this is why the app is freezing. TBH I wouldn't bother with the app as u can change it to permissive using setenforce 0 or to enforce using setenforce 1 for terminal app. If people would prefer it I could add it as an option in the updater app as I know my app checks for root the correct way and is working on both system-less root and system rooted devices.
[G4 Original Android Development] wedgess:
Released v2.4, live on updater app and in the OP

v2.4

Fix Revoke USB debugging authorizations not showing in developer settings

Allow SELinux mode to be changed rather than hard-coding to permissive
[G4 Original Android Development] HorstiG:
Wow, thank you :D

---------- Post added at 17:10 ---------- Previous post was at 17:05 ----------

That would be awesome, thank you.
[G4 Original Android Development] maddler:
I'll give it a try later today!

We should catch for a few at some point! Owe you one for the Kernel anyway! ????
[G4 Original Android Development] wedgess:
Released v1.5 of Updater App - available in the attachments of post #2

v1.5

Add SELinux mode changer

Add FAB animation when viewing kernel release info

Speed up loading longer changelogs when viewing kernel release info
[G4 Original Android Development] HorstiG:
WOW !!! Thank you
[G4 Original Android Development] maddler:
Just installed, seems to be working fine so far.

Cheers!
[G4 Original Android Development] StefanoTonti:
Hi. First of all i would like to thank wedgess. Great kernel and great work!

I have got a question for you. I noticed this Gpu Governor 's behavior

-your kernel def: the min freq. stays [MENTION=409989]300[/MENTION] even if you try to force it [MENTION=742690]180[/MENTION] via Ex Kernel

-if i set simple_ondemande and min freq [MENTION=742690]180[/MENTION] , real freq. continues to switch between 180-300 without stopping.

Can you check it pls? Maybe it is just a problem of my configuration

thanks and best regards
[G4 Original Android Development] wedgess:
You are welcome, thanks :)

Just checked here and GPU frequency changes fine actually seems to drop below min frequency when idle?? Checked on both kernel adiutor and my own kernel tuner app so must be something to do with your configuration cause I also switched to simple_ondemand and it's fine.
[G4 Original Android Development] HorstiG:
[MENTION=4609488]wedgess[/MENTION]

Where can I find your Kernel tuner app?
[G4 Original Android Development] wedgess:
Won't be able to find it anywhere as it's 2years old and pretty outdated plus doesn't support big/little. I never released it anywhere.
[G4 Original Android Development] HorstiG:
OK no Problem, I use Ex kernel Manger. Just thought you have a "over" app.
[G4 Original Android Development] wedgess:
So, I've finally switched from STOCK to CM. I'll post a CM based kernel probably later today. I will probably make it available through the updater app but I'll have to release a new version of the updater app to allow users to switch between the CM/STOCK releases.
[G4 Original Android Development] HorstiG:
An option for multi-ROM would be super.
[G4 Original Android Development] wedgess:
Would love to but as this is my main device, I can't risk a brick while testing as I don't have the money to replace it.

Edit - However any one else willing to risk it can PM me their hangouts and ill get to work on it.
[G4 Original Android Development] zwodziarz:
I've just flashed this kernel and from the beginning it seems more fluent, responsive and better on battery than the Imperium kernel(on the same gov/scheduler sets). Currently on v20e . If You're now on CM that means it's kind of final version? Cause that's what I was looking for. Thanks overall I was using Your kernels on my previous phones and all that I can remember they were flawless ;)
[G4 Original Android Development] HorstiG:
I hope it's not the end for Stock :)
[G4 Original Android Development] xrad:
Yikes... no like. Well, it was good while it lasted. Thanks for your work on stock mate!
[G4 Original Android Development] wedgess:
Nope its not the end of the stock kernel, it will continue, I am monitoring downloads to see if it is worth it and so far between here and downloads through the updater app it's doing pretty good.

I'll keep it updated inline with the latest Linux releases and any changes which are worthy. Rite now I think its a pretty good kernel, adding things for the sake of an update is pointless IMO.

TLDR; This is not the end of the stock kernel just giving others (including myself) the option of a CM LuPuS kernel.
[G4 Original Android Development] HorstiG:
What a CM ROM do you use?
[G4 Original Android Development] wedgess:
Rite now, im just using yesterday's CM nightly. Im going to probably build PAC ROM in the next few days/weeks depending on how time goes. I have exams in 2 weeks so studying for them at the moment.
[G4 Original Android Development] xrad:
Live it up mate, these are great times to be a student with some spare time. When I studied almost everything was closed source, and Linux was just emerging. I recall playing around with NetBSD a bit on my Amiga but it wasn't really much fun.
[G4 Original Android Development] wedgess:
I've not much spare time at all unfortunately, but when I do the last thing I want to do is more coding after a 8+ hour college day of it :( Ahh yes, in those days I was only a kid, playing duck hunt or the Simpsons on my Commodore 64, those were the days...
[G4 Original Android Development] barjola:
Waiting for the CM version ?.

Im using crDroid and its the best version for me.

Enviado desde mi LG-H815 mediante Tapatalk
[G4 Original Android Development] wedgess:
Ended up building PAC and flashing it so won't be releasing the CM kernel till some time tomorrow probably.
[G4 Original Android Development] patalao:
If you're willing to make Multirom recovery I could test it.
[G4 Original Android Development] wedgess:
Yes please, if u can send me your hangout contact info via PM.illl let I know when a test is ready.
[G4 Original Android Development] lkbfreak:
When I studied there were no mobile phones and nothing was closed source - we were mostly developing beers and chicks. :p Sorry for the off-topic! :D
[G4 Original Android Development] t.figaroa:
Question

Hey guys i'm kind of new by the things about kernels. And i have a question about your kernels.

If i want the features of kernel version 1.7 do i have to install version 1.7 or are they include in the latest kernel which is 2.4 now?
[G4 Original Android Development] wedgess:
Features from v1.7 are included in v1.7 and up. So flash v2.4. If anything from previous versions is removed it will be mentioned in the change log :)
[G4 Original Android Development] wedgess:
Just an update as to why the CM kernel was not released and there has been no update for the STOCK version yet...

My device suddenly rebooted the other nite while using the browser, and is now stuck in a constant bootloop, I have no way of recovering it even though I have tried everything. It was manufactured back in May/June last year so its more than likely the infamous LG G4 bootloop issue. As I don;t have the money to replace this device i'm not sure what I can do but for now this kernel is discontinued unless I can get a replacement (which is unlikely) :(
[G4 Original Android Development] patalao:
Doesn't it have warranty?

If it's hardware failure LG should replace it.
[G4 Original Android Development] HorstiG:
Your Kernel 2.4 works great without any Problem. Take your Time.

I wish you all the best for the G4. Normal takes the LG free repair.
[G4 Original Android Development] xrad:
What a bummer for you. I assume you have tried getting right into download mode by pressing volume up and then plugging the USB cable? If that worked you could LGUP to a sane state perhaps.
[G4 Original Android Development] troullis2004:
My device had the same issue [MENTION=742570]wedge[/MENTION] while connecting to a wifi Hotspot. Then a bootloader but I managed to reflash the rom in recovery. Strange.
[G4 Original Android Development] wedgess:
Ye I tried everything download mode worked for a few minutes but the device had no battery left so would reboot after a couple of minutes. Then I'd have to charge it again, but the device would turn back on and get stuck in the bootloop, the device would then get so hot I'd have no choice but to switch it off.

I'm done with LG, not going to get another G4 as I don't want to be without a device again... I've sent it back to Amazon and am getting a full refund (thanks to Amazons great customer service)

V2.4 is the final release of this kernel for the G4. I did have another version but can't release it without testing it on a device.

Thanks to all that have followed this thread and hopefully see you around :)
[G4 Original Android Development] kabirjedi:
Sad info but thanks your hard work!
[G4 Original Android Development] HorstiG:
Oh no, but thank you for your work :(
[G4 Original Android Development] troullis2004:
Pitty. It is my favorite kernel.
[G4 Original Android Development] Chris_Kardas:
It was a good kernel, sad what happened to you.. Thank for your hard and long work :good:
[G4 Original Android Development] HorstiG:
[MENTION=4609488]wedgess[/MENTION]

It's totally a shame that you can not continue to develop the kernel, it is still the best for me.
[G4 Original Android Development] thewhisper:
@wedgess

So sad news about you phone... Mine is built in june (506) - I think I have to be prepared for the same destiny someday (I hope to be wrong). Was your phone from the 506 series or ? So on what device are you planning to move ?
[G4 Original Android Development] wedgess:
Glad to here, i'll also miss being able to improve the kernel, especially seen as I should have a bit more time the next few weeks since i'm nearly finished my exams.

Mine was the same, built in June and was the 506. I had none of the issues mentioned over the last few months within the general section so thought my device was one of the lucky ones to escape, unfortunately that was not the case. I was lucky I was still able to avail of my full refund, so with the money I got back I was able to get a Nexus 6p, just waiting on it to get delivered now. I'm getting really sick of using my S3 as a backup device especially seen as the battery drains fully within about 4 hours :(
[G4 Original Android Development] MickyFoley:
Seems the line is clear: 90% of all manufacturers to trash and only one will keep Android alive... Nexus. I'll wait til Google I/O and probably get the HTC Nexus (Hopefully - HTC 10 really is promising). But I agree your decision to go for pure Android, since all sources are open & building things is way easier than on closed source devices, with just the opensource parts are released. We'll see us again, buddy & thank you for all your wonderful work.
[G4 Original Android Development] HorstiG:
Still the best
[G4 Original Android Development] MickyFoley:
No doubt, [MENTION=5172363]HorstiG[/MENTION]. Since Google f*cked their I/O (no new Nexus), I keep my G4 alive as long as I can. I stick with CM13, because it's a daily driver since 2 months now. I didn't encounter into any bugs or relevant things - even the batterylife is comparable. Just saying, that all is working with CM and I didn't regret to not sticking with stock LG :). Still... I miss this kernel very much. Was a great time to have.
[G4 Original Android Development] HorstiG:
CM is good for old mobile phones or Nexus phones, but not for the technically sophisticated equipment.

I've never been on the road for so long with Stock and will remain so.

Thank you mate.

P.S. on my S5 is Ressurection Remix CM 13 ;) :D
[G4 Original Android Development] MickyFoley:
For old phones? Nah :). There are many benefits, like fast fixes for the well known StageFright issues, privacy manager, theme support, etc. pp. If you're for updates: No way around CM for our devices. And now only for the moment, because the newest Nexus is now pretty old and there are not enough reasons to switch. Like I said: If HTC announces a Nexus with neat specs, I'd go for it :).
[G4 Original Android Development] wedgess:
I was using CM13 for a while before my G4 died, I was going to work on a kernel specific for cm13 had most things merged from this stock kernel into it. I could build a version and post it here if your interested in using it. I obviously won't be able to test it but it was working before so should still work now unless there have been any major G4 kernel patches from codeworkx?

Since moving to the Nexus 6p I have to say i'd never look back. I'm still on stock as I don't need a bloated settings that we get with other custom ROMs, I was thinking about doing my own AOSP with a small amount of features which I personally use. But so far stock is blazing fast. I was a bit hesitant in the size of the 6P but it's not much bigger than the G4, a bit wider and a bit taller but the length of the phone can be forgiven due to the amazing front facing speakers(not sure how I lived without them). I originally got the G4 due to its amazing camera but when I got the phone I never used the camera half as much as I thought I would. The 6P camera is OK, good for my needs. I still go to press the power button on the back of the device, luckily the nexus 6P has it's fingerprint sensor there so my screen still turns on :p Oh and not to forget the charging speed which is amazing, full charge in about 60-80 mins.

Yes the Nexus 6P may be over 6 months old but still a solid choice IMO.
[G4 Original Android Development] MickyFoley:
[MENTION=4609488]wedgess[/MENTION]: Well, you know how much the 6P costs. It is just a plain calculation: 650 bucks for me (and I think, for you too). The G4 is still fine and I'm lucky to have a 509 serial device, so if we trust fellow members here at XDA, Reddit, etc., this should be fine & no worries about something like a bootloop issue so far. Sure, I still want a Nexus - no doubt. But I already spent 500 bucks for the OnePlus 2 (regret it a bit, because of lacking sources of OnePlus themselves) and again 500 for the G4 :).

So if I'm in the need for a new phone... sure, 650 bucks are not that much to spend. But 650 bucks just for Vanilla Android & a pretty old device (sure, not old, but is should be cheaper now. 1 year is one year.), 32GB, no replaceable battery and no ability to extend the memory... I have to deny.
[G4 Original Android Development] RogerF81:
Oh yeah, a new CM kernel would be great!! :)
[G4 Original Android Development] wedgess:
650 is a lot for me :p I wouldn't have been able to afford a 6p without getting the full refund for the G4. I got the 64GB version so storage won't be an issue for me (hopefully, so far so good) and I never had to replace my battery nor did I switch out when one ran low. In my situation the 6p was a no brainier rather than taking a new g4, I only had to pay an extra €10 for the 6p. But in your situation I agree, no point in a 6p when we are 4months away from the next Nexus (probably).A couple of my friends have the OnePlus 2, I like it so long as it's running CM. If you have the G4 and OnePlus 2 which do you use daily.

I'll take a look later when I get a chance. Think everything is still set up for it on my machine so it should be some time today. I'll mention you once I post it.
[G4 Original Android Development] RogerF81:
Yeah thank you, I'm looking forward to it! :) Will you list which features are included? :)
[G4 Original Android Development] res0sf9v:
f2fs h811

does this kernel support f2fs on h811?
[G4 Original Android Development] MickyFoley:
[MENTION=4609488]wedgess[/MENTION]: What phone for daily use? The G4 (black leatherback version). The reason was simple: I didn't see a bright future for the OnePlus 2, because OnePlus kept the sources for LAF and FP closed. Their OxygenOS is pure... well... crap. Would have been better, if the devs would have kept working on their AOSP-ROM than switching over to OnePlus. I didn't have had the patience to wait for a probably successor of the OnePlus One. I saw codeworkx as official developer and knew, I have to switch over. Even if Lord Boeffla is supporting the OnePlus 2 with his kernel, it wasn't a reason to wait.

Then there was the problem with their camera: Stabilized? Not a single bit. OIS (Optical Image Stabilization) wasn't even close to be functional, whilst the G4 was promising for taking good photos. So in summary, the OPT failed in many things, because just of their closed sources. Would it have been the best phone out with opened sources? Probably yes. The specs of the OPT are more than just promising. But the lack of fixing the bugs or supporting their hardware was just awful.

I've enough from closed sourced phones. It just keeps the devs busy and probably angry, because they have to write each an every function themselves. And how is it worshiped? Whining children, not even able to read the 1st post. Stating, it's better to go back to stock, and not just reading what the OP stated. Each and every (!) developer is trying his best to get a fully working piece or ROM developed - not getting a damn single coin. Many users think, custom kernels and ROMs are quite natural. They aren't. It's idealism. It's free time. It's a tiny competition and primary & mostly were those things just for themselves: Thinking "Not bad. Maybe another user would be glad to have it too!". And then earning disrespect.

I know, it went offtopic, but having all sources open to develop is much easier to work with. And therefore the choice is easy: Get a Nexus & f*ck closed source devices.
[G4 Original Android Development] wedgess:
I've attached a CM kernel, untested so for those who want to give it a go there is no guarantees it will boot, it should though as I had tested it on my device before it broke.

Kernel source: https://github.com/garwedgess/android_kernel_lge_msm8992/tree/lupus-cm-13.0

If you want a change log there is 2 pages of github commits you can look at: here

Have fun! :)

Edit: Oh H815 only
[G4 Original Android Development] RogerF81:
Wow thank you very very much!! :highfive: :)
[G4 Original Android Development] Carach_CZ:
Is this kernel still in development? Its two months without the update. And does it support hotplugging? Or shall i use SimpleGX instead? Thanks!

Edit: i double checked the thread. Too bad it is not developed anymore.
[G4 Original Android Development] alirezaanik:
Lg g4 h812

Can i use this rom on my device
[G4 Original Android Development] grantdb:
Just so everyone understands that there is no need to "update" this when using with stock rom!

Now that there is an unofficial unlock, yes! I am using it on my H812 stock MM!

This kernel is excellent thank you [MENTION=4609488]wedgess[/MENTION]
[G4 Original Android Development] wedgess:
Release v1.2, live on updater app(post #2) or can be downloaded from the attachments in post #1

v1.2

Fix exFat support (thanks slim80 for sussing out module signing and orhtun01 for testing & logs)

cpufreq: Introduce new relation for freq selection

Optimized ARM RWSEM algorithm

net: bcmdhd: reduce wakelocks

tcp: fix timing issue in CUBIC slope calculation

msm: kgsl: Report correct GPU frequency in sysfs

cpufreq: Introduce new relation for freq selection

usb: gadget: mass_storage: added sysfs entry for cdrom to LUNs

Full list of changes on github or available in lupus kernel updater app
[G4 Original Android Development] rav101:
Hi [MENTION=4609488]wedgess[/MENTION],

Just flashed on Genesis v3.5 and I can confirm the exFat fix. Will have a play with the other stuff but in the meantime, thanks for the hard work!!

Regards,

Ravi
[G4 Original Android Development] MickyFoley:
Confirmed too. exFAT is working fine. Just wanted to mention it :).

Edit: The time-bug seems to be kernel-related. Never had it again with GoogyMax. [MENTION=4609488]wedgess[/MENTION]: May you have a look into it? Would be nice :).

Why I know it you may ask: My alarm rings everytime I reboot my phone. And for sure: The alarm isn't set to that specific time :D.
[G4 Original Android Development] pidocchio:
Nice kernel, the only thing that its missing is the state notifier driver and adreno idler ;)
[G4 Original Android Development] wedgess:
The time bug is on all custom kernels for the G4, I think... Looking at googymax thread someone posted a screenshot and it also showed the time still reset on boot in the latest version.

Any way had some time to look at it there and I've fixed it so I'll release it in a couple hours when I'm home:)