[MATA] [CAF] [UNIFIED] [EAS] [4.4.166] [CLANG 8.0] Neutrino Kernel (hercules)

Search This thread

return.of.octobot

Senior Member
Mar 5, 2015
521
1,318
Wilmington, NY
Neutrino Kernel began as an effort to keep the stock LineageOS 15.1 kernel up-to-date with the latest linux-stable releases and has since evolved into an intensive crash course in maintaining my own custom kernel. Although some of you would accuse me of modesty, I think it's important to acknowledge that I am a "kernel developer" in the same way that Amy Schumer is a "comedian". That is to say, my work is highly derivative and built on the backs of individuals who are far more talented than I am. My role here is to have a vision, establish a design philosophy, and use the resources at my disposal to bring that vision to fruition.

Those of you who've perused my staging repo will know that I'm very particular about cleanliness. All changes and additions are vetted based on viability and purpose. Neutrino is based on kernel.lnx.4.4.r35-rel, pure CAF source for Android 9.0 tracking and upstreamed to the latest linux-stable release. I have manually rebased Essential's stock kernel source on top of CAF using relevant OEM commits from PPR1.181005.034. All major features and patchsets are assembled on independent staging branches of this codebase base and merged into the release repository.

I do not commit changes that I cannot justify or explain, and I do not go on indiscriminate cherry-picking sprees. There are a handful of developers that I highly respect, and who's projects have served as inspiration for my own. My intention is to incorporate the best of what they've brought to the table in a way that most effectively achieves and enhances this project's design goals.

I like to think that Neutrino is relatively subdued in terms of "features", with a stronger focus on optimizations over fluff. That being said, there have been quite a few additions which I feel have merit in terms of increased performance and/or efficiency provided the former does not compromise the later:

  • Revamped EAS implementation for Pie
  • sultanxda's CPU/GPU Boost Drivers
  • Dynamic SchedTune Boosting
  • Maple I/O Scheduler
  • Broader subsystem support for Power Efficient Workqueues
  • KCAL Color Control
  • Backlight Dimmer
  • Fsync Toggle (enabled by default)
  • GPU Underclock @ 180 MHz
  • CPU (partial) Overclock, Silver Cores @ 2035 MHz
  • Boeffla Wakelock Blocker v1.1.0
  • Wireguard Support
  • VDSO Support
  • Treewide memory allocation/overflow patches from mainline
  • OOM Reaper and various memory management enhancements to improve LMK
  • Treewide compiler warnings corrected
  • Built with self-compiled Clang 8.0.3 and GCC 8.2.0 toolchains, with a local initialization sanitizer and polly optimization flags

INSTALLATION:
**Neutrino now utilizes AnyKernel2 zip format for universal compatibility**
As a result, you can now flash this kernel on just about anything including Oreo/Pie custom and stock ROMs. The only requirement is that your firmware is current and up-to-date with PPR1.180905.036 at a minimum. Flashing on older firmware will result in broken input detection and a non-functional touchscreen.

That being said, this is an EAS kernel and is best suited for use on EAS-compatible ROMs. Just because it can be flashed on stock does not mean that you should do so. Installation on ROMs which do not natively support EAS (such as stock) will likely result in sub-optimal battery performance and I will not entertain any complaints stemming from the use of Neutrino on ROMs which are incompatible with EAS. Stock support is a perk and an experiment on my part, please do not make me regret giving you the ability to flash on stock, I will drop public support for it if this disclaimer is routinely ignored. If you choose not to heed my recommendations, you are doing so at your own discretion.

For ease of use, I would recommend using an app with built-in zip flashing functionality such as EX Kernel Manager or FK Kernel Manager. Of course, I cannot expect all of you to utilize a paid app for installation and as such, conventional installation via TWRP is certainly possible as well.

Neutrino will preserve existing Magisk installation during kernel update, meaning if you already have Magisk installed on your device you need not worry about reflashing Magisk when updating your kernel. If you do not already have Magisk installed and desire root access then Magisk zip must be flashed following kernel zip via TWRP.

DOWNLOADS:
Current releases can be downloaded here.
Archival builds (boot images) for lineage-15.1 can be found here.

SOURCE & SPECS:
Neutrino Kernel Source
Neutrino Staging Repo
Changelog
Linux Kernel Version: 4.4.166
CAF Release: LA.UM.7.4.r1-03900-8x98.0
Neutrino Kernel Version: hercules
Clang Version: neutrino clang 8.0.0-r348460
Build Date: 20181206
 
Last edited:

Arju

Senior Member
Nov 11, 2008
1,676
1,135
Örebro/Sweden
@return.of.octobot Awesome! Thanks for bringing us upstream updates! So if I've understood it correctly if I do flash the root version and want to take an ota update, I'll have to revert to stock kernel for the lineage os version I was on or flash the non root version that you've provided us with before updating?
 

rignfool

Senior Member
Dec 8, 2010
5,010
2,734
The Poconos
@return.of.octobot Awesome! Thanks for bringing us upstream updates! So if I've understood it correctly if I do flash the root version and want to take an ota update, I'll have to revert to stock kernel for the lineage os version I was on or flash the non root version that you've provided us with before updating?
When I had magisk installed and was running lineage... The OTA program didn't care about signatures...

Since it's not a Delta... It's not patching anything... Just overwriting what is currently there... So it SHOULDN'T matter...


Sent from my PH-1 using XDA Labs
 
  • Like
Reactions: Arju

Arju

Senior Member
Nov 11, 2008
1,676
1,135
Örebro/Sweden
When I had magisk installed and was running lineage... The OTA program didn't care about signatures...

Since it's not a Delta... It's not patching anything... Just overwriting what is currently there... So it SHOULDN'T matter...


Sent from my PH-1 using XDA Labs

Hey, great to see you here. I remember you from the Nexus 6 forums. Thanks for the answer :)
 
  • Like
Reactions: rignfool

return.of.octobot

Senior Member
Mar 5, 2015
521
1,318
Wilmington, NY
@return.of.octobot Awesome! Thanks for bringing us upstream updates! So if I've understood it correctly if I do flash the root version and want to take an ota update, I'll have to revert to stock kernel for the lineage os version I was on or flash the non root version that you've provided us with before updating?

When I had magisk installed and was running lineage... The OTA program didn't care about signatures...

Since it's not a Delta... It's not patching anything... Just overwriting what is currently there... So it SHOULDN'T matter...


Sent from my PH-1 using XDA Labs

He is right, I was recommending that the unrooted image be flashed prior to OTA but you could also certainly restore the boot.img that was originally included in invisiblek's build for maximum peace of mind. I would tend to agree that it doesn't actually matter as the OTA should be installing a completely new image on the opposite slot so I'm not sure what difference it would make, I was just leaning my instructions towards the safe side, perhaps I'll try and clean them up.
 
  • Like
Reactions: aer0zer0 and Arju

return.of.octobot

Senior Member
Mar 5, 2015
521
1,318
Wilmington, NY
only for lineage can it work on aosp rom?

Yeah, it's literally built from Lineage source with upstream Linux kernel merged in. I wouldn't recommended flashing this on AOSP any more than I would recommended flashing the stock Lineage kernel on an AOSP build. Even if it booted I imagine there's a good chance it would break things to the point of being unusable. That being said, I haven't tried it so I'm only speculating. If you do, make sure you've got a copy of your ROMs stock boot.img to recover with. But seriously, I wouldn't.
 
  • Like
Reactions: Tech_Savvy

return.of.octobot

Senior Member
Mar 5, 2015
521
1,318
Wilmington, NY
Will be uploading 4.4.118 images within the next day or two, currently experimenting with merging the latest CAF tags into upstream source. Jury's still out on whether or not that's going to prove successful but I will be releasing standard linux-stable builds regardless.

Without further ado, 4.4.118 images are available for download here.

Same deal as before, built from unadulterated upstream linux-stable source. Stock and Pre-Patched Magisk variants available.

I did manage to get a CAF-based version of this kernel building and booting, however it broke my touchscreen and is clearly not ready for public consumption. So, until further notice we're going to stick with the 'if it ain't broke..' philosophy, although you may or may not see me releasing some experimental builds in the future.

For now, enjoy 4.4.118 ;)
 
Last edited:

Arju

Senior Member
Nov 11, 2008
1,676
1,135
Örebro/Sweden
***OP updated for 4.4.118 release, revised comprehensive installation instructions***

flashed your kernel with magisk support on todays (28th) lineageos build. Magisk is not passing safteynet.

edit: followed your instruction to patch the boot img using magisk and now it passes safteynet. had to use the non patched on from here.
 
Last edited:
  • Like
Reactions: return.of.octobot

return.of.octobot

Senior Member
Mar 5, 2015
521
1,318
Wilmington, NY
flashed your kernel with magisk support on todays (28th) lineageos build. Magisk is not passing safteynet.

edit: followed your instruction to patch the boot img using magisk and now it passes safteynet. had to use the non patched on from here.

Good to know, I'll have to make note of your findings in the OP. I would've never figured that out myself as I've got xposed installed and to the best of my knowledge my SafetyNet checks will always fail because if it. I've really just been offering the prepatched images because I thought it would be helpful to allow some to bypass the step of patching manually. However, I'll have to consider whether it might be a better idea to just provide the clean image with instructions on how to patch it.
 
  • Like
Reactions: Arju

Arju

Senior Member
Nov 11, 2008
1,676
1,135
Örebro/Sweden
Good to know, I'll have to make note of your findings in the OP. I would've never figured that out myself as I've got xposed installed and to the best of my knowledge my SafetyNet checks will always fail because if it. I've really just been offering the prepatched images because I thought it would be helpful to allow some to bypass the step of patching manually. However, I'll have to consider whether it might be a better idea to just provide the clean image with instructions on how to patch it.
So this is what I did.

1. Flashed lineage os. Set it up.
2. Flashed your kernel (non magisk version) using fastboot and booted back into rom. (Not sure if this is necessary as I later on flash the patches version by magisk manager).
3. Install magisk manager. Have the non magisk version of your boot image on my phone. Patch it with magisk manager.
4. Transfered the patched boot image to computer.
5. Flashed the patches boot image using the computer (fastboot). Reboot into system.
6. Safetynet check passes.
 
  • Like
Reactions: return.of.octobot

return.of.octobot

Senior Member
Mar 5, 2015
521
1,318
Wilmington, NY
So this is what I did.

1. Flashed lineage os. Set it up.
2. Flashed your kernel (non magisk version) using fastboot and booted back into rom. (Not sure if this is necessary as I later on flash the patches version by magisk manager).
3. Install magisk manager. Have the non magisk version of your boot image on my phone. Patch it with magisk manager.
4. Transfered the patched boot image to computer.
5. Flashed the patches boot image using the computer (fastboot). Reboot into system.
6. Safetynet check passes.

Thanks for sharing. I essentially went through the same process to patch these images myself after they were built, perhaps there is some kind of security measure in place where the boot.img needs to be installed to the same device it was patched on? I find it strange that it would successfully root the device, but not pass SafetyNet. I'll think on that and figure out if it makes more sense to just release unpatched builds in the future.
 
  • Like
Reactions: Arju

blakeatl

Senior Member
Jul 28, 2009
702
86
Atlanta Area
Yeah, it's literally built from Lineage source with upstream Linux kernel merged in. I wouldn't recommended flashing this on AOSP any more than I would recommended flashing the stock Lineage kernel on an AOSP build. Even if it booted I imagine there's a good chance it would break things to the point of being unusable. That being said, I haven't tried it so I'm only speculating. If you do, make sure you've got a copy of your ROMs stock boot.img to recover with. But seriously, I wouldn't.

I flashed it on AOSIP without issue. Not sure if it's considered the same as AOSP.....
 

Arju

Senior Member
Nov 11, 2008
1,676
1,135
Örebro/Sweden
Thanks for sharing. I essentially went through the same process to patch these images myself after they were built, perhaps there is some kind of security measure in place where the boot.img needs to be installed to the same device it was patched on? I find it strange that it would successfully root the device, but not pass SafetyNet. I'll think on that and figure out if it makes more sense to just release unpatched builds in the future.
I wouldn't realy mind and I think it would make it easier for you too. If the patching is unique per phone then it makes sense that we patch it ourselves. But we need upstreamed updated kernels!!! so don't stop doing those!! ;)
 
  • Like
Reactions: return.of.octobot

return.of.octobot

Senior Member
Mar 5, 2015
521
1,318
Wilmington, NY
I wouldn't realy mind and I think it would make it easier for you too. If the patching is unique per phone then it makes sense that we patch it ourselves. But we need upstreamed updated kernels!!! so don't stop doing those!! ;)

Yeah of course, no sooner had I uploaded 118 than 119 was pushed. I'm not sure if I'll be able to get one out for each release before the next one comes out, but I'm going to be keeping these updated a frequently as I can. Anyway, I was only speculating about device-specific images, but I'm going to try and flash an image that was patched by my buddy and see if I can reproduce any issues. Regardless, I'll likely stick to uploading unpatched images in the future.
 
  • Like
Reactions: NaterTots and Arju

Top Liked Posts

  • There are no posts matching your filters.
  • 45
    Neutrino Kernel began as an effort to keep the stock LineageOS 15.1 kernel up-to-date with the latest linux-stable releases and has since evolved into an intensive crash course in maintaining my own custom kernel. Although some of you would accuse me of modesty, I think it's important to acknowledge that I am a "kernel developer" in the same way that Amy Schumer is a "comedian". That is to say, my work is highly derivative and built on the backs of individuals who are far more talented than I am. My role here is to have a vision, establish a design philosophy, and use the resources at my disposal to bring that vision to fruition.

    Those of you who've perused my staging repo will know that I'm very particular about cleanliness. All changes and additions are vetted based on viability and purpose. Neutrino is based on kernel.lnx.4.4.r35-rel, pure CAF source for Android 9.0 tracking and upstreamed to the latest linux-stable release. I have manually rebased Essential's stock kernel source on top of CAF using relevant OEM commits from PPR1.181005.034. All major features and patchsets are assembled on independent staging branches of this codebase base and merged into the release repository.

    I do not commit changes that I cannot justify or explain, and I do not go on indiscriminate cherry-picking sprees. There are a handful of developers that I highly respect, and who's projects have served as inspiration for my own. My intention is to incorporate the best of what they've brought to the table in a way that most effectively achieves and enhances this project's design goals.

    I like to think that Neutrino is relatively subdued in terms of "features", with a stronger focus on optimizations over fluff. That being said, there have been quite a few additions which I feel have merit in terms of increased performance and/or efficiency provided the former does not compromise the later:

    • Revamped EAS implementation for Pie
    • sultanxda's CPU/GPU Boost Drivers
    • Dynamic SchedTune Boosting
    • Maple I/O Scheduler
    • Broader subsystem support for Power Efficient Workqueues
    • KCAL Color Control
    • Backlight Dimmer
    • Fsync Toggle (enabled by default)
    • GPU Underclock @ 180 MHz
    • CPU (partial) Overclock, Silver Cores @ 2035 MHz
    • Boeffla Wakelock Blocker v1.1.0
    • Wireguard Support
    • VDSO Support
    • Treewide memory allocation/overflow patches from mainline
    • OOM Reaper and various memory management enhancements to improve LMK
    • Treewide compiler warnings corrected
    • Built with self-compiled Clang 8.0.3 and GCC 8.2.0 toolchains, with a local initialization sanitizer and polly optimization flags

    INSTALLATION:
    **Neutrino now utilizes AnyKernel2 zip format for universal compatibility**
    As a result, you can now flash this kernel on just about anything including Oreo/Pie custom and stock ROMs. The only requirement is that your firmware is current and up-to-date with PPR1.180905.036 at a minimum. Flashing on older firmware will result in broken input detection and a non-functional touchscreen.

    That being said, this is an EAS kernel and is best suited for use on EAS-compatible ROMs. Just because it can be flashed on stock does not mean that you should do so. Installation on ROMs which do not natively support EAS (such as stock) will likely result in sub-optimal battery performance and I will not entertain any complaints stemming from the use of Neutrino on ROMs which are incompatible with EAS. Stock support is a perk and an experiment on my part, please do not make me regret giving you the ability to flash on stock, I will drop public support for it if this disclaimer is routinely ignored. If you choose not to heed my recommendations, you are doing so at your own discretion.

    For ease of use, I would recommend using an app with built-in zip flashing functionality such as EX Kernel Manager or FK Kernel Manager. Of course, I cannot expect all of you to utilize a paid app for installation and as such, conventional installation via TWRP is certainly possible as well.

    Neutrino will preserve existing Magisk installation during kernel update, meaning if you already have Magisk installed on your device you need not worry about reflashing Magisk when updating your kernel. If you do not already have Magisk installed and desire root access then Magisk zip must be flashed following kernel zip via TWRP.

    DOWNLOADS:
    Current releases can be downloaded here.
    Archival builds (boot images) for lineage-15.1 can be found here.

    SOURCE & SPECS:
    Neutrino Kernel Source
    Neutrino Staging Repo
    Changelog
    Linux Kernel Version: 4.4.166
    CAF Release: LA.UM.7.4.r1-03900-8x98.0
    Neutrino Kernel Version: hercules
    Clang Version: neutrino clang 8.0.0-r348460
    Build Date: 20181206
    24
    For the sake of courtesy to anyone who still cares, I will be requesting the closure of this thread. This does not mean I am effectively throwing in the towel on this project, it's just indicative of the fact that I have run up against a wall which I am currently unable to overcome on my own accord. It seems I am currently the only person on the entirety of the internet trying to implement EAS on the new CAF Pie tags, and my individual attempts have had embarrassing results to say the least. I have no desire to maintain an HMP based kernel as there is very little that I'd be able to offer on that end that you wouldn't be able to find elsewhere, by someone more talented than I am. With that being said, until I get smarter, or find a like minded collaborator I see no reason to keep this thread open for the time being and passively stoke expectations for a future release that is unlikely to materialize in any sort of timely manner.
    22
    So, I pretty much spent all day getting back to the point I was at yesterday but such is life. On a positive note I've rebased OEM source on kernel.lnx.4.4.r34-rel (our new CAF branch for 9.0), and upstreamed to 4.4.152. It was a slog considering there was no android-linux-stable repo to work off of this time, but it was good exercise to go through the process myself and I'm extremely pleased with how clean the result turned out to be. Really looking forward to seeing how this progresses, apologies in advance for the delay that ensues, but I promise I'm working as quick as I possibly can (just ask the last 8 hours of my life). If you're at all interested, you can follow the progress here.
    22
    With all do respect guys, I requested this thread be reopened in preparation for new releases. I was hoping that it would silently remain unbumped until I was ready to update it but it seems that ship has sailed.

    Yes, there is a new build and I will be continuing work on this project. Some of you may very well already be running it, but there are a few things I need to take care of before it hits XDA officially and more importantly there is some pertinent information that I need to make clear in the OP in an attempt to mitigate future headaches. I will attempt to summarize some of these points for the times being..

    - New builds will be in AnyKernel zip format

    - They will run on anything including stock and oreo/pie custom ROMs provided that your firmware is up to date with PPR1.180905.036 (September) or newer.

    - Just because it runs on stock does not mean that you should flash it. This is an EAS kernel and is best suited for use with EAS compatible ROMs, I will not entertain complaints stemming from the use of Neutrino on stock or any other ROM that does not natively support EAS.

    - If you choose to flash Neutrino on stock YMMV and you are doing so at your own discretion. Stock/universal support is a perk and an experiment on my part. Do not make me regret giving you the ability to flash on stock, I will drop public support for it like a hot potato.

    That's more or less the gist of it, I'm going to take the next day or two to get a few things in order at which point I will update this thread and officially drop the new release. Thank you for your patience.
    21
    4.4.166-NeutrinoKernel-hercules

    **OP updated for Neutrino Kernel release (4.4.166-hercules)**

    Better late than never...


    Neutrino Kernel release for Essential PH-1 (mata)
    Linux Version: 4.4.166
    Neutrino Version: hercules
    HEAD: f324a8c

    Changelog (Summarized):
    (Complete Changelog)