[Google Pixel 4 XL ROMs, Kernels, Recoveries, & Oth] Freak07:
Kirisakura-Kernel for the Pixel 4 and Pixel 4 XL

Hello everyone,

After rising to the most popular kernel on the Pixel 3/XL forums, here is Kirisakura-Kernel for the Pixel 4 (FLAME) and Pixel 4 XL (CORAL), together FLORAL.

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!

The kernel aims to keep most of the subsystems updated, way ahead of the stock kernel, thereby improving security, stability and performance!

This includes Linux-Stable, CAF-Upstream, F2FS-Mainline and kernel/common.

If that 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.

Main Features:

- Based on latest kernel sources from Google, Kernel is made for Android 13

- Linux-Stable-Upstream included to latest 4.14.326

- CAF-Upstream usually based on one of the latest tags for sm8150

- include all important fixes/improvements from kernel/common

- compiled with latest Clang 16.0.2 from Google prebuilts and built with -O3 optimizations

- F2FS implementation updated to latest state of kernel/common and kernel.org maintained by Jaegeuk Kim.

- devfreq backports from 5.4 (sd 888 qcom kernel base)

- Safety Net patches are included -> Kernel passes Safety Net (hardware attestation is not related to these kernel patches)

- Flashing the kernel will keep root!

- Tested to work on custom ROMs

- Flashable via EXKM and FKM on a rooted system!

- remove extensive Memory Management logging from Google

- removed nolog usage, remove rtb logging from the kernel

- remove selinux auditing from kernel for lower overhead

- remove IPC logging from the kernel

- introduce kmalloc reclaimable caches for improved memory management

- AnyKernel3 powered by @osm0sis (big thanks!)

EAS related features:

- CleanSlate options to dynamically control freq boosting and sched boosting of powerhal

- small improvements to tasks placement

- fixes from kernel/common to EAS

- improvements from Pixel 5

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 (WLAN, MM, audio, charger, power, thermal, glink etc) to user power efficient workingqueues. This should work well in conjunction with EAS

- include cpuidle patches from CAF

- s2idle-flow improvements from mainline

- improve efficiency while music playback

- arm64: lse: Prefetch operands to speed up atomic operations

- improve camera launch time

File System related features:

- Include latest f2fs changes found on f2fs stable git

- Include rapid GC by @arter97 ( best thing is to read the commit description linked here. I compared GC on stock google f2fs, upstreamed f2fs and f2fs with rapid GC. Rapid GC is the most effective, followed by upstreamed f2fs.)

GPU related features:

- KCAL to control various RGB related display configs (RGB, Hue, Saturation etc -> accessible via CleanSlate Config App)

- add ability to reduce minimum brightness

- add high-brightness-mode (HBM)

- Update GPU driver to latest CAF state

- improve GPU performance (overall smoother experience)

- reduce power consumption when rendering static images

- enable of usage of SD855+ GPU frequencies as optional feature

UI/UX/Usability related features from CleanSlate:

- CleanSlate features made by @tbalden

- Adjust all CleanSlate features with the CleanSlate-Apps found in the CleanSlate-Thread (if you profit from the CleanSlate features make sure to buy the premium versions on Play-Store to support

@tbalden

- CleanSlate options that require permissive selinux in any way are not included, as they can be easily achieved otherwise on a rooted environment and this kernel is not intended to be used rootless (adblocking, props spoofing etc.)

- Flashlight Notification/Call blinking

- Vibrating Notification Reminder

- Sweep to Sleep touchscreen gesture - highly customizable

- DoubleTap on Sweep2Sleep's area gestures - new way to pull down android Notification Area

- Face down screen off - new gesture, e.g. conveniently use together with 'flip to shh' to turn screen off

Network related features:

- Wireguard Support (Details)

Memory related features:

- updated PSI monitor with latest changes

- improved mm with patches from latest mainline

- various other changes from mainline

- included zstd and lz0-rle as options for ZRAM-algorithm (lz4 is probably the best all around, so only change it if you know why and what you are doing)

- allow swappiness up to a value of 200

- Backport to enable CONFIG_HAVE_MOVE_PMD (see here)

- Backport to enable CONFIG_HAVE_MOVE_PUD (see here) (reverted for now as it breaks audio driver)

- improvements to ZRAM writeback (thanks @arter97 )

- disable per cgroup tracking via psi to reduce overhead

Security related features:

- CFI and LTO both kept intact and are used to keep additional security Google implemented for us!

- ThinLTO used as of 3.9.0

- Shadow Call Stack

Tuned PowerHal

- allow kernel to idle on lowest frequencies when no interaction is happening

- increase swappiness during periods without interaction to favor swapping memory, relax swappiness otherwise

- scheduler camera processes to the big cluster and prime core when faceunlock is used

- adjust powerhal behaviour when the camera is used

Misc Features:

TCP Congestion Algorithms:

- advanced algorithms enabled

- includes new bbr2

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

Other features:

- disable logging to make the kernel more lightweight in various places (includes mm, vma, gpu, ipa etc)

- remove VLAs from the kernel (more info)

- add support for steam controller

- add support for nintendo switch controller

- merge upstream solution for PM/Wakeup driver, which reduces unnecessary logspam and also improves sleeping behaviour

- merge freezer v2 backport from google gerrit (required for developer option ""suspend execution for cached apps"")

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

- working magisk environment

- latest stock rom (custom roms can have issue, several users reported success when rooted with magisk 24.3 instead of latest)

How to flash the Kernel:

1. Download the kernel.zip to your device

1a. While it may not be necessary all times when coming from another custom kernel: You may want to restore stock boot.img as well as stock dtbo.img, which can both be found in the factory image. If you´re on a custom rom, simply dirty flash your ROM. Reroot with magisk and optionally install twrp.zip (if existing). Before reporting issues make sure you do that! Thank you!

1b. If you used the SQLITE3 Magisk Module and the GPay Fix Magisk Module in the past look at this post: click me

You only need to do either 2a OR 2b

2a. If TWRP is available for this device and specific android version, boot to TWRP and flash my kernel.zip. Root will be preserved!

or

2b. Flash kernel zip in EX Kernel Manager or FKM app. Root will be preserved! If a kernel manager is not yet updated to work on a specific Android Version, you need to wait until it is updated or use another one.

4. Reboot and profit!

DOWNLOAD:

Download is located always in this folder or attached to the release post in case it´s now in AFH.

https://www.androidfilehost.com/?w=files&flid=301179

Please also check the release posts for download links or attched files. AFH is often down recently.

Important: Read after Download

Please take a look at the second post after flashing the kernel!

Changelog:

Android 10/ Q Kernels

1.0.0 Initial Release

1.0.1 https://xdaforums.com/showpost.php?p=80712545&postcount=51

1.0.3 https://xdaforums.com/showpost.php?p=80791393&postcount=181

2.0.0 https://xdaforums.com/showpost.php?p=81069625&postcount=341

2.1.0 https://xdaforums.com/showpost.php?p=81168297&postcount=424

2.3.0 https://xdaforums.com/showpost.php?p=81244627&postcount=491

2.3.4 https://xdaforums.com/showpost.php?p=81311861&postcount=561

2.6.0 https://xdaforums.com/showpost.php?p=81408591&postcount=611

2.9.0 https://xdaforums.com/showpost.php?p=81527369&postcount=692

2.9.2 https://xdaforums.com/showpost.php?p=81575075&postcount=702

3.1.0 https://xdaforums.com/showpost.php?p=81625099&postcount=725

3.2.0 https://xdaforums.com/showpost.php?p=81679343&postcount=761

3.9.0 https://xdaforums.com/showpost.php?p=81926617&postcount=802

3.9.1 https://xdaforums.com/showpost.php?p=81943269&postcount=824

4.2.0 https://xdaforums.com/showpost.php?p=82189985&postcount=851

4.5.0 https://xdaforums.com/showpost.php?p=82485339&postcount=892

4.5.6 https://xdaforums.com/showpost.php?p=82562029&postcount=941

4.7.5 https://xdaforums.com/showpost.php?p=82725499&postcount=986

5.0.0 https://xdaforums.com/showpost.php?p=83019609&postcount=1022

5.2.2 https://xdaforums.com/showpost.php?p=83206123&postcount=1066

5.2.6 https://xdaforums.com/showpost.php?p=83387505&postcount=1078

Android 11/ R Kernels

6.0.0 https://xdaforums.com/showpost.php?p=83476821&postcount=1092

6.1.3 https://xdaforums.com/showpost.php?p=83649491&postcount=1131

6.2.4 https://xdaforums.com/showpost.php?p=83849179&postcount=1143

6.6.0 https://xdaforums.com/t/kernel-03-1...r-pixel-4-xl-aka-floral.3992213/post-84068177

6.6.6 https://xdaforums.com/t/kernel-04-0...r-pixel-4-xl-aka-floral.3992213/post-84227741

6.8.2 https://xdaforums.com/t/kernel-04-0...r-pixel-4-xl-aka-floral.3992213/post-84408147

7.1.0 https://xdaforums.com/t/kernel-01-0...r-pixel-4-xl-aka-floral.3992213/post-84588667

7.1.1 https://xdaforums.com/t/kernel-05-0...r-pixel-4-xl-aka-floral.3992213/post-84603881

7.2.3 https://xdaforums.com/t/kernel-05-0...r-pixel-4-xl-aka-floral.3992213/post-84747379

7.4.0 https://xdaforums.com/t/kernel-30-0...r-pixel-4-xl-aka-floral.3992213/post-84900715

7.4.1 https://xdaforums.com/t/kernel-25-0...r-pixel-4-xl-aka-floral.3992213/post-84951399

7.4.2 https://xdaforums.com/t/kernel-04-0...r-pixel-4-xl-aka-floral.3992213/post-85000553

7.4.3 https://xdaforums.com/t/kernel-12-0...r-pixel-4-xl-aka-floral.3992213/post-85079523

7.4.4 https://xdaforums.com/t/kernel-25-0...r-pixel-4-xl-aka-floral.3992213/post-85155405

7.9.0 https://xdaforums.com/t/kernel-09-0...r-pixel-4-xl-aka-floral.3992213/post-85298631

7.9.1 https://xdaforums.com/t/kernel-08-0...r-pixel-4-xl-aka-floral.3992213/post-85424575

7.9.2 https://xdaforums.com/t/kernel-03-0...r-pixel-4-xl-aka-floral.3992213/post-85473277

7.9.3 https://xdaforums.com/t/kernel-13-0...r-pixel-4-xl-aka-floral.3992213/post-85674963

Android 12

8.0.0 https://xdaforums.com/t/kernel-23-0...r-pixel-4-xl-aka-floral.3992213/post-86063673

8.0.3 https://xdaforums.com/t/kernel-08-1...r-pixel-4-xl-aka-floral.3992213/post-86236075

8.0.4 https://xdaforums.com/t/kernel-10-0...r-pixel-4-xl-aka-floral.3992213/post-86413329

8.0.5 https://xdaforums.com/t/kernel-12-0...r-pixel-4-xl-aka-floral.3992213/post-86550055

8.2.0 https://xdaforums.com/t/kernel-09-0...r-pixel-4-xl-aka-floral.3992213/post-86843221

8.2.2 https://xdaforums.com/t/kernel-04-0...r-pixel-4-xl-aka-floral.3992213/post-87006201

Android 13

9.0.0 https://xdaforums.com/t/kernel-10-0...r-pixel-4-xl-aka-floral.3992213/post-87295655

9.0.2 https://xdaforums.com/t/kernel-17-0...r-pixel-4-xl-aka-floral.3992213/post-87532941

9.1.0 https://xdaforums.com/t/kernel-06-1...r-pixel-4-xl-aka-floral.3992213/post-87760941

9.1.1 https://xdaforums.com/t/kernel-06-1...r-pixel-4-xl-aka-floral.3992213/post-87868847

9.1.4 https://xdaforums.com/t/kernel-17-1...r-pixel-4-xl-aka-floral.3992213/post-88332237

9.1.6 https://xdaforums.com/t/kernel-25-0...r-pixel-4-xl-aka-floral.3992213/post-88583047

9.1.9 https://xdaforums.com/t/kernel-28-0...r-pixel-4-xl-aka-floral.3992213/post-89045405

9.2.0 https://xdaforums.com/t/kernel-25-0...r-pixel-4-xl-aka-floral.3992213/post-89569975

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:

@osm0sis for all his work, including the ak3 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 all of his work and the stuff I could learn from him

@flar2 for all his work

@joshuous for all the help he provided to me in the past!

@topjohnwu for magisk!

@arter97 , @kdrag0n for helping me out several times!

XDA:DevDB Information

Kirisakura Kernel, Kernel for the Google Pixel 4 XL

Contributors

Freak07

Source Code: https://github.com/freak07/FLORAL

Kernel Special Features:

Version Information

Status: Stable

Created 2019-10-27

Last Updated 2020-11-03