[Kernel][04.07.2022][Android 12] Kirisakura 1.0.0_S for Asus Zenfone 7/Pro aka Tequila

Search This thread

vj7771

Member
Oct 17, 2016
15
2
35
新竹市
HTC U Ultra
HTC U11+
有新的更新嗎? 78 降低手機上,內核不會讓我上的頻率。
謝謝
I am currently using 30.41.69.78 firmware, it is no problem to change this kernel... You try to re-flash magisk. Check the kernel and try it. Prohibit unnecessary application startup
Screenshot_20210718-002759510.jpg
 
Last edited:
  • Like
Reactions: Seosam

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,644
18,740
Update to 1.2.0_R

Hey guys and girls,


I hope everyone had good week or is starting into the weekend already. here´s the next update.
It includes the source code merged for the update zenfone7_zs670ks.mr2.4-30.41.69.78.

Link to the full firmware file below:

More changes in the Changelog below:


Changelog:
- Merge Source Code Update from zenfone7_zs670ks.mr2.4-30.41.69.78
- Linux-Stable Upstream to 4.19.198
- merge a big part of f2fs-stable
- improve GC (garbage collection) done by f2fs





Download:



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

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,644
18,740
Update to 1.2.1_R

Hey guys and girls,


I hope everyone had good week or is starting into the weekend already. here´s the next update.
It includes the source code merged for the update zenfone7_zs670ks.mr2.5-30.41.69.89
Linux-stable to latest is included as well..

Link to the full firmware file below:

More changes in the Changelog below:


Changelog:
- Merge Source Code Update from zenfone7_zs670ks.mr2.5-30.41.69.89
- Linux-Stable Upstream to 4.19.201
- built with latest prebuilt clang 12.0.7 by google





Download:



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

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,644
18,740
Update to 1.2.5_R

Hey guys and girls,


I hope everyone had good week or is starting into the weekend already. here´s the next update.
It includes the source code for the update UL-I002D-WW-30.41.69.112.
Linux-stable was bumped as well.

Link to the full firmware file below:

More changes in the changelog section.


Changelog:
- Merge Source Code Update from zenfone7_zs670ks.mr2.6-30.41.69.112
- Linux-Stable Upstream to 4.19.204
- built with latest prebuilt clang 13.0.1 by google
- fix game crashing on loadup (call of duty)
- disable per-cgroup pressure tracking to reduce overhead
- disable unnecessary debugging configs to further reduce overhead
- adjust battery saver to efficient freqs according to freqbench results

Download:



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
 
  • Like
Reactions: tombbb and Seosam

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,644
18,740
Update to 1.2.6_R

Hey guys and girls,


I hope everyone had a nice new year so far. Here´s the next update.
It includes the source code for the update UL-I002D-WW-30.41.69.143.
Most of the kernel changes we already had by merging linux-stable and caf-upstream.

Link to the full firmware file below:

More changes in the changelog section.


Changelog:
- Merge Source Code Update from zenfone7_zs670ks.mr2.8-30.41.69.143


Download:



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
 
  • Like
Reactions: tombbb

Kevin86

Member
Jan 26, 2007
8
1
Update to 1.2.6_R

Hey guys and girls,

I hope everyone had a nice new year so far. Here´s the next update.
It includes the source code for the update UL-I002D-WW-30.41.69.143.
Most of the kernel changes we already had by merging linux-stable and caf-upstream.

Link to the full firmware file below:

More changes in the changelog section.


Changelog:
- Merge Source Code Update from zenfone7_zs670ks.mr2.8-30.41.69.143


Download:



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
Hi @Freak07

Any chance you release an Android 12 kernel? Thanks!
 

Kevin86

Member
Jan 26, 2007
8
1
Just flashed the kernel, first impressions are good. WireGuard with the kernel module functions well and the user experience is more snappy 👍 Thanks for supporting this older device ☺️
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,644
18,740
Update to 1.0.0_S

Hey guys and girls,

Alright here´s the update for Android 12 firmware version 31.0210.0210.250. There are many other improvements as well as linux-stable upstream being bumped to 4.19.240.
Please make sure to update to the latest Android 12 firmware to make sure no compatibility issues arise.

If you flashed the previous 1.0.0_S zip a few posts above please update, the kernel are not the same.

Link to the full firmware file below:

More changes in the changelog section.


Changelog:
- Update for Android 12
- Rebase entire kernel on A12 source code
- keep all improvements
- linux-stable at 4.19.240
- more details please check the first post and github


Download:



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
 

MaxLeSac

New member
Oct 11, 2017
1
0
ASUS ZenFone 7/7 Pro
Update to 1.0.0_S

Hey guys and girls,


Alright here´s the update for Android 12 firmware version 31.0210.0210.250. There are many other improvements as well as linux-stable upstream being bumped to 4.19.240.
Please make sure to update to the latest Android 12 firmware to make sure no compatibility issues arise.

If you flashed the previous 1.0.0_S zip a few posts above please update, the kernel are not the same.

Link to the full firmware file below:

More changes in the changelog section.


Changelog:
- Update for Android 12
- Rebase entire kernel on A12 source code
- keep all improvements
- linux-stable at 4.19.240
- more details please check the first post and github


Download:



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
Hey !

My ZF7 pro run with omnirom 12.1, If I use kirisakura kernel on this custom rom is it a problem or its okay ?
 

Kevin86

Member
Jan 26, 2007
8
1
Just updated to the latest 277 ROM. The A12 kernel still works fine. Found one bug that is pretty serious, my camera crashes on snapping a picture with the stock camera app. Video works fine. Taking a picture from within Whatsapp/Telegram works fine.

Reflashing the stock kernel fixes the issue. Any idea what could be causing this @Freak07?
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,644
18,740
Just updated to the latest 277 ROM. The A12 kernel still works fine. Found one bug that is pretty serious, my camera crashes on snapping a picture with the stock camera app. Video works fine. Taking a picture from within Whatsapp/Telegram works fine.

Reflashing the stock kernel fixes the issue. Any idea what could be causing this @Freak07?
Do you use the kernel from the release post uploaded to afh? Or the one I uploaded earlier?

The one on AFH shouldn't show this issue, just updated myself and everything is well.
No problem to snap a picture with stock camera on 277 firmware.


 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    Kirisakura-Kernel for the Asus Zenfone 7/Pro

    Hello everyone,

    To keep it short: Here is Kirisakura - Kernel for the Asus Zenfone 7/Pro aka Tequila. The Zenfone line- up internal codenames are derived from alcoholic drinks, last year the Zenfone 6 bore the title Kirin.
    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. Instead there is an option called battery saver in the options of your phone.
    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.
    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.

    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 865/+ that´s built into the different SKUs of the Zenfone 7/Pro.
    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 12 and intended for use on the latest Asus Stock-Firmware
    - compiled with Clang 13.0.1 and built with -O3 speed optimizations
    - Linux-Stable-Upstream included to 4.19.2240
    - CAF base for the Snapdragon 865/+ (SD865/+) updated to upstream CAF
    - Kernel Control-Flow-Integration (CFI) andLink-Time-Optimization (LTO) ported from 4.19 kernel/common and Pixel 5/4/XL Kernel
    - 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!
    - Flashable via EXKM, FKM or TWRP on a rooted system!
    - Anykernel zip is based on the Anykernel3 release from @osm0sis
    - 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)
    - display tweaks to reduce power consumption on statically rendered images
    - option to limit max cpu frequency (3 levels) also to cpu boosting during input, without enabling powersaver mode that restricts background data sometimes killing notifications

    EAS related features:
    - EAS implementation patched up to latest CAF state
    - disable autogroups and use cgroups for more efficient task placement!
    - updates from kernel/common
    - scheduler updates from Googles Pixel kernel
    - tune scheduler for improved jitter and less jank frames
    - scheduler updates for RT tasks
    - scheduler updates from sd888/ 5.4 kernel
    - mainline scheduler updates for better load balancing on sched_idle cpus

    CPU related features:
    - Change various drivers (WLAN, MM, audio, charger, power, thermal, glink etc) to user power efficient workingqueues. This compliments EAS
    - improvements to cpufreq/times/stats
    - improve memory allocations in binder driver
    - vdso32 patches as found on Google Pixel devices (brief documentation here)
    - arm64: lse: Prefetch operands to speed up atomic operations, thanks @kdrag0n
    - implement fast refcount checking
    - remove RTB logging to reduce overhead
    - remove event debug logging

    GPU related features:
    - GPU driver updated to latest CAF-State
    - remove POPP functionality from GPU driver to avoid constant fight about downscaling with msm-adreno-tz
    - don´t wake the gpu on touch input, instead wake when receiving an ioctl
    - don´t copy fence names by default to save a bit of cpu-time (explanation)
    - msm: kgsl: Stop slab shrinker when no more pages can be reclaimed
    - 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:
    - 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
    - default IO scheduler to CFQ and readahead to 128
    - improve GC as to not interfere while user interaction is happening and prevent possible jitter or latency spikes

    UI/UX/Usability:
    - Backlight Dimmer (reduce minimal brightness on a solid white background from 2,3 lux to 1,6 lux)
    - sweep to sleep
    - touch sampling override option (set stock touchsampling rate from 120hz to 200hz for reduced touch latency)

    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 and bbr2

    Memory related features:
    - Speculative Page Faults left enabled (1. 2) (CAF default)
    - various fixes for PSI-Monitor, which is used by the userspace lowmemorykiller-daemon
    - Fix various memory leaks in different subsystems
    - improved mm with patches from mainline
    - various other changes from mainline
    - included zstd as an option for ZRAM-algorithm (lz4 is probably the best all around, so only change it if you know why and what you are doing)
    - improve memory allocations in various subsystems
    - Backport to enable CONFIG_HAVE_MOVE_PMD (see here) , thanks @arter97
    - Backport to enable CONFIG_HAVE_MOVE_PUD (commit here) , thanks @arter97
    - allow max swappiness over 100, to favor swapping instead of dropping the cache
    - free more RAM by removing unused reserved memory regions

    Security related features:
    - Control-Flow-Integration (CFI) and Link-Time-Optimization (LTO) ported from 4.19 kernel/common and Pixel 5 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
    - Backport mainline Selinux commits for improved performance in the selinux subsystem, thanks @arter97 (you must be on magisk 21.0 or higher, otherwise the kernel won´t boot)


    Misc Features:

    TCP Congestion Algorithms:
    - advanced algorithms enabled, enable them with your favorite kernel manager
    - use bbr as default TCP congestion algorithm (fasted algo according to this excellent research from @kdrag0n found here )
    - 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
    - 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 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
    - implement ramoops functionality to be able to easily debug kernel panics

    Feature section for the "non visible" but perceptible improvements:
    - updated binder section (responsible for interprocess communication)


    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 (magisk 22.0 or higher), usually magisk stable works best
    - a backup of stock boot.img and dtbo.img so you can go back to stock conditions (simplest way is TWRP)

    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 7/Pro receives an 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, make sure you have a backup ready!

    2. Flash the kernel.zip via latest TWRP, EXKM or FKM app and do a full reboot.

    3. Reboot and profit.


    DOWNLOAD:
    Download is located always in this folder:

    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.1.3 https://forum.xda-developers.com/t/...nfone-7-pro-aka-tequila.4269677/post-85018787
    1.2.0 https://forum.xda-developers.com/t/...nfone-7-pro-aka-tequila.4269677/post-85369449
    1.2.1 https://forum.xda-developers.com/t/...nfone-7-pro-aka-tequila.4269677/post-85432205
    1.2.5 https://forum.xda-developers.com/t/...nfone-7-pro-aka-tequila.4269677/post-85797313
    1.2.6 https://forum.xda-developers.com/t/...nfone-7-pro-aka-tequila.4269677/post-86238683
    Android 12

    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_TEQUILA_Zenfone_7
    6
    Feature Documentation:
    Here´s a brief documentation about some of the features included in the kernel that can be changed as the user desires.
    They can be accessed via either terminal, scripts or for example EXKM manager ( tools -> user settings).



    CPU-Frequency Limiting
    Another option is CPU-Freq Limiting. You can now limit the CPU frequency to a few different levels with a sysfs interface. Original implementation is from @tbalden, I only changed it to be accessible via traditional root methods.
    Main Switch:
    sys/module/cpufreq/parameters/batterysaver
    Set this option to "1" to enable the feature

    Max-Frequency Selection (Input boosts, such as scrolling boost or app launching boosts will still apply, if touch boost restriction is not set to 1)
    sys/module/cpufreq/parameters/batterysaver_level
    Set this to "1" to restrict the max CPU-Freqs to 1,7GHZ/2,1GHZ/2,49GHZ (Little Cluster/Big Cluster/Prime Core)
    Set this to "2" to restrict the max CPU-Freqs to 1,6GHZ/1,7GHZ/2,0GHZ (Little Cluster/Big Cluster/Prime Core)
    Set this to "3" to restrict the max CPU-Freqs to 1,49GHZ/1,4GHZ/1,6GHZ (Little Cluster/Big Cluster/Prime Core)

    Touch-Boost Restriction
    sys/module/cpufreq/parameters/batterysaver_touch limiting
    Set this to "1" to restrict the powerhal from boosting over the limit defined in batterysaver_level
    Set this to "0" to allow the powerhal to boost above the values defined in batterysaver_level, but only during interaction with the Phone!

    Screenshots:
    1621076204384.png
    1621076219469.png
    1621076241915.png



    This is for example very useful during gaming to prevent additional heat, if not the highest performance from the CPU is required. Check if the game is running fine on level 1 or 2, and you´ll notice much less heat. Powerdraw will be reduced as well.
    Another very useful trick while doing video calls or long extended navigation sessions with google maps to preserve battery or keep the phone from heating. Especially during summer if the ambient temperatures are high.
    This is a very easy way to preserve battery or reduce heat without toggling the battery save mode in settings as that restricts background data usage, which can lead to delayed notifications.
    5
    Update to 1.2.1_R

    Hey guys and girls,


    I hope everyone had good week or is starting into the weekend already. here´s the next update.
    It includes the source code merged for the update zenfone7_zs670ks.mr2.5-30.41.69.89
    Linux-stable to latest is included as well..

    Link to the full firmware file below:

    More changes in the Changelog below:


    Changelog:
    - Merge Source Code Update from zenfone7_zs670ks.mr2.5-30.41.69.89
    - Linux-Stable Upstream to 4.19.201
    - built with latest prebuilt clang 12.0.7 by google





    Download:



    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
    4
    Update to 1.2.0_R

    Hey guys and girls,


    I hope everyone had good week or is starting into the weekend already. here´s the next update.
    It includes the source code merged for the update zenfone7_zs670ks.mr2.4-30.41.69.78.

    Link to the full firmware file below:

    More changes in the Changelog below:


    Changelog:
    - Merge Source Code Update from zenfone7_zs670ks.mr2.4-30.41.69.78
    - Linux-Stable Upstream to 4.19.198
    - merge a big part of f2fs-stable
    - improve GC (garbage collection) done by f2fs





    Download:



    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
    3
    Hey everybody,
    I was a bit busy. Regarding new firmware update:
    all changes from the 30.41.69.66 were already present in my kernel by merging CAF-Upstream.

    So just flash away on the new firmware, link is here: