[Samsung Galaxy S9 & S9+ Cross Device Development] Eamo5:
Endurance Kernel • Galaxy S9 / S9+​

Endurance Kernel was designed by me with the goal of providing a much more responsive user experience whilst simultaneously conserving the devices battery as much as possible. The Oreo kernel is forked from A Pretty Good Kernel by ianmacd so everything from there has been ported over and likely will consistently for the lifespan of this kernel, and the Pie kernel is forked from ELS. If you want the best battery this kernel offers, flash the underclocking build. If you want the best performance this kernel offers, flash the overclocking build. Each variant of the kernel is explained in more depth below. The kernel is largely adjustable in the paid app EX Kernel Manager (EXKM) by flar2 or in the free app MTweaks by Morogoku. Please note I don't own my S9 anymore!

DISCLAIMER - I am not responsible for any harm that may come to your device as a result of flashing this kernel. I am however happy to provide support if required.

Downloads

I am trialing GitHub and Mega releases only for now in order to simplify and speed up the release process. 1.x.x indicates the kernel should be used with an Oreo based firmware. 2.x.x indicates the kernel should be used with a Pie based firmware.

Latest GitHub Release

MEGA Repository

Key Features

Latest ELS (almost) always merged in

Implemented AndreiLux’s custom scheduling, EAS backports, 16ms PELT half-life, and migration hysteresis filter

Hotplugging enabled

Boeffla wakelock blocker supported (default list tweaked for improved deep sleep)

Support CPU overclocking and underclocking in overclock and underclock kernel builds

Support GPU overclocking up to 598MHz on all builds

Adapted notification LED fade support from NX Kernel from the Galaxy S8

Enabled fsync on / off support (on is default and recommended)

DoubleTap2Wake, Sweep2Wake, Sweep2Sleep & RGB colour control

CFQ (stock and kernel default), deadline, noop, FIOPS, SIO, Zen, Maple and BFQ support

Westwood (kernel default), bic (stock), cubic, reno, htcp, lia, veno and olia TCP congestion algorithms enabled

8.1.0 and 9.0 AOSP support

Several kernel optimizations from Notorious Kernel

WireGuard Support

DriveDroid Support

F2FS support

SELinux set to enforcing

Unofficially supported adjustable SELinux status through the 'Magisk SELinux Manager' module or # setenforce 1 or 0

Disabled almost all logging, debugging and tracing

Various patches to improve performance and battery

No bull****

Detailed Overview

The PELT half-life has been reduced from 32ms (stock) to 16ms which greatly improves device responsiveness, alongside the use of updated custom scheduling, both thanks to Andrei Frumusanu’s amazing work on the kernel. For a more up to date reference on the performance of the Exynos 9810, look at Andrei's investigation comparing the Exynos Note 9 to the Snapdragon Note 9.

This kernel supports overclocking and underclocking. In order to use overclocking or underclocking, simply rename 'Endurance-Kernel-1.x.x' to 'Endurance-Kernel-1.x.x_oc' or 'Endurance-Kernel-1.x.x_uc'. If the kernel has '_uc' or '_oc' in the name of the zip file, it will flash the selected build of the kernel.

The overclock build will now use big cluster (M3) quad / triple frequencies up to 2106MHz, dual frequencies up to 2416MHz and single frequencies up to 2964MHz. The small cluster has now also been overclocked to 2002MHz. The overclock build also removes Andrei's conservative frequencies for Samsung's default scheduling in order to utilise the higher frequencies more. There is no guarantee that your battery will perform well with overclocking, nor your device will be safe running above stock frequencies. Use at your own risk.

The underclock build will now limit quad workloads at 1586MHz but still allow single frequencies up to 2704MHz, dual frequencies up to 2314MHZ or triple frequencies of up to 1794MHz. This finds a good balance between battery conservation and performance. Due to the 16ms PELT half-life the underclock should be hopefully be less noticeable than it would be on a stock kernel at 32ms.

Notification LED fade support has also been added and enabled by default. The fade can be turned on and off and have fade in and out speed adjusted in EXKM or MTweaks. Additionally, in both EXKM and MTweaks such as fsync on / off support, DoubleTap2Wake, Sweep2Wake, Sweep2Sleep & RGB colour control.

This kernel unofficially supports (but I typically strongly advise against the use of) a permissive SELinux status through the 'Magisk SELinux Manager' module.

Magisk installation chaining has also been added as a feature thanks to Ian's updated installer script. To use the the magisk chaining feature, simply rename the zip from, for example 'Endurance-Kernel.1.x.x_underclock' to 'Endurance-Kernel-1.x.x_underclock_magisk'. Ian's thorough explanation of the feature has been attached below.

AOSP Kernels

As of V1.1.2, the kernel now supports 8.1 and 9.0 AOSP ROMs. These builds are entire ports of Endurance Kernel that have been adapted for AOSP, hence any changes that are made to the base kernel will almost always also be included in the AOSP kernels. The 8.1 AOSP kernel seems to entirely work with all ROMs that support the current kernel firmware and vendor. Lineage OS will not work due to the merging of Note 9 sources and the dependency on the Note 9 vendor.

If you are using any of CodeFox / Mohammed's builds of PixysOS, Pixel Experience 9.0 sGSI or a build newer than Rainbow_Dash's V3, you must use the 8.1 AOSP Kernel. All other sGSI's should use the GSI build.

Due to SELinux interfering with Bluetooth's functioning on CodeFox / Mohammed's newer builds of Pixel Experience or PixysOS, you will need to set the kernel to a permissive SELinux status through the 'Magisk SELinux Manager' module for Bluetooth to work.

If SafetyNet is failing, this can be worked around to allow SafetyNet to pass. You will need the 'MagiskHideProps' module installed. After rebooting, using a Terminal Emulator app enter the following commands in the order listed without quotation marks.

Type 'su'

Type 'props'

Type '1' to edit the device fingerprint

Type 'f'

Type '13' to select Samsung

Type '23' if you have a Galaxy S9 (G960X) or '24' if you have a Galaxy S9+ (G965X)

Reboot

Due to the sheer diversity of AOSP ROMs, it is important to ensure you are concise when reporting an issue. Before you report an issue ensure you explicitly state the variant of the kernel you are using (TW, 9.0 GSI, 8.1 AOSP) as well as the ROM, firmware and vendor once you have ensured the ROM is compatible with the kernel. If these requirements are not met, you may receive support for the wrong platform or no response at all. It is preferred that you ask in the relevant telegram group prior to publishing on the XDA thread if possible.

Telegram Groups

If you're joining the Telegram group for support, please read the FAQ first!

Endurance Kernel Discussion / Support Group - https://t.me/endurancekernel

Endurance Kernel News Channel - https://t.me/endurancekernelnews

Credits

A huge thank you to everyone involved in the production of this kernel. Particularly a few names I would like to mention.

ianmacd - For creating A Pretty Good Kernel and doing all the hard work for me, as well as being a fantastic mentor who has assisted me through every stage of this kernel. My words understate my appreciation for your efforts. Seriously, try APGK if you do not enjoy this kernel!

AndreiLux - For pushing the device to its limits in many regards and paving the pathway from which many other devs, myself included rely on, and for assisting me in the production of the kernel.

farovitus - For his vast efforts included in the development of Notorious Kernel and for providing inspiration of changes and commits to include in the kernel as well as making another great kernel before the production of Endurance Kernel. Also thanks for maintaining ELS and keeping it simple for me!

flar2- For his fantastic EXKM app, and all his work from ElementalX included in APGK such as wake / sleep gestures and RGB colour control.

djb77 - For inspiring a few additions to the ramdisk and for being another fellow Aussie.

WhoIsJohnGalt1979 - For being by far the most exceptional beta tester and friend. Your efforts and kindness do not go unnoticed.​

Huge thanks to everyone else who was involved in development of the kernel, and helped me during the stages of instability in the early phases of this kernel. You know who you are!

And of course, everyone involved in mainline Linux development!

Additonally

Lord Boeffla for Boeffla Wakelock Blocker

franciscofranco for fsync on / off support

Ktoonsez for initially introducing Notification LED fade support.

Noxxxious for making it easier to adapt Notification LED fade to the S9!

osm0sis for Android Image Kitchen

If I included your work and forgot you, let me know and I’ll add you to the credits list!

Source - https://github.com/eamo5/starlte-endurance

Click here to donate! I used to not accept donations but while I'm undertaking my degree, a small donation could go a long way.