Related
Introduction
This ROM is inspired by JustArchi's build optimizations that provide up to 6x performance boost .
I am not a developer by any means, I did my homework and I figured out how to compile and cherry-pick cool things. I am open to advice and guides that can help me make this ROM even better, you can also always ask for features and I'll do my best to bring them in.
As this is my rom for daily use, it contains many, many tweaks and endless hours of work of the best devs of XDA. In these features you can find Faux's Intelliplug, Yank555 powersuspend driver and many other stuff. At this point if you use any other kernel with my ROM you will lose about 80% of the features and the experience I want to provide will be lost. If you like other custom kernels such as Pink please kindly use official Nightlys.
If you are still here and haven't ran away you must know that you can always ask me for new features you see in other fine roms (Such as Temasek, CrDroid, etc) and if everybody like that feature (Including me) I will gladly bring it into the ROM. Don't forget that if you want a full featured ROM there's plenty of fine choices. The main idea with this is the same as with my old CM11 builds; "To stay as close to Stable CM as possible while adding on a little somethin' somethin' to make things better."
DISCLAIMER: I am not responsible for any damages to your device, always have a nandroid on hand if anything happens
Main Features
Based on CyanogenMod 13 latest updates
ROM compiled with UberTC 5.2
Build optimized with Graphite and O3 flags
Build optimized Cortex A7 architecture
Custom cosmetical changes
Screen Record
Custom msm8226-common device branch (Different PowerHAL)
Custom Kernel with several features out of the box such as:
-Upstream GPU patches
-GPU Overclock
-HTC dynamic fsync
-USB fast charging
-Some Interactive picks
-Power efficient workqueues
-Simple GPU Algorithm
And much more, for a deep insight you can visit my github
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Installation Instructions:
Upgrading from a previous build:
1.- Flash the ROM
2.- Flash any add-ons you want
3.- Wipe dalvik and cache
4.- Reboot into ROM
Upgrading from any other ROM even CM11:
1.- Full wipe
2.- Flash the ROM
3.- Flash GApps
4.- Flash any add-ons you want
5.- Wipe dalvik and cache
6.- Reboot into ROM
Downloads:
ROM
Build 4
Build 3
Build 2.1
Build 2
Build 1
Kernel
[MM]Beto's_Kernel_V6.0.zip
5.1.1 releases,
Beto's_Kernel_V5.0.zip
Beto's_Kernel_V4.1.zip
My preferred GApps:
Open Gapps
--Recommended Settings--
Nope.
Source and credits:
*CyanogenMod for the awesome ROM and great support for our device
*Somcom3X our beautiful CM maintainer.
*JustArchi for the countless hours of testing build flags and Toolchains.
*Chainfire for the great Superuser.
*bedalus (picked lot of things from your kernel)
*GalacticStrider for his amazing build work on SaberSunset.
*CL3Kener
*Faux
*Synergy510 For his amazing work with Saberize optimizations which made possible this ROM. (I also took his thread as base to make this one )
This ROM wouldn't be possible without them, so please donate and show your support to them.
ROM OS Version: 6.0.1 Lollipop
ROM Kernel: Linux 3.4.x
Based On: CyanogenMod 13
Source: My kernel sauce
Version Information
Status: Stable
Created 01/30/2015
Changelog
Build 4
-Updated to latest cm-13.0
-Changed some out of the box kernel settings
Click to expand...
Click to collapse
Build 3
Synced with latest cm-13.0 sources
MSM8226-Common
- Revert "msm8226-common: Add falcon and peregrine sensors HAL" …
- Revert "msm8226-common: Enable proximity check on wake" …
- Revert "msm8226-common: Enable Ambient Display" …
- msm8226-common: Kill Doze and sensor usage …
vendor/motorola
- Revert "falcon peregrine: Remove proprietary sensors HAL" …
cm/vendor
- Added Kcal control by savoca
- Added latest AdAway
- Added Nova Launcher
Click to expand...
Click to collapse
Build 2.1
Fixed derps with BT and optimzation flags
Click to expand...
Click to collapse
Build 2
ROM:
-Updated to latest cm-13.0 release
Kernel:
-Added Kcal support
-Added Faux Sound Control
Click to expand...
Click to collapse
Build 1
MSM8226-COMMON
-Default scheduler is ROW
[+] Which is vastly superior than default on real life usage
-Killed custom cm PowerHAL in favour of Qualcomm implementation.
[+] This improves battery consumption both on iddle and screen on.
-Disabled hispeed_freq when screen is off
[+] Intended to improve energy usage on iddle
-Replaced some libs to match qcom vendor
[+] This one fix some very annoying logs on the PowerHAL as it looked for libs that didn't exist. Such as “QCOM*PowerHAL:*Failed to acquire lock”
-Added MSM8226 board optimizations
[+] Given more data to the compiler such as number of cores and cache L1/L2 to allow it to optimize the code even further
Frameworks/Base:
-Ability to hide root icon
-Switchable kill-app timer
Build
-Compiled with Arter97 optimization flags
-Build compiled with UberTC 5.3 optimized
Vendor/cm
-Some cosmetical changes
Kernel: (Featuring my old kernel which is a stock kernel with a couple of extra features)
-Upstream GPU patches
-GPU Overclock
-Intelli-Plug and Mako hotplug
-HTC dynamic fsync
-USB fast charging
-Some Interactive picks
-Power efficient workqueues
-Simple GPU Algorithm
-Intelliactive governor
-More TCP congestion
-CPU-Boost on which is needed by qcom PowerHAL
-“A lot” of misc stuff which you can check on my github
Click to expand...
Click to collapse
Final
-Updated to latest cm-12.1 sources
-Reverted some custom PowerHal upstream commits since we are using qcom implementation
-Deleted profile settings that used to turn on MP-Decision on several tasks (We may now use Intelli-Plug without it messing around)
Click to expand...
Click to collapse
Build 26
-Updated to latest CM-12.1 sources
-Added wakelock blocker.
-Default scheduler is ROW again.
-Reverted custom PowerHal implementation
-Reverted readahead back to normal values
Click to expand...
Click to collapse
Build 25
ROM:
Updated to latest cm-12.1 sources.
Removed Nova Launcher
Custom PowerHAL implementation
[+] This one changes the battery profiles, specially for power saving, making the phone actually usable on saving mode (More info here)
Added MSM8226 board optimizations
[+] Given more data to the compiler such as number of cores and cache L1/L2 to allow it to optimize the code even further for our phone.
Bionic changes
[+] Added optimized memcpy implementation for Cortex A7
ART Optimizations
Patch to allow Viper4Android on enforcing mode
Misc UI changes
Kernel:
Pushed readahead to 512Kb
Intelli-Plug updates
Default scheduler is now BFQ
SELinux is now enforced.
soc: qcom: bam_dmux: Add fast-shutdown flag
[+] This one should greatly reduce bam_dmux_wakelock on our 4G device
Click to expand...
Click to collapse
Build 24
-Updated to latest CM-12.1 sources
-Reverted some unnecesary framework/base commits
-Restored MotoDoze
-ROM compiled now with Uber 4.9, which is fairly similar to SaberMod. Just for testing purposes.
-Cleaned my build environment squashing commits
Click to expand...
Click to collapse
Build 23
-Updated to latest CM-12.1 sources
-ROM is now compiled with GCC 4.9, the toolchain that'll be shiped on M.
-Fixed wrong auto-vectorization of ID3 iterator causing various media crashes with badly-tagged MP3s
-Kernel compiled with Linaro 4.9.4
-Added built in SuperSu menu (Require SuperSu)
-Updated to ArchiDroid Optimizations 4.1.
Click to expand...
Click to collapse
Build 22
-Updated to latest CM-12.1 sources
-Refactored kernel after *some guy* decided to fix Interactive governor when there it was nothing wrong with it.
-Updated kernel toolchain to Linaro 4.9.4
-Updated SaberMod 4.8 to latest release
Click to expand...
Click to collapse
Build 19
Updated to latest CM12 sources
Fixed hide supersu icon option
Disabled Faux123 Simple_Ondemand
Enabled Arter97 AdrenoIdler 1.1
Misc kernel cherry-picks I had before my phone died
Click to expand...
Click to collapse
Build 18
-Updated to latest CM12 sources
-Lot of things have been fixed, specially fixed parameters for lowminfree memory and possibly bluetooth hiccups
-Updated SaberMod toolchain.
Click to expand...
Click to collapse
Build 16
Updated to latest CM12 sources
Kernel and ROM are now separated, if you want my kernel it must be downloaded and flashed after the ROM.
Merged pull request of @Frazew
Fixed screen record which I had broke on Build 15
Build lited with Opti-Charger
Misc updates to Kernel
Click to expand...
Click to collapse
Build 15.1
-Finished bringing features of old kernel to the new one
-Implemented misc build.prop tweaks (Commit)
-Introduced Opti-Charger (To improve RAM use, more info in the spoiler)
Custom ROMs in the beginning had limited space to work with which is why Cyanogen introduced opticharging to the custom release tool in order to shrink apks to fit more apps on system partitions of the original android devices. The opticharger script pulls apart apks near the end of the build and optimizes all pngs drawables found in them. Originally this script used optipng which is great and there is absolutely no quality loss involved in the png compressions but more recently I’ve begun using pngquant because it compresses pngs even smaller 30-70% with usually an average of about 50%. Pngquant does result in a slight loss of quality but nobody has noticed yet (See more on pngquant here: http://pngquant.org/) (If you are worried about quality you can always use optipng which compresses without any quality loss themers usually use this option instead)
Currently, CyanogenMod has abandoned the use of the opticharger but many ROMs still use it such as SLIM, AOKP, LiquidSmooth, Dirty Unicorns, Carbon, Validus, and many others. Themers and app developers alike use these techniques as well to make their apps/themes run more smoothly. Making pngs 70% smaller actually makes the loading time 3 times faster for these pngs and also saves you RAM. I understand apks aren't all pngs but you'd be surprised how many junk pngs google has left behind since froyo that serve no purpose but are loaded into your ram with SystemUI anyways. Thankfully opticharging shrinks all of those undesirables by usually 50-70% and saves you several MB worth of space and speeds up your SystemUI. Since you can't unload the system UI this is well worth the effort! My motto always is every little bit counts
Many still argue that high end device don’t need opticharging anymore because they are fast enough to handle these full-sized pngs. While this is true it still doesn’t change the fact that opticharing IS still slightly faster and opticharged apks do use less ram
.
Click to expand...
Click to collapse
Build 15
-Updated latest CM-12.1 sources
-Switched kernel to latest CM sources, meaning you can use Optimus and Spirit kernel now. Make sure to update your bootloader if you don't want "screen-tearing" lines.
-Merged Arter97's fix to Play Store FC's
Click to expand...
Click to collapse
Build 14.1
First attempt to fix suddenly battery drops
Added more TCP congestion options
Click to expand...
Click to collapse
Build 14
Synced latest CM-12.1 sources
Featuring latest 5.1.1 R1 release.
Fixed crazy radio wakeups on deep sleep
Removed p-thread to get more battery life (MOAR!)
Added quick lockscreen gestures (To turn screen on when notification led is blinking and pocket mode)
Switched to latest JusArchi 5.1 gcc optimized for Cortex A7.
Added screen-recorder, which can be enabled on "Buttons" -> "Poweroff Menu"
Probably more stuff I don't remember right now
Click to expand...
Click to collapse
Build 11
Updated to latest CM-12.1 sources 8/05
We are back to my "stock" kernel which doesn't have DT2W
Released 2 variants of my kernel, one with DT2W and the other without it.
Click to expand...
Click to collapse
Build 10.1
Enabled DT2W implementation
Enabled power efficient workqueues
Activated fast charge via USB
Some misc picks to enhance kernel
Click to expand...
Click to collapse
Build 8.1
Fixed kernel Toolchain (Crucial for a perfect synergy with optimizations)
Click to expand...
Click to collapse
Build 8
Featuring Android 5.1.1
Synced latest CM12.1 sources 21/04/15
Updated kernel Toolchain to SaberMod 5.0
Complete rebase to kernel.
Updated graphite flags.
Beast benchmark scores (over 20k)
All old optimizations that are posted on OP are up and running too.
Click to expand...
Click to collapse
Build 6
Updated with latest CM12 sources
Intelli-Plug 4.0 with eco-mode is back.
Added some special changes to hotplug
Added option to hide the annoying icon of root at status bar. (@Pupet_Master bet you are going to love this one)
Switched to Linaro Toolchain 4.9.2 optimized for A7 Cortex architecture. (Rom is still compiled with SaberMod)
Misc tweaks to kernel.
Click to expand...
Click to collapse
Build 5
Reworked Project, added all optimization flags.
Click to expand...
Click to collapse
Build 4
*Synced latest CM12 sources
*No screen-tearing issues
*Re-Enabled MP-Decision
*Added new implementation of Intelliplug directly from Faux's Github
*Removed IntelliMinMax governor (For now)
*Updated powersuspend driver to v1.5
*Updated SaberMod Toolchains
*Ditched my old build environment and bringed up @JustArchi optimizations which takes Android to a whole new level
Important changes:
- Optimized for speed yet more all instructions - ARM and THUMB (-O3)
- Optimized for speed also parts which are compiled with Clang (-O3)
- Turned off all debugging code (lack of -g)
- Eliminated redundant loads that come after stores to the same memory location, both partial and full redundancies (-fgcse-las)
- Ran a store motion pass after global common subexpression elimination. This pass attempts to move stores out of loops (-fgcse-sm)
- Performed interprocedural pointer analysis and interprocedural modification and reference analysis (-fipa-pta)
- Performed induction variable optimizations (strength reduction, induction variable merging and induction variable elimination) on trees (-fivopts)
- Didn't keep the frame pointer in a register for functions that don't need one. This avoids the instructions to save, set up and restore frame pointers; it also makes an extra register available in many functions (-fomit-frame-pointer)
- Attempted to avoid false dependencies in scheduled code by making use of registers left over after register allocation. This optimization most benefits processors with lots of registers (-frename-registers)
- Tried to reduce the number of symbolic address calculations by using shared “anchor” symbols to address nearby objects. This transformation can help to reduce the number of GOT entries and GOT accesses on some targets (-fsection-anchors)
- Performed tail duplication to enlarge superblock size. This transformation simplifies the control flow of the function allowing other optimizations to do a better job (-ftracer)
- Performed loop invariant motion on trees. It also moved operands of conditions that are invariant out of the loop, so that we can use just trivial invariantness analysis in loop unswitching. The pass also includes store motion (-ftree-loop-im)
- Created a canonical counter for number of iterations in loops for which determining number of iterations requires complicated analysis. Later optimizations then may determine the number easily (-ftree-loop-ivcanon)
- Assumed that loop indices do not overflow, and that loops with nontrivial exit condition are not infinite. This enables a wider range of loop optimizations even if the loop optimizer itself cannot prove that these assumptions are valid (-funsafe-loop-optimizations)
- Moved branches with loop invariant conditions out of the loop (-funswitch-loops)
- Constructed webs as commonly used for register allocation purposes and assigned each web individual pseudo register. This allows the register allocation pass to operate on pseudos directly, but also strengthens several other optimization passes, such as CSE, loop optimizer and trivial dead code remover (-fweb)
- Sorted the common symbols by alignment in descending order. This is to prevent gaps between symbols due to alignment constraints (-Wl,--sort-common)
Click to expand...
Click to collapse
Build 3
Updated CM12 commits.
Initial Modular O3 Implementation … (Yay!)
armv7-a-neon: Apply Correct mfpu and mfloat tunings per arch …
Updated Graphite flags
Speed up Recents Menu, StatusBar and Windows Orientation.
Added a setting to disable expanded notifications.
Disabled MP-Decision (Conflicting with Intelli-Plug when performance per app is ON)
Enabled Intelli-Plug by default.
Misc cherry-picks to polish new optimizations
Click to expand...
Click to collapse
Build 2
Added Graphite optimizations
Added Strict-Aliasing optimizations
Updated latest CM12 sources.
Click to expand...
Click to collapse
FAQ
Thanks a lot @Travisholt92 for writing this guide, please give him a big thanks here!
Question 1: I am coming from (Stock or CM11), how can i install this?
Answer 1:
1. Back up all of your files, text messages, and everything else that you dont want to lose (try Easy Backup in the Google Play Store). You will lose everything stored on your phones internal storage and applications , your SD card will be safe.
2. Download the latest build posted in OP and Download GAPPS and move the .zip files onto your SD card (Remember where you put these files).
3. Shut down your phone.
4. Reboot into recovery mode by holding down the volume down button and the power button, then releasing the power button. This will come up with the Fastboot interface. Press volume down to highlight Recovery and then press volume up to boot into recovery mode.
(through TWRP)
5. Press Wipe
6. Press Advanced Wipe
7. Select Dalvik Cache, Data, Internal Storage, Cache, and System.
(Do not select microSD card or USB OTG)
8. Swipe to wipe.
9. Press Install. At the top of the screen make sure it says "Storage: microSD card". Navigate to the ROM .zip file and press it.
10. Press Add More Zips and select the GAPPS .zip file.
11. Swipe to confirm flash, reboot system, enjoy SaberMod!
(If none of these answers fix your issue read the comments for others having similar issues to see if anybody has found a fix for the issue. If the issue hasn't been meantioned previously please report the issue, leave a comment. Make sure to state what build you are running and what kernel you are using if you installed a custom kernel. If its something that happens when you perform a certain action such as after sending a text your phone reboots, try and be as detailed as possible when reporting the bug)
Question 2: I just installed (insert build name here and issue below). How do i fix this?
A. and my device is stuck at boot animation, device boots but spams with system application errors (meaning installed by your ROM not from GAPPS) , or anything else that prevents you from using your phone.
Answer: Backup your device and follow the directions for answer 1. (install the last ROM you were running if you are coming from an AOSP build if needed to back up your data)
B. and my device boots but spams with my downloaded application errors.
Answer: Uninstall the application and redownload it from the Google Play Store.
Gonna test
Que buena ver un chileno por estos lares, y más aun desarrollando roms, bastante bueno; voy a probar la ROM y ver como anda
English; Gonna test the rom and will say how it works
Any severe bugs up to know?
primewell said:
Any severe bugs up to know?
Click to expand...
Click to collapse
Only CM11 bugs, wich at this stage of develeopment are almost zero. That's the idea of applying only minimal stuff, the result is a enhanced CM11 experience with the same stability.
Next build will inlude GPU and RAM OC.
.
I also prefer CM 11 for now. Better stability and performance. And your ROM is great! No bugs so far. Thanks!
BUG
I Got Alll cores running on 1190hz all time and i can't change the frequencies
SplaszIG said:
I Got Alll cores running on 1190hz all time and i can't change the frequencies
Click to expand...
Click to collapse
It is not a bug, MPdecision shows all cores at full freq, but if you check them at real time (I.E using CoolTool) you'll see they work normally.
Anyway, I DK if add more features on the next build (Halo maybe?) or keep things simple with Linaro and Archi's optimizations. What do you guys think?
keep it simple, there are other ROMs for those who want more.
or you can make it modular and give additional functions in flashable zips
WiCiO_MeDi said:
keep it simple, there are other ROMs for those who want more.
or you can make it modular and give additional functions in flashable zips
Click to expand...
Click to collapse
+1
WiCiO_MeDi said:
keep it simple, there are other ROMs for those who want more.
or you can make it modular and give additional functions in flashable zips
Click to expand...
Click to collapse
Will do.
Thanks for your input!
I Think that modular add ons wolud be great , btw i would like more perfomance improvements too:good:
Wonderful job, hermano trasandino'. One thing I'm missing is the Tap2Wake feature. How can I add it to this ROM ?
Thanks
I'm guessing there's still this mystical memory leak problem as in CM11?
Sent from my XT1039 using XDA Free mobile app
New build is up. Currently I'm adding general tweaks before fetching more advanced stuff. (I'm having a lot of fun on Blechdose's AeroKernel and Faux github )
Changelog:
Updated with latest CM sources
Added GPU OC 550mhz
Added Min CPU Freq 192mhz
GPU optimizations
Added instructions for Cortex A7 architecture
ARM: use -mcpu=cortex-a7 when targeting MSM8226 CPU
Added frequency to corner mappings for msm8226v2
Reverted RAM OC due overheating
Interactive governor misc tweaks.
Click to expand...
Click to collapse
Link: Build 2
Can I flash this doing a clean install from CM12? There will be no problem right?
rodsayd said:
Can I flash this doing a clean install from CM12? There will be no problem right?
Click to expand...
Click to collapse
Yes. That's the way I've done it. Just simply erase everything EXCEPT sdcard and usbotg. Then, as usual, flash this ROM and then Gapps
I've been using it since yesterday and the perfomance is amazing! I will keep this as a daily driver, just one problem: sometimes the camera doesn't take the photo, it freezes just after I push the botton (I had the same problem on CM12).
rodsayd said:
I've been using it since yesterday and the perfomance is amazing! I will keep this as a daily driver, just one problem: sometimes the camera doesn't take the photo, it freezes just after I push the botton (I had the same problem on CM12).
Click to expand...
Click to collapse
Glad to see there's actually someone using and enjoying it. I'm having pretty good battery life and performance too, I guess Linaro and JustArchi's optimizations are just magical.
Regarding the camera, I don't use stock CM11 app but "A Better Camera" from the PlayStore. GIve it a shot and tell me if the issue persists.
Regards!
Great, I will try it. By the way, there isn't block screen notifications on the rom? That would be a nice feature if you can add it and keep up the good work, I'm staying with this.
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.
To make use of this facility, either rename the APGK Endurance Kernel zip file to contain the string _magisk or create a file called .magisk in either the root of your external SD card or in the standard Download directory of the internal SD card.
If any of these trigger conditions is met, the installer then looks in the standard internal Download directory as well as in ./Magisk (if present) on the external SD card (if present) for a suitable Magisk zip file to install. Preference is given to versioned files matching the glob Magisk-v*, in which case the latest according to lexical sort order will be used. If none is found, the installer then looks for unversioned release builds (e.g. official Canary channel release builds) called magisk-release.zip in the same locations, selecting the one with the most recent timestamp. If none is found, the installer will then try to find unversioned debug builds (e.g. official Canary channel debug builds) called magisk-debug.zip, again picking the one with the most recent timestamp. Finally, the installer falls back to looking for the most recent file called Magisk.zip or magisk.zip. If still no files have been found by this stage, chaining of Magisk is abandoned.
Click to expand...
Click to collapse
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.
OneUI Current Build Changelog
V2.0.27
Linux 4.9.190
CSGD kernel source and ramdisk
Converted GPU workqueues to kthreads (thanks farovitus)
Previous Changelogs
V2.0.26
Linux 4.9.186
CSG8 source and ramdisk
Removed various unneeded drivers
Disabled swap on AOSP
V2.0.25
Linux 4.9.185
V2.0.24
Linux 4.9.184
Introduced the latest stable Simple LMK from Sultanxda in AOSP kernel
V2.0.23
Linux 4.9.183
Addressed some regressions from the previous build
I forgot to update the kernel version lol
V2.0.22
Linux 4.9.182
CSF2 kernel source and ramdisk
Several improvements to ashmem, binder, SELinux dynamic memory allocation, IRQs & qos from Sultanxda
V2.0.21
Linux 4.9.180
V2.0.20
Linux 4.9.179
Cross compiled with GCC 9.1
Fixed instability in 4.9.178
V2.0.19
Linux 4.9.177
CSE3 ramdisk
V2.0.18
Linux 4.9.176
Cleaned up defconfigs
Unset CONFIG_DEBUG_KERNEL (and all it's dependencies)
Optimised F2FS configuration
Fixed issues with unofficial TWRP (hopefully)
V2.0.17
Linux 4.9.175
Fixed F2FS
V2.0.16
Linux 4.9.174
F2FS support
V2.0.15
Linux 4.9.173
V2.0.14
Linux 4.9.172
Updated Gator driver to v6.9
V2.0.13
Linux 4.9.171
Unset CONFIG_AUDIT (reduce SELinux overhead)
Updated Gator driver to 6.8
V2.0.12
Linux 4.9.170
V2.0.11
CSD4 kernel sources
CSD4 ramdisk
Linux 4.9.169
V2.0.10
Linux 4.9.168
V2.0.9
Linux 4.9.166
Fixed 4.9.165 performance regression
V2.0.8
Linux 4.9.165
Reduced kernel size
V2.0.7
CSC8 kernel sources
Linux 4.9.164
V2.0.6
Linux 4.9.163
V2.0.5
Linux 4.9.162
Unset approximately 15 CONFIG_TRACE & CONFIG_EXYNOS_SNAPSHOT related options
V2.0.4
Linux 4.9.161
Set CONFIG_STRIP_ASM_SYMS
Unset CONFIG_BT_DEBUGFS
Unset CONFIG_USB_DEBUG_DETAILED_LOG
Unset CONFIG_DEBUG_ATOMIC_SLEEP
Unset CONFIG_SEC_BOOTSTAT
Unset CONFIG_SEC_UPLOAD
Unset CONFIG_SEC_DEBUG_PPMPU
Fixed an issue with the r8152 ethernet driver & updated the driver.
V2.0.3
Linux 4.9.160
Unset CONFIG_EXYNOS_CORESIGHT (and everything it unsets)
Unset CONFIG_DEBUG_LIST
Unset CONFIG_DEBUG_EXCEPTION_STACK
Unset CONFIG_TIMER_STATS
Unset CONFIG_DEBUG_NOTIFIERS_PRINT_ELAPSED_TIME
Unset CONFIG_CGROUP_DEBUG
Unset CONFIG_MMC_DW_DEBUG
Unset CONFIG_SEC_DEBUG_TSP_LOG
Unset CONFIG_PHY_EXYNOS_DEBUGFS
Suppressed additional minor logging
V2.0.2
Linux 4.9.159
Unset CONFIG_KSM
Unset CONFIG_SDFAT_DEBUG
Unset CONFIG_SCHED_DEBUG
Fixed SD Card issue on AOSP ROMs
Maybe fixed vibration issue on AOSP ROMs
Oreo, GSI and AOSP Current Build Changelog
V1.2.33
Linux 4.9.190
Previous Changelogs
V1.2.32
Linux 4.9.186
Removed various unneeded drivers
V1.2.31
Linux 4.9.185
Reverted Simple LMK on AOSP builds as it doesn't appear to be making reclaims correctly atm.
V1.2.30
Linux 4.9.184
Introduced the latest stable Simple LMK from Sultanxda in AOSP kernels
V1.2.29
Linux 4.9.183
Addressed some regressions from the previous build
I forgot to update the kernel version lol
V1.2.28
Linux 4.9.182
Several improvements to ashmem, binder, SELinux dynamic memory allocation, IRQs & qos from Sultanxda
V1.2.27
Linux 4.9.180
V1.2.26
Linux 4.9.179
Cross compiled with GCC 9.1
Fixed instability in 4.9.178
V1.2.25
Linux 4.9.177
V1.2.24
Linux 4.9.176
Cleaned up defconfigs
Unset CONFIG_DEBUG_KERNEL (and all it's dependencies)
Optimised F2FS configuration
Fixed issues with unofficial TWRP (hopefully)
V1.2.23
Linux 4.9.175
Fixed F2FS
V1.2.22
Linux 4.9.174
F2FS support
V1.2.21
Linux 4.9.173
V1.2.20
Linux 4.9.172
Updated Gator driver to v6.9
V1.2.19
Linux 4.9.171
Unset CONFIG_AUDIT (reduce SELinux overhead)
Updated Gator driver to 6.8
V1.2.18
Linux 4.9.170
V1.2.17
Linux 4.9.169
V1.2.16
Linux 4.9.168
V1.2.15
Linux 4.9.166
Fixed 4.9.165 performance regression
V1.2.14
Linux 4.9.165
Unset CONFIG_ION_EXYNOS_STAT_LOG
V1.2.13
Linux 4.9.164
V1.2.12
Linux 4.9.163
V1.2.11
Linux 4.9.162
Unset CONFIG_FIVE_PA_FEATURE
V1.2.10
Linux 4.9.161
V1.2.9
Linux 4.9.160
Suppressed additional minor logging
FAQ
A FAQ section will be established as kernel development progresses. If you have any explicit unanswered questions, feel free to ask away. If you must contact me due to an issue, please report your device variant, ROM, firmware, vendor and previous kernel.
1. I can’t unlock / boot my phone! What do I do?
If you're stuck in a lockscreen loop, make sure you're on a firmware with a matching ramdisk to the kernel. Do not mix a CSC1 kernel ramdisk with a CSA2 ROM for example. Anytime the ramdisk is changed, it will be listed in the changelog. Are you on the correct firmware and vendor? If not, you can always flash this zip or revert back to previous versions through the Android File Host folder. Can anyone else successfully flash the kernel? If yes, verify the MD5 sum by referencing and ensuring a matching MD5 sum between the local file and the Android File Host file. Is it isolated to one device variant? (G960F / G965F) Did I just push an update? If yes, contact me on Telegram in the Endurance Kernel group for a faster response, and XDA for an eventual response. Does your ROM require a permissive SELinux status to boot? If yes, use the 'Magisk SELinux Manager' module to adjust your SELinux status. If none of this can solve your problem, contact me through the Endurance Kernel group.
2. Why doesn't my camera work after flashing the kernel?
Verify that you are on the correct firmware, vendor and a ROM that supports the current kernels sources. If you are still encountering issues after verifying this is correct, then let me know! If you do not wish to update, you can maintain a version of the kernel that does support your ROM by reading the relevant changelog for your OS and downloading the previous version from the Android File Host folder
3. Why doesn't my Bluetooth work after flashing the kernel?
Are you on an Oreo ROM that does not patch libsecure_storage, such as DevBase? If your Bluetooth is broken, the answer is probably. Instead you can use ianmacd's Magisk module 'libsecure_storage companion for rooted Samsung (Oreo) devices' or you can manually flash a zip to patch it yourself, without the need for Magisk.
4. Should I use the permissive or enforcing SELinux status?
The decision is yours. There is plenty of documentation available online outlining their differences. I strongly recommend enforcing, hence why permissive is not officially supported. Permissive is far less secure, and hence I do not condone the use of permissive. If you are using permissive, you should either have to due to a dependency or have another specific reason for doing so. eg. ROM requires disabled signature check. For most users, unless directed otherwise, use the default enforcing build.
5. When will you update the kernel?
Once ELS is updated and the kernel is ready! This is just a side hobby and I do have a life outside of kernel development. Be patient, the update will arrive within a few days if not ASAP.
6. Does this kernel support 9.0 AOSP GSI's?
Yes! Anything that's currently working on the Pixel Experience YEET kernel (lol) such as dual audio and MTP should also be working there too, plus some extra relevant changes.
7. Does the 8.1 AOSP kernel work with Lineage OS?
As of the Lineage OS 20181112 release, the kernel will no longer boot at all on Lineage OS due to the merging of Note 9 sources and the dependency on the incompatible Note 9 vendor. Albeit, Lineage previously wasn't recommended regardless due to the outdated vendor and kernel sources, which breaks the camera.
8. Will you add CPU undervolting?
No, EAS (Energy Aware Scheduling) has mostly made undervolting mostly irrelevant. Google EAS if you would like it find out more information as to why it is the case. I've included a detailed YouTube video outlining the scheduling mechanisms of EAS here.
9. Does this kernel support Note 9 ROM ports?
Not at this point in time but perhaps in the future. Almost certainly not within Oreo's lifespan anyway.
10. Do I need to install Magisk?
Nope, Magisk is entirely optional with this kernel.
11. Why when I flash the kernel, do I get a Magisk zip not found error?
Unfortunately, that means your Magisk distribution is not supported by the Magisk chaining feature. The kernel should have still installed despite not finding the Magisk zip, so you'll just have to flash Magisk manually afterwards. Personally I use ianmacd's nightly builds for S9 and have 0 issues with the chaining feature.
12. Why does this kernel offer no additional governors?
Because most of them are unstable and cause the device to crash, as well as EAS' integration with schedutil and EHMP.
13. Why does this kernel makes my device crash / battery poor / performance poor?
Because this kernel is still in beta. At this point, these should hopefully not be issues due to me and several others testing this kernel for several months. If this is the case, report it on the XDA thread or Telegram group.
14. Why is my WiFi performance worse when using this kernel?
This may be the case for some people. This kernel uses the Westwood+ TCP algorithm for enhanced WiFi speeds on certain networks. However there may be scenarios on poor signal networks, this TCP algorithm may cause packet loss at a greater rate than is default. This should hopefully not be an issue for anyone, however if it is, try using bic as default and contact me.
15. Why is my battery still terrible?
Are you in an area with poor signal reception? Unfortunately that is one thing a custom kernel cannot compensate for due to the device modem having restricted access and also legal issues. That leaves us with optimizations that can only be done to the SOC of the device. How you use your device can also greatly lead to variation in battery stats. If you are in need of further battery, 'underclocking' is available and is explained in OP. If you want the best battery life, I advise you try out that build.
16. Does the kernel support Samsung's Pie beta program?
Not yet, we still have to wait for sources to be released. Once sources are available, I'll begin work!
17. Why doesn't Bluetooth work on Pixel Experience with the 8.1 AOSP kernel?
Due to SELinux interfering with Bluetooth's functioning, you will need to set the kernel to a permissive SELinux status through the 'Magisk SELinux Manager' module.
18. Why does SafetyNet fail on the AOSP kernels?
This is a minor issue I don't believe I can address on my end. This can be worked around however 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
19. How do I overclock / underclock?
I can't believe I need this as a FAQ still. If you've been redirected here, read the OP! 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.
20. How can I use F2FS?
To use F2FS, you must erase your data and format your data partition (and optionally cache partition) to F2FS using the N9 TWRP available here, even if you are on S9. From there you should be able to reboot your device and restore your data through a backup.
21. Where can I donate?
I used to not accept donations but while I'm undertaking my degree, a small donation could go a long way. You can donate through my PayPal link here.
Installed and testing. Look good so far. No lags in PUBG ...
Battery life we will see
Thanks for this kernel!
Oel said:
Installed and testing. Look good so far. No lags in PUBG ...
Battery life we will see
Thanks for this kernel!
Click to expand...
Click to collapse
Great, future builds should allow for increased frequency usage when I enable overclocking. Stay tuned for that for an even better experience
Will install it today and test it
Just a note, I didn't port the GPU stuff, flar2 did.
djb77 said:
Just a note, I didn't port the GPU stuff, flar2 did.
Click to expand...
Click to collapse
Updated the post. Thanks!
support 960/965n?
Cosis1 said:
support 960/965n?
Click to expand...
Click to collapse
I personally haven't tested an N device yet. Feel free to try it out though. I think it should work
I've been eagerly awaiting on the sidelines to try your kernel. I have heard you mention it many times in different groups and now it has finally arrived. Many thanks and greatly appreciated. I'll let you know how I get on cheers eamon your a star.:good:
@Eamo5
hi, one question.
what exactly does the boeffla wakelock blocker patch?
greetings
emphazer said:
@Eamo5
hi, one question.
what exactly does the boeffla wakelock blocker patch?
greetings
Click to expand...
Click to collapse
It allows the blocking of default kernel wakelock which can in return give better battery due to less time being awoken from deep sleep, but should only be used if you know what you're doing
Eamo5 said:
It allows the blocking of default kernel wakelock which can in return give better battery due to less time being awoken from deep sleep, but should only be used if you know what you're doing
Click to expand...
Click to collapse
im asking because i noticed that the clock timer for ringing up on custom roms with android 5-7 didnt work correctly.
It didn't start to ring because the device was in a deep sleep. I just wanted to know if this behavior maybe has something to do with a kernel patch like that.
normally I say blocking of wakelocks are really good but if it blocks the wrong stuff then it can easy result in really bad sidechain effects.
edit: found a good descrption.
so its just a optional feature.
V1.0.1 Changelog
- ELS 4.9.131
- Frequency cap at 1794MHz removed to compensate for Samsung's updated scheduling mechanisms. (Should not reduce battery)
- Added Magisk chaining support.
- Overclocking and 'underclocking' support (Explained further in OP)
- Added unofficial N device support (Untested)
- Fixed LED adjustment at the source in original commit. Thanks flar2.
- Fixed dual audio on Pie GSIs (Untested)
- Remove GPU voltage control due to it's current broken state. (Will return when fixed)
- Improve kernel source
Download link is updated in OP!
V1.0
- Initial Release
Cosis1 said:
support 960/965n?
Click to expand...
Click to collapse
Can you try out that please? ^^
Eamo5 said:
Can you try out that please? ^^
Click to expand...
Click to collapse
I can use now. Thx :good:
Very good beginning!
Eamo5 said:
V1.0.1 Changelog
- ELS 4.9.131
- Frequency cap at 1794MHz removed to compensate for Samsung's updated scheduling mechanisms. (Should not reduce battery)
- Added Magisk chaining support.
- Overclocking and 'underclocking' support (Explained further in OP)
- Added unofficial N device support (Untested)
- Fixed LED adjustment at the source in original commit. Thanks flar2.
- Fixed dual audio on Pie GSIs (Untested)
- Remove GPU voltage control due to it's current broken state. (Will return when fixed)
- Improve kernel source
Download link is updated in OP!
V1.0
- Initial Release
Click to expand...
Click to collapse
Hi
@Eamo5 Thank you for your hard work.
I started with overclock, and the kernel is pretty good, performance is ok snappy system and battery life seems to be good even with overclocking.
I noticed that CPU never reach 2900 neither 2700 mhz even in heavy use. Maybe it is the ELS that have a better management of cores. I will continu testing and give feedback.
Have a nice day all
Sorry for my bad English
Phahec said:
Hi
@Eamo5 Thank you for your hard work.
I started with overclock, and the kernel is pretty good, performance is ok snappy system and battery life seems to be good even with overclocking.
I noticed that CPU never reach 2900 neither 2700 mhz even in heavy use. Maybe it is the ELS that have a better management of cores. I will continu testing and give feedback.
Have a nice day all
Sorry for my bad English
Click to expand...
Click to collapse
Great, glad to hear performance and battery are great. The very limited usage of those frequencies is due to how the hotplugging driver works after the BRE5 update I believe, where it will only use those frequencies in single threaded workloads ie. not very often, hence there will be very little regression in battery. I'm thinking of making some adjustments to the quad, dual and single frequencies next build to allow for greater usage of these frequencies and potentially an entire overhaul of the underclock build. Thanks for your testing, and your english is pretty good btw
Kirisakura-Kernel for the Asus Zenfone 6
Hello everyone,
After rising to the most popular Kernel on Pixel 3/XL, here it is for the Asus Zenfone 6!
Kirisakura - Kernel is designed to bring a handful of beneficial features to the device, while ensuring excellent performance and smoothness to get you safely through the day!
This project aims to keep most of the subsystems updated, way ahead of the stock kernel, thereby improving security and performance, while keeping stability as the foucs during testing! This includes Linux-Stable, CAF-Upstream and kernel/common.
Kernel Control Flow Integrity (Kernel-CFI), which is achieved by linking the kernel with LLD and Link Time Optimization (LTO), more precisely ThinLTO, are quite unique security features. In fact this, alongside Kirisakura-Kernel for the OnePlus 8 Pro, may be (and probably is) the first 4.19 msm kernel with a fully working Kernel-CFI implementation and CFI-Violations fixed on a smartphone.
The only kernels made by OEMs offering this security feature are the ones for the Pixel 3, 4 and 5 devices.
The recently released Kirisakura-Kernel for the OnePlus 8 Pro was featured on the XDA-Portal due to the inclusion of CFI. The featured article explains CFI in great details, is easy to understand and definitely worth to read.
Another security feature is Shadow Call Stack (SCS). Similar to CFI, only the Pixel 3, 4 and 5 kernels use this security feature.
SCS is another security patchset that is aimed at preventing attacks via return oriented programming (ROP).
ROP is a technique where the attacker gains control of the kernel stack to overwrite function return addresses and redirect execution to carefully selected parts of existing kernel code.
If you´re interested here are a few good links:
Google Security Blog explaining SCS.
LLVM doc about SCS
Android DOCs documenting SCS
If reading about upstream in the paragraph above got you curious,have a read about Linux-Stable and why it is important here. The stable-process is not the same for every subsystem, but the general idea, rule of thumb and benefits are applicable for other subsystems as well.
Quick explanation of CAF-Upstream. CAF is short for Codeaurora-Forums. This is the place where development from Qualcomm for their SoCs happens. This includes the Snapdragon 855/+ that´s built into the different SKUs of the Zenfone 6.
The kernel-bases available on the Codeaurora-Forums, are basically the foundations OEMs use, to build their own kernel additions on top for devices featuring Qualcomm SoCs.
The Qualcomm developers push regular updates to the bases of the different SoCs, a bit similar to how Linux-Upstream works. OEMs usually stop updating the initial base after the phone is released.
This kernel focuses amongst the other features to provide the latest CAF-Updates merged in a regular manner, to provide updates, improvements and enhancements for SoC specific drivers and subsystems! This might take a while, because a lot of device specific testing is done on my end to ensure stability.
The kernel includes a lot of improvements and contributions from other developers as well. Without this kernel would not exist.
Many of the improvements originate from @arter97´s, @kdrag0n´s and @Sultanxda´s work. Many others contributed in some way or another to this kernel.
A big thanks to all of them at this place!
Now lets continue with a list of features in the next paragraph!
Main Features:
- Based on latest kernel sources from Asus for Android 11
- Upstreamed against latest CAF
- Linux-Stable-Upstream included to latest 4.14.220
- compiled with Clang 11.0.1 prebuilt from Google
- Link-Time-Optimization (LTO)
- Kernel Control-Flow-Integration (CFI) and Link-Time-Optimization (LTO) ported from 4.19 kernel/common
- Shadow Call Stack (SCS) Security-Feature
- Use ThinLTO which was first used in the Pixel 4 XL Android R-Preview Kernel instead of full LTO for full program visibility (needed by CFI)
- fix CFI-Violations found in various subsystems like Asus/device specific drivers and qualcomm drivers
- Link the kernel with LLD and use RELR-Relocation
- include important fixes/improvements from kernel/common
- Flashing the kernel will keep root!
- Anykernel zip is based on the all new Anykernel3 release from @osm0sis
- include vDSO 32 patches to improve 32-bit performance
- disable various debugging configs, that are not needed in a perf build kernel according to google.
- disable selinux auditing (we don´t have to adress selinux denials running a stock rom)
EAS related features:
- backported scheduler from sd865
- disable autogroups and use cgroups for more efficient task placement!
- disable core_ctl for improved task placement and load balancing
- updates from kernel/common
- scheduler updates from Googles Pixel kernel
CPU related features:
- Power saving workingqueues enabled by default (toggleable in EXKM)
have a read here: https://lwn.net/Articles/731052/
this complements EAS in general
- Change various drivers ( MM, audio) to user power efficient workingqueues. This should work well in conjunction with EAS
- include cpuidle patches from CAF
- improvements to cpufreq/times/stats
- improve memory allocations in binder driver
- vdso32 patches as found on Google Pixel devices (brief documentation here)
File System related features:
- Set the bio REQ_NOENCRYPT flag (When lower layers such as dm-crypt observe the REQ_NOENCRYPT flag, it helps the I/O stack avoid redundant encryption, improving performance and power utilization. ) (CAF default)
- improve memory allocations in sdcardfs
- improve eventpoll logging to stop indicting timerfd (improves kernel wakelock readability)
- improve memory allocations in kernfs
- writeback: hardcode dirty_expire_centisecs=3000 based on this commit
- ufs improvements from pixel 4/ pixel 5 kernel
GPU related features:
- KCAL to control the display
- KLAPSE integrated
- KCAL/KLAPSE: changes safety measures -> allow completely disabling two RGB values (this was requested to, for example, only have red values on night dimming)
Network related features:
- Wireguard Support (Details)
- advanced TCP algorithms enabled
- includes new bbr and bbrv2
Memory related features:
- Memory Management patches from mainline kernel
- Speculative Page Faults (1. 2)
- Fix various memory leaks in different subsystems
- Reap memory of a task that receives sigkill
- enabled per process reclaim
- allow ZRAM to use higher swappiness values than 100
- possibility to use lzo-rle as default ZRAM compression algorithm (more information here and there )
Security related features:
- Control-Flow-Integration (CFI) and Link-Time-Optimization (LTO) ported from 4.19 kernel/common and Pixel 4/XL Kernel
- Use ThinLTO which was first used in the Pixel 4 XL Android R-Kernel instead of full LTO
- Shadow Call Stack (SCS) Security-Feature
- fix various CFI-Violations found in various subsystems like Asus/device specific drivers and qualcomm drivers
- enable init_on_alloc for even more security, more information can be found in the commit message
WLAN Driver
- use CAF wlan driver and compile it inline, the only way to ensure working wlan with this kernel
- the kernel cannot even force load prebuild WLAN module as the kernel base is way to far from stock!
- do no longer rely on the pre compiled wlan driver module
- completely removed qcom_rx wakelock in the wlan driver
- removed debugging from wlan driver
- removed logging from wlan driver
Magisk Companion Module
- set kernel settings like I intend them to be
Misc Features:
Wakelock Blocker:
- advanced wakelock blocker with the ability to block any wakelocks (dangerous, use with caution)
- please read [URL="https://arstechnica.com/gadgets/2018/08/p-is-for-power-how-google-tests-tracks-and-improves-android-battery-life/"]this for further info
- blocking a kernel wakelock should only be done in case of firmware incompatabilities (WiFi network at work (can´t be changed) causes deep sleep to not work on the phone.) That´s the only use case I see for this feature. The kernel does not features this to improve battery life!
Other features:
- disable logging to make the kernel more lightweight in various places
- fix several coding issues detected by newer Clang-Toolchains
- add support for steam controller
- add support for nintendo switch controller
- ufs improvements from pixel 4/ pixel 5 kernel
- gpu/kgsl improvements from pixel 4/pixel 5 kernel
Feature section for the "non visible" but perceptible improvements:
- updated binder section (responsible for interprocess communication)
- updated sdcardfs ; have a read about it here:
Requirements
- unlocked Bootloader
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
- magisk root
How to flash the Kernel:
1. Download the latest kernel.zip
1a. Optional: While it may not be necessary all times, you may want to restore stock boot.img, re-root with magisk and optionally install twrp.zip if coming from another kernel. Before reporting issues make sure you do that! Thank you!
2. Make sure to use latest Magisk stable. (not the latest canary!)
3. Flash the kernel.zip via latest EXKM or FKM app. Alternatively via TWRP.
4. Reboot and profit.
DOWNLOAD:
Download is located always in this folder:
Downloads for : -Android- Generic Device/Other | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.
Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.
androidfilehost.com
Important: Read after Download
Please take a look at the second post after flashing the kernel!
Changelog:
Android 9/Pie
1.0.0 Initial Release
1.3.0 https://forum.xda-developers.com/showpost.php?p=79852192&postcount=21
1.5.0 https://forum.xda-developers.com/showpost.php?p=79948337&postcount=36
1.6.0 https://forum.xda-developers.com/showpost.php?p=80037776&postcount=46
1.8.1 https://forum.xda-developers.com/showpost.php?p=80275065&postcount=58
3.0.0 https://forum.xda-developers.com/showpost.php?p=80712703&postcount=66
Android 10/Q
1.0.0_Q https://forum.xda-developers.com/showpost.php?p=81368413&postcount=73
1.0.3_Q https://forum.xda-developers.com/showpost.php?p=82387237&postcount=86
1.2.0_Q https://forum.xda-developers.com/showpost.php?p=83920653&postcount=92
Android 11/R
1.0.1_R https://forum.xda-developers.com/t/...sus-zenfone-6-aka-kirin.3940178/post-84526765
Donations:
Donations are not mandatory but very welcome if you want to support development or just buy me a coffee
If you like my work: http://paypal.me/freak07
Credits:
Asus for the Zenfone 6!
@osm0sis for all his work, including the ak2 installer!
@tbalden for being the best HTC wingman!
@LeeDroid for his awesome roms!
@Captain_Throwback for all the mentoring and guidance!
@Eliminater74 for bringing me into the game and the Inspiration
@nathanchance for his upstream guidance and assistance
@RenderBroken for helping me out
@flar2 for all his work
@joshuous for all the help he provided to me in the past!
@arter97 for giving me advice
@topjohnwu for magisk!
@osm0sis for anykernel!
XDA:DevDB Information
Kirisakura-Kernel, Kernel for the ASUS ZenFone 6 (2019)
Contributors
Freak07
Source Code: https://github.com/freak07/Kirisakura_Kirin
Version Information
Status: Stable
Mine for FAQ
Too
And too
Flashed it today and no problems so far.
Everything seems to work as intended
Freak07 said:
Mine for FAQ
Click to expand...
Click to collapse
Which RAM version do you have please?
Is the kernel for both?
EMJI79 said:
Which RAM version do you have please?
Is the kernel for both?
Click to expand...
Click to collapse
The 8GB version. RAM variant shouldn´t matter.
1. Does it have to be magisk stable or is canary (dev version) ok? I am asking because i need to use canary so my stupid pay app will not detect root.
2. This might sound stupid but what is magisk companion and where do i get it? I can not find it in the magisk modules repository or on xda and neither google.
2. This might sound stupid but what is magisk companion and where do i get it? I can not find it in the magisk modules repository or on xda and neither google.[/QUOTE]
It's in the downloads folder at the end of the afh link in the OP
isthisadagger said:
1. Does it have to be magisk stable or is canary (dev version) ok? I am asking because i need to use canary so my stupid pay app will not detect root.
2. This might sound stupid but what is magisk companion and where do i get it? I can not find it in the magisk modules repository or on xda and neither google.
Click to expand...
Click to collapse
jeremyet said:
2. This might sound stupid but what is magisk companion and where do i get it? I can not find it in the magisk modules repository or on xda and neither google.
Click to expand...
Click to collapse
It's in the downloads folder at the end of the afh link in the OP[/QUOTE]
1. you can probably use the canaries of magisk too. But keep in mind, they’re canary builds for a reason. If you’re having issues, flash to magisk stable and see if you can reproduce them.
2. Like @jeremyet said, it’s in the download folder in the OP
good job man
@Freak07: Cool, the first costom kernel for the Zenfone 6, thanks
I am still thinking of switching to the Zenfone 6, one feature I currently use a lot, is the "USB fast charge" : it makes a big difference, if I have my Smartphone for file transfer on my Laptop or PC, whether it charges in the background only with 500 mAh or with a little over 900 mAh on my USB 3 ports.
Does your kernel support USB fast charge / if not: will it be supported? (some custom kernels devs don't want to implement it, bacause it is not an official feature and "might" not work perfectly)
Coming from stock kernel, I got stuck at the Zenfone logo during reboot after the first flash with exkm. Volume down+power fixed that and after flashing a second time all seems to be working ? zram is at 684mb for my 6Gb variant.
Thank you a lot.
A quick question about the kernel source: Is there an API/kernel endpoint that can be used to query and manipulate the flip camera's motor? If so, is it something than can be accessed from userland? I was wondering if one might be able to write a shell script that can be used to send commands to it.
Does camera has OIS? I've seen OIS code in DTS
dmd79 said:
Does camera has OIS? I've seen OIS code in DTS
Click to expand...
Click to collapse
It's not the object of this thread.
There's a "ask me anything thread" in the discussions forum.
Flashing via EXKM will NOT work, if you’re on the latest magisk canary! (currently 19305!)
19302 is still working fine with EXKM, as is stable 19.3. Big changes in magisk are coming. we will have to wait for flar2 to find a new way of flashing zips.
Can this be flashed on the latest update or does it require an update from you? If not are there any downsides to it not being based on the most current kernel source code then?
Kind regards
regenwurm16 said:
Can this be flashed on the latest update or does it require an update from you? If not are there any downsides to it not being based on the most current kernel source code then?
Kind regards
Click to expand...
Click to collapse
Wait a bit. I’ll release an update soon. (hopefully later today) This will have latest asus sources merged.
I currently see 2 downloads for my kernel :cyclops: so I thought I can take it slow.
Testing was good so it should be ready for prime time stay tuned!
Thanks for your effort.
If think the two downloads are because of the scarce availability of the phone. I ordered mine on 5th of June on Amazon Germany the 6GB RAM 128GB ROM variant (only model they sell) and it took until 1st of July to get to me
I would have ordered on the Asus eShop but they don't ship to my country/don't have a shop for my country
Just take a look in the UK availability thread it's even worse there
Introduction
Hello everyone, this is my personal kernel for the OnePlus 8 Pro, will use it as my daily driver as soon as I get the device! (hopefully very early next week)
My philosophy on the kernel is pretty simple, intended to replace the stock kernel, but with a lot of under-the-hood tweaks.
Hopefully you will all enjoy!
Important thread information!
I refuse to acknowledge/respond to bug reports that do not include clear steps to reproduce, a logcat, and a console ramoops (if random rebooting) or a dmesg (any other issues). Follow this guide to do this.
Keep things civil, no flaming in the forums!
Features
Up to date with OxygenOS 11 source
Compiled with Google's Clang toolchain for maximum stability, with all warnings and errors fixed
Compiled with Clang's cortex-a55 optimizations
Many tweaks under the hood for smoother UX, lower battery drain, etc.
Westwood as the default congestion algorithm
Includes WireGuard
Includes KCAL support
Available to flash with AnyKernel3
Latest kernel release on GitHub
LINK
Source
Omega GitHub: https://github.com/kristofpetho/kernel_oneplus_sm8250
Omega originally sourced from: OnePlusOSS
Thanks where it's due
Nathan Chance for his guidance and patience with general kernel dev questions
Kerneltoast for his extreme patience and guidance
freak07 for his dtb advice
tbalden for figuring out the 8 Pro boot issues
zoman7663 for testing
osm0sis (for AnyKernel3)
Releases
April 19 - download HERE
- Fixed bootloop issue
April 16 - download HERE
- Updated Clang to Google's latest
- Disable coresight clocks when not used (better battery drain)
- Pulled back the two fixes for network driver that previously fixed random reboots (apologies, don't know how I didn't have those in latest...)
March 23 - download HERE
- Cleaned out older commits (stability)
- Updated Google's Clang toolchain to 12.0.4 (latest)
- Fixed a GPU bug where the UI might jitter a bit (smoothness)
March 16 - download HERE
- Enabled a new set of Clang compilation diagnostics, and fixed them with the help of CAF, who started fixing them in their 5.4.y kernels (7 coding errors)
- Fixed a similar issue in the qseecom driver that didn't show up in diagnostics
- Fixed a potential resourcing error in the mhi bus driver
March 13 - download HERE
- Reverted all CAF patches to fix hiccups observed in UI
- Kept 1 USB driver patch to fix faulty transfer of big files
- Kept 2 network driver patches to address random reboots previously observed
March 10 - download HERE
- Reverted all CAF patches from the kernel
- Added back only critical fixes that (hopefully) do apply to our use case (not did add back any "nice-to-have" patches)
March 4 - download HERE
- Pulled in some critical bugfixes from CAF:
- 3 UFS file system fixes
- 1 F2FS fix
- 1 memory allocation fix
- 3 wireless driver fixes
- 1 more USB transfer fix
- 4 GPU/video driver fixes
- Updated Anykernel3 to latest version
- Built with Google's Clang 12.0.3 (I save ~1 minute every time I do a build, which adds up)
February 26 - download HERE
- Switched back to LLVM's Clang 11.1.0 branch for stability reasons
- Updated Wireguard to latest version
- Potential fix for some random reboots a few users were seeing (reverted two smoothness commits)
- Fixed a major code error in OnePlus's source code
- Potential fix for CPU's min frequencies sticking in some situations
February 22 - download HERE
- Updated Wireguard to latest v1.0.20210219
- Removed more debugging from GPU driver for smoothness
- Updated compiler to Google's Clang 12.0.3
February 14 - download from HERE
- Reverted "Removed 3 performance loggers/debuggers from the kernel" to fix media playback issue
February 11 - download from HERE
- Heavy kernel cleanup, removed a lot of commits that either did nothing, or even reduced performance
- Reverted to using userspace, Oneplus-supplied WiFi driver (improved battery life)
- Fixed some previous ugly code fixes I had in the kernel
- Enabled Clang's detection of code formatting errors, and fixed all of them
- Removed 3 performance loggers/debuggers from the kernel
January 25 - download from HERE
- Switched back to Google's Clang 12.0.2 for compiling (much faster to compile)
- Updated WireGuard to latest version
- Fixed some coding errors caught by Clang after turning on some additional diagnostics
January 20 - download from HERE
- Switched from Google's Clang 12 compiler to stable LLVM Clang 11.0.1 (custom built)
- Removed all debugging from the camera driver (it will not kill the battery if you use the camera a lot)
- Removed some overbearing debugging from the video/media driver
- Removed debugging from the Oneplus priximity driver
- Fixed coding errors found by a run of GCC compiler (there were 2-3 major errors in the code that Clang didn't catch)
- Added WLAN driver to the kernel (using the same 5.2.022.3E driver that Oneplus is using)
- Removed a ton of debugging from the WLAN driver, and fixed some code errors
- Added RMNET driver to the kernel (version parity with the WLAN driver)
- Removed external module support from the kernel, since all modules now reside in the kernel
January 14 - download from HERE
- Adjusted kernel configuration to reflect the addition of a new Oneplus kernel module in OOS 11.0.3.3
- Added back a debugger that is needed by Oneplus's userspace
- Removed some harmless kernel loggers
- Further code fixes in the kernel
- Updated to Google's new Clang 12.0.1 compiler to compile the kernel
December 22
- Back to using binutils (from LLVM tools) - I experienced nav bar graphical glitches with LLVM tools
- Pulled in a few tweaks from Sultan's new redbull kernel - optimized graphics driver, optimized power usage, optimized smoothness
- Updated Wireguard to latest version
- Updated Anykernel3 to latest version
December 13
- Reverted all CAF patches... let's assume Oneplus actually knows what they are doing
- Compiled with advanced LLVM tools
- Reverted a commit that is not needed for LLVM, but was needed for latest binutils (which we are now not using)
December 4
- Added a few fixes from CAF upstream
- Cleaned up unneeded commits
- Removed bad commits
- Removed more logging (that are safe to remove)
November 24
- Refactored some commits for easier later patching
- Finally using UFS 3.0 driver that's meant for the OnePlus 8 Pro
November 20
- Fixed battery drain issue that was on previous release (apologies for that)
November 16
- General stability improvements
- Slightly improved active as well as idle battery drain
- Updated WireGuard to latest version
November 6
- Removed a major debug from the kernel that is also missing on stock kernel (sources were not updated by Oneplus...)
- Reverted to using O2 optimization level from O3, for stability reasons
- Reverted modified CPUsets, the overall experience is much smoother this way, with no discernible effect on battery life
October 23
- Reverted the two Google commits since those seemed to increase active drain just a bit
- Pulled in latest Oneplus kernel source for OOS 11.0.1.1
October 19
- Reverted the CAF upstream - Oneplus does extensive testing on the CAF base they are using and it also resulted in significantly higher active as well as idle drain upon further testing
- Using stock (userspace) WLAN and RMNET drivers
- Pulled in two commits from Google's 4.19.y kernel tree for increased smoothness (scheduling, write delay)
- Fixed a additional code error found through Clang
October 10
First release for Android 11-based OOS11.
Changelog vs stock kernel:
- Compiled with latest Google Clang 11.0.5
- All the tweaks pulled in from Omega OOS10 kernel
- Added in KCAL color control
- Upstreamed the entire kernel to CAF release LA.UM.9.12.r1-08300-SMxx50.0
- Included both WLAN and RMNET drivers with CAF release LA.UM.9.12.r1-08300-SMxx50.0
Philosophy
- The kernel will always be up-to-date with OnePlusOSS sources
- No additional functionality, only stock
- Only code fixes, code optimizations, and minor tweaks to keep it 100% stable
- Only logging and debugging will be removed
I can flash this with EX kernel manager?
Sent from my OnePlus 8 Pro using XDA Labs
Gordietm said:
I can flash this with EX kernel manager?
Sent from my OnePlus 8 Pro using XDA Labs
Click to expand...
Click to collapse
See post 2. And yes, EXKM is also my kernel flasher of choice.
Happy to see you here, used your kernel on the 6T also Flashed and all seems to be good!
Welcome buddy
One of the most popular kernels for the OP6T...
Also for the 8pro ..
Nice to see here! Kudo's
Will I lose root when I flash it?
Sent from my OnePlus 8 Pro using XDA Labs
kristofpetho said:
May 9 - First release
- It boots! YAY
- Built with Clang 10.0.0 stable, polly and cortex-a55 optimization
- Few initial tweaks, some minor debugging removed
Click to expand...
Click to collapse
Any possible way you could try to compile a clang 11 build by chance?
Is it possible to add some kinda touch input boost? Screen sometimes feel sluggish..slow..typing is difficult.
Burt Squirtz said:
Any possible way you could try to compile a clang 11 build by chance?
Click to expand...
Click to collapse
My preference is stable Clang, unless you give me a good reason to use Clang 11.
OPOmaniac said:
Is it possible to add some kinda touch input boost? Screen sometimes feel sluggish..slow..typing is difficult.
Click to expand...
Click to collapse
No. See post #3. BUT -> when I finish the tweaks, it will be much smoother than stock.
Gordietm said:
Will I lose root when I flash it?
Sent from my OnePlus 8 Pro using XDA Labs
Click to expand...
Click to collapse
No you will not, AnyKernel3 will preserve root.
kristofpetho said:
No you will not, AnyKernel3 will preserve root.
Click to expand...
Click to collapse
Will this kernel be able to use normal update of the original Oneplus firmware through the system? Download with oxygen updater and flashing through local update.
golf60 said:
Will this kernel be able to use normal update of the original Oneplus firmware through the system? Download with oxygen updater and flashing through local update.
Click to expand...
Click to collapse
Sure, but you will need to reflash kernel again after the update
marko94 said:
Sure, but you will need to reflash kernel again after the update
Click to expand...
Click to collapse
That's great.
So flashed the kernel with EX Kernel Manager. Everything works great and still rooted.
Thanks for your work!
Do you recommend to keep Ram Boost still enabled?
Sent from my OnePlus 8 Pro using XDA Labs
Gordietm said:
So flashed the kernel with EX Kernel Manager. Everything works great and still rooted.
Thanks for your work!
Do you recommend to keep Ram Boost still enabled?
Sent from my OnePlus 8 Pro using XDA Labs
Click to expand...
Click to collapse
Up to you. I personally have it turned off on my 6T currently.
Flashed! Lets see what is the hype about )) Cant wait for more updates!
EDIT. ok man, im after reboot and my phone feels MUCH faster! Like, scrolling is major improved. I did not expected.
OPOmaniac said:
Flashed! Lets see what is the hype about )) Cant wait for more updates!
EDIT. ok man, im after reboot and my phone feels MUCH faster! Like, scrolling is major improved. I did not expected.
Click to expand...
Click to collapse
That's always after reboot. I have the same problems with screen responsiveness as you. Seems like the phone needs some time to **** it up after rebooting ?
But who knows, let's hope I'm wrong!
Kirisakura-Kernel for the Asus Zenfone 8
Hello everyone,
To keep it short: Here is Kirisakura - Kernel for the Asus Zenfone 8 aka Sake. The Zenfone line-up internal codenames are traditionally derived from alcoholic drinks. Two years ago the Zenfone 6 bore the title "Kirin". The Zenfone 7 was codenamed "Tequila".
I would appreciate if everybody that flashes the kernel, reads at least once through this opening post and the following ones.
Kirisakura - Kernel is designed to bring a handful of beneficial features to the device, while ensuring excellent performance and smoothness to get you safely through the day!
If you expect a custom kernel to magically improve your devices battery life manifold and this is your only priority then this might not be the right place for you.
However the kernel is built to keep battery life close to the same as you would experience the on stock kernel while being tuned to perform better in various UI related benchmarks. The same benches are used by google to verify and ensure UI smoothness on the Pixel devices. The scheduler is tuned to yield lower jitter and reduce jank frames.
If that got your curious, I welcome you to continue reading if you´re still interested!
This project aims to keep most of the subsystems updated, way ahead of the stock kernel, thereby improving security and performance, while keeping stability as the foucs during testing! This includes Linux-Stable, CAF-Upstream and kernel/common.
A very positive development. Google pushed for CFI and SCS to be enabled by default in the android-common kernel. In this years generation ( 5.4 linux kernel base/ SD 888 ) CFI and SCS are enabled by default. It was a lot of work to get these features working nicely on the kernel I did the years back. So it´s nice to see this is now there by default in everybody can profit from it.
I put the explanations and links in hide tags here.
Spoiler: Documentation Control-Flow-Integrity (CFI) / Shadow Call Stacj (SCS)
Kernel Control Flow Integrity (Kernel-CFI), which is achieved by linking the kernel with LLD and Link Time Optimization (LTO), more precisely ThinLTO, are quite unique security features.
The recently released Kirisakura-Kernel for the OnePlus 8 Pro was featured on the XDA-Portal due to the inclusion of CFI. The featured article explains CFI in great details, is easy to understand and definitely worth to read.
If possible the latest Kirisakura-Kernel releases for various devices aim to include CFI in enforcing mode so users can benefit from this security features.
Another security feature is Shadow Call Stack (SCS).
SCS is another security patchset that is aimed at preventing attacks via return oriented programming (ROP).
ROP is a technique where the attacker gains control of the kernel stack to overwrite function return addresses and redirect execution to carefully selected parts of existing kernel code.
If you´re interested here are a few good links:
Google Security Blog explaining SCS.
LLVM doc about SCS
Android DOCs documenting SCS
If reading about upstream in the paragraph above got you curious, have a read about Linux-Stable and why it is important here. The stable-process is not the same for every subsystem, but the general idea, rule of thumb and benefits are applicable for other subsystems as well.
Read more about the Release-Model following this link.
This conversation on the LKML mailing list also shows the power of Linux-Stable and why it´s very beneficial to not just say it´s not worth and a potentiol source for bugs:
Starting with the Initial Message , the following reply and a good summarizing statement.
Quick explanation of CAF-Upstream. CAF is short for Codeaurora-Forums. This is the place where development from Qualcomm for their SoCs happens. This includes the Snapdragon 888 that´s built into the different SKUs of the Zenfone 8.
The kernel-bases available on the Codeaurora-Forums, are basically the foundations OEMs use, to build their own kernel additions on top for devices featuring Qualcomm SoCs.
The Qualcomm developers push regular updates to the bases of the different SoCs, a bit similar to how Linux-Upstream works. OEMs usually stop updating the initial base after the phone is released.
This kernel focuses amongst the other features to provide the latest CAF-Updates merged in a regular manner, to provide updates, improvements and enhancements for SoC specific drivers and subsystems! This might take a while, because a lot of device specific testing is done on my end to ensure stability.
The kernel includes a lot of improvements and contributions from other developers as well. Without this kernel would not exist.
A big part of improvements originate from @arter97´s, @kdrag0n´s and @Sultanxda´s work. Many others contributed in some way or another to this kernel.
A big thanks to all of them at this place!
Now lets continue with a list of features in the next paragraph!
Main Features:
- Based on latest kernel sources from Asus for Android 13 and intended to be used on the latest Asus Stock-Firmware
- compiled with Clang 14.0.7 and built with -O3 speed optimizations
- Linux-Stable-Upstream included to 5.4.231
- upstreamed CAF base for the Snapdragon 888 (qcoms internal codename "lahaina")
- include important fixes/improvements from kernel/common
- tune scheduler for improved jitter and less jank frames
- reduce power consumption during deep sleep
- remove logging while device is suspended
- remove sleep debugging from Asus for release build
- disable various debugging mechanisms for drivers which are not needed on a perf build (for example touchscreen, fingerprint reader, display, binder)
- disable various debugging configs, that are not needed in a perf kernel build according to google.
- disable selinux auditing (we don´t have to adress selinux denials running a stock rom)
- display tweaks to reduce power consumption on statically rendered images
- disable unnecessary CPU errata for our specific SoC
- disable per cgroup pressure tracking to reduce overhead
- SSG IO scheduler for reduced overhead and less CPU cycles (more lightweight and android optimized)
- free up RAM by removing reserved mem regions used only for debugging
- implement LRNG (thanks @arter97, see arter kernel OP for more info )
- Flashing the kernel will keep root!
- Flashable via EXKM, FKM or TWRP (if available) on a rooted system!
- Anykernel zip is based on the Anykernel3 release from @osm0sis
EAS related features:
- Implement dynamic WALT-Window size depending on current FPS, collecting information about CPU-Load to provide more precise information for the scheduler
- EAS implementation patched up to latest CAF state
- updates from kernel/common
- scheduler updates from sd888/ 5.4 kernel
- scheduler update from sony xperia 1 III kernel aiming to improve WALT
CPU related features:
- Power saving workingqueues enabled by default (toggleable in EXKM)
- Change various drivers (WLAN, MM, audio, charger, power, thermal, glink etc) to use power efficient workingqueues. This compliments EAS in general
- improvements to cpufreq/times/stats
- vdso32 patches as found on Google Pixel devices (brief documentation here) (CAF 5.4 default, keep for documentation)
- remove event debug logging
- disable broken irq detection, disable debugmon
- improve suspend/resume from audio driver (caf-upstream for audio-kernel)
- cpuidle: wake only cpus for which qos has changed (this allows cores to keep idle states better)
- disable debugging during sleep states as per qcom recommendation
- remove RTB logging to reduce overhead
- disable trace_printk as it shouldn´t be used on production/perf kernel builds
- enable suspend_skip_sync to save power during suspend/resume
- disable edac and coresight (following google on the pixel kernels)
- disable jtagv8 debugging as recommended by qcom for perf builds to avoid potential power, performance and memory penalty
- disable s2idle in favor of deep idle state -> improves deep sleep drain (google initially used 2idle for improved suspend/resume latency on pixel 3 and pixel 4, but disabled it on pixel 5. qcom followed suit for sd 888, but apparently didn´t see google reverting it on pixel 5. Other OEMs such as Xiaomi or OnePlus already disabled s2idle on their SD888 devices in favor of deep- read more about s2idle vs deep here)
GPU related features:
- GPU driver updated to latest CAF-State
- gpu/kgsl improvements from pixel 4/pixel 5 kernel
- add low_prio_worker thread for gpu driver (Improves performance when tearing down processes (eg, via LMK) and not blocking currently running UI from submitting work to the GPU
File System related features:
- upstream BFQ-MQ to latest state in linux-mainline and default to 128KB readahead
- improve memory allocations in kernfs
- ufs improvements from pixel 4/ pixel 5 kernel
- improve GC as to not interfere while user interaction is happening and prevent possible jitter or latency spikes
UI/UX/Usability related features from CleanSlate:
- CleanSlate features made by @tbalden
- Disclaimer: All CleanSlate features can be controlled via the free companion and config app found on CleanSlate thread here on the Zenfone 8 Forums on XDA. Please consider buying the premium versions if you enjoy using the CleanSlate features, to give a little something back to @tbalden.
Network related features:
- Wireguard Support (Details)
- advanced TCP algorithms enabled
- use bbr as default TCP congestion algorithm (fasted algo according to this excellent research from @kdrag0n found here )
- includes new bbr
- improved networking drivers from caf-upstream (especially wifi)
- remove unnecessary wakelock from WLAN driver to reduce thousands of very short wakeups during a 7 hour deep sleep period
- improved bluetooth performance (¹, ²)
- Enable support for TTL spoofing
Memory related features:
- Speculative Page Faults left enabled (1. 2) (CAF 5.4 default, keep for documentation)
- Fix various memory leaks in different subsystems
- improved mm with patches from mainline
- patches from kernel/common
- improve memory allocations in various subsystems, video encode/decode, kernfs, cgroup
- Backport to enable CONFIG_HAVE_MOVE_PMD (see here) , thanks @arter97
- Backport to enable CONFIG_HAVE_MOVE_PUD (commit here) , thanks @arter97
- free more RAM by removing unused reserved memory regions
- mm: Micro-optimize PID map reads for arm64 (improves game performance, especially unity based games such as genshin impact)
- MGLRU added (info here and here
Security related features:
- Control-Flow-Integration (CFI) and Link-Time-Optimization (LTO) (CAF 5.4 default, keep for documentation)
- Use ThinLTO which was first used in the Pixel 4 XL Android R-Kernel instead of full LTO (CAF 5.4 default, keep for documentation)
- Shadow Call Stack (SCS) Security-Feature ( 5.4 default, keep for documentation)
- enable init_on_alloc for even more security, more information can be found in the commit message (CAF 5.4 default, keep for documentation)
Misc Features:
Wakelock Blocker:
- advanced wakelock blocker with the ability to block any wakelocks (dangerous, use with caution)
- please read [URL="https://arstechnica.com/gadgets/2018/08/p-is-for-power-how-google-tests-tracks-and-improves-android-battery-life/"]this for further info
- blocking a kernel wakelock should only be done in case of firmware incompatabilities (WiFi network at work (can´t be changed) causes deep sleep to not work on the phone.) That´s the only use case I see for this feature. The kernel does not features this to improve battery life!
Other features:
- clean up asus drivers and fix a few warnings in kernel log
- disable logging and debugging to make the kernel more lightweight in various places (includes binder, mm, vma, gpu, ipa etc)
- fix several coding issues detected by newer Clang-Toolchains
- enlarge dmesg size to ease debugging
Flashing Guide, Download and Changelog
Requirements:
- unlocked Bootloader (this will void warranty and kill future OTA updates on all asus phones at the moment)
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
- magisk root
- a backup of stock boot.img, vendor_boot.img and dtbo.img so you can go back to stock conditions (simplest way is TWRP or to extract from stock firmware)
How to flash the Kernel:
1. Download the latest kernel.zip and make sure you have properly updated to the latest matching Asus Stock-Firmware. When the Zenfone 8 receives an OTA update it takes Asus a while to release the source code for the new OS and me a while to build a new kernel. If you don´t want to face any issues, wait until I either release an updated kernel or give green light because there were no kernel changes.
Always make sure to run the firmware the kernel is built for!
If you feel adventurous and try in advance, make sure you have a backup ready!
2. Flash the kernel.zip via latest TWRP (if available), EXKM or FKM app and do a full reboot.
3. Reboot and profit.
DOWNLOAD:
Download is located always in this folder:
https://www.androidfilehost.com/?w=files&flid=326387
Important: Read after Download
Please take a look at the second post after flashing the kernel!
Changelog:
Android 11
1.0.0 Initial Release
1.0.3 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-85230887
1.1.8 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-85369421
1.3.1 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-85471991
1.4.7 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-85580815
1.5.1 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-85708459
1.7.5 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-85845707
1.7.8 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-85845707
1.7.9 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-86004361
Android 12
1.0.0 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-86200913
1.0.1 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-86219239
1.0.2 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-86221081
1.0.8 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-86546997
2.0.0 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-86856077
2.0.1 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-87005047
2.0.2 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-87053951
2.0.8 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-87244107
2.0.10 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-87432111
2.0.12 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-87641841
2.0.15 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-87944971
Android 13
3.0.0 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-88195025
3.0.1 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-88326835
3.0.2 https://forum.xda-developers.com/t/...asus-zenfone-8-aka-sake.4295287/post-88632657
Donations:
Donations are not mandatory but very welcome if you want to support development or just buy me a coffee/tea
If you like my work: http://paypal.me/freak07
Credits:
Asus for the development device, giving me the opportunity to create this project!
@osm0sis for all his work, including the ak3 installer!
@tbalden for being the best HTC, Pixel, OnePlus and now Asus wingman!
@LeeDroid and @mwilky for their awesome roms and work I used on multiple devices!
@Captain_Throwback for all the mentoring and guidance!
@Eliminater74 for bringing me into the game and the Inspiration
@nathanchance for his upstream guidance and assistance
@RenderBroken for helping me out
@flar2 for all his work
@joshuous for all the help he provided to me in the past!
@arter97 for giving me advice
@kdrag0n for his help and advices!
@topjohnwu for magisk!
Source Code: https://github.com/freak07/Kirisakura_SAKE_Zenfone_8
F.A.Q:
Question: Is root preserved when flashing this kernel?
Answer: Yes, the AnyKernel.zip will detect root and keep it.
Question: How do I return back to stock or another kernel.
Answer: Extract boot.img, vendor_boot.img as well as dtbo.img from matching firmware you are on and flash them via fastboot. If you want to keep root flash back the magisk_patched_boot.img. Or dirty flash your rom and re-root.
Question: Why is having Magisk installed mandatory for this kernel?
Answer: The kernel uses a ramdisk overlay to apply some settings after boot. If you are not rooted these settings will not get applied and you miss some of the optimizations.
Question: How to report bugs properly?
Answer: Have a look at post #3 in the linked thread. The linked guide is a pretty good starting point.
Before reporting any bug make sure you´re running on a stock configuration. That´s means you´re not using any mods, tweaks in kernel managers or other root tweaks , magisk modules, scripts or other modifications that alter various functions like sound mods, data traffic, sleeping behaviour, scheduler, magical battery tweaks etc.
Try to describe the issue as detailed as possible! Give your exact setup, like rom, magisk version, kernel version.
Is the issue reproducible? Does it happen frequently?
Provide logs, otherwise debugging is a lot harder. If you can already reproduce the issue and provide logs it greatly limits the amount of time I have to spent until I figure out how to reproduce it.
If the device force reboots/randomly reboots (that means you see the bootloader unlocked screen!) provide a .zip of /asdf.
Easiest way is immediately after booting up, with a root explorer navigate to /asdf. Copy the contents to your internal storage, zip it up and send it to me.
If the issue happens while the device is running provide a dmesg plus a logcat that you take while/shortly after the issue happens. This will log what´s running in the current session. Try to be as detailed as possible what´s happening when the issue appears. It will also help me in reading the log!
and this is mine too
justincase
last one I promise
Woah another kernel for sake ! Might give it a try later !
Update to 1.0.3
Hey guys and girls,
I hope everyone is having a good day or starting into one. Here´s the next update.
The kernel is updated for the latest firmware:
30.11.51.67. Make sure to update to the latest firmware before flashing the kernel to have no compatibility issues.
The link to the firmware can be found here:
https://dlcdnets.asus.com/pub/ASUS/ZenFone/ZS590KS/UL-I006D-ASUS-30.11.51.67-1.1.25-user.zip
md5sum: 0f30d5e043f4a675e7db3250d5218125
More changes in the Changelog below:
Changelog:
- Import zenfone8_zs590ks.MR0.4-30.11.51.67 source code
- Linux-Stable Upstream to 5.4.128
- bump clang to latest prebuilt clang by google (12.0.7)
Download:
https://www.androidfilehost.com/?fid=14943124697586354960
Instructions can be found in the OP!
But look at this post too
Have fun, enjoy the kernel and your phone.
Donations are not mandatory but very welcome.
If you like my work and want to buy me a coffee/green tea to keep development going: http://paypal.me/freak07
Freak07 said:
Update to 1.0.3
Hey guys and girls,
I hope everyone is having a good day or starting into one. Here´s the next update.
The kernel is updated for the latest firmware:
30.11.51.67. Make sure to update to the latest firmware before flashing the kernel to have no compatibility issues.
The link to the firmware can be found here:
https://dlcdnets.asus.com/pub/ASUS/ZenFone/ZS590KS/UL-I006D-ASUS-30.11.51.67-1.1.25-user.zip
md5sum: 0f30d5e043f4a675e7db3250d5218125
More changes in the Changelog below:
Changelog:
- Import zenfone8_zs590ks.MR0.4-30.11.51.67 source code
- Linux-Stable Upstream to 5.4.128
- bump clang to latest prebuilt clang by google (12.0.7)
Download:
https://www.androidfilehost.com/?fid=14943124697586354960
Instructions can be found in the OP!
But look at this post too
Have fun, enjoy the kernel and your phone.
Donations are not mandatory but very welcome.
If you like my work and want to buy me a coffee/green tea to keep development going: http://paypal.me/freak07
Click to expand...
Click to collapse
Hello. I tried this kernel recently. But now I want to return to the stock core. But when I flash boot.img and dtbo.img, the settings stop working for me. There are also no items in Quick Settings. What am I doing wrong?
a7lanov said:
Hello. I tried this kernel recently. But now I want to return to the stock core. But when I flash boot.img and dtbo.img, the settings stop working for me. There are also no items in Quick Settings. What am I doing wrong?
Click to expand...
Click to collapse
Soory, wrong post
a7lanov said:
Hello. I tried this kernel recently. But now I want to return to the stock core. But when I flash boot.img and dtbo.img, the settings stop working for me. There are also no items in Quick Settings. What am I doing wrong?
Click to expand...
Click to collapse
Hey,
I forgot to mention to restore vendor_boot.img as well.
Sorry for the inconvenience, I adjusted the OP and the FAQ already.
So to get back to stock, extract boot.img, vendor_boot.img and dtbo.img from the matching stock firmware.zip. make sure you extract from the same firmware you're currently running.
Then flash these via fastboot.
If it doesn't work afterwards your problem lies elsewhere.
Freak07 said:
Hey,
I forgot to mention to restore vendor_boot.img as well.
Sorry for the inconvenience, I adjusted the OP and the FAQ already.
So to get back to stock, extract boot.img, vendor_boot.img and dtbo.img from the matching stock firmware.zip. make sure you extract from the same firmware you're currently running.
Then flash these via fastboot.
If it doesn't work afterwards your problem lies elsewhere.
Click to expand...
Click to collapse
Thank you. Today I will also try to flash the vendor_boot.img
no updates?
I know IT clearly says 'Zenfone 8', but is there any chance this Kernel will work on the 'Zenfone 8 Flip', too? (ZS672KS)... Ty!
elchmartin said:
I know IT clearly says 'Zenfone 8', but is there any chance this Kernel will work on the 'Zenfone 8 Flip', too? (ZS672KS)... Ty!
Click to expand...
Click to collapse
unfortunately no. 8 flip uses a separate kernel.
Hi @Freak07 ,
Thanks a lot for your effort and time that you invested into developing this kernel.
However, as is the case with other custom kernels, I would like to know what kind of battery life benefits I can expect from using this kernel on my device?
Unlocking the bootloader on Asus phones right now means a bit more hassle with the updates, also rooting the phone means a bit more hassle with using some apps (safety net etc),so I would really like to know what are the benefits in terms of battery life.
Update to 1.1.8
Hey guys and girls,
I hope everyone is having a good day or starting into one. Here´s the next update.
The kernel is updated for the latest firmware:
30.11.51.83. Make sure to update to the latest firmware before flashing the kernel to have no compatibility issues.
The link to the firmware can be found here:
https://dlcdnets.asus.com/pub/ASUS/ZenFone/ZS590KS/zenfone8_zs590ks.MR0.5-30.11.51.83.zip
md5sum: 0f30d5e043f4a675e7db3250d5218125
More changes in the Changelog below:
Changelog:
- Import zenfone8_zs590ks.MR0.5-30.11.51.83 source code
- Linux-Stable Upstream to 5.4.134
- bump clang to latest prebuilt clang by google
- Merge CAF (QCOM) upstream
- enable ddr cooling device
- raise lto inlining limit
- other improvements please take a look at github
Download:
https://www.androidfilehost.com/?fid=14943124697586372325
Instructions can be found in the OP!
But look at this post too
Have fun, enjoy the kernel and your phone.
Donations are not mandatory but very welcome.
If you like my work and want to buy me a coffee/green tea to keep development going: http://paypal.me/freak07
Freak07 said:
Update to 1.1.8
Hey guys and girls,
I hope everyone is having a good day or starting into one. Here´s the next update.
The kernel is updated for the latest firmware:
30.11.51.83. Make sure to update to the latest firmware before flashing the kernel to have no compatibility issues.
The link to the firmware can be found here:
https://dlcdnets.asus.com/pub/ASUS/ZenFone/ZS590KS/zenfone8_zs590ks.MR0.5-30.11.51.83.zip
md5sum: 0f30d5e043f4a675e7db3250d5218125
More changes in the Changelog below:
Changelog:
- Import zenfone8_zs590ks.MR0.5-30.11.51.83 source code
- Linux-Stable Upstream to 5.4.134
- bump clang to latest prebuilt clang by google
- Merge CAF (QCOM) upstream
- enable ddr cooling device
- raise lto inlining limit
- other improvements please take a look at github
Download:
https://www.androidfilehost.com/?fid=14943124697586372325
Instructions can be found in the OP!
But look at this post too
Have fun, enjoy the kernel and your phone.
Donations are not mandatory but very welcome.
If you like my work and want to buy me a coffee/green tea to keep development going: http://paypal.me/freak07
Click to expand...
Click to collapse
Hi. Thanks. And I have a question. I noticed through the Kernel Adiutor that big and prime cpu do not sleep when there is no load, they work at low frequency (original kernel). Is this a hotplug problem? Should they not go to Offline? Do they sleep in your kernel?
a7lanov said:
Hi. Thanks. And I have a question. I noticed through the Kernel Adiutor that big and prime cpu do not sleep when there is no load, they work at low frequency (original kernel). Is this a hotplug problem? Should they not go to Offline? Do they sleep in your kernel?
Click to expand...
Click to collapse
That´s expected behaviour on the few last gens of QCOM SoCs. and you´re also fooled by the ui of the app.
if there are no tasks/work the clusters go into idle c-states, but kernel managers/monitors will show you the frequency that you described.
depeding which battery mode you chose in settings, minfreqs for the clusters will be higher or lower.
dynamic should be at 300mhz for little cluster, 710mhz for big cores and and 844mhz for the prime core.
Freak07
Thanks for clarifying
Freak07 said:
Update to 1.1.8
Click to expand...
Click to collapse
Thanks man!
Could you please let us know if defconfig is stable or it's better to configure something (like cpu/gpu freq's) on the device ?
Does it support both 8GB and 16GB RAM devices?