Related
FP Bug fix and TRIM on older kernels
The Background:
Kernel development for older android versions have stopped for a while now. With the release of the FP Bug fix and TRIM enabled kernel, I decided to make my own personal builds! Please note that in no way I am going to maintain these kernels. I have enough kernels to maintain anyway!
If you have problems or if anything goes wrong, you need to reflash your current ROM to revert kernel.
The Mission:
To continue giving support for the much loved kernel. New features and additions will be added to improve flexibility and speed to the already amazing kernel. My goal is to improve DorimanX kernel as much as I can, without sacrificing stability.
NO JELLYBEAN, KITKAT AND LOLLIPOP SUPPORT HERE!
DISCLAIMER:
ONLY FOR AOSP/STOCK BASED ROMS
I'm not responsible for bricked devices or wrong version flashing
You are using this kernel at your own responsibility
——— !!!!!!!! YOU HAVE BEEN WARNED !!!!!!!! ———
FEATURES:
This kernels includes the following additional features over stock kernel builds:
- Built with Latest Linaro 4.9 Toolchain (Smooth, fast and fluid)
- Updated FPBug fix is already included in this kernel!
CREDITS:
Dorimanx (the real master of the kernel)
Gokhanmoral (Siyah Kernel)
Voku1987(This Kernel)
Alucard_24(This Kernel)
STANTRC(This Kernel)
Entropy512 (CyanogenMod)
Tungstwenty (On screen gestures addon)
Torvalds (Kernel 3.6.Y maintainer)
Computoncio (This Kernel)
cybernetus (This Kernel)
stelistcristi (Contents of this post)
chhapil (For helping me with all of the issues, thanks man)
Chet Kener (For UBER toolchain)
Lanchon (For TRIM fix)
Zeitferne (For FP Bug/Music Bug fix)
Lysergic Acid (For Source and fixes)
DOWNLOAD:
Refer to third post
CHANGELOG:
Refer to second post
ISSUES:
Code:
- All bugs from original releases
USEFUL LINKS
- CPU Governor and I/O Scheduler Guide
- DorimanX tuning guide
TCP Algorithm guide
XDA:DevDB Information
FP Bug fix and TRIM on older kernels, Kernel for the Samsung Galaxy S II
Contributors
gsstudios
Kernel Special Features: See post #1
Version Information
Status: Testing
Created 2015-08-02
Last Updated 2015-08-02
Changelogs:
--UNRELEASED VERSIONS--
Code:
- Nothing here to see :)
--RELEASED VERSIONS--
Code:
Downloads
I will mostly work on this LP kernel since I have LP ROM installed. I will test each build before uploading it onto XDA. Kernels marked with '(STABLE)' are safe for everyday use, but only take this as a indication.
--IMPORTANT, PLEASE READ--
CAUTION: All builds marked with 'TRIM' at the end has TRIM enabled. If you have brickbug affected emmc chip, avoid downloading it if you don't know what you are doing! For more information about the trim brickbug, visit Lanchon's guide here: http://forum.xda-developers.com/gal...ives/rom-brickbug-aftermath-speeding-t2843238
All builds without 'TRIM' (marked as 'NON-TRIM') have trim disabled. These kernels are safe on brickbug affected chips.
All builds with '-signed' at the end can be flashed using Cyanogen recovery, these zips are signed and should flash without errors.
MAKE SURE YOU'RE DOWNLOADING THE RIGHT KERNEL. OTHERWISE YOU COULD BRICK YOUR DEVICE!
For TRIM users:
To use TRIM, you can download an app on the app store called trimmer or use terminal commands as directed in the troubleshooting guide.
In order to tweak the kernel properly, you need to install stweaks from the play store or from the apk in the attachments below:
Troubleshooting
(Probably one of the most detailed troubleshooting guides for kernels on XDA)
Q:How do I flash your kernel?
A: You flash kernels like flashing roms, except you don't have to factory reset your phone. However, if you are official CM12.1 nightly, you will have to flash the kernel differently.
Method A: If you get signature verification errors, you need to sign the zip with a program like Sign-em or Sign+.
Method B: To flash this kernel on official CM12.1 nightly, you first need to flash Philz recovery on your phone via ODIN. Here is the link to the for philz recovery: Philz Touch Recovery After that, you can flash the kernel like normal.
Method C: Another way is to create a kernel .tar file by extracting the zimage file located in /boot folder of the kernel zip then create a .tar archive. Then flash it in ODIN. Here is the guide to create your own kernel tar file: http://forum.xda-developers.com/galaxy-s2/development-derivatives/convert-kernel-zip-to-tar-t2994381 For your convenience, I've create a tar file of build b002 in the guide linked.
Q: Which kernel version build should I flash?
A: Flash the latest stable version if you want the most stable experience. Builds that have not been marked with 'Stable' are mostly stable, or haven't been tested enough to earn a stable tag. Either way, it's up to you which one you want to flash. Read the changelog for any important changes that might have occurred in a particular build.
Q: Which app should I use to tweak the kernel?
To have access to all of the tunables, you need to install stweaks from the playstore or from the apk linked in the downloads post.
Q: Wifi doesn't work after I flash this kernel
A: There are two main causes to this issue, either there is a problem with your:
- Partitions OR
- Permissions OR
- Gapps OR
- ROM OR
- Compatibility with your wifi hardware
Don't use a pit with modded preload! It will just cause issues with ROMs and Kernels. Use stock pit or use a pit with unmodded preload. Sometimes, the gapps package you flash somehow breaks compatibility with the kernel. You can fix this by flashing a different gapps (making sure to clean cache and dalvik). If you have permissions problem, you can fix this by repartitioning your internal sd card or by reflashing back to stock rom. Sometimes, the ROM doesn't fully support the wireless drivers in the kernel, this can be solved by flashing a different ROM or different kernel. But if your wifi hardware is not compatible (a way to tell this is when you have tried everything and failed), there is nothing you can do but reflash the rom or flash a different kernel.
Q: My battery life sucks after flashing this kernel!
A: Download and install Betterbatterystats and see what is the culprit to your problem. If it is kernel related, have you made sure you have wipe cache and dalvik and reset stweaks settings? If yes, it would be nice if you posted a logcat.
Q: How do I get a logcat for the kernel?
A: In stweaks, go to BUG-REPORT and tap on KERNEL-BUG.
Q: How do I trim my partitions?
BEWARE: Make sure you have read all of the precautions before attempting to trim your partitions!
A: install the trimmer app from the playstore. App link . Check for all 3 partitions, and tap on run. grant root access. the 3 fstrim operations should be successful ("partition was trimmed" means success).
alternatively, instead of using trimmer you can run one of these commands (these are better because they also trim /preload):
# on the phone in the terminal app:
su -c "fstrim -v /system; fstrim -v /data; fstrim -v /cache; fstrim -v /preload"
# on your PC if you are connected to the phone via adb:
adb shell su -c "fstrim -v /system; fstrim -v /data; fstrim -v /cache; fstrim -v /preload"
reboot.
Click to expand...
Click to collapse
Q: My device is (hard) bricked after flashing your kernel!
A: Have you read all of the precautions before installing the kernel? You made the decision to flash the kernel and now you've stuffed up your phone.
Q: I get constant FCs after flashing your kernel!
A: Have you wiped your cache partition, dalvik cache and reset stweaks settings? If you've done all of these already, a logcat would be nice
Q: What's a good combination for CPU governor and I/O scheduler?
A: Have a look at the default settings, they are optimised for our phone
However, here are some settings I personally like:
1. Governor: HYPER/Ondemand I/O scheduler:SIO/SIO
2. Governor: PegasusQ/Nightmare I/O scheduler: SIO/SIO
3. Governor: NeoX/Ondemand I/O scheduler: SIO/SIO
4. Governor: Nightmare/Nightmare I/O scheduler: SIO/SIO
Q: What is a TCP algorithm?
A: Congestion control strategies (or algorithms) are used by TCP, the data transmission protocol used by many Internet applications. The main goal of a TCP algorithm is to avoid sending more data than the network is capable of transmitting, that is, to avoid causing network congestion.
Q: What is UBER?
A: After years of using different custom toolchains like Linaro and SaberMod, I found there were things I liked about both of them but also things that didn't sit quite as well with me. SaberMod always seemed to have UI lag (especially in scrolling) but opened apps well and Linaro always seemed to be buttery smooth but had terrible app opening speed. Linaro battery was also worse for me than SaberMod. After going back and forth between toolchains I finally had this epiphany! Why not just take all of the best parts of all toolchains and merge them into one? So I began bringing up my own toolchain from gnu.org. At first I patched in all of the AOSP toolchain pactches (much like how SaberMod did it originally however it is important that you realize that No! I did not copy and paste SaberMod into my source I'm simply stating that I used their idea of merging aosp into gnu.org) to my source. Then I went through and added all of the linaro patches that I could to the source. I also made sure that I had the very latest of every toolchain component. I then made very minimal changes to the aosp toolchain build folder to allow for building with these newer toolchain components and UBERTC was born!!! (Note: both Linaro and SaberMod both made lots of modifications to the toolchain build folder, UBERTC is the closest to the aosp build process)
Click to expand...
Click to collapse
Good Job...If u need any help...plz let me know...Thanks.
Here is a highly experimental build based on Siyah 5.0i. It has the FP Bug fix included on it. Please, if someone has ICS installed, can someone test it. Proper build will have ICS included in the file name.
Thanks, gsstudios
Edit: Download link removed. Due to lack of compatibility updates done on siyah kernel, the kernel doesn't natively support linaro 4.9, therefore it will not be stable
Jesse's Kernel (I am not good at naming sth.)
for Galaxy S8 and S8+ (Exynos)
(G950F/FD/X/N) and (G955F/FD/X/N)
This kernel is designed to be SIMPLE and STABLE with improved performance and battery life.
Just flash and enjoy your phone. No additional setting required.
This kernel has 3 series,
Early-Testing: Contains latest changes, experimental features. This build will be released to testers only.
Stable: Changes, features in early-testing build will be picked into stable once they are confirmed to be stable.
Semi-Stock: For those who want maximum stability or ROM developers who want to integrate with their ROMs. This build is very similar to stock but it will have some useful changes like SELinux permissive, disabled security features, etc. This build will be released to public in low update frequency(usuallly based on stock kernel changes).
LICENSE:
Kernel sources:
GPL 2.0: https://www.gnu.org/licenses/gpl-2.0.html
Kernel binaries, patches to system, ramdisk modifications, etc.:
Code:
You can use, mirror, modify and/or integrate it/them with your own works, WITHOUT inform me, subject to the following conditions:
1. Credit MUST be given. (a possible form: thanks *** for ***)
2. Warranty is NOT provided. I am not responsible for any possible losses.
3. Authorization may be TERMINATED for selected person without prior notice under certain conditions (subject to my sole discretion).
4. Above conditions must be preserved. (You have the responsibilities to inform your users about these conditions. A possible way is to add "LICENSE: (link to this post)" to "thanks *** for ***")
Features:
STABLE: (Mainline)
Toolchain: Linaro GCC 7
Linux 4.4.79 (updated from 4.4.13)
Always SELinux Permissive (with fake SELinux Enforcing status.)
Kernel Security Features, Root Restrictions are DISABLED
Linux mainline random generator driver backported
Max frequency of big cores set to 2.5GHz
Other optimizations, backports for best performance and power efficiency
BFQ I/O scheduler
Versioning: VERSION x.x
Release Frequency: Regularly
SEMI-STOCK:
Toolchain: Linaro GCC 7
Linux 4.4.79 (updated from 4.4.13)
Always SELinux Permissive (with fake SELinux Enforcing status.)
Kernel Security Features, Root Restrictions are DISABLED
Versioning: RELEASE x
Release Frequency: Rare (only stock kernel updates and bug fixes)
NOTE: As of VERSION 0.3 and SEMI-STOCK RELEASE 6, AQG5 or newer bootloader is required.
Download:
STABLE:
VERSION 0.3: (Source Tag)
https://www.androidfilehost.com/?fid=673368273298975229
SEMI-STOCK:
RELEASE 6: (Source Tag)
https://www.androidfilehost.com/?fid=889764386195919462
NOTE:
1. Existing Bluetooth Pairs, Wi-Fi Passwords will be forgot when you flash this kernel for the first time.
2. You need to flash root package (Magisk or SuperSU) AFTER flash kernel if you want root access.
Show your appreciation:
Click Thanks!, Rate 5-star or/and Donate to me.
Get informed about news and updates:
Join Official Telegram Channel
AND/OR
Follow this project on XDA
XDA:DevDB Information
Jesse's Kernel for Galaxy S8 and S8+, Kernel for the Samsung Galaxy S8+
Contributors
jesec
Source Code: https://github.com/jesec/android_kernel_samsung_universal8895
Kernel Special Features:
Version Information
Status: Stable
Created 2017-05-08
Last Updated 2017-07-30
Changelog:
STABLE:
VERSION 0.3, July 29th:
Merge AQG5 kernel updates from Samsung
Merge Linux 4.4.79
Merge BFQ-v8r12
Backport latest F2FS
Switch to latest Linaro GCC 7 toolchain with processor specific tunes.
Use -Ofast optimization.
VERSION 0.2.2, June 26th:
Merge AQF7 kernel updates from Samsung
Merge Linux 4.4.74
VERSION 0.2.1, May 27th:
Merge AQE5 kernel updates from Samsung
Merge Linux 4.4.69
Update system patches
VERSION 0.2, May 19th:
Updated to Linux 4.4.68
Full F2FS file system support (with latest driver backported from Linux 4.12) is added.
Possible kernel panic (random reboots) addressed.
Possible battery life improvements for CPU frequency boosts.
BFQ is added and set as the default I/O scheduler.
VoLTE & VoWiFi problem fixed. (verified by testers)
NOTE: VoLTE logo may not be an accurate indicator of VoLTE support.
VERSION 0.1, May 11th:
Initial Release.
SEMI-STOCK:
RELEASE 6, July 29th:
Merge AQG5 kernel updates from Samsung
Merge Linux 4.4.79
Backport latest F2FS
Switch to latest Linaro GCC 7 toolchain with processor specific tunes.
Use -Ofast optimization.
RELEASE 5, June 26th:
Merge AQF7 kernel updates from Samsung
Merge Linux 4.4.74
RELEASE 4, May 27th:
Merge AQE5 kernel updates from Samsung
Merge Linux 4.4.69
Update system patches
RELEASE 3, May 19th:
Updated to Linux 4.4.68
Switched to GCC 8.X
Full F2FS file system support (with latest driver backported from Linux 4.12) is added.
Possible kernel panic (random reboots) addressed.
VoLTE & VoWiFi problem fixed. (verified by testers)
NOTE: VoLTE logo may not be an accurate indicator of VoLTE support.
RELEASE 2, May 11th:
Storage and CPU performance problems fixed.
Guides:
HOW-TO FLASH THIS KERNEL:
1. Make sure TWRP is installed. (https://forum.xda-developers.com/showpost.php?p=72004368&postcount=3)
2. Download the flashable zip from download section in OP.
3. Transfer the zip to your phone.
4. Go to "Install" menu of TWRP and flash the zip.
(for devs) HOW-TO PROPERLY INTEGRATE THIS KERNEL TO YOUR ROM:
1. Download the flashable zip from download section in OP.
2. Rename the downloaded zip to "jesse-kernel.zip".
3. Delete original boot.img of your ROM.
4. Place the zip to kernel (create if not exists) folder of your ROM.
Example Structure:
->META-INF
->->com
->->...
->system
->->app
->->priv-app
->->...
->kernel
->->jesse-kernel.zip
->...
5. Delete original kernel flashing lines from installation script (META-INF/com/google/android/updater-script) of your ROM.
tip: usually start with package_extract_file("boot.img" after "ui_print("Extracting boot image...");".
6. Add these lines to the installation script of your ROM:
Code:
ui_print("Installing Jesse's Kernel...");
package_extract_dir("kernel", "/tmp/kernel");
run_program("/sbin/busybox", "unzip", "/tmp/kernel/jesse-kernel.zip", "META-INF/com/google/android/*", "-d", "/tmp/kernel");
set_perm(0, 1000, 0755, "/tmp/kernel/META-INF/com/google/android/update-binary");
run_program("/tmp/kernel/META-INF/com/google/android/update-binary", "3", "1", "/tmp/kernel/jesse-kernel.zip");
ui_print("Jesse's Kernel Installed");
(for devs) Tips about kernel compile: (Note: NO technical support for such things. Inquires will be ignored.)
1. There is a kernel build script in my kernel. (build_kernel.sh)
2. Two variables must be specified before you can run it.
export $KERNEL_TOOLCHAIN=/path/to/your-toolchain/bin/toolchain-prefix-
export $KERNEL_DTBTOOL=/path/to/dtbtool/dtbhtoolExynos
3. If you are building for Galaxy S8 (dreamlte), run it with "bash build_kernel.sh dreamlte".
If you are building for Galaxy S8+ (dream2lte), run it with "bash build_kernel.sh dream2lte".
4. Default output dir is "../kernel_out". "dt.img" and "Image" will be generated.
That's what I'm talking about! Thank you!!
Thanks @jesec for this and twrp. Without u development would be so far behind
sent from the R.I.C.E powered V8+
Great work mate :fingers-crossed:
State-wide provider blackout the very second i flashed. No worries!
Thanks for your hard work. Great job as always.
Sent from my SM-G955F using Tapatalk
what is the difference between stock and semi stock?
GreyFox777 said:
what is the difference between stock and semi stock?
Click to expand...
Click to collapse
Got the same question.. I've installed it, but it doesn't seem to have any advanced governors, etc on board.
But still very nice to have the first kernel on!!!!!
Jesec, you're just great
Btw: does the name Jesse's kernel was chosen on purpose or just a mistake?
GreyFox777 said:
what is the difference between stock and semi stock?
Click to expand...
Click to collapse
This kernel look like a basic kernel update from 4.4.13 to 4.4.66
@jesec
Awesome, thanks a lot bro!
Thank you for the first custom kernel
Can we expect a permissive kernel for this device soon?
tiho5 said:
Thank you for the first custom kernel
Can we expect a permissive kernel for this device soon?
Click to expand...
Click to collapse
Per github commit, the big news here is that this kernel is permissive!
@jessec, you are totaly awesome:good:
Thank you for being here!
Update; appear kernel selinux is still enforcing
It is SELinux permissive. That enforcing is fake actually. (just let userspace think status change is successful)
Changelog: (May. 9th)
I fixed a bug of script. Now new build (May. 9th) should work fine on non-plus variants.
finally i can use ARISE completely. thx a lot
Great one. Many thanks. I will try and report.
Sent from my SM-G955F using Tapatalk
Feels good to see development here, used to love ur work on GS7.
One question, where can I get the Magisk Flashable? I got it when flashed the ROM but I cant flash the ROM over the kernel or I will lose the kernel
jesec said:
It is SELinux permissive. That enforcing is fake actually. (just let userspace think status change is successful)
Changelog: (May. 9th)
I fixed a bug of script. Now new build (May. 9th) should work fine on non-plus variants.
Click to expand...
Click to collapse
Great.
Thanks. That's what I've been waiting for.
metuskale said:
Feels good to see development here, used to love ur work on GS7.
One question, where can I get the Magisk Flashable? I got it when flashed the ROM but I cant flash the ROM over the kernel or I will lose the kernel
Click to expand...
Click to collapse
here it is:
Hello!
This is a development thread for the project of upgrading of the Linux kernel for the U8500 platform.
Builds provided here (at the moment of writing this message) are not considered to be used as a daily driver, by any means, - these are rather a dev preview versions.
For now, there are a several LK builds (the highest currently supported kernel version is 3.10).
Because builds here are really not stable, I'll just leave a disclaimer here.
Code:
#include <std/disclaimer.h>
/*
* I am not responsible for bricked devices, dead SD cards, thermonuclear
* war, or the current economic crisis caused by you following these
* directions. YOU are choosing to make these modificiations, and
* if you point your finger at me for messing up your device, I will
* laugh at you.
*/
Working features
RIL
Camera (front & rear) - only works in <3.8
Video (playback & recording)
Audio (playback & recording)
Wifi
Bluetooth (broken in >=3.8, needs a workaround to manually startup)
USB, ADB
Tethering (not tested)
GPS (not tested)
Sensors
Known bugs
IRQs are mishandled by some device drivers (abb_btemp, abb_fg)
proximity sensor might not work (not tested, cause it's broken on my device)
deep sleep might not work at a times
MMC driver works unreliably in >=3.8 (contiguous usage might lead in a data corruption)
networking is not fully-functional (no mobile data)*
camera is broken in 3.8
*some other features of the android kernel might not present - it's because these kernels lacks android-specific patches.
Sources
LK 3.5
LK 3.6
LK 3.7
LK 3.8
LK 3.9
LK 3.10
Downloads
http://xda.mister-freeze.eu/XDA-files/ChronoMonochrome/misc/upgrading
Installation
install chrono kernel r5.2 or higher (this is needed to pick up the necessary scripts, incl. bootscripts, etc)
reboot to recovery
install build linked in "Downloads" section
Credits
Linux kernel development community
Google
ST-Ericcson
Samsung
Team Canjica
XDA:DevDB Information
U8500 Linux kernel upgrading project, Kernel for the Samsung Galaxy Ace II
Contributors
ChronoMonochrome
Kernel Special Features:
Version Information
Status: Alpha
Created 2017-05-09
Last Updated 2017-05-10
Reserved
Porting
The porting a higher kernel version tehnique I'll describe here is not intended to be a guide for dummies. I'll assume you've already built a kernel for your device, familiar with git versioning control usage and with some porting / coding tehniques.
Firstly, you need a cleaned source for your device. By "cleaned" I mean, there are no Linux incremental patches, android changes applied, manufacture-specific patches are avoided when possible and so on - you need sources as closest to a "pure" Linux kernel as possible. Otherwise you'll have later need to deal with conflicts resolution, you'll most likely be unable to resolve and the kernel won't boot.
So, without a further forewords, the tehnique is below:
1) As was previously mentioned, a clean kernel source is required, I'll assume we are starting from LK-3.4 ( https://github.com/ChronoMonochrome/Chrono_Kernel-1/commits/ea228ee0f5e9935841aff25c62fa163cd78dc01d ) and porting a higher kernel versions. A kernel base needs to be tested for any bugs just to distinguish, which bugs were intruduced during porting from those ones that already present in a kernel base.
2) The following steps will mostly use git bisect and git merge commands in order to merge all the changes from a higher kernel versions and help to find / resolve the bugs that were introduced. I suggest copying a git kernel repo that you use for building to a somewhere else, so you can use it , e.g. for grepping a different versions source, bisecting the revisions and so on, so don't need to bother messing up in your main repo that you use for build.
3) Firstly, lets just try to merge a higher kernel version, e.g. LK 3.5 by issuing a command git merge lk-3.5. You'll likely have a lot of merge conflicts, most of which you can resolve with resetting the paths to a some revision (either a kernel base - lk 3.4, or the version you do port, or just another suitable conflict resolution). So I suggest to write those paths to a text file, like so:
Code:
arch/arm/boot
arch/arm/mach-ux500
arch/arm/plat-nomadik
drivers/mmc
include/linux/mmc
drivers/usb
include/linux/usb
drivers/mfd
include/linux/mfd
...
Write all the paths you intend to reset to the kernel base, you most likely need to re-use them later. To actually perform a resetting source, you can issue
Code:
for path in $(cat file_with_a_paths.txt | xargs)
do
git checkout COMMIT $path
done
Be sure not to put to this file anything not the device-specific! Resetting to the kernel base should be avoided when possible (never ever try resetting archictecture-specific paths, e.g. arch/arm/kernel, arch/arm/mm and so on - unless you really know that kernel will boot thereafter, instead, you have to manually resolve such conflicts). Resolve any other conflicts by resetting paths to the porting source (e.g. LK 3.5).
Note. While resetting with a paths is probably not the most accurate tehnique, but people don't live that long to use more accurate approach, e.g. performing git cherry-pick for every upstream commit and then manually resolving all the conflicts, you'll just sooner or later get bothered and will abandon it.
4) When you're done with the previous steps you can try building kernel. You'll likely have a build errors - because some part of a source got not updated (e.g. the device-specific drivers), you need manually implement the necessary by a higher kernel version changes. Firstly check if an upstream kernel contains the necessary fixes (example: https://github.com/ChronoMonochrome/Chrono_Kernel-1/commit/9fae8c449b710f502662da1cbcf26ece5a098af9 , https://github.com/ChronoMonochrome/Chrono_Kernel-1/commit/fe027c25d6db0d100937deb5248e249ec5b24ee7 ). If the driver you are porting doesn't exist in the upstream, you can also try to find a similar change and mimic it: https://github.com/ChronoMonochrome/Chrono_Kernel-1/commit/5f2e7afbf2ac3284dc62b3d96a0627c7f99ed4e9 ( ported similarly to https://github.com/ChronoMonochrome/Chrono_Kernel-1/commit/526c597 ). In the worst case scenario you will need to examine the upstream changes and apply the changes so that the drivers complies to the upstream changes: https://github.com/ChronoMonochrome/Chrono_Kernel-1/commit/ea6432d167 .
5) If everything is done properly and you're lucky enough, the compiled kernel might already bootup. If not, you'll need to find a culprint that doesn't let the device to boot up. Switch to a copy of your kernel sources, reset the source to the base kernel version (e.g. LK 3.4), issue git bisect good, then issue git bisect bad lk-3.5, git will reset to a somewhere in a middle between of LK 3.4 and LK 3.5.
6) Save your changes in the kernel repo, by assigning a some branch to it, switch to the source base, merge all the fixes you've already introduced, then merge the revision you have got in the previous step by bisecting the tree. Repeat these steps until you'll find a first bad commit.
7) If you are already on this step, the most trickiest part starts here - testing (hopefully) working kernel for bugs (if any). While logs can be useful sometimes (so you can google the failing messages and find something useful), there are also many bugs you can find only performing git bisect tehnique decribed above.
The decribed algorithm only possible thanks to having a clean kernel source. The usage of this guide is not limited only to the kernel porting, it can be used on other projects as well, this is just what I've come across to, when I've ever started porting Linux kernel versions higher than LK3.4.
Reserved
I wonder if any of this expertise couldn't look pretty cool here too.
Wooooowwwewe
Oooh
Look whose good boys have been trying to win the STE mastermind prize as of lately
https://github.com/novathor-mainline/linux
https://git.kernel.org/pub/scm/linu...inux-nomadik.git/log/?h=ux500-skomer-v5.5-rc1
mirhl said:
Oooh
Look whose good boys have been trying to win the STE mastermind prize as of lately
https://github.com/novathor-mainline/linux
https://git.kernel.org/pub/scm/linu...inux-nomadik.git/log/?h=ux500-skomer-v5.5-rc1
Click to expand...
Click to collapse
Seriously!
mirhl said:
Oooh
Look whose good boys have been trying to win the STE mastermind prize as of lately
https://github.com/novathor-mainline/linux
https://git.kernel.org/pub/scm/linu...inux-nomadik.git/log/?h=ux500-skomer-v5.5-rc1
Click to expand...
Click to collapse
Wow, that's incredible
Exynos4412 already got some mainline support, it would be very nice to have this one supported too.
Aaaaand it's done, kinda.
ST-Ericsson NovaThor U8500 - postmarketOS
wiki.postmarketos.org
device/testing/linux-postmarketos-stericsson · master · postmarketOS / pmaports · GitLab
postmarketOS package build recipes
gitlab.com
This thread was for a custom kernel for LineageOS 16.0 and 17.1. I left it alone entirely for a long, long, looooong while, and have now properly discontinued it after intending to since forever.
All of the previous content this post had has been removed, as it's no longer necessary with a proper discontinuation with a removal of download links and it's really hard to look at since it was just really bad, and from times when I was totally unknowledgeable (not that I think I have much knowledge even now). Likewise for my replies in this thread, which the contents of have been removed (yep, although knowing there are replies).
Thanks to those who used such custom kernel previously, although I'm not in support of most custom kernels anymore, especially as almost all of them mostly (or only) contain what are gimmicks, and few, if any at all, useful features. The one I maintained was one of such custom kernels.
For anyone who might happen to randomly want this old custom kernel even with no information on what gimmicks it had (and maybe asks for it) at any point: Please forget about it.
For anyone who has old images and is willing to share them after someone requests them: Please don't. They're, well, old and pretty much useless with any new builds, not that they're not already filled with gimmicks, and I made a few pretty bad mistakes with the kernels.
That's all there is to say with the discontinuation, please just ignore this thread.
Hello.
I'm sorry. Please make a reliable kernel to Samsung's official firmware with Android 4.1.2 for remove 4GB file size limitation on an external microSD card formatted in exFAT for Samsung Galaxy S2.
TALUAtXDA said:
Hello everyone,
I have been building my own kernels for myself for a while now. Recently, I have been implementing features in my kernel that many people will find useful, most notably exFAT support. Since there is interest in my kernel, I have decided to release it for everyone to use.
I am not in any way responsible for any damage you happen to cause to your phone trying to use my kernels features (for example, overvolting). Be careful!
Downloads:
I have made 3 boot images, a boot image for no Magisk, one for Magisk Stable and one for Magisk Canary:
Latest version:
No Magisk: TALUs_Custom_Kernel_i9100_LOS_16_20191102_No_Magisk.img
Magisk Stable: TALUs_Custom_Kernel_i9100_LOS_16_20191102_Magisk_Stable_v20.1_ramdisk.img Magisk version: 20.1
Magisk Canary: TALUs_Custom_Kernel_i9100_LOS_16_20191102_Magisk_Canary_v20.2-a6e62e07_ramdisk.img Magisk version: 20.2-a6e62e07
Changelog:
Release 20191102:
Fix exFAT kernel panics relating to truncating (https://github.com/TALUAtGitHub/and...mmit/0dc727fe94ea18cda800a8b8fe1c5b446956224f)
Remove WiFi MAC address changing patch, not sure how it works and editing /efs/wifi/.mac.info doesn't do anything (https://github.com/TALUAtGitHub/and...mmit/a84ba223f9add13aa5465a59b3d67b1f5aa214f4)
Remove recovery ramdisk from initramfs - the recovery ramdisk is unnecessary as we already have TWRP in the recovery partition that's loaded using IsoRec. The boot image has shrunk from around 7.8MB to around 5.3-5.6MB doing this. This will allow more features and future source updates without it exceeding the boot partition size (https://github.com/TALUAtGitHub/and...mmit/d58457099a8995107a2bebbc0a1b733669a5515c)
Old releases:
Release 20191030 from https://forum.xda-developers.com/showpost.php?p=80729219&postcount=849:
Please don't use this release if you want to use exFAT! This release has an exFAT bug relating to truncating which causes kernel panics that were fixed in release 20191102.
Initial release.
Kernel features:
exFAT support:
exFAT support is available via a slightly modified implementation of this in-kernel, native driver: https://github.com/arter97/exfat-linux The modifications are required as the kernel we are using has many backports from newer kernels and this driver selects what code is used based on kernel version. The result is features that the kernel no longer has are selected and there are build errors. With a SD card formatted as exFAT, you can now have files that are bigger than 4GB in size and with better performance than FAT32. exFAT support was already available via a fuse implementation which is not favorable due to bad performance. Implementing the exFAT driver in-kernel means that it is used instead of the fuse implementation. NTFS support is also enabled with CONFIG_NTFS_FS=y but that may be a fuse driver.
Overclocking to 1.4GHz:
By default, this kernel is overclocks the CPU to 1.4GHz. 1.4GHz should be stable on all Exynos 4210 CPUs and was the stock frequency on the very first Note phone which also used an Exynos 4210 CPU. However, if you don't want to use the overclock for slightly lower temperatues, you can set the clock speed back to 1.2GHz using a kernel manager like Kernel Adiutor or by using this echo command in a terminal:
Code:
echo "1200000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Even if you want to set the clock speed back to 1.2GHz, I would suggest you undervolt the CPU to get lower temperatures. Try undervolting by -5mV at a time every few hours and see what's stable. I can do -65mV on both of my S2s, however, how far you can undervolt varies depending on how well your CPU was manufactured.
CPU voltage control:
WARNING: Overvolting can damage your CPU and I would not suggest you do it. It shouldn't be necessary. Whatever you do, I am not in any way responsible for whatever you happen to do and what damage you cause to your phone. You should only use this feature for undervolting.
CPU voltage control is implemented in this kernel via a typical SysFS interface. You can use either a kernel manager to control CPU voltage or use an echo command in a terminal:
Code:
echo "<1.4GHz voltage> <1.3GHz voltage> <and so on....>" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
An example for this command is:
Code:
echo "1215 1190 1165 1115 1065 1015 965 915 915 890 890 890 865 865" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
There is also another interface for another unit for measuring voltage. That command is for millivolts. Replace "UV_mV_table" with "UV_uV_table" to control voltage using microvolts.
Charging current control and slightly higher charging current by default:
WARNING: if you decide to set a very high current and something gets damaged, such as something on the motherboard or your battery, you are responsible for the damage, not me.
Charging current control is implemented and is controllable using another typical SysFS interface. The interface can be controlled with milliamps (mA) using yet another typical SysFS interface:
Code:
echo "<AC current> <Miscellaneous current> <USB current>" > /sys/devices/virtual/misc/charge_control/charge_current
Kernel managers don't detect this feature, so the only way to control this is with that command. Also, the charging current for all AC, misc and USB is slightly higher than default. This means that we have better charging times and the battery temperature increase is very small. We are closer to USB specifications when charging on a USB port, too!
GPU clock speed and voltage control:
WARNING: You risk damaging your graphics chip if you set a clock speed or voltage that is too high. I am not responsible for any damage caused using this feature. I have only tested up to 330MHz, nothing more.
GPU clock speed and voltage control is implemented. This is controllable using yet another SysFS interface and is only controllable using an echo command once again.
Code:
echo "<Step0> <Step1> <Step2> <Step3" > /sys/devices/virtual/misc/gpu_<clock/voltage>_control/gpu_control
Replace "<clock/voltage>" with what you'd like to control. The clock speed is in MHz and the voltage is in uV (microvolts). The frequencies that are available for clock speed control are 54MHz, 66MHz, 108MHz, 160MHz, 200MHz, 267MHz, 330MHz, 400MHz, 440MHz and 520MHz. 267MHz is default for step 3 and 330MHz and anything above is overclocking.
Building the kernel:
Building this kernel requires an installation of a Linux distribution. If you have an installation with all dependencies installed (you can search for them yourself, the LineageOS build guides have what you need to install. Use a build guide for any device.), you can continue. The source code for what is used to build this kernel is here:
Kernel source code: https://github.com/TALUAtGitHub/android_kernel_samsung_smdk4412
galaxys2-common: https://github.com/TALUAtGitHub/android_device_samsung_galaxys2-common
To get full sources, you can use @linusdan's manifests: https://github.com/linusdan/lineage_manifests The instructions for getting sources are all there. However, before you run repo sync, you must edit <sources_root>/.repo/local_manifests/roomservice.xml from this:
Code:
<project name="rINanDO/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="lineage-16.0" />
<project name="rINanDO/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="lineage-16.0" />
to this:
Code:
<project name="TALUAtGitHub/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="lineage-16.0" />
<project name="TALUAtGitHub/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="lineage-16.0" />
After you have all of the sources downloaded, change directories to the directory with all the source code and then run:
Code:
. build/envsetup.sh
lunch lineage_i9100-userdebug
Instead of running brunch, run:
Code:
mka adbd
mka bootimage
The boot image with my kernel will start building. After building the boot image, running "cout" will change directories to <sources_root>/out/product/i9100/. The file "boot.img" is the boot image with the kernel. You have successfully built my kernel! However, this boot image will have a ramdisk without Magisk and the kernel localversion string will not match the modules in /system/lib/modules and /system/vendor/lib/modules which is important for FM radio users using SpiritF (Si4709_driver.ko driver) or users of any of the other modules. Inserting these modules will error out.
Solve kernel localversion issues:
First method:
First of all, install the latest Magisk boot image from @rINanDO or install the boot.img from the ROM installation zip (this will be installed anyway when installing the whole ROM in TWRP). Boot your phone up and go to Settings -> About Phone -> Android version and keep the string under "Kernel version" saved somewhere or written down for later. The string looks like "3.0.101-lineage-xxxxxxx".
In the kernel source code <sources_root>/kernel/samsung/smdk4412, run:
Code:
touch .scmversion
Now, change directories to <kernel_sources_root>/arch/arm/configs. Using your favorite text editor, open lineageos_i9100_defconfig. You can use "nano lineageos_i9100_defconfig" if you're not sure. Find the lines:
Code:
CONFIG_LOCALVERSION="-lineage"
CONFIG_LOCALVERSION_AUTO=y
Set CONFIG_LOCALVERSION_AUTO to "n". Now, add everything after the string "3.0.101-lineage" from earlier to the end of -lineage at CONFIG_LOCALVERSION. For example, if the kernel version string from earlier was "3.0.101-lineage-gd9313e5", then it should now be:
Code:
CONFIG_LOCALVERSION="-lineage-gd9313e5"
You may now run "mka bootimage" again or "mka adbd" before that if you haven't already built once before.
Second method:
During a kernel build, the modules are built and stored in <sources_root>/out/target/product/i9100/system/vendor/lib/modules/. You can use "adb push" to push all of the files here to /system/lib/modules/ and /system/vendor/lib/modules/ or copy them to your devices storage or SD card and copy them to those 2 locations.
Building the kernel with magisk:
In the sources root directory, run:
Code:
touch buildspec.mk
Then, change directories using "cd" to <sources_root>/device/samsung/galaxys2-common/magisk. In this directory, there is a bash script that is there to make boot images with a ramdisk with Magisk. Run it:
Code:
bash build-magisk-kernel.sh
This script will do everything automatically and tell you what to do.
If the Magisk build script fails, you must run:
Code:
rm <sources_root>/buildspec.mk*
touch <sources_root>/buildspec.mk
After a repo sync or modifying anything to do with the ramdisk, it is recommended to force a rebuild of ramdisk.cpio with new files. To do this, run:
Code:
rm buildspec.mk*
rm -rf <sources_root>/out/target/product/i9100/*ramdisk*
mka bootimage
touch buildspec.mk
before running the Magisk build script again.
Source code:
https://github.com/TALUAtGitHub/android_kernel_samsung_smdk4412
https://github.com/TALUAtGitHub/android_device_samsung_galaxys2-common
Thanks to:
@rINanDO for LineageOS 16.0 on our phone and all of his work.
@arter97 for the exfat-linux driver.
@linusdan for LineageOS manifests.
All of the people who have worked on other custom kernels which I could use parts of for some features.
...and of course, anyone who has worked on the Linux kernel.
Click to expand...
Click to collapse
Great work on the Kernel. Using it at the moment, minor crashes only. It's very stable. Downloaded your sources. Planning to do a feature build as soon as i get the time. BTW, have you considered adding few governors and schedulers?
Thanks for create this kernel, I don´t see a mod kernel since android MM
Previous reply content removed
TALUAtXDA said:
Hi,
I don't really know anyone but the fewest of people who still run the stock ROM here on XDA, so I don't feel motivated to do this and you have insulted developers here before on your "bugs" thread so I feel like you will not be grateful for anything. However, this could be a nice learning experience for you. It should actually be easier to implement exFAT in the stock kernel, and I see there are already exFAT sources which may work with some additions, though I would only consider that to be a starting point and you should update the exFAT sources.
Click to expand...
Click to collapse
I'm not an IT specialist. I'm just a regular smartphone user.
I offer 5USD for a RELIABLE kernel without an obsolete file size limitation in video recording to Samsung's official ROM with Android 4.1.2.
And yet actually I'm really interesting in the camera improvement. So...
I'm offering 50USD to anyone who will make Galaxy S2 become able to record FHD+ video with 21:9 aspect ratio (2520x1080) without any other disadvantages.
I can offer other bounties for any reliable improvements to the camera (include the stereo sound recording) without disadvantages.
Any payments will be proceed only after successful firmware testing by me.
Previous reply content removed
mate i have one issue, i flashed the magisk version but when i install kernel auditor don´t ask me if a gant o deny the root in this app, and magisk app don´t download the modules
Previous reply content removed
Does the new Magisk Stable image work for anyone else? Did the old one work for everyone? If the old one didn't even work, why didn't anyone tell me? [/QUOTE]
The old and the new Magisk Stable image work both for me. Until now I didn't have the Canary image installed. And I don't think I 'm gonna go for the Canary version.
Previous reply content removed
This is not Fundamental solution i think
Hi there, I flashed the versions 20191102 und 20191117 (no Magisk) and both are stable with the implemented 1.4 GHz overclocking. Battery life in standby only with Wi-Fi is great. Unfortunately both versions have a bug when device is turned off and charging: Switching on the phone with plugged-in cable is not possible and will result in booting up charging mode again - cable has to be unplugged for turning on phone. I can remember a similar bug in one of the former custom kernels for the Galaxy S. Thank you for the impressive work - it's great to have a custom kernel for the new LOS releases! Bye Ollie
Previous reply content removed
Previous reply content removed
Hello,recently i bought an extended battery for s2. The battery its 3500Mah and the original are 1650mah,do you have implemented any code to read entended battteries properly or know any mod to flash?. I see videos on youtube and the device swift off when the real battery have 60%
Previous reply content removed
Previous reply content removed
Previous reply content removed
Hi,
first of all - great job. The kernel is fantastic and it's probably the easiest way to make 16 run a little bit smoother (along with overclocking).
Do you think it would be possible to backport at least some of the features to support Android 7.1? We personally still think that it's the OS that has the best peformance to battery life ratio on our device.
Thanks in advance, looking forward to your reply
- HW
Kirisakura-Kernel for the Asus Zenfone 9
Hello everyone,
To keep it short: Here is Kirisakura - Kernel for the Asus Zenfone 9 aka DaVinci. The Zenfone line-up internal codenames were traditionally derived from alcoholic drinks. Two years ago the Zenfone 6 bore the title "Kirin". The Zenfone 7 was codenamed "Tequila", while the Zenfone 8 bore the title "Sake".
This year seems to make a change however. The Zenfone 9´s internal codename is "DaVinci".
I would appreciate if everybody that flashes the kernel, reads at least once through this opening post and the following ones.
As far as we, @tbalden and me, are aware and as far as we know this project, alongside CleanSlate kernel for the Zenfone 9, marks the first release of a source compiled custom QGKI 2.0 kernel as a standalone flashable zip and project here on XDA.
The introduction of GKI and QCOMs adaptation QGKI means unfortunately that building a monolithic kernel becomes harder and harder. This results in the "kernel" itself no longer just sitting in one partition or the zImage, but it´s spread across different partitions (no longer being monolithic) now. Since there´s no requirment to keep monolithic builds working as in the past, it´s no longer possible to compile the source as is (without applying major rewrites, tricks or hacks) in the monolithic fashion on 5.10 kernels. The same was true for the Pixel 6/Pro.
That means the "kernel" project you´re seeing here needs to be compiled in a build environment to achieve the GKI/QGKI way. Since only Google releases the full build environment alongside the kernel sources itself in a proper fashion with git history, it became very complicated and seemingly impossible to do this on the Zenfone 9 at first glance. A big thanks at this place to Asus. From all the sources of SD8 Gen 1 QGKI devices published, the Asus Source is the most complete. A big thanks to Asus for publishing the sources on time and complete! Also for listening to us if the source is not complete and something is missing.
With excellent teamwork and a lot of hardwork, @tbalden and me managed to compile the Zenfone 9 kernel in QGKI 2.0 fashion after a lot of failed attempts and misery. It´s been a pleasure to work with him over the years here on XDA.
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.
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.
A very positive development. Google pushed for CFI and SCS to be enabled by default in the android-common kernel. Starting with 5.4 kernel ( SD 888 ) CFI and SCS were enabled by default. It was a lot of work to get these features working nicely on the kernel I did the years back. So it´s nice to see this is now there by default in everybody can profit from it.
I put the explanations and links in hide tags here.
Spoiler: Documentation Control-Flow-Integrity (CFI) / Shadow Call Stacj (SCS)
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.
Read more about the Release-Model following this link.
This conversation on the LKML mailing list also shows the power of Linux-Stable and why it´s very beneficial to not just say it´s not worth and a potentiol source for bugs:
Starting with the Initial Message , the following reply and a good summarizing statement.
Quick explanation of QCOM-Upstream. CLO-git is the place where development from Qualcomm for their SoCs happens. This includes the Snapdragon 8+ Gen1 that´s built into the different SKUs of the Zenfone 9.
The kernel-bases available on QCOMs git, 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 13 and intended to be used on the latest Asus Stock-Firmware
- compiled with Clang 16.0.2 and built with -O3 speed optimizations
- Linux-Stable-Upstream included to 5.10.181
- upstreamed QCOM base for the Snapdragon SD8+ Gen1 (qcoms internal codename "cape")
- Lazy RCU which should result in power-savings while the device is lightly-loaded or idling, more information here
- include important fixes/improvements from kernel/common
- SSG IO scheduler for reduced overhead and less CPU cycles (more lightweight and android optimized)
- implement ramoops for easier logs in case of kernel panics
- implement LRNG (see arter kernel OP for more info )
- Flashing the kernel will keep root!
- Flashable via EXKM, FKM or Kernel Flasher (free open source solution, get it here)
- Anykernel zip is based on the Anykernel3 release from @osm0sis
EAS related features:
- Implement dynamic WALT-Window size depending on current FPS, collecting information about CPU-Load to provide more precise information for the scheduler
- EAS implementation patched up to latest CAF state
- updates from kernel/common
CPU related features:
- Power saving workingqueues enabled by default
- Change various drivers (WLAN, MM, audio, charger, power, thermal, glink etc) to use power efficient workingqueues. This compliments EAS in general
- vdso32 patches as found on Google Pixel devices (brief documentation here) (CAF 5.10 default, keep for documentation)
- improve suspend/resume from audio driver (caf-upstream for audio-kernel)
- enable suspend_skip_sync to save power during suspend/resume
- speed up face unlock
- reduce camera launch time
GPU related features:
- GPU driver updated to latest CAF-State
File System related features:
- f2fs improvements
UI/UX/Usability related features from CleanSlate:
- CleanSlate features made by @tbalden
- Disclaimer: All CleanSlate features can be controlled via the free companion and config app found on CleanSlate thread here on the Zenfone 9 Forums on XDA. Please consider buying the premium versions if you enjoy using the CleanSlate features, to give a little something back to @tbalden.
- add option to force 240hz touch sample rate
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
- Enable support for TTL spoofing
Memory related features:
- Speculative Page Faults left enabled (1. 2) (CAF 5.4 default, keep for documentation)
Security related features:
- Control-Flow-Integration (CFI) and Link-Time-Optimization (LTO) (CAF 5.4 default, keep for documentation)
- Use ThinLTO which was first used in the Pixel 4 XL Android R-Kernel instead of full LTO (CAF 5.4 default, keep for documentation)
- Shadow Call Stack (SCS) Security-Feature ( 5.4 default, keep for documentation)
- enable init_on_alloc for even more security, more information can be found in the commit message (CAF 5.4 default, keep for documentation)
Other features:
- clean up asus drivers and fix a few warnings in kernel log
- enlarge dmesg size to ease debugging
Flashing Guide, Download and Changelog
Requirements:
- unlocked Bootloader (this will void warranty and kill future OTA updates on all asus phones at the moment)
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
- magisk root
- a backup of stock boot.img, vendor_boot.img, vendor_dlkm.img and dtbo.img so you can go back to stock conditions (simplest way is TWRP or to extract from stock firmware via payload extractor)
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 9 receives an OTA 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 and try in advance, make sure you have a backup ready!
2. Flash the kernel.zip in your favorite kernel app (I personally use Kernel Flasher by @capntrips as it´s free OSS) or TWRP once available.
3. Reboot and profit.
DOWNLOAD:
Download is located always in this folder:
AFH is currently down. Please check release posts for attached files.
https://www.androidfilehost.com/?w=files&flid=335947
Important: Read after Download
Please take a look at the second post after flashing the kernel!
Changelog:
Android 12
1.0.0 Initial Release
1.1.0 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-87544785
1.1.0 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-87641829
1.1.3 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-87761015
Android 13
2.0.0
[Kernel][09.12.2022][Android 13] Kirisakura 2.0.0_T for Asus Zenfone 9 aka "DaVinci"
Kirisakura-Kernel for the Asus Zenfone 9 Hello everyone, To keep it short: Here is Kirisakura - Kernel for the Asus Zenfone 9 aka DaVinci. The Zenfone line-up internal codenames were traditionally derived from alcoholic drinks. Two years ago...
forum.xda-developers.com
2.0.6 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-87945357
2.0.12 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-88194923
2.0.18 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-88332217
2.0.19 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-88360955
2.0.21 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-88384057
2.0.24 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-88600875
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! This device is absolutely stunning!
@osm0sis for all his work, including the ak3 installer!
@capntrips for his relentless work on several projects, including kernel flasher!
@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_DaVinci_AI2202/
For necessary changes to other repos, besides the main kernel tree please check tbaldens github, we did the bringup together:
tbalden - Repositories
engineer. Started github with kernel for HTCDoubleshot, migrating version in 2011. kernel follows kernel, patching intuitive new features into CleanSlate line. - tbalden
github.com
F.A.Q:
Question: How do I return back to stock?
Answer: Extract boot.img, dtbo.img, vendor_boot.img and vendor_dlkm.img from the matching factory image provided on googles download page.
If you want to stay rooted make sure to flash a boot.img that has been patched with magisk.
Flash those images via fastboot/fastbootd and you will be back on stock kernel.
boot.img, dtbo.img and vendor_boot.img are to be flashed in regular fastboot.
vendor_dlkm.img is to be flashed in fastbootd (you can get to this with "fastboot reboot fastboot" when you´re in regular fastboot)
Question: How to report bugs properly?
Answer: Have a look at post #3 in the linked thread. The linked guide is a pretty good starting point.
Before reporting any bug make sure you´re running on a stock configuration. That´s means you´re not using any mods, tweaks in kernel managers or other root tweaks , magisk modules, scripts or other modifications that alter various functions like sound mods, data traffic, sleeping behaviour, scheduler, magical battery tweaks 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?
Please make sure to meet the points described above, provide logs as detailed in the link above, otherwise debugging is a lot more time consuming and harder. If these requirements aren´t met and I don´t find time to either reproduce the issue myself or I´m not able to reproduce the issue myself reports might just be ignored. 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.
Question: What about unlocking, rooting, passing safetynet, apps detecting root/modifications and other topics that are vaguely related, but not really subject of this thread?
Answer: If you want to modify your phone via root/magisk in any way you need to unlock the bootloader. Unlocking will result in safetynet not passing. This has nothing to do with the kernel. At the moment of writing this, safetynet not passing can be worked around with a magisk module called "Universal SafetyNet Fix".
Not passing safetynet is unrelated to the kernel since hardware attestation is enforced on nearly all newly released devices now.
If you´re not passing safetynet banking apps might for example be detecting root. There are various tricks to hide root/modifications to the phone from banking apps or others but that´s not really subject of this thread.
taken from pixel 6 soon to be adjusted
AOSP Build Environment and Standalone Kernel builds (monolithic builds)
I´m sure some of you followed the movement towards the Generic Kernel Image (GKI) and Qcoms adaption to it called QGKI.
You can find more information about GKI following this link.
What does that mean for custom kernels and this custom kernel?
The last few years the kernel on android devices was more or less compiled as a monolith. That means the kernel is in the zImage with all (most) drivers compiled inline.
However with GKI this changed. There´s the base kernel image while vendor/device specific drivers are compiled as dynamically loadable kernel modules.
On last years devices like the Pixel 5 (using a 4.19 kernel) and this years devices with SD888 on a 5.4 kernel base, there was the possibility to change the QGKI kernel back into a monolithic kernel image. (building the drivers that are on stock kernel external modules back into the zImage to end with a monolithic kernel)
On the Pixel 6 I wasn´t able to achieve this yet. But during my tries I also wondered if maybe finally the time has come to follow suit, instead of trying to enforce old ways, when there´s a new way going forward.
What does that mean. This means that at this point the kernel is shipped as images that are to be flashed via fastboot. At a later stage I´m sure we can modify anykernel3 to allow flashing zips again, but at this early stage fastboot flashable images will be provided.
Those images can be flashed the same way the device is rooted, therefore I think everybody should be able to flash it easily since the device can´t be rooted any other way.
The kernel was compiled using the aosp kernel build environment. Information about it can be found on the documentation page from google.
this one too
and this one as well
Woohoo! Rock'n'roll! ^__^
Update to 1.1.0
Hey guys and girls,
Here´s the next update. It includes quite a few changes.
It also includes the few kernel changes from the latest firmware 32.2040.2040.23.
The link to the latest firmware can be found following this link.
More changes in the changelog below:
Changelog:
- Linux-Stable upstream bumped to 5.10.146
- merge latest CAF-Upstream
- bump clang to prebuilt 14.0.7 from google
- fixed clang warnings in the process
- other improvements and tweaks please check github
Download:
AFH is currently not working properly. Please check this post for the download. Kernel.zip is attached.
https://www.androidfilehost.com/?w=files&flid=335947
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 said:
Update to 1.1.0
Hey guys and girls,
Here´s the next update. It includes quite a few changes.
It also includes the few kernel changes from the latest firmware 32.2040.2040.23.
The link to the latest firmware can be found following this link.
More changes in the changelog below:
Changelog:
- Linux-Stable upstream bumped to 5.10.146
- merge latest CAF-Upstream
- bump clang to prebuilt 14.0.7 from google
- fixed clang warnings in the process
- other improvements and tweaks please check github
Download:
AFH is currently not working properly. Please check this post for the download. Kernel.zip is attached.
https://www.androidfilehost.com/?w=files&flid=335947
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
Click to expand...
Click to collapse
Hello sir,
How do you compile the original Kernel? Is any of vendor_boot or vendor_dlkm images the same as original stock or both are different? What about DTBO? I'm trying to build kernel for ROG Phone 6 but I thought kernal was still a monolithic file, so I flashed one only and failed to boot. ROG Phone 6 includes a script that apparently compiles everything but I don't which one is DTBO, vendor boot and vendor dlkm. Where and how you compile this kernel and where does the output go? For example I see kernel-platform/msm-kernel as the one you modified? That one is the vendor_boot?
Thank you for your help
And by the way, any plan for Kirisakura for ROG Phone 6?
Update to 1.1.1
Hey guys and girls,
Here´s the next update. It includes quite a few changes.
It also includes the few kernel changes from the latest firmware 32.2050.2050.29.
The link to the latest firmware can be found following this link.
More changes in the changelog below:
Changelog:
- included few changes from firmware 32.2050.2050.29
- other improvements and tweaks please check github
Download:
https://www.androidfilehost.com/?w=files&flid=335947
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
Lossani said:
Hello sir,
How do you compile the original Kernel? Is any of vendor_boot or vendor_dlkm images the same as original stock or both are different? What about DTBO? I'm trying to build kernel for ROG Phone 6 but I thought kernal was still a monolithic file, so I flashed one only and failed to boot. ROG Phone 6 includes a script that apparently compiles everything but I don't which one is DTBO, vendor boot and vendor dlkm. Where and how you compile this kernel and where does the output go? For example I see kernel-platform/msm-kernel as the one you modified? That one is the vendor_boot?
Thank you for your help
And by the way, any plan for Kirisakura for ROG Phone 6?
Click to expand...
Click to collapse
boot.img contains the zImage, vendor_boot contains first stage kernel modules, vendor_dlkm contains second stage kernel modules.
Kernel is no longer monolithic by default. I´m using the build environment to get the relevant images for GKI.
Freak07 said:
boot.img contains the zImage, vendor_boot contains first stage kernel modules, vendor_dlkm contains second stage kernel modules.
Kernel is no longer monolithic by default. I´m using the build environment to get the relevant images for GKI.
Click to expand...
Click to collapse
Do you have any kind of tutorial to follow to pack the kernel like you do in AnyKernel zip?
Thank you
Lossani said:
Do you have any kind of tutorial to follow to pack the kernel like you do in AnyKernel zip?
Thank you
Click to expand...
Click to collapse
I´m sorry but a step by step tutorial I don´t have the time to type that all down.
Please check tbaldens github for ZF9. We did the "bringup" of the ZF9 GKI environment together.
That here contains the scripts/methods we basically use both.
GitHub - tbalden/android_kernel_asus_zf9_build_env
Contribute to tbalden/android_kernel_asus_zf9_build_env development by creating an account on GitHub.
github.com
Check all the other zf9 repos as well.
We took basically the asus build script inside the ROG 6 source, readjusted it for the ZF9 source, as the build environment for the ROG 6 was more complete than ZF9.
You either need to remove avb from fstab (that lands in vendor_boot) or disable vbmeta flags for verity/verfication before you can flash any modified vendor_dlkm.
Be aware, disabling the flags triggers an inevitable wipe.
Otherwise check the scripts and work yourself through all the repos.
Unfortunately with GKI kernels you need to adjust the ABI. Now it gets complicated. The gki kernel, the zImage is usually compiled, from the common repo, while the qcom specific drivers are built in the msm repo. Since I don´t care about preserving googles abi for the GKI kernel, I compile the zImage from the updated msm repo, as well as the qcom modules.
That means in my build environment common repo is a symlink of msm repo, while I compile with the same script found in ROG 6 source. I think once you start working through the build environment you´ll understand. Tbalden doesn´t need to do that, as his kernel is close to stock with only a few mild changes, so easier to keep abi in check.
Unfortunately at the moment there´s no easy way to compile it.
Freak07 said:
I´m sorry but a step by step tutorial I don´t have the time to type that all down.
Please check tbaldens github for ZF9. We did the "bringup" of the ZF9 GKI environment together.
That here contains the scripts we basically use both.
GitHub - tbalden/android_kernel_asus_zf9_build_env
Contribute to tbalden/android_kernel_asus_zf9_build_env development by creating an account on GitHub.
github.com
Check all the other zf9 repos as well.
We took basically the asus build script inside the ROG 6 source, readjusted it for the ZF9 source, as the build environment for the ROG 6 was more complete than ZF9.
You either need to remove avb from fstab (that lands in vendor_boot) or disable vbmeta flags for verity/verfication before you can modify vendor_dlkm.
Otherwise check the scripts and work yourself through all the repos.
Unfortunately with GKI kernels you need to adjust the ABI. Now it gets complicated. The gki kernel, the zImage is usually compiled, from the common repo, while the qcom specific drivers are built in the msm repo. Since I don´t care about preserving googles abi for the GKI kernel, I compile the zImage from the updated msm repo, as well as the qcom modules.
That means in my build environment common repo is a symlink of msm repo, while I compile with the same script found in ROG 6 source. I think once you start working through the build environment you´ll understand. Tbalden doesn´t need to do that, as his kernel is close to stock with only a few mild changes, so easier to keep abi in check.
Unfortunately at the moment there´s no easy way to compile it.
Click to expand...
Click to collapse
Thank you for your reply. I succeded to compile using ROG 6 script but I end up with a vendor_dlkm.img in out/target/platform/taro and in gki folder "dist" outputs Image, vendor_boot.img and another vendor_dlkm.img + dtbo.img but doesn't seem to be the correct size, I guess there's another step missing to compile or I don't know which one of the dlkm is the correct one or if I need another step to make the Image file and vendor_boot.img.
Thank you anyways
Lossani said:
Thank you for your reply. I succeded to compile using ROG 6 script but I end up with a vendor_dlkm.img in out/target/platform/taro and in gki folder "dist" outputs Image, vendor_boot.img and another vendor_dlkm.img + dtbo.img but doesn't seem to be the correct size, I guess there's another step missing to compile or I don't know which one of the dlkm is the correct one or if I need another step to make the Image file and vendor_boot.img.
Thank you anyways
Click to expand...
Click to collapse
check the scripts I just sent you. the vendor_dlkm and vendor_boot from the environment don´t work on the device.
The thing is, asus just uses the kernel environment to precompile zImage,all the modules, dtb and dtbo, then transfer those to their complete build environment and those get includes into the images that end up in the firmware. The zImage they´re using on the device is actually not the one compiled in the build environment, but the GKI kernel uploaded by google. That´s why abi is so important. You´re not supposed to flash the ones produced by the build environment.
Check the scripts how repacking both of those works. If everything is right, that will get you to boot.
the zImage you can get from ASUS_AI2202-32.2030.2030.26-kernel-src/kernel_platform/out/msm-waipio-waipio-gki/dist
Update to 1.1.3
Hey guys and girls,
Here´s the next update. Linux-Stable up to 5.10.149, which also fixed the CVEs discussed here and here.
The link to the latest firmware can be found following this link.
More changes in the changelog below:
Changelog:
- included few changes from firmware 32.2050.2050.34
- merge latest kernel/common
- linux-stable to 5.10.149
- includes a few fixed CVEs
- other improvements and tweaks please check github
Download:
Attached to release post, AFH is currently broken
https://www.androidfilehost.com/?w=files&flid=335947
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
Update to 2.0.0
Hey guys and girls,
Here´s the next update with source for A13 stable merged. (not much changes, hence the fast release)
Update to A13 stable before flashing this.
The link to the latest firmware can be found following this link.
More changes in the changelog below:
Changelog:
- included few changes from firmware 33.0804.2060.65
- merge latest kernel/common
- linux-stable to 5.10.157
- other improvements and tweaks please check github
Download:
Attached to release post, AFH is currently broken
https://www.androidfilehost.com/?w=files&flid=335947
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
Update to 2.0.6
Hey guys and girls,
Here´s the next update. That´s a bigger one. I´ll explain a few things below in more detail.
The link to the latest firmware can be found following this link.
Monolithic kernel build
Thanks to @arter97 it´s now possible to build the 5.10 qcom kernel now as a monolithic kernel, not needing to build as a GKI style kernel.
To explain it simple: The problem is QCOM/Google are no longer required to test if drivers are loading in the correct order and or test compilation of a monolithic kernel at all.
The gki style kernel has 100s of drivers build as external kernel modules, instead of directly into the zImage.
Having a monolithic build eases development a bit, but won´t directly make an impact to the user.
If you´re interested check my github, it contains the commits. and be sure to drop @arter97 a few thanks somewhere!
Introduction of Lazy RCU
Usually I´m not stating remarks about a change improving battery life notably. But this is one of the few kernel changes that really does make a noticeable difference.
This kernel has the entire(!) RCU subsystem updated to latest linux 6.0 kernel state. This also allowed for Lazy RCU to be merged into the kernel, which should result in power-savings while the device is lightly-loaded or idling (which is basically the case all the time a smartphone isn´t being interacted with (nothing touching the screen and no other workload such as video editing is done).
If you´re interested in details check the slides, which are also linked in the article mentioned/linked above.
A very simplified explanation: RCU functionality can be called 1000s of times a second, batching RCU calls can save power by not calling as often.
Please keep in mind, those are kernel changes and battery life will not be improved magically by huge amounts, but there´s definitely an improvments.
Sony Scheduler Improvements
Import some scheduler changes around Walt from Sony Xperia 1 IV. This improves jitter by a significant amount.
More changes in the changelog below:
Changelog:
- merge latest kernel/common lts branch
- linux-stable to 5.10.160
- merge latest qcom upstream to main branch
- bump clang to latest prebuilt from google 16.0.2
- lazy rcu backported
- scheduler improvements from Sony Xperia 1 IV
- remove wlan rx wakelock as it´s unnecssary
- other improvements and tweaks please check github
Download:
Attached to release post, AFH is currently broken
https://www.androidfilehost.com/?w=files&flid=335947
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
is there any possibility you could try to make such a kernel for rog 6 ? if you had a tester
luki2411 said:
is there any possibility you could try to make such a kernel for rog 6 ? if you had a tester
Click to expand...
Click to collapse
hi everybody. this is a very voluminous work, but still, if you decide, I am ready to take an active part in testing.
Hi Freak Will you port this kernel to ROG Phone 6 ?