[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
Update to 2.0.0

Hey guys and girls,

The wait for the Android 10 kernel is finally over. As already announced this time it´s not only a stock kernel with a few minimal changes.

I updated the OP with all the information on what´s included in the kernel. I include the list in this post as well. Most improvements have some descriptions linked.

If not Google is your friend :)

Flashing the kernel will automatically install a helper module for the kernel settings to be applied at boot! Don´t remove it in Magisk Manager!

These settings will tune the Energy-Aware Scheduler to work better on the ROG, than what´s default. I can notice an improvement when cold-opening apps for example and in other scenarios as well.

I´m not a fan of benchmarks for getting the highest score possible or to start competitions. However all tests I did so far showed a slight improvement. :) Jitter is improved, Jank is improved and other benchmarks as well.

I´m very content how the kernel currently runs. I plan to look into this further, maybe there are more improvements to be gained.

If you are installing the kernel for the first time on Android 10 you need to flash it twice. The first flash disables verity and the second flash edits some files on vendor, which is now allowed due to disabling verity.

All consecutive flashes will require only one flash. If you at some point dirty flash your the asus firmware, you need to install it twice again.

This was added to the instructions in the OP!

If you need more performance or want to throttle the device, you can use X-Mode or the custom X-Mode.

I don´t have the Asus Gamepad, so I don´t know if it still works. If anybody can give feedback on this it´s appreciated. The fan that´s included in the package works fine.

The kernel includes latest linux-stable, is upstreamed against the latest CAF-Sources ( soc specific patches), uses latest f2fs-stable and has all relevant commits from kernel/common included.

It´s built with the latest prebuilt Clang from Google.

Bringing this kernel to the state it now is was a lot of work over the last month. This is now nearly the 100th build.

Enjoy!

Changelog:

Main Features:

- Based on latest kernel sources from Asus for Android 10

- compiled with Clang 10.0.6 and built with -O3 speed optimizations

- Linux-Stable-Upstream included to latest 4.14.175

- Regular CAF-Tag for SD855 merged LA.UM.8.1.r1-14500-sm8150.0

- Next-Gen CAF-Tag LV.AU.0.2.0.r1-03200-gen3meta.0 merged

- Next-Gen CAF-Tag LA.AU.0.1.1.r1-03100-gen3meta.0 merged

- Link the kernel with LLD and use KASLR

- include all important fixes/improvements from kernel/common

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

- Safety Net patches are included -> Kernel passes Safety Net

- Flashing the kernel will keep root!

- Sweep to sleep functionality

- Flashable via EXKM and FKM on a rooted system!

- specifically tuned EAS for the Asus Rog Phone 2

- removed nolog usage, remove rtb logging from the kernel

- remove selinux auditing from kernel for lower overhead

- remove IPC logging from the kernel

- Anykernel zip is based on the all new Anykernel3 release from [MENTION=4544860]osm0sis[/MENTION]

EAS related features:

- EAS implementation patched up to latest CAF state

- disable autogroups and use cgroups for more efficient task placement!

- Dynamic Stune Boost to inflate task utilization and not overload cores on interaction (thanks to [MENTION=5438598]RenderBroken[/MENTION] and [MENTION=6745491]joshuous[/MENTION] )

- improved schedutil governor

- updates from kernel/common

CPU related features:

- Power saving workingqueues enabled by default

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

- improvements to cpufreq/times/stats

- vDSO 32 patches to improve 32-bit performance

File System related features:

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

- Include rapid GC by [MENTION=4898097]arter97[/MENTION] ( 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.)

- adapt F2FS to be inline with Pixel 4s code from Google, which is also directly maintained by Jaegeuk Kim

- include a few F2FS fixes from the Pixel 4 kernel

- include optimizations to UFS-Driver from Pixel 4

- various improvements to FS-Performance from the Pixel 4

GPU related features:

- Update GPU driver to latest CAF state

- remove debugging and non-sd855+ specific code from the GPU driver

- introduce low priority worker thread to improve performance in UI-critical situations

Network related features:

- Wireguard Support (Details)

- advanced TCP algorithms enabled

- includes new bbr and bbr2

Memory related features:

- Speculative Page Faults (1. 2) (CAF default)

- enabled per process reclaim (CAF default)

- Fix various memory leaks in different subsystems

- 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

Security related features:

- Control-Flow-Integration (CFI) andLink-Time-Optimization (LTO) ported from 4.14 kernel/common and Pixel 4 Kernel

- Shadow Call Stack ported from 4.14 kernel/common and Pixel 4 Kernel

- enable init_on_alloc for even more security, more information can be found in the commit message

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 and debugging to make the kernel more lightweight in various places (includes binder, mm, vma, gpu, ipa etc)

- remove VLAs from the kernel (more info)

- add support for steam controller

- add support for nintendo switch controller

- optional Magisk-Module to reduce minimum brightness by a bit

Feature section for the "non visible" but perceptible improvements:

- updated binder section (responsible for interprocess communication)

- updated sdcardfs ; have a read about it here:

- fix CFI violations

- add ramoops/pstore support (thanks [MENTION=5778309]luca020400[/MENTION])

I wish you all a nice day/evening!

Download is below :)

Download:

Disclaimer/Important:

Kernel: https://www.androidfilehost.com/?fid=4349826312261766784

Instructions how to flash the kernel can be found in the OP!

But look at this post too :)

Brightness Module (reduces minimum brightness):https://www.androidfilehost.com/?fid=4349826312261766808

Only for Android 10 WW Stock Firmware ! Flashable via Magisk Manager.

The module is offered without any form of support. Please do not discuss it here in the thread.

If you face issues, it´s because you accidentally use any form of tweak, app, script, module or some other conflicting mod.

Have fun, enjoy the kernel and your phone.

If you like my work please consider a donation.

Donations are not mandatory but very welcome.

If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07