[Kernel] [All ROMs] [ALL VARIANTS] Glassrom kernel - OnePlus 7, 7 Pro, 7T, 7T Pro Cross Device Kernel D

This is the stock kernel that ships with glassrom (or will ship with it)
5g variants are not yet supported
It is based off kirisakura kernel with additional hardening from my side.
You get this:
All the features from kirisakura kernel
Removed qualcomm's rmnet drivers
COMPAT_VDSO is disabled to enable full vDSO ASLR
KSPP patches have been applied
Clang control flow integrity (https://source.android.com/devices/tech/debug/cfi)
Backward edged control flow integrity:
Strong protections enforced by shadowcallstack (https://source.android.com/devices/tech/debug/shadow-call-stack)
Weak protections enforced by adding stack canaries to everything and ensuring ASLR is of a decent enough quality
Compiled with -O3 and Polly for maximum performance
Wireguard driver has been removed
AVB depends on the ROM. Flashing it on glassrom/oxygenos will definitely cause it to boot with enforcing AVB. On other ROMs this shouldn't happen
Selinux forced enforcing patch from Samsung
Yama is enabled and set to SCOPE_NO_ATTACH
Uses sdfat driver to provide vfat and exfat drivers
Todo:
Port Linux-hardened patch
fix fingerprint on oos
Notes:
Flashing it on oxygenos will break dt2w
Flashing the kernel regardless of ROM or device combination will break twrp ramdisk boot. The only way to boot twrp is using fastboot boot, installing it to the ramdisk will always lead to a kernel panic. This is not a bug and will not be fixed
Download: see release post https://forum.xda-developers.com/showpost.php?p=81105101&postcount=8
Source:
https://github.com/GlassROM-devices/android_kernel_oneplus_sm8150
Donations:
Most of the hard work was done by @Freak07 so check out his thread and buy him a coffee

anupritaisno1 said:
This is the stock kernel that ships with glassrom (or will ship with it)
5g variants are not yet supported
It is based off kirisakura kernel with additional hardening from my side.
You get this:
All the features from kirisakura kernel
Removed qualcomm's rmnet drivers
COMPAT_VDSO is disabled to enable full vDSO ASLR
KSPP patches have been applied
Clang control flow integrity (https://source.android.com/devices/tech/debug/cfi)
Backward edged control flow integrity:
Strong protections enforced by shadowcallstack (https://source.android.com/devices/tech/debug/shadow-call-stack)
Weak protections enforced by adding stack canaries to everything and ensuring ASLR is of a decent enough quality
Compiled with -O3 and Polly for maximum performance
Wireguard driver has been removed
AVB depends on the ROM. Flashing it on glassrom/oxygenos will definitely cause it to boot with enforcing AVB. On other ROMs this shouldn't happen
Selinux forced enforcing patch from Samsung
Yama is enabled (does nothing significant for now)
Todo:
Set Yama to level 3 (breaks magisk)
Port Linux-hardened patch
Notes:
Flashing it on oxygenos will break dt2w
Flashing the kernel regardless of ROM or device combination will break twrp ramdisk boot. The only way to boot twrp is using fastboot boot, installing it to the ramdisk will always lead to a kernel panic. This is not a bug and will not be fixed
Download:
https://mirror.apexcdn.net/files/glassrom/unsigned.zip
Source:
https://github.com/GlassROM-devices/android_kernel_oneplus_sm8150
Click to expand...
Click to collapse
Fingerprint is broken on oos

Kaz205 said:
Fingerprint is broken on oos
Click to expand...
Click to collapse
Yeah sorry about that. I'll make a version for oos soon
I did test it for a short while on oos but did not test it enough

Merged in the latest kernel from kirisakura git and also merged in 4.14.156
It boots fine but I don't have a good internet connection to be able to upload it
Will do so soon

anupritaisno1 said:
Merged in the latest kernel from kirisakura git and also merged in 4.14.156
It boots fine but I don't have a good internet connection to be able to upload it
Will do so soon
Click to expand...
Click to collapse
Thanks! Does this one work with OOS?

MrGimpGrumble said:
Thanks! Does this one work with OOS?
Click to expand...
Click to collapse
I eventually plan to stop supporting oos
OOS is proprietary for one and such a system is almost never secure. And if you don't believe me just look at their past vulnerability announcements. Almost all oxygenos vulnerabilities come from the fact that oneplus finds loopholes around Google's CTS. Who knows what other holes they've opened up that Google forgot to add checks for
Further, oos has many "memory optimisation" drivers that directly try to access ram and break most of the security features I'm implementing. Most custom ROMs do not have these and the drivers can be safely disabled
I will also add that this kernel is almost functionally identical with kirisakura kernel. Yes I might merge upstream slightly faster but other than that there is no difference that you would notice. The only difference is that I'm enabling all the security features that must be enabled - especially CFI and shadowcallstack which come standard on any Google pixel device
As for wireguard I just think running a VPN in kernel space is a very bad idea. Not to mention I have confirmed that on Android the tunnel leaks ipv6 traffic if you're not careful and no, disabling ipv6 is not the solution. The userspace go implementation is much safer and I mean it. The userspace implementation almost never leaks ipv6 traffic. Not to mention Go is a much safer language than C

okay new update is in the attachments
changes: linux 4.14.156
upstreamed to oos open beta 6 (doesn't mean fixed fingerprint yet)
upstreamed wifi driver and audio driver to latest caf tag (LA.UM.8.1.r1-12200-sm8150.0)
yama is now at level 3
all upstream changes from kirisakura. except for wake gestures as lineagehw seems to already have those
oos users should disable smart boost from settings

okay new build is here
changelog:
linux 4.14.157
upstreamed sdfat driver
fixed a weird kernel panic that happened on anything other than oxygenos when the device was fast charging from a very low battery

anupritaisno1 said:
okay new build is here
changelog:
linux 4.14.157
upstreamed sdfat driver
fixed a weird kernel panic that happened on anything other than oxygenos when the device was fast charging from a very low battery
Click to expand...
Click to collapse
work on pa?

ryshd296 said:
work on pa?
Click to expand...
Click to collapse
Please test it and let me know
It should boot on any ROM that can enforce selinux

anupritaisno1 said:
Please test it and let me know
It should boot on any ROM that can enforce selinux
Click to expand...
Click to collapse
This sent me into an immediate Qualcomm crash dump upon booting on both stock OOS and Omni for OnePlus 7t global variant.
Previous releases as well, not just the newer release.

scott.hart.bti said:
This sent me into an immediate Qualcomm crash dump upon booting on both stock OOS and Omni for OnePlus 7t global variant.
Previous releases as well, not just the newer release.
Click to expand...
Click to collapse
Please duplicate the crashdump message exactly
Especially send the "PC at" line and the error message if present
If the error message is blank please mention that it is
If you get a PC at __cfi_check_fail message please mention this

@scott.hart.bti still waiting for your response
Please send the crash log if possible

Do i need ma
gisk companion for this?

psychemisha said:
Do i need ma
gisk companion for this?
Click to expand...
Click to collapse
No you don't
However somewhere around ob4 maintaining compatibility with oxygenos became next to impossible without breaking custom ROMs
I think most users are still on OOS. If not I can just release builds for custom ROMs

Costum plz

is the development stopped?

Related

[NOUGAT] ab123321 kernel for Oneplus One

Hi all, now I'm going to present my own custom kernel for Oneplus One!
Feature list:
Compiled with Linaro GCC 6.2 ARM toolchain
kexec patch (Multirom support)
UV support
Working button longpress on wired headset
KCAL display control by savoca
Kernel Samepage Merging (KSM)
Simple Thermal driver by franciscofranco
Qualcomm's MPDecision hotplugging driver is replaced by Nvidia's CPUQuiet for better UX (backported 3.10 version)
CAF's CPU boost driver is replaced by sultanxda's cpu_input_boost driver
Tuned Interactive governor with franciscofranco patches (better freq scaling)
Custom camera blobs from OOS 3.x on any (almost) ROM!
Optimized Low Memory Killer (LMK)
Charging current control by boeffla
QoS patches from Linux 3.10 kernel
Optimized FSync algorithm and ability to disable it <-- Use with caution!
Many many other little adjustments (Over 660 changes have been made to the kernel source!)
Anykernel installation
Very smooth UI
Almost full KA support (WiP)
I've forgotten much, you can check my source on Github
Installation:
Download latest kernel and camera blobs zips (you have to flash blobs only once or after ROM reflash)
Reboot recovery
Flash them
Reboot
Contact me:
If you found any bugs/something doesn't work or you have feature request, contact me in Telegram group
Downloads:
Bacon (OOS 3.x blobs): link
Credits:
franciscofranco, flar2, eng.stk, arter97, sultanxda, lord boeffla and many other people: for contributing to Android kernel development
jcadduono for lazyflasher
@KalilDev for making template for this post because I'm lazy ass very busy
XDA:DevDB Information
ab123321 kernel, Kernel for the OnePlus One
Contributors
ab123321
Source Code: [url]https://github.com/ab123321/android_kernel_oneplus_one/[/URL]
FAQ:
Q: What should I flash first: blobs or kernel?
A: It doesn't matter
Q: Which ROMs are supported?
A: Nougat ROMs with CM kernel are supported. It's most of ROMs for Oneplus One (LOS, AICP, RR etc).
Q: I have issues!
A: Flash ROM => flash SuperSU/Magisk (optionally) => flash needed kernel and blobs
Q: I sill have issues!
A: Take logcat and kmsg and send me in PM (Telegram preferred)
Q: I flashed my favorite Boeffla kernel and camera stopped working! Help!
A: If you want properly working device with custom blobs, flash this kernel, not any other (except it is mentioned by kernel author).
Changelog:
4_2 (09.03.2017) - Simple GPU Algorithm is replaced by Adreno idler, switched from Anykernel to lazyflasher, performance improved much (battery may drain). Now you can flash kernel on ROM with sultanxda camera HAL
3 (17.02.2017) - sultanxda version of blobs is dropped, added lionheart governor, fully reworked default performance profile (better performance and battery life), default read ahead size is 512KB by default
2_1 (06.02.2017) - Little adjustments to sultanxda version (both kernel and blobs zips updated), no need to update if you're currently on beta2. Alpha2_1 version of OOS blobs
beta2 (01.02.2017) - SELinux is set to Permissive mode by default to fix most of camera problems; updates from LineageOS; some charging fixes
beta1 (26.01.2017) - Initial Release
Finally the magic begins.
The magic is out!
Good job
Interesting. So you're saying you can flash this kernel on any ROM and have SultanXDA's camera HAL?
Claudiosvs said:
Interesting. So you're saying you can flash this kernel on any ROM and have SultanXDA's camera HAL?
Click to expand...
Click to collapse
You are right
Do I need to flash sultan blobs separately on lineageos??
Thanks for this mileage.
Installed both zips over the latest resurrection remix 7.1.1 and unfortunately the camera keeps crashing when trying to take photos and videos. Tried with the main and secondary camera and also with flash on and off.
Also saw that 1080p and 2.5k video recording of the secondary camera is not present, so i guess is still a WIP
Logcat after the issues: https://drive.google.com/file/d/0B25zhqsy3xaYSHNQOGd1T1dkaEE/view?usp=drivesdk
Kernek log: https://drive.google.com/file/d/0B25zhqsy3xaYZjFhbEhnQ01CdFU/view?usp=drivesdk
Does this kernel have uv support?
mustang_ssc said:
Thanks for this mileage.
Installed both zips over the latest resurrection remix 7.1.1 and unfortunately the camera keeps crashing when trying to take photos and videos. Tried with the main and secondary camera and also with flash on and off.
Also saw that 1080p and 2.5k video recording of the secondary camera is not present, so i guess is still a WIP
Logcat after the issues: https://drive.google.com/file/d/0B25zhqsy3xaYSHNQOGd1T1dkaEE/view?usp=drivesdk
Kernek log: https://drive.google.com/file/d/0B25zhqsy3xaYZjFhbEhnQ01CdFU/view?usp=drivesdk
Click to expand...
Click to collapse
Thanks! Until I fix this, try to use ut with SELinux Permssive. 1080p and 2.5k formats support is on ROM side
Anyone with official LineageOS? Results? Haha
Gawd said:
Anyone with official LineageOS? Results? Haha
Click to expand...
Click to collapse
It works fine.
Fatsodonkey said:
Does this kernel have uv support?
Click to expand...
Click to collapse
No.
Btw, turn on permissive so that it can save pictures/not crash.
f41lbl0g said:
It works fine.
Click to expand...
Click to collapse
Including the camera? Like literally sultanxda's?
Gawd said:
Including the camera? Like literally sultanxda's?
Click to expand...
Click to collapse
Yes, its literally magical but it works. Try it for yourself.
Awesome kernel, great battery and slick performance.
So this is it. A prophetic hero who would arise to port Sultan's kernel works to Nougat.
Guess I'm keeping my OPO for another year.
flashed the kernel
also flashed the sultan camera libs, no camera crash experienced, so far great, i cant tell the difference though
Hey! Is this a caf kernel?
cudi90 said:
Hey! Is this a caf kernel?
Click to expand...
Click to collapse
It's CM kernel

[WALLEYE][8.1][4.4.109][BFQ] mKernel R5

README!!!
I'm in China right now, so won't show up at XDA very frequently. If you encounter any bugs, please leave an issue on GitHub
Introduction
This is a personal kernel for Pixel 2 aka walleye. The central goal for it is to provide overall performance improve without any more power consumption than stock kernel. It also allow you to modify the device in your own style, such as charge control.
Important
I'm not responsible for any damage caused by this kernel. Since I'm not even a XDA recognized developer, this kernel might be potentially harmful to your device.
Featrues
Catch up the latest Linux upstream
Catch up the latest EAS
BFQ added
CRNG random driver (from linux-mainline, 10x+ faster)
Wakelock control
AC Charging current control (current up to 3200mah)
Tunable USB fast charge
Some more TCP algorithms (westwood as default)
Use power efficient workqueues for several subsystems
Force SElinux in Permissive mode
SafetyNet patch included
GPU underclocked (180MHz)
Compiled by clang 5.0
Be able to *see* CPU voltage table
Some misc improve
HBM mode support
Adreno Boost support
WireGuard support
KCAL control
Wakeup Gestures (From EXKernel)
Some guides
Kernel Manager
Personally recommend EX Kernel Manager and KernelAdiutor
AC Charging current control
Google implement a feature to adjust charging current based on battery voltage and temperature, if you want to turn it off, use command
Code:
echo N > /sys/module/htc_battery/parameters/enable_ibat_adjust
Turn it on by
Code:
echo Y > /sys/module/htc_battery/parameters/enable_ibat_adjust
They also capped the max current to 2700ma, if you want to change it, use those two command
Code:
echo Y > /sys/module/htc_battery/parameters/enable_custom_fcc_ma
Code:
echo *the value you want* > /sys/module/htc_battery/parameters/custom_fcc_ma
Haptic strength control
Stock driver supports haptic strength control through altering the voltage like this. (Default value is 165)
Code:
echo *the value you want*> /sys/bus/i2c/devices/i2c-6/6-005a/od_clamp
Gonna map this to the common node so we can use kernel manager like EXKM to control
Changelog
R5:
[*]Linux 4.4.109 code merged
[*]Catch up to Jan's update
[*]Misc changes
R4:
Wakeup Gestures (Kang from EXKernel)
Linux 4.4.107 code merged
R3:
Compile with polly
Fix usb audio
Pick some opt commits from freak97
Linux 4.4.105 code merged
R2.1:
KCAL control added
Fix a derp
R2:
mr1 release code merged
Revert to stock binder
WireGuard support added
Linux 4.4.104 code merged
R1.1:
Fix a bug happen when you flash the kernel with magisk at the same time (if still can't boot when flash together, try flash separately)
mr1 preview code merged
Switch to clang 5
Commits
Download
Google Drive
Install
The kernel is packed with AnyKernel2, so just flash the zip file in TWRP
You can extract the zImage and dtbo.img out and manually flash them if you want
Kernel Source
https://github.com/msdx321/android_kernel_google_wahoo
Credits and Thanks
Too many to list, please check my github commits for credits
Special thanks to @nathanchance for his notes about update to linux-stable (quite useful, encourage anyone who want to compile his own kernel read this)
Bug Report
Leave an issue on my github repo or send me an email
Reserved
Install same as others using magisk to modify boot.img?
Sent from my [device_name] using XDA-Developers Legacy app
gvsukids said:
Install same as others using magisk to modify boot.img?
Sent from my [device_name] using XDA-Developers Legacy app
Click to expand...
Click to collapse
It's packed with AnyKernel2 so boot into TWRP and flash it
The more the merrier,??
What's the reasoning for selinux permissive? V4A?
Sent from my Pixel 2 using Tapatalk
joetheshmo said:
What's the reasoning for selinux permissive? V4A?
Sent from my Pixel 2 using Tapatalk
Click to expand...
Click to collapse
Just a personal flavor, some features rely on permissive such reading GPU loads
Hey,
Plans to add any sort of audio control ?
About time!
Ashray_Vk said:
Hey,
Plans to add any sort of audio control ?
Click to expand...
Click to collapse
Working on haptic and audio control right now
nathanchance said:
About time!
Click to expand...
Click to collapse
:highfive: :highfive: :highfive:
Do I flash the zimage like a boot image? What should I make it? Also I don't see the dtbo image. Or should I just flash twrp at this point?
I just booted into twrp so nevermind haha. Thanks works great so far!
slyr114 said:
Do I flash the zimage like a boot image? What should I make it? Also I don't see the dtbo image. Or should I just flash twrp at this point?
I just booted into twrp so nevermind haha. Thanks works great so far!
Click to expand...
Click to collapse
The zip file is twrp flashable, you can also extract the zimage out and using fastboot manually flash it. For dtbo, R2 doesn't have one since R2 kernel doesn't need it. R2.1 has a dtbo image and need it.
I know it may sound weird, but my headphones aren't getting detected, any logs I can get for that?
Headphone usb Adapter not working
I habe the same Problem, my headphone Adapter wont work, even in save Mode. Maybe it's magisk though or 8.1 and not the kernel. I will Flash Stock kernel with safetynet fix later or timorrow and report back.
Edit: Just flashed the "Flash" Kernel and can report Headphone adapter works again. I'll just stick to flash kernel, because i'm lazy.
Will this kernel work with taimen too?
Ashray_Vk said:
I know it may sound weird, but my headphones aren't getting detected, any logs I can get for that?
Click to expand...
Click to collapse
SeaMax said:
I habe the same Problem, my headphone Adapter wont work, even in save Mode. Maybe it's magisk though or 8.1 and not the kernel. I will Flash Stock kernel with safetynet fix later or timorrow and report back.
Edit: Just flashed the "Flash" Kernel and can report Headphone adapter works again. I'll just stick to flash kernel, because i'm lazy.
Click to expand...
Click to collapse
Sorry guys, it's a bug and has been fixed.:crying:
msdx321 said:
Sorry guys, it's a bug and has been fixed.:crying:
Click to expand...
Click to collapse
Thanks for notifying , is that fix upcoming in the next update ?
Ashray_Vk said:
Thanks for notifying , is that fix upcoming in the next update ?
Click to expand...
Click to collapse
Sorry, just noticed the R3. Testing it out
Ashray_Vk said:
Sorry, just noticed the R3. Testing it out
Click to expand...
Click to collapse
How's it going?

[KERNEL][OREO] [SM-T830/T835] [2019-11-21] Modesty 1.0.0 [Linux 4.4.202] [ARK4]

Modesty - a modest custom kernel for the Samsung Tab S4
Modesty aims to provide a mildly appealing and reasonable alternative to the stock 4.4.78 kernel that comes with The Tab S4. In its pursuit of being both mildly appealing and reasonable, it will eschew features that could compromise device stability, whilst gleefully embracing low-risk, self-contained enhancements. In other words, your lowest expectation should be that this kernel will be at least as stable as the stock kernel.
Since there are currently no other custom kernel projects supporting the Tab S4, there isn't really any previous device-specific work to build on. Development of this kernel is therefore likely to be slow and steady.
"Why is this kernel called Modesty? That's crap! Why not Wolverine, Intrepid or Jupiter?"
Because it's just a operating-system kernel, not a turbo-charged supercar or a mission into outer space. Even as operating-system kernels go, this one is pretty dull. Besides, I'm a weary curmudgeon in his fifties, not a teenager.
This project has the modest aim of modestly enhancing the pleasure you derive from your Tab S4 and is therefore modestly named Modesty.
Key characteristics
Supports both the wi-fi only (T830) and wi-fi/LTE (T835) models.
Forked from Samsung's pristine kernel source code (Linux 4.4.78 for ARGH firmware at time of launch).
Regular merging of the upstream Linux kernel's linux-4.4.y branch (4.4.161 at time of public launch).
Regular merging of Samsung's updates to its modified kernel source as they are made available.
Includes @savoca's KCAL advanced colour/gamma control driver.
Includes @flar2's sound control driver to manage headphone and microphone gain.
Disables a huge amount of tracing and logging features inexplicably left enabled by Samsung in the stock release kernel. These debugging features have no place outside engineering builds.
Packed into a boot.img (boot image) taken directly from Samsung's latest stock firmware and kept as close to the original as possible. No obscure boot-time kernel configuration is stashed away here, and no changes are made to any other part of the file system at either install time or run time.
Provides a fully automated installer, with the option of interactive installation to allow manual selection of features and the ability to automatically root the device with Magisk in the post-installation phase.
Includes WireGuard VPN support (version 0.0.20180818 at the time of public launch), which will be updated as available.
Includes @Lord Boeffla's generic kernel wakelock blocker. The conservative default block-list is: qcom_rx_wakelock and NETLINK.
Utilises Westwood+ TCP congestion algorithm by default.
Includes Veno TCP congestion algorithm.
SELinux operates in enforcing mode and cannot be dynamically switched to permissive mode.
FAQ
Q. Is this kernel still actively developed?
A. No. The final ianmacd release was v1.0.0 on 21st November 2019 and no-one else has picked up maintenance of the project.​
Q. Will this kernel also run on Android 9.0 (Pie) devices?
A. No. Modesty targets Android 8.1 (Oreo) and there was never an intention to update it for 9.0 (Pie).​
Q. Can I overclock or underclock the CPU using this kernel?
A. No.​
Q. How does interactive installation mode work?
A. If the ZIP file name contains the string _interactive or a dot-file called .modesty_interactive is present in the root of the external SD card, interactive installation mode is triggered. Please note that this mode overrides any selections implied by the archive name or the presence of dot-files on the file-system.
In interactive mode, you will be asked whether to root the device afterwards with Magisk. Selections are made using the Volume buttons. Just follow the on-screen prompts.​
Q. Can I safely block wakelock X?
A. Perhaps. However, unless you know what a particular wakelock does and are certain that it is causing an actual problem on your device, I suggest you leave it alone.​
Q. Why is this kernel labelled beta? Is it safe to use? And who are you, anyway? Can you be trusted?
A. My T830 has been running this kernel every day since I first rooted it, and I can therefore personally vouch for its stability on this model.
A couple of users have reported Modesty running well on the T835. Initially, it was reported that the kernel did not boot on this model, but after trying several test kernels, the user in question discovered that his machine had a non-standard firmware installation. Once this situation was remedied, Modesty booted and worked as designed.
As the person who built the kernel, I know exactly what's in it, and therefore the only risk I'm exposing myself to when I run it is that of my own incompetence. That's not true for you, however, and you should exercise due caution and at least pause for a moment to consider what you are installing, and the far-reaching powers you are about to grant this unaudited code over your device. Although I link to the source code below, you have only my word for it that this bears any resemblance to the kernel actually provided in the installer.
There are likely to be many iterations of this kernel before it sees a 1.0 release. Features may be added or removed along the way, although there is no clear roadmap at this point in time. Development will go where the needs of the users take it.
Please see the Installation section below for an important note regarding the use of this kernel in combination with stock (i.e. unmodified) Samsung firmware.​
Q. Can I safely root this kernel?
A. Of course. What use would it be if you couldn't? I recommend Magisk for the task. It has a few minor issues, but as a project is very much alive, something that cannot be said about its peers. Magisk has arguably now established itself as the de facto root solution for Android devices.
It just so happens that I also produce my own builds of Magisk, which you are welcome to use. These are release builds (as opposed to debugging builds), produced from my own fork of @topjohnwu's original source, often augmented with patches. You can use anyone's builds, though.
Again, these builds work for me on various Samsung devices, but they are unofficial and you should approach them with fitting caution.​
Q. Can I install Magisk at the same time as Modesty?
A. Yes. The Modesty installer allows you to automatically root your device with Magisk following installation of Modesty..
To make use of this facility, either rename the Modesty zip file to contain the string _magisk or create a file called .modesty_magisk in either the root of your external SD card or in the standard Download directory of the internal SD card. Alternatively, you can utilise interactive installation mode. See above for details.
If any of these trigger conditions is met, the installer will look in the standard internal Download directory as well as in ./Magisk (if present) on the external SD card (if present) for a suitable Magisk zip file to install. Preference is given to versioned files matching the glob Magisk-v*, in which case the latest according to lexical sort order will be used. If none is found, the installer then looks for unversioned release builds (e.g. official Canary channel release builds) called magisk-release.zip in the same locations, selecting the one with the most recent timestamp. If none is found, the installer will then try to find unversioned debug builds (e.g. official Canary channel debug builds) called magisk-debug.zip, again picking the one with the most recent timestamp. Finally, the installer falls back to looking for the most recent file called Magisk.zip or magisk.zip. If still no files have been found by this stage, chaining of Magisk is abandoned.
For example:
Code:
star2lte:/ $ ls -l /storage/0000-0000/.modesty_magisk
-rwxrwx--x 1 root sdcard_rw 0 2018-09-15 14:31 /storage/0000-0000/.modesty_magisk
star2lte:/ $ ls /storage/0000-0000/Magisk/Magisk-* | tail -n 3
/storage/0000-0000/Magisk/Magisk-v17.2-2018091001-ianmacd.zip
/storage/0000-0000/Magisk/Magisk-v17.2-2018091201-ianmacd.zip
/storage/0000-0000/Magisk/Magisk-v17.2-2018091501-ianmacd.zip
When you flash the Modesty archive in TWRP, the most recent version of Magisk that could be found will now be used to automatically root your kernel, i.e. Magisk-v17.2-2018091501-ianmacd.zip in this example.​
Q. Why doesn't Modesty have its own Telegram group?
A. Because my experience of Android-themed Telegram groups is that they invariably degenerate into seething cesspits of rudeness, ignorance, superstition and — on a good day — pseudo-science. I don't wish to police such a den of iniquity. Of course, it's a free world (or so I still like to kid myself), so you are at liberty to create your own Telegram group for Modesty if you wish. Just please don't invite me to it.​
Building
Building the kernel from source is beyond the scope of this document. If you want to build this kernel from scratch, for example to change its configuration, start with this handy reference tailored to building kernels for Android.
Download
See posting #2 in this thread for links to the latest and all previous versions.
Known Issues
Bluetooth HID (input) devices do not work.
Versions 0.99.11 to 0.99.22 contained a bug that caused Bluetooth HID (input) devices, such as mice, keyboards and gamepads, not to function. They could be paired with the tablet, but their input was not recognised. This bug was finally traced and fixed in 0.99.23.​
Installation
Make a back-up of your existing boot partition using the custom recovery environment provided by TWRP. If your device doesn't yet have TWRP, you will need to install it first. Then, use it to flash the Modesty ZIP file. The boot image will automatically be installed in the boot partition of your device.
If your device has unmodified Samsung firmware, you will encounter problems with Bluetooth (namely delayed initialisation and forgotten pairings) after installing this or any other custom kernel. To remedy this, you will need to patch your system with modified libsecure_storage.so libraries. Some custom kernel installers actually install these without telling you, overwriting your system libraries and transparently circumventing the problem before you can run into it. This approach necessarily modifies your device's file-system, however, and that may not be what you want. At the very least, the user should be made aware what is happening to his device.
For this reason, I have instead prepared a companion Magisk module that achieves the same goal without modifying the file-system. This will allow you to run a custom kernel (not just this one, but any custom kernel) on pristine stock firmware without any Bluetooth issues. The module can be found in the official Magisk module repository, accessible from Magisk Manager on your tablet. If you install this Magisk module, you may wish to also disable the secure_storage_daemon by editing /system/etc/init/secure_storage_daemon.rc (change start to stop), as it no longer serves a purpose.
In a similar vein, you may encounter authentication errors when connecting to wireless networks after installing this or any other custom kernel. This problem is not serious and easily remedied by re-entering your passphrase for the networks you use.
Finally, if SecurityLogAgent notifies you that unauthorised actions have been detected, do not be alarmed. This is a normal consequence of having installed a custom kernel. You may wish to disable SecurityLogAgent to avoid being repeatedly notified..
Whilst the above issues are the only ones you can expect to encounter when running this kernel vs. the stock Samsung kernel, they may sound like more trouble than they're worth. In that case, you might be happier just sticking to Samsung's stock kernel. The company supplies a perfectly good kernel straight from the factory.
Configuration
You are encouraged to use either @morogoku's excellent MTweaks (a modified version of Kernel Aduitor) or @flar2's EX Kernel Manager to manage the features provided by this kernel.
Source code
Modesty's GitHub repository.
References
A useful guide to CPU governors, I/O schedulers (and more).
For more information on the some of the individual schedulers included in this kernel, you can also look under Documentation/block in the kernel source.
The WireGuard user guide, control app, home page and source code.
Credits
Thank you to everyone in the Linux kernel universe for getting us this far. Within the Android development community, I am grateful to the following people for their time-saving contributions:
@osm0sis for Android Image Kitchen, which has saved me a huge amount of work in packing and unpacking boot images.
An honorary mention must go to @Chainfire, the extent of whose benefaction to the Android community is still not fully understood or appreciated in some quarters.
Change log
v1.0.0 (final ianmacd release) (2019-11-21)
Kernel proclaimed stable. Version number incremented. No code changes since v0.99.49.
v0.99.49 (2019-11-16)
Updated to Linux 4.4.202.
v0.99.48 (2019-11-13)
Updated to Linux 4.4.201.
v0.99.47 (2019-11-11)
Updated to Linux 4.4.200.
v0.99.46 (2019-11-06)
Updated to Linux 4.4.199.
v0.99.45 (2019-10-31)
Updated to Linux 4.4.198.
v0.99.44 (2019-10-19)
Updated to Linux 4.4.197.
v0.99.43 (2019-10-08)
Updated to Linux 4.4.196.
v0.99.42 (2019-10-07)
Updated to Linux 4.4.195.
v0.99.41 (2019-09-22)
Updated to Linux 4.4.194.
v0.99.40 (2019-09-16)
Updated to Linux 4.4.193.
v0.99.39 (2019-09-11)
Updated to Linux 4.4.192.
Fixes unavailability of external SD card in Modesty 0.99.38.
v0.99.38 (2019-09-08) Release withdrawn (External SD card unavailable)
Updated to Linux 4.4.191.
v0.99.37 (2019-08-26)
Updated to Linux 4.4.190.
v0.99.36 (2019-08-12)
Updated to Linux 4.4.189.
v0.99.35 (2019-08-07)
Updated to Linux 4.4.188.
v0.99.34 (2019-08-05)
Updated to Linux 4.4.187.
v0.99.33 (2019-07-23)
Updated to Linux 4.4.186.
v0.99.32 (2019-07-12)
Updated to Linux 4.4.185.
v0.99.31 (2019-06-28)
Updated to Linux 4.4.184.
v0.99.30 (2019-06-22)
Updated to Linux 4.4.183.
v0.99.29 (2019-06-18)
Updated to Linux 4.4.182.
v0.99.28 (2019-06-12)
Updated to Linux 4.4.181.
v0.99.27 (2019-05-17)
Updated to Linux 4.4.180.
v0.99.26 (2019-04-28)
Updated to Linux 4.4.179.
v0.99.25 (2019-04-07)
Updated to Linux 4.4.178.
v0.99.24 (2019-03-26)
Updated to Linux 4.4.177.
Build only the latest revision of the DTB.
v0.99.23 (2019-03-02)
Fixed bug, introduced in v0.99.11, that caused input from Bluetooth HID devices, such as keyboards, mice and gamepads to be ignored.
v0.99.22 (2019-02-23)
Updated to Linux 4.4.176.
v0.99.21 (2019-02-20)
Updated to Linux 4.4.175.
v0.99.20 (2019-02-11)
Updated to Linux 4.4.174.
v0.99.19 (2019-02-08)
Updated to Linux 4.4.173.
v0.99.18 (2019-01-26)
Updated to Linux 4.4.172.
v0.99.17 (2019-01-17)
Updated to Linux 4.4.171.
v0.99.16 (2019-01-13)
Updated to Linux 4.4.170.
v0.99.15 (2018-12-30)
Rebased on ARK4 kernel source code and boot images.
v0.99.14 (2018-12-23)
Updated to Linux 4.4.169.
Merged four more UPSTREAM commits from android-4.4 kernel branch.
v0.99.13 (2018-12-13)
Updated to Linux 4.4.167.
Merged selected BACKPORT and UPSTREAM commits from android-4.4 kernel branch.
v0.99.12 (2018-12-05)
Updated to Linux 4.4.166.
Realtek USB Ethernet driver upgraded from v2.08.0 to v2.10.00.
v0.99.11 (2018-11-29)
Updated to Linux 4.4.165.
KCAL advanced colour/gamma control driver optimisation.
Added @flar2's sound control driver for controlling headphone and microphone gain. (Configure with MTweaks or EX Kernel Manager).
v0.99.10 (2018-11-21)
Updated to Linux 4.4.164.
Added KCAL advanced colour/gamma control driver. (Configure with MTweaks or EX Kernel Manager).
Lots of tracing and debug logging disabled, further reducing kernel size.
CONFIG_DISPLAY_USE_INFO
CONFIG_SEC_DISPLAYPORT_LOGGER
CONFIG_FB_MSM_MDSS_XLOG_DEBUG
CONFIG_SEC_FILE_LEAK_DEBUG
CONFIG_SEC_DEBUG_USER
CONFIG_SEC_DEBUG_SUMMARY
CONFIG_SCSI_UFSHCD_CMD_LOGGING
CONFIG_MSM_SMEM_LOGGING
CONFIG_PROFILING
CONFIG_DEBUG_INFO
CONFIG_SCHED_DEBUG
CONFIG_SEC_PM_DEBUG
CONFIG_CORESIGHT
Built as monolithic kernel (i.e. without CONFIG_MODULES).
Built as relocatable code (CONFIG_RELOCATABLE_KERNEL).
Assembler symbols stripped (CONFIG_STRIP_ASM_SYMS set).
Embedded kernel config (reported via /proc/config.gz) now falsely reports stock settings to allow disabling of superfluous kernel features that otherwise cause grave Android System warning on boot.
v0.99.9 (2018-11-13)
Rebased on ARJ3 kernel source code and boot images.
v0.99.8 (2018-11-10)
Updated to Linux 4.4.163.
More than 100 fixes applied from upstream AOSP android-4.4 and android 4.4-o branches.
Lots of tracing and debug logging disabled:
CONFIG_IPC_LOGGING (debug logging for IPC drivers)
CONFIG_QCOM_RTB (register tracing)
CONFIG_TRACER_PKT (for tracing IPC protocols)
CONFIG_FTRACE (kernel tracing infrastructure)
CONFIG_CPU_FREQ_SWITCH_PROFILER (CPU frequency switch profiler)
CONFIG_TRACING_EVENTS_GPIO (traces GPIO subsystem)
Fixes to allow kernel to build when above logging and tracing options are disabled.
v0.99.7 (2018-10-30)
Rebased on ARH5 kernel source code.
Reworked the v4l2 fix that restores liboemcrypto-dependent apps to working state.
v0.99.6 (2018-10-28)
v4l2 fixes to restore liboemcrypto-dependent apps to working state.
v0.99.5 (2018-10-21)
Updated to Linux 4.4.162.
v0.99.4 (2018-10-19)
Initial public release, based on Linux 4.4.161.
v0.99.3
Internal build, based on Linux 4.4.160.
v0.99.2
Internal build, based on Linux 4.4.159.
v0.99.1
Initial internal build, based on Linux 4.4.78.
It begins! Awesome to finally see a custom kernel for the Tab S4.
I want to test for you once I can get root back
ianmacd said:
Change log
v0.99.4 (2018-10-19)
Initial public release, based on Linux 4.4.161. Caution: This kernel remains completely untested on the T835.
v0.99.3
Internal build, based on Linux 4.4.160.
v0.99.2
Internal build, based on Linux 4.4.159.
v0.99.1
Initial internal build, based on Linux 4.4.78.
Click to expand...
Click to collapse
Flashed on T835 device doesnt even get past the Boot (custom device) screen is there a way to get logs without using a computer?
Sent from my Samsung SM-G950F using XDA Labs
dr460nf1r3 said:
Flashed on T835 device doesnt even get past the Boot (custom device) screen is there a way to get logs without using a computer?
Click to expand...
Click to collapse
I'll look into it this evening. I'm just about to get off a plane.
Were there any errors when installing? Was your device properly detected as a T835?
Sent from my SM-G965F using XDA Labs
ianmacd said:
I'll look into it this evening. I'm just about to get off a plane.
Were there any errors when installing? Was your device properly detected as a T835?
Click to expand...
Click to collapse
Installing just fine, correctly detected as well.
Sent from my Samsung SM-G950F using XDA Labs
dr460nf1r3 said:
Installing just fine, correctly detected as well.
Click to expand...
Click to collapse
I've gone through the ramdisk of the T835's boot image with a fine-tooth comb and can find nothing untoward. I also verified that I properly removed the dm-verity flag from the T835's device tree.
There are actually very few source code differences between the T830 and T835. Both can be built from a single tree. The only differences lie in the kernel config file and the device tree, but I am building with the default T835 configuration, and with the proper device tree for that device.
Let's try at least ruling out my installer code. Please image-flash this new boot image[/i] to your device and tell me if it boot-loops. If it does, my installer isn't the problem, because it's only used for a ZIP flash. I've already checked the installer code and can't see any bugs, so I don't think the issue lies there.
Can you also please tell me which version of the firmware your device is running? Possibly there's an issue there, too. Samsung has so far released the source to the ARGH kernel only. This seems to work fine on my ARH5 firmware, but it's uncertain whether it would still work on something based on ARI*, and I've seen that a couple of countries do now have ARI firmware available. Mind you, even if it wasn't compatible, it should still get as far as booting.
Anyway, please test that boot image and let me know your firmware version.
While I soldier on with the issues afflicting the T835 build, can anyone else verify the T830 build as working for them?
Don't be shy; I'm running it on my own device, so I'm certain that build boots.
ianmacd said:
While I soldier on with the issues afflicting the T835 build, can anyone else verify the T830 build as working for them?
Don't be shy; I'm running it on my own device, so I'm certain that build boots.
Click to expand...
Click to collapse
Sorry for the noob question if i flash this kernal on my SM-T835 will i lose DEX ? Sorry i'm not quite understanding what KERNEL does ? Thanks in advance!
N1NJATH3ORY said:
Sorry for the noob question if i flash this kernal on my SM-T835 will i lose DEX ? Sorry i'm not quite understanding what KERNEL does?
Click to expand...
Click to collapse
When the kernel is working as intended, you won't lose DeX, but it currently isn't even booting on the T835.
Only those who are able to assist in debugging the current boot failure should install the T835 build at this time.
The T830 build, on the other hand, is rock solid for me, and I encourage anyone who is capable of recovering from an unexpected bootloop to try it out.
Version 0.99.5 released.
This release updates the kernel to the latest upstream Linux.
T830 owners, install at will. T835 owners, beware: The previous release has been reported unbootable on this model, and this release is likely to be similarly afflicted. Investigations are ongoing. Until this issue is resolved, the whole project has been downgraded to alpha status.
Change log
Updated to Linux 4.4.162. Caution: This release is likely to cause a bootloop on the T835.
ianmacd said:
I've gone through the ramdisk of the T835's boot image with a fine-tooth comb and can find nothing untoward. I also verified that I properly removed the dm-verity flag from the T835's device tree.
There are actually very few source code differences between the T830 and T835. Both can be built from a single tree. The only differences lie in the kernel config file and the device tree, but I am building with the default T835 configuration, and with the proper device tree for that device.
Let's try at least ruling out my installer code. Please image-flash this new boot image[/i] to your device and tell me if it boot-loops. If it does, my installer isn't the problem, because it's only used for a ZIP flash. I've already checked the installer code and can't see any bugs, so I don't think the issue lies there.
Can you also please tell me which version of the firmware your device is running? Possibly there's an issue there, too. Samsung has so far released the source to the ARGH kernel only. This seems to work fine on my ARH5 firmware, but it's uncertain whether it would still work on something based on ARI*, and I've seen that a couple of countries do now have ARI firmware available. Mind you, even if it wasn't compatible, it should still get as far as booting.
Anyway, please test that boot image and let me know your firmware version.
Click to expand...
Click to collapse
Firmware Version ist arh5 and after flashing your img the device still constantly reboots on the start screen and doesnt even get to the boot Screen
Sent from my Samsung SM-G950F using XDA Labs
dr460nf1r3 said:
Firmware Version ist arh5 and after flashing your img the device still constantly reboots on the start screen and doesnt even get to the boot Screen
Click to expand...
Click to collapse
Thanks. That absolves the installer of any wrongdoing, at least.
Something is fundamentally wrong with the kernel for the T835.
The boot image is taken from stock firmware, and modified just enough to allow a custom kernel to boot. I very much doubt the problem lies there. A virtually identical image works for the T830.
The kernel config used is the one supplied by Samsung. The only modifications made to it are the same ones I made to the T830's.
I think my next step will be to produce a kernel built without downstreaming the 4.4.y Linux branch, so back to 4.4.78. If that works, it will indicate that an error affecting only the T835 was introduced during all of my merging of the upstream kernel.
I'll post again when I've built the kernel, which won't be for a few hours, as I'm on holiday at the moment.
Sent from my SM-G965F using XDA Labs
ianmacd said:
I think my next step will be to produce a kernel built without downstreaming the 4.4.y Linux branch, so back to 4.4.78. If that works, it will indicate that an error affecting only the T835 was introduced during all of my merging of the upstream kernel.
Click to expand...
Click to collapse
OK, @dr460nf1r3, please try this new T835 build.
This is rewound to 4.4.78, with just a few extra cherry-picked commits to enable it to build cleanly and boot without triggering dm-verity.
In other words, this kernel should be 99% identical to the one that shipped with the machine. This assumes that the source as supplied by Samsung was actually used to build the stock kernel.. They have been known to publish sources that don't match what's on the machine.
ianmacd said:
OK, @dr460nf1r3, please try this new T835 build.
This is rewound to 4.4.78, with just a few extra cherry-picked commits to enable it to build cleanly and boot without triggering dm-verity.
In other words, this kernel should be 99% identical to the one that shipped with the machine. This assumes that the source as supplied by Samsung was actually used to build the stock kernel.. They have been known to publish sources that don't match what's on the machine.
Click to expand...
Click to collapse
Thanks, flashing now will report back in a few minutes
Sent from my Samsung SM-G950F using XDA Labs
---------- Post added at 05:44 PM ---------- Previous post was at 05:17 PM ----------
ianmacd said:
OK, @dr460nf1r3, please try this new T835 build.
This is rewound to 4.4.78, with just a few extra cherry-picked commits to enable it to build cleanly and boot without triggering dm-verity.
In other words, this kernel should be 99% identical to the one that shipped with the machine. This assumes that the source as supplied by Samsung was actually used to build the stock kernel.. They have been known to publish sources that don't match what's on the machine.
Click to expand...
Click to collapse
Did not work still the same issue.. flashed via twrp to boot partition. Noob question, the boot backup i got is 64mb while your kernel hardly has 25.. whats going on here?
Sent from my Samsung SM-G950F using XDA Labs
dr460nf1r3 said:
Did not work still the same issue.. flashed via twrp to boot partition.
Click to expand...
Click to collapse
Well, that's disappointing. I was hoping that it was my screw-up, rather than Samsung's, but at this point almost everything I've done has been backed out and it still won't boot.
Noob question, the boot backup i got is 64mb while your kernel hardly has 25.. whats going on here?
Click to expand...
Click to collapse
Good question.
Your back-up is of the entire partition, including the area with no data on it, so you're getting a file the same size as the partition itself. My boot image contains just the data segment, so it's smaller.
If you pull the stock boot image from the AP file of Samsung's firmware, you'll see that it's a very similar size to mine (slightly smaller, actually):
Code:
$ unzip -p T835XXU1ARH5_T835OXM1ARH5_PHN.zip AP_T835XXU1ARH5_CL14008523_QB19263559_REV00_user_low_ship_MULTI_CERT_meta.tar.md5| tar xf - -O boot.img.\*lz4 | lz4 -dc > boot.img
$ ls -l boot.img
-rw-rw-r--. 1 ianmacd ianmacd 23593232 Oct 21 22:01 boot.img
$ file boot.img
boot.img: Android bootimg, kernel (0x8000), ramdisk (0x2000000), page size: 4096, cmdline (console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_le)
So, what now?
I'll see which other minor changes I can back out, in an effort to arrive at a kernel built from source that is as close to stock as possible. If you're wondering Why doesn't he just build from pristine sources?, the answer is: Because Samsung's source code won't even build out of the box. Many of the kernel header files are simply not in the expected locations. Alas, this is a fairly common problem with Samsung's kernel source code releases.
I suspect the solution to this problem may actually lie in changes that have yet to be made, rather than changes made that need to be reverted. In other words, the T835 may require some kernel modifications or configuration that the T830 doesn't. Theoretically, a kernel compiled from Samsung's pristine sources should just work, but that's starting to look unlikely now.
I'm hoping that I can enable/disable a few further options in the kernel config, rebuild and produce a kernel that works for you. If, however, the problem is that the source itself is faulty, we may have to wait for a future release by Samsung to give us something that compiles into a working kernel.
But I don't intend to throw in the towel on the T835 just yet. There are still a few more things we can try.
ianmacd said:
Well, that's disappointing. I was hoping that it was my screw-up, rather than Samsung's, but at this point almost everything I've done has been backed out and it still won't boot.
Good question.
Your back-up is of the entire partition, including the area with no data on it, so you're getting a file the same size as the partition itself. My boot image contains just the data segment, so it's smaller.
If you pull the stock boot image from the AP file of Samsung's firmware, you'll see that it's a very similar size to mine (slightly smaller, actually):
So, what now?
I'll see which other minor changes I can back out, in an effort to arrive at a kernel built from source that is as close to stock as possible. If you're wondering Why doesn't he just build from pristine sources?, the answer is: Because Samsung's source code won't even build out of the box. Many of the kernel header files are simply not in the expected locations. Alas, this is a fairly common problem with Samsung's kernel source code releases.
I suspect the solution to this problem may actually lie in changes that have yet to be made, rather than changes made that need to be reverted. In other words, the T835 may require some kernel modifications or configuration that the T830 doesn't. Theoretically, a kernel compiled from Samsung's pristine sources should just work, but that's starting to look unlikely now.
I'm hoping that I can enable/disable a few further options in the kernel config, rebuild and produce a kernel that works for you. If, however, the problem is that the source itself is faulty, we may have to wait for a future release by Samsung to give us something that compiles into a working kernel.
But I don't intend to throw in the towel on the T835 just yet. There are still a few more things we can try.
Click to expand...
Click to collapse
Thanks for explaining everything for me. Id like to help you were i can but i dont have a computer by my hands right now for the next time
Sent from my gts4llte using XDA Labs
dr460nf1r3 said:
Thanks for explaining everything for me. Id like to help you were i can but i dont have a computer by my hands right now for the next time
Click to expand...
Click to collapse
Here's a new build to try. This one reverts the last few changes I originally made to the T835's kernel configuration before building. This is as close to stock as possible, whilst still being able to build.
If this doesn't boot, it pretty much means that Samsung has supplied code for the T835 that simply will not compile into a working kernel. At that point, we'll probably have to wait for updated sources. I already have a request pending with Samsung for the release of the BRI sources.
Just to be clear, the current status quo as I understand it is that the Samsung logo never starts to be written from left to right. You never get past the static screen with the device name and the word Custom. Is that correct?
ianmacd said:
Here's a new build to try. This one reverts the last few changes I originally made to the T835's kernel configuration before building. This is as close to stock as possible, whilst still being able to build.
If this doesn't boot, it pretty much means that Samsung has supplied code for the T835 that simply will not compile into a working kernel. At that point, we'll probably have to wait for updated sources. I already have a request pending with Samsung for the release of the BRI sources.
Just to be clear, the current status quo as I understand it is that the Samsung logo never starts to be written from left to right. You never get past the static screen with the device name and the word Custom. Is that correct?
Click to expand...
Click to collapse
Im sorry to tell you but this doesnt boot either in fact it doesnt even reboot the static screen. Your right about the current status quo sadly.
Sent from my Samsung SM-G950F using XDA Labs

[Kernel][04.01.2022][Android 11] Kirisakura 1.0.0_R for Asus Rog Phone 2 aka Yoda

Kirisakura-Kernel for the Asus Rog Phone 2
Hello everyone,
I proudly present Kirisakura-Kernel made for the Asus Rog Phone 2 aka Yoda!
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!
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. In fact this may be one of the only 4.14 msm kernels with a fully working Kernel-CFI implementation and CFI-Violations fixed on a smartphone.
The only kernels made by OEMs offering this security feature are the ones for the Pixel 3 and Pixel 4 devices.
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.
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 855+ that´s built into the Asus Rog Phone 2.
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 others 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.
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 11 and intended for use on Asus Stock Rom
- compiled with Clang 13.0.1 and built with -O3 speed optimizations
- Linux-Stable-Upstream included to 4.14.243
- CAF-Upstream 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 @osm0sis
- option for 144hz refresh rate (Android 10 only)
- option to improve visibility in dark scenes
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 @RenderBroken and @joshuous )
- 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
- arm64: lse: Prefetch operands to speed up atomic operations (thanks to @kdrag0n )
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 @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.)
- 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
- f2fs fix to prevent data loss in case of sudden power failure
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
- remove unused mem regions to free more RAM (thanks to @kdrag0n )
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
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 @luca020400)
Requirements
- unlocked Bootloader
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
- magisk root
- a backup of boot.img and dtbo.img to be able to restore to stock. you should be able to do this easily via TWRP.
How to flash the Kernel:
1. Download the latest kernel.zip and make sure you have properly updated to the latest Asus Firmware
1a. Optional: While it may not be necessary all times, you may want to restore stock boot.img and dtbo.img, re-root with magisk and optionally install twrp.zip if coming from another kernel. Before reporting issues make sure you do that! Thank you!
2. Make sure to use latest Magisk stable. (not the latest canary!)
3. Flash the kernel.zip via latest EXKM or FKM app, or TWRP (haven´t tested TWRP myself as I don´t need it) and do a full reboot.
4. Flash the kernel again. This step is needed because flashing the kernel disables verity on vendor in order to modify two files. Disabling verity takes a reboot. Flashing the second time allows the two files to be changed correctly. This step is necessary if you flashed a firmware update. (This step should not be necessary when updating my kernel, if you are already running it, but if you want to be on the safe side just flash it twice)
5. Reboot and profit. It will take around 15 seconds for the kernel and the system to execute all changes done by flashing the kernel.zip. After 15 seconds 120fps will kick in, if you use 120fps setting!
DOWNLOAD:
Download is located always in this folder:
https://www.androidfilehost.com/?w=files&flid=303784
Important: Read after Download
Please take a look at the second post after flashing the kernel!
Changelog:
Android 9
1.0.0 Initial Release
1.0.2 https://forum.xda-developers.com/showpost.php?p=81389411&postcount=33
Android 10
2.0.0 https://forum.xda-developers.com/showpost.php?p=82238713&postcount=141
2.1.0 https://forum.xda-developers.com/showpost.php?p=82317211&postcount=191
2.6.0 https://forum.xda-developers.com/showpost.php?p=82495531&postcount=252
2.6.2 https://forum.xda-developers.com/showpost.php?p=82560081&postcount=261
2.6.4 https://forum.xda-developers.com/showpost.php?p=82602927&postcount=267
2.7.2 https://forum.xda-developers.com/showpost.php?p=82834055&postcount=281
2.7.5 https://forum.xda-developers.com/showpost.php?p=82837791&postcount=285
2.9.0 https://forum.xda-developers.com/showpost.php?p=83100663&postcount=306
3.0.6 https://forum.xda-developers.com/showpost.php?p=83526987&postcount=391
3.1.0 https://forum.xda-developers.com/showpost.php?p=83606511&postcount=406
3.1.3 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84124933
3.1.5 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84617449
3.2.0 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84717691
3.2.1 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84799241
3.2.2 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-85145887
3.2.3 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-85431627
Android 11
1.0.0_R https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-86201183
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:
Asus for the Rog Phone 2
@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 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 too
@topjohnwu for magisk!
@osm0sis for anykernel!
XDA:DevDB Information
Kirisakura Kernel, Kernel for the ASUS ROG Phone II
Contributors
Freak07
Source Code: https://github.com/freak07/Kirisakura_Yoda
F.A.Q:
Question: Why does the kernel version show as "unavailable" in settings after flashing it.
Answer: Asus does not allow for custom kernel names in their settings. Use a kernel manager to check the kernel version.
Question: Is root preserved when flashing this kernel?
Answer: Yes the Anykernel Zip will detect root and keep it.
Question: How do I return back to stock or another kernel.
Answer: Extract boot.img as well as dtbo.img from matching firmware you are on and flash the extracted boot.img via fastboot.
Question: How to report bugs properly?
Answer: Have a look at post #3 in this thread. The linked guide is a pretty good starting point.
Before reporting any bug make sure you´re not using any mods, magisk modules, scripts or other modifications that alter various functions like sound mods, data traffic etc.
Try to describe the issue as detailed as possible! Give your exact setup, like rom, magisk version, kernel version.
Is the issue reproducible? Does it happen frequently?
Provide logs, otherwise debugging is a lot harder. If you can already reproduce the issue and provide logs it greatly limits the amount of time I have to spent until I figure out how to reproduce it.
If the device force reboots/randomly reboots (that means you see the bootloader unlocked screen!) provide a ramoops file.
Easiest way is immediately after booting up, with a root explorer navigate to sys/fs/pstore. Copy the contents to your internal storage, zip it up and send it to me.
If the issue happens while the device is running provide a dmesg plus a logcat that you take while/shortly after the issue happens. This will log what´s running in the current session. Try to be as detailed as possible what´s happening when the issue appears. It will also help me in reading the log!
Useful Resources
How to report bugs:
It is incredibly useful if bug reports are done in a proper way. That saves everyones time and will ultimately lead to a faster bugfix (hopefully).
The following guide from @nathanchance is a very good guideline on how to properly report a bug!
android-tools/guides/proper_bug_reporting.txt at main · nathanchance/android-tools
Publicly available Android stuff. Contribute to nathanchance/android-tools development by creating an account on GitHub.
github.com
and one more for me
Wow!!! Awesome! Plans for kcal in the future?
Thank you so much for giving me a reason to unlock the bootloader. Finally am happy to see development for the device and that too from a well known developer ???? cheers mate and a very happy new year.
Can I flash Android 10 beta fota file to my cn version phone using this recovery?
I love your work bro keep this devlopment continue
All rog2 user support your hardwork ,
And more developer will come after seeing your hardwork
a5he said:
Can I flash Android 10 beta fota file to my cn version phone using this recovery?
Click to expand...
Click to collapse
please help..now my device stuck and keep looping in bootloader mode after trying to flash this kernel on Android 10 beta fota..and i cant reboot into twrp recovery and system..
sakamaki izayoi said:
please help..now my device stuck and keep looping in bootloader mode after trying to flash this kernel on Android 10 beta fota..and i cant reboot into twrp recovery and system..
Click to expand...
Click to collapse
flash the boot.img extracted from the android 10 beta firmware via fastboot.
Kernel is made for Android Pie as stated in the OP.
Welcome bro and thanks for the first rog 2 custom kernel.. ?
After flashing in twrp it says i should flash companion magisk module. Is there one yet?
mohammed510 said:
Welcome bro and thanks for the first rog 2 custom kernel.. ?
After flashing in twrp it says i should flash companion magisk module. Is there one yet?
Click to expand...
Click to collapse
Oh that’s a remnant of another kernel in the flashing script.
No there is none needed. I’ll remove that message in the next release!
thanks for the hint!
You just gave me a reason to unlock my bootloader and go back to Pie
What a day! Thanks a lot @Freak07! I'm happy for you being around!
Cheers,
anthonws.
sakamaki izayoi said:
please help..now my device stuck and keep looping in bootloader mode after trying to flash this kernel on Android 10 beta fota..and i cant reboot into twrp recovery and system..
Click to expand...
Click to collapse
Extract the boot.img from Update and flash it under .img in twrp.
Goodluck
Very thanks
Please work on power saving and governor
Thank you for joining the ROG 2 Forums @Freak07
apollo3x said:
Extract the boot.img from Update and flash it under .img in twrp.
Goodluck
Click to expand...
Click to collapse
How to extract the Payload file of Android 10 FOTA?
The current Payload dumper doesn't support it.
Thank you so much for your hard work, I can't wait for you to make an version for Android 10 , hopefully once we have a custom kernel we can finally enjoy the 6000 mah battery
Mohamad313 said:
Very thanks
Please work on power saving and governor
Click to expand...
Click to collapse
avivv said:
Thank you so much for your hard work, I can't wait for you to make an version for Android 10 , hopefully once we have a custom kernel we can finally enjoy the 6000 mah battery
Click to expand...
Click to collapse
No idea about Android 10, but I’m enjoying the 6000mah on Pie already. That Android 10 build floating around is no finished or final piece of software.
I’ll attach my current stats from this morning.
No extensive gaming, mainly browsing, exploring the phone, massaging, videos, some calls etc.
but all on constant 120hz.
Wow that's great stats, when I had android 9 I the battery life was worst than I expected, if there was a way to rollback to android 9 without wiping the data I would have done it just to try this kernel.
would it be possible to add battery charge limiting support? currently apps like ACC don't work with this phone.

[ROM][4.4][EAS] Enchanted LineageOS 17.1 with 4.4 kernel

Enchanted LineageOS 17.1 with 4.4 Infinity EAS Kernel
Gemini forever alive!
Download:
TWRP with 4.4 kernel
LineageOS 17.1
Installation:
If you are on stock TWRP you need to flash 4.4 to avoid any problems like /data corruption!
You need to perform a factory reset (format /data)!
Flash rom, gapps/microG and optionally magisk.
Known bugs:
Camera hang in Snap when switching to HDR (click back button and open camera again, boom, it's working)
Join Mi5 group on Telegram
Please consider donating to my hard work
https://paypal.me/xNombre
XDA:DevDB Information
Enchanted LineageOS 17.1 with 4.4 kernel, ROM for the Xiaomi Mi 5
Contributors
xNombre
Source Code: https://github.com/xNombre
ROM OS Version: Android 10
ROM Kernel: Linux 4.x
Version Information
Status: Stable
Created 2020-01-06
Last Updated 2020-04-02
Reserved
Antutu Score
Reserved
¯\_(ツ)_/¯
Thanks for your hard work
hi
tanx 4 ur hard work
i want know about battery life plz..
install instruction?
and best frimware?
tanx
Can not change battery icon style it is stuck on Icon Portrait.
Hi @xNombre, just 2 quick questions regarding the the kernel used in your LOS release:
1- Does the kernel support HW Encryption? I remember on Havoc 2.9 (Android P) there was a port of 4.4 kernel with working HW crypto.
2- Will you release a standalone package of the infinity kernel in the future that can be used with other ROMs?
Thanks!
do we need jdc treble for this or what? since it "treble"
What about battery life?
can i flash other android 10 gsi based on this rom since it "treble"
immediately banned from telegram group right after joined. not even wrote a message or got a warning. interesting way to manage a community group.
i'll be around for feedbacks. thanks for your effort anyways.
nebik said:
Can not change battery icon style it is stuck on Icon Portrait.
Click to expand...
Click to collapse
It's LOS bug.
3V0LU710N said:
Hi @xNombre, just 2 quick questions regarding the the kernel used in your LOS release:
1- Does the kernel support HW Encryption? I remember on Havoc 2.9 (Android P) there was a port of 4.4 kernel with working HW crypto.
2- Will you release a standalone package of the infinity kernel in the future that can be used with other ROMs?
Thanks!
Click to expand...
Click to collapse
1. AFAIR not yet because it's not merged on LOS.
2. Probably no because there are too many custom changes made (dt & vendor) and I don't like listening to moaning that something is broken. I want to release more interesting ROMs some day (Syb... uhh ekh... eria).
shandianex1 said:
can i flash other android 10 gsi based on this rom since it "treble"
Click to expand...
Click to collapse
Hmmm, that's interesting question. I've only focused on making it fulfill all Android Q requirements concerning vendor separation (and such as APEX), not intended to make it GSI friendly. I guess there are still some incompabilities and you can't expect such and old device to be GSI friendly.
jackryder38 said:
What about battery life?
Click to expand...
Click to collapse
Test yourself, the biggest culprit about I can do nothing more is RIL. Maybe when Xiaomi releases Q for daisy, the blobs will make it better.
RmznDndr said:
immediately banned from telegram group right after joined. not even wrote a message or got a warning. interesting way to manage a community group.
i'll be around for feedbacks. thanks for your effort anyways.
Click to expand...
Click to collapse
The group is protected with antibot, I've checked your nickname and youre not banned for sure.
Enchanted LineageOS updated!
Changelog:
Merge latest kernel_common and CAF tag into kernel
Merge latest branch into qcacld driver
Use fq_codel queuing discipline, faster net
Update some blobs (those I have access to) from LA.UM.8.6.r1-02900-89xx.0
Remove unused move time data script
Add missing wifi mac generator
Fix USB tethering
Uprev Mapper to 2.1
Tweak Dalvik parameters accroding to new google configs
Go back to stock WiFi config and add some new Xiaomi edits - fixes connectivity problems
Rootdir updates
Minor cleanup
Fixup microG location
Massive overlay update from LA.UM.8.6.r1-02900-89xx.0
Selinux enforcing
Safetynet PASS!!!
Important LOS updates:
Fixed battery style
Updated to android 10.0 r23
Added survival script (magisk reflashes itself)
Repo sync all
Download via sf:
https://sourceforge.net/projects/xn...-17.1-20200119-UNOFFICIAL-gemini.zip/download
Please consider donating...
https://paypal.me/xNombre
xNombre said:
Enchanted LineageOS 17.1 with 4.4 Infinity EAS Kernel
Known bugs:
Speaker playing only left channel
5GHz hotspot
Camera hang in Snap when switching to HDR (click back button and open camera again, boom, it's working)
Click to expand...
Click to collapse
Fixed?
PavelPerm said:
Fixed?
Click to expand...
Click to collapse
Camera still hangs on HDR on/off. 5Ghz Hotspot works and about speaker i do not know.
nebik said:
Camera still hangs on HDR on/off. 5Ghz Hotspot works and about speaker i do not know.
Click to expand...
Click to collapse
Use this Gcam
https://easyupload.io/5ms9tu
It's version 7.2 - optimized and working 100% on gemini
PavelPerm said:
Fixed?
Click to expand...
Click to collapse
Not listed so not fixes, I thought it's clear.
New build could have some problems due to selinux change (dt2w or so) and I will push hotfix when I can.
xNombre said:
Not listed so not fixes, I thought it's clear.
New build could have some problems due to selinux change (dt2w or so) and I will push hotfix when I can.
Click to expand...
Click to collapse
I have problem with permission name (icon != Permission name)

Categories

Resources