[Sony Xperia 1 IV] Freak07:
Kirisakura-Kernel for the Sony Xperia 1 IV

Hello everyone,

To keep it short: Here is Kirisakura- GKI - Kernel for the Sony Xperia 1 IV aka Nagara. Nagara is the internal codename for this years development platform of Sony Mark IV devices.

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.

There´s also a cpu-battery saver mode that cuts back the CPU max- freqs, but without the disadvantages like delayed notifications from built into the system user-space power-saving modes.

If that got your curious, I welcome you to continue reading if you´re still interested!

Now lets continue with a list of features in the next paragraph!

Main Features:

- Based on kernel/common 5.10.149

- compiled with Clang 12.0.5

- CPU-Battery saver to be able to restrict max cpufreqs on the fly, without enabling powersaving modes that might cause missed notifications (see second post)

- SSG IO scheduler for reduced overhead and less CPU cycles (more lightweight and android optimized)

- Power saving workingqueues enabled by default

- Change various drivers to use power efficient workingqueues. This compliments EAS in general

- implement LRNG (thanks @arter97, see arter kernel OP for more info )

- Enable support for TTL spoofing

- 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

- f2fs improvments for better efficiency

- scheduler improvements

- psi fixes

- Flashing the kernel will keep root!

- Flashable via EXKM, FKM or TWRP (if available) on a rooted system!

Flashing Guide, Download and Changelog

Requirements:

- unlocked Bootloader

- USB-Debugging in developer options enabled

- latest adb and fastboot binaries

- working adb and fastboot environment

- magisk root

- a backup of stock boot.img or your magisk patched boot.img in case you want to go back to stock.

How to flash the Kernel:

1. Download the latest kernel.zip and make sure you have properly updated to the latest matching Firmware (check the feature list for the current firmware the source is based on). When there´s an OTA update for the Sony Xperia 1 IV it takes Sony 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.

If you want to be sure there are no issues, 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, or attached to the release posts in case AFH is wonky.

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

Important: Read after Download

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

Changelog:

Android 12

1.0.0 Initial Release

Android 13

1.0.0 https://xdaforums.com/t/kernel-gki-...-xperia-1-iv-aka-nagara.4480653/post-87711541

1.0.1 https://xdaforums.com/t/kernel-gki-...-xperia-1-iv-aka-nagara.4480653/post-87945391

1.0.3 https://xdaforums.com/t/kernel-gki-...-xperia-1-iv-aka-nagara.4480653/post-88241223

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:

Sony 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_GKI_Nagara