[KERNEL] Serenity (Firefly Edition) Kernel [EMUI 8 / Treble][10-06-2018]

Wirmpolter

Senior Member
Apr 16, 2008
242
360
0
Innisfil
Welcome to the Serenity Kernel (Firefly Edition) for the Mate 9


The Serenity kernel is designed to make the most out of the mate 9 by optimizing the balance of both battery life and performance.


As there aren't many choices for our devices when it comes to custom kernels or ROM's, I decided to dive into developing a kernel to not only help maximize idle battery drain (while the screen is off) but also to help extend the total SoT for our devices. The goal is to create that "flash it and forget it" type kernel for those that don't want to have to mess around with the settings. However, this kernel will also provide those who want more functionality and control. the ability to do so.

Right now, some kernel settings like I/O schedulers need to be set using a kernel manager app.


Disclaimer:

This kernel has been tested and working but this will void your warranty and any modifications you do to your device, you do at your own risk. I will not be held responsible for any damage such broken sdcards, your phone causing world war iii etc...


Features

  • Unified to work on STOCK Emui 8.1 and Custom 8.1 roms
  • Compiled with latest Linaro 4.9 Toolchain (A53 optimized)
  • Upstreamed to 4.4.70 Linux Kernel Version
  • Added OP fingerprint boost driver
  • Added Nebula Governor
  • Added Blu_active driver with kirin support (thanks @eng.stk)
  • Cpu-boost CAF driver ported for kirin with some added improvements (thanks eng.stk)
  • Added zen, fiops I/O schedulers
  • Boeflla Wakelock Blocker
  • Swap and zRAM disabled
  • Option to turn fsync on/off
  • 300HZ base timer frequency rasied from 250HZ
  • Enable advanced TCP congestion algorithms
  • Westwood set as default TPC algorithm
  • Enable missing GPU governors
  • GPU Scene Aware set as default GPU governor
  • USB fast charging ability (needs kernel manager app to enable/disable)
  • Tuned entropy
  • Various build tweaks
  • Compatible with Kernel Auditor, EXKM and others
  • More to come....

Requirements:

  • Unlocked bootloader
  • Use TWRP to flash the zip, one zip for all builds - Big thanks to @osm0sis
  • EMUI 8


How to Install:

Warning Ideally, you should flash this kernel on top of the stock kernel only. If you are already using a custom kernel, you must flash the stock one before flashing Serenity.

First time install
  • Download the Serenity Kernel ZIP below
  • Move or copy the ZIP file to external SD card
  • Boot into recovery (TWRP)
  • Backup your stock ramdisk and kernel
  • Flash via TWRP
  • Reboot and enjoy!

Already on Serenity Kernel
  • Download Serenity kernel below
  • Move or copy ZIP file to your external SD card
  • Boot into recovery (TWRP)
  • Flash via TWRP
  • Reboot and enjoy!

Downloads

New version

Download Serenity (Firefly Edition v1.4 HERE

Old versions

Download Serenity (Firefly Edition v1.3 HERE
Download Serenity (Firefly Edition v1.2 HERE
Download Serenity (Firefly Edition v1.1 HERE
Download Serenity (Firefly Edition) v1 HERE


Credits:

Of course, I would have never been able to do this on my own so want to personally take this time to thank those who have given me inspiration, helped me out and from those that I have cherry-picked from.

@ajituchiha - To all your help thus far in mentoring me to building this kernel
@osm0sis for the AnyKernel2
@nathanchance - for your Linux upstreaming help
@eng.stk - for blu_active
Phhusson
Lord Boeffla - andip71
ZaneZam
flar2
FranciscoFranco
Ak
Blackball
frap129
Meticulus
spezi77
RenderBroken
joshuous

If I forgot anyone that would like to be on the list, please let me know and I will add you. Truly sorry if I did.



XDA:DevDB Information
Serenity, Kernel for the Huawei Mate 9

Contributors
Wirmpolter, wirmpolter
Source Code: https://github.com/wirmpolter/Serenity

Kernel Special Features:

Version Information
Status: Stable
Current Stable Version: Firefly V1.4
Stable Release Date: 2018-06-10

Created 2018-05-10
Last Updated 2018-06-10
 
Last edited:

Wirmpolter

Senior Member
Apr 16, 2008
242
360
0
Innisfil
Changelog

Version 1.4 released

-Upstreamed to 4.4.70 Linux Kernel Version
-Enable USB fast-charging (has to be enabled with a kernel manager app)
-Add wireguard support
-Enable missing file system options
-A few various enhancements/tweaks
-Remove more logging

Version 1.3 released

-Upstreamed to 4.4.60 Linux Kernel Version
-Enable Frandom
-Add OP5 State Driver
-Build enhancements/tweaks
-Remove some more logging
-Add entropy fix

Version 1.2 - 19-05-2018

-Upstreamed to 4.4.56 Linux Kernel Version
-Added fsync on/off function
-Tuned Entropy values
-Removed some logging


Version 1.1 - 12-05-2018

-Upstreamed to 4.4.52 Linux Version
-Added blu_active driver with kirin support (thanks eng.stk)
-Enabled blu_active as default cpu governor
-Cpu-boost CAF driver ported for kirin with some added improvements (thanks eng.stk)
-Disabled CRC check
-Use 300HZ base timer frequency
-Disabled wq_power_effecient by default


Version 1 - Initial Release - 10-05-2018

-Compiled with latest Linaro 4.9 Toolchain (A53 optimized)
-Upstreamed to 4.4.50 Linux Kernel Version
-Added fingerprint boost driver
-Added Nebula Governor
-Added zen, fiops I/O schedulers
-Boeflla Wakelock Blocker
-Swap and zRAM disabled
-Enable advanced TCP congestion algorithms
-Westwood set as default TPC algorithm
-Enable missing GPU governors
-GPU Scene Aware set as default GPU governor
 
Last edited:

Wirmpolter

Senior Member
Apr 16, 2008
242
360
0
Innisfil
Q&A

Q I'm getting a partition error while trying to flash the zip file in TWRP.
A Ensure you are on the latest recovery. I personally use the v3 of TWRP from blackball for the p10 plus.

Q How can I modify the kernel settings?
A I personally like to use to EX Kernel Manager but any others like Kernel Auditor will work too.
 
Last edited:

Wirmpolter

Senior Member
Apr 16, 2008
242
360
0
Innisfil
Version 1.1 released

-Upstreamed to 4.4.52
-Added blu_active driver with kirin support (thanks eng.stk)
-Enabled blu_active as default cpu governor
-Cpu-boost CAF driver ported for kirin with some added improvements (thanks eng.stk)
-Disabled CRC check
-Use 300HZ base timer frequency
-Disabled wq_power_effecient by default

Download : https://drive.google.com/open?id=1PQUxIjzc-iklOSTRVwgN09DZi9KdYCq7
 

Wirmpolter

Senior Member
Apr 16, 2008
242
360
0
Innisfil
Can you add some features in next build please? I run nethunter and i need modify kernel for external adapter and hid attack. You can find more information here
I can definitely take a look at adding nethunter and it's features into the next build. Always open to implementing features that will benefit others and work. So I'm always up for suggestions.
 

bgx

Senior Member
Dec 23, 2010
580
127
0
I really really can say good work. Today I drive with my bike to work 1h 30 min one way with GPS and Spotify. On work I played games in the break and later again 1h 30 min GPS and Spotify for home way. And now I have only lost 50% of my battery. Way better than stock. Great work.

Gesendet von meinem MHA-L29 mit Tapatalk
 
  • Like
Reactions: Wirmpolter

Wirmpolter

Senior Member
Apr 16, 2008
242
360
0
Innisfil
I really really can say good work. Today I drive with my bike to work 1h 30 min one way with GPS and Spotify. On work I played games in the break and later again 1h 30 min GPS and Spotify for home way. And now I have only lost 50% of my battery. Way better than stock. Great work.

Gesendet von meinem MHA-L29 mit Tapatalk
Awesome to hear... Was hoping to bring some new life into the Mate 9. Glad to see it is surpassing stock.
 

eric-chen

Member
Sep 11, 2013
41
10
0
tested, game guardian still not work.
Can you please help on this? For me, the reason I flash a new custom kernel is for game guardian only.
Thank you so much!