[Kernel][21.08.2021][4.14.243][Android 11] Kirisakura 1.3.9_R for OP7/Pro aka Guacamole - OnePlus 7 Pro ROMs, Kernels, Recoveries, & Other D

Kirisakura-Kernel for the One Plus 7 Pro
Hello everyone,
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.
The only kernels made by OEMs offering this security feature by default are the ones for the Pixel 3, 4 and 5 devices.
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). Similar to CFI, only the Pixel 3, 4 and 5 kernels use this security feature.
SCS is another security patchset that is aimed at preventing attacks via return oriented programming (ROP).
ROP is a technique where the attacker gains control of the kernel stack to overwrite function return addresses and redirect execution to carefully selected parts of existing kernel code.
If you´re interested here are a few good links:
Google Security Blog explaining SCS.
LLVM doc about SCS
Android DOCs documenting SCS
If reading about upstream in the paragraph above got you curious,have a read about Linux-Stable and why it is important here. The stable-process is not the same for every subsystem, but the general idea, rule of thumb and benefits are applicable for other subsystems as well.
Quick explanation of CAF-Upstream. CAF is short for Codeaurora-Forums. This is the place where development from Qualcomm for their SoCs happens. This includes the Snapdragon 855/+ that´s built into the different SKUs of the OP7/T/Pro.
The kernel-bases available on the Codeaurora-Forums, are basically the foundations OEMs use, to build their own kernel additions on top for devices featuring Qualcomm SoCs.
The Qualcomm developers push regular updates to the bases of the different SoCs, a bit similar to how Linux-Upstream works. Most OEMs usually stop updating the initial base after the phone is released, and only cherry-pick certain commits to be in line with the android security bulletin.
This kernel focuses amongst the other features to merge CAF-Updates 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 EAS implementation from 4.19 CAF (sd865/+) was ported to this kernel. There are several interesting mechanisms qcom worked on. The basic layout of the soc architecture ( 4xLittle- , 3xBig- and 1x Prime-Core(s)) has not changed from SD855 to SD865. That means instead of revolution there was a very nice evolution the scheduler underwent.
The kernel includes a lot of improvements and contributions from other developers as well. Without this kernel would not exist.
Many of the improvements originate from @arter97´s, @kdrag0n´s, @RenderBroken´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 OnePlus for Android 11 primarily intended for use on OOS stock firmware
- Upstreamed against latest CAF
- Linux-Stable-Upstream included to latest 4.14.243
- compiled with Clang 13.0.1 prebuilt from Google
- built with -O3 speed optimizations
- Link-Time-Optimization (ThinLTO)
- Kernel Control-Flow-Integration (CFI)
- Shadow Call Stack (SCS) Security-Feature
- Use ThinLTO which was first used in the Pixel 4 XL Android R-Preview Kernel instead of full LTO for full program visibility (needed by CFI)
- fix CFI-Violations found in various subsystems like OnePlus/device specific drivers and qualcomm drivers
- Link the kernel with LLD and use RELR-Relocation
- include important fixes/improvements from kernel/common
- Flashing the kernel will keep root!
- Anykernel zip is based on the Anykernel3 repo from @osm0sis
- include vDSO 32 patches to improve 32-bit performance
- devfreq backports from 5.4 (sd 888 qcom kernel base)
- disable various debugging configs, that are not needed in a perf build kernel according to google.
- Removed RTB(interrupt) logging entirely
- disable selinux auditing (we don´t have to adress selinux denials running a stock rom)
- fix several coding issues detected by newer Clang-Toolchains
EAS related features:
- EAS scheduler backported from 4.19 CAF and 5.4 CAF / QCOM SOurce(SD865/SD888)
- adjust powerhal to account for scheduler backports
- disable autogroups and use cgroups for more efficient task placement!
- updates from kernel/common
- scheduler updates from Googles Pixel kernel
CPU related features:
- dynamic WALT-Windows based on FPS (more information here and here )
- Power saving workingqueues enabled by default (toggleable in EXKM)
have a read here: https://lwn.net/Articles/731052/
this complements EAS in general
- Change various drivers ( MM, audio) to user power efficient workingqueues. This should work well in conjunction with EAS
- include cpuidle patches from CAF
- improvements to cpufreq/times/stats
- improve memory allocations in binder driver
- vdso32 patches as found on Google Pixel devices (brief documentation here)
- arm64: lse: Prefetch operands to speed up atomic operations
- improve bluetooth performance
- improve /proc performance
- remove VLA-usage (info)
- option to disable touchboost in msm_performance
- disable coresight, enable coresight placeholder and add proper disabled clocks for sd 855
File System related features:
- improve memory allocations in sdcardfs
- improve memory allocations in kernfs
- writeback: hardcode dirty_expire_centisecs=3000 based on this commit
- ufs improvements from pixel 4/ pixel 5 kernel
- default IO scheduler to CFQ and readahead to 128
Usability related features:
- High Brightness Mode for increasing backlight level related to brightness accessible via EXKM app
- Vibration Intensity adjustable via EXKM app
- DC Dimming setting now fully functional
- add support for steam controller
- add support for nintendo switch controller
Display related features:
- KCAL to control the display
- KLAPSE integrated
- KCAL/KLAPSE: changes safety measures -> allow completely disabling two RGB values (this was requested to, for example, only have red values on night dimming)
- display tweaks to save power on statically rendered images (taken from samsung galaxy source, which uses a very similar panel)
- improve memory allocation
GPU related features:
- Ability to use the new 675mhz GPU step officially introduced by CAF (OP7/Pro is set to only use 585mhz as max)
more information and benches in the 1.2.0 release post
- add low_prio_worker thread for gpu driver (Improves performance when tearing down processes (eg, via LMK) and not blocking currently running UI from submitting work to the GPU
- remove debugging tracing from GPU driver
- improve memory allocation
Network related features:
- Wireguard Support (Details)
- advanced TCP algorithms enabled
- includes new bbr and bbrv2 (default to bbr as advised by @kdrag0n )
Memory related features:
- Memory Management patches from mainline kernel
- Speculative Page Faults (1. 2) (CAF-default)
- Fix various memory leaks in different subsystems
- allow ZRAM to use higher swappiness values than 100
- default ZRAM algorithm set to lz4 (fastest compression/decompression speeds)
- possibility to use lzo-rle as default ZRAM compression algorithm (more information here and there )
- possibility to use zstd as default ZRAM compression algorithm ( higher compression ratio, slightly lower compression decompression speed, more information and benchmarks here)
- free up memory by removing unused memory regions from dts
- improved performance for unity based games
- improved lz4 performance
Security related features:
- Control-Flow-Integration (CFI) and Link-Time-Optimization (LTO) ported from 4.19 kernel/common and Pixel 4/XL Kernel
- Use ThinLTO which was first used in the Pixel 4 XL Android R-Kernel instead of full LTO
- Shadow Call Stack (SCS) Security-Feature
- fix various CFI-Violations found in various subsystems like Asus/device specific drivers and qualcomm drivers
- enable init_on_alloc for even more security, more information can be found in the commit message
WLAN Driver:
- use CAF wlan driver and compile it inline, the only way to ensure working wlan with this kernel
- the kernel cannot even force load prebuild WLAN module as the kernel base is way to far from stock!
- do no longer rely on the pre compiled wlan driver module
- completely removed qcom_rx wakelock in the wlan driver
- removed debugging from wlan driver
- removed logging from wlan driver
Scheduler Setup and Kernel Settings:
- kernel setting get automatically applied at boot
- an AK3 helper module is automatically installed during flashing ( do not remove it in magisk manager)
Misc Features:
Wakelock Blocker:
- advanced wakelock blocker with the ability to block any wakelocks (dangerous, use with caution)
- please read [URL="https://arstechnica.com/gadgets/2018/08/p-is-for-power-how-google-tests-tracks-and-improves-android-battery-life/"]this for further info
- blocking a kernel wakelock should only be done in case of firmware incompatabilities (WiFi network at work (can´t be changed) causes deep sleep to not work on the phone.) That´s the only use case I see for this feature. The kernel does not features this to improve battery life!
Requirements
- unlocked Bootloader
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
- magisk root
- be aware kernel is primarily made for OOS, certain custom roms might not boot or have features broken
How to flash the Kernel:
1. Download the latest kernel.zip
1a. Optional: While it may not be necessary all times, you may want to restore stock boot.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!
1b. Optional: The stock kernel can be restored by either dirty flashing the firmware.zip or by restoring the stock dtbo.img as well as boot.img. Those can be extracted via payload extractor from the firmware.zip.
2. Make sure to use latest Magisk stable.
3. Flash the kernel.zip via latest EXKM or FKM app. Alternatively via TWRP if TWRP is working.
4. Reboot and profit. After flashing the kernel in magisk manager there will be a module called AK3 Helper Module, do not delete it.
DOWNLOAD:
Download is located always in this folder:
Android 11:
Downloads for : -Android- Generic Device/Other | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.
Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.
www.androidfilehost.com
Android 10:
https://www.androidfilehost.com/?w=files&flid=300422
Android Pie:
https://www.androidfilehost.com/?w=files&flid=294636
Important: Read after Download
Please take a look at the second post after flashing the kernel!
Changelog:
Android 9/Pie
1.0.0 Initial Release
1.2.0 https://forum.xda-developers.com/showpost.php?p=79657888&postcount=133
1.3.0 https://forum.xda-developers.com/showpost.php?p=79681205&postcount=212
1.4.0 https://forum.xda-developers.com/showpost.php?p=79715609&postcount=266
1.5.0 https://forum.xda-developers.com/showpost.php?p=79759064&postcount=369
1.6.0 https://forum.xda-developers.com/showpost.php?p=79812896&postcount=533
1.7.0 https://forum.xda-developers.com/showpost.php?p=79870285&postcount=624
2.0.0 https://forum.xda-developers.com/showpost.php?p=79958105&postcount=732
2.3.0 https://forum.xda-developers.com/showpost.php?p=79994692&postcount=821
2.8.0 https://forum.xda-developers.com/showpost.php?p=80174759&postcount=1003
2.9.0 https://forum.xda-developers.com/showpost.php?p=80246585&postcount=1062
Android 10/Q:
1.0.0 https://forum.xda-developers.com/showpost.php?p=80519841&postcount=1164
1.0.1 https://forum.xda-developers.com/showpost.php?p=80533419&postcount=1186
1.2.0 https://forum.xda-developers.com/showpost.php?p=80606335&postcount=1275
1.3.0 https://forum.xda-developers.com/showpost.php?p=80789819&postcount=1381
1.4.0 https://forum.xda-developers.com/showpost.php?p=81033561&postcount=1472
1.6.0 https://forum.xda-developers.com/showpost.php?p=81399355&postcount=1574
1.7.0 https://forum.xda-developers.com/showpost.php?p=81684441&postcount=1675
1.9.1 https://forum.xda-developers.com/showpost.php?p=82120413&postcount=1737
1.9.7 https://forum.xda-developers.com/showpost.php?p=82743109&postcount=2002
2.0.0 https://forum.xda-developers.com/showpost.php?p=83555997&postcount=2163
Android 11/R
1.1.0_R https://forum.xda-developers.com/t/...r-op7-pro-aka-guacamole.3933916/post-84786595
1.1.1_R https://forum.xda-developers.com/t/...r-op7-pro-aka-guacamole.3933916/post-84793145
1.1.3_R https://forum.xda-developers.com/t/...r-op7-pro-aka-guacamole.3933916/post-84812661
1.1.4_R https://forum.xda-developers.com/t/...r-op7-pro-aka-guacamole.3933916/post-84853537
1.1.6_R https://forum.xda-developers.com/t/...r-op7-pro-aka-guacamole.3933916/post-84900619
1.3.9_R https://forum.xda-developers.com/t/...r-op7-pro-aka-guacamole.3933916/post-85510637
Donations:
Donations are not mandatory but very welcome!
If you want to support development or just buy me a coffee/tea to get development going: http://paypal.me/freak07
Credits:
@osm0sis for all his work, including the ak2 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 giving me advice
@topjohnwu for magisk!
@osm0sis for anykernel!
Contributors
Freak07
Source Code: https://github.com/freak07/Kirisakura_OP7Pro_A11
Kernel Special Features:
Version Information
Status: Stable
Created 2019-05-26
Last Updated 2020-09-26

Question: Is root preserved when flashing this kernel?
Answer: My kernel.zip keeps a device rooted by magisk rooted.
Question: How do I return back to stock kernel?
Answer: Flash boot.img as well as dtbo.img extracted from the full firmware zip.
Question: My WiFi is not working after flashing the kernel. I can´t toggle it on.
Answer: That means something happened to your device, that is causing some stuff to not get loaded properly when booting. I ran into the same issue once. Read through the thread to find the cause.
I wrote a guide in the linked thread, that explains step by step, how to return to a working condition without the need to wipe the phone completely.
Click the following link to find the post: post is linked here
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 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!
To easily get a logcat in case of a crash take a look at this post:
https://forum.xda-developers.com/showpost.php?p=79462002&postcount=1566
Big thanks to @jcmm11 for it
Here´s a tasker task to automatically copy /sys/fs/pstore on each boot to internal storage. Be advised these files get also created on correct reboots.
https://forum.xda-developers.com/showpost.php?p=79549126&postcount=1670
thanks @jsauder2 for this little trick

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!
https://github.com/nathanchance/Android-Tools/blob/master/Guides/Proper_Bug_Reporting.txt

How to convert your OP7 Pro to use f2fs on /data:
Do this only if you know what you´re doing. This guide works even on stock rom with stock kernel.
OP7 Pros Kernel as well as the fstab support f2fs by default.
If you´re using Kirisakura-Kernel starting with version 1.5.0 you will use the latest upstreamed f2fs implementation. Otherwise you´re running that´s a bit outdated and also a bit slower.
Google did put a lot of work in f2fs and that benefits here greatly too.
1. Backup your data and transfer it to an external storage device, because we will now erase everything on /data
2. Boot to TWRP
3. Go to Wipe - Advanced Wipe - Select "data" - Change file system - f2fs - confirm <- This will erase all userdata including your internal storage (pictures, videos, music etc)
4. Boot up and set up your device freshly.
5. Enjoy f2fs on your OP7 Pro
Androbench Results:
Stock EXT4 taken from XDA OP7 Pro Review:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
F2FS on Kirisakura 1.5.0

Well, I wasn't planning on unlocking the bootloader in this phone.... Going to now that you're here! Thanks for your hard work

Dude,
So pumped to have you on the OP7Pro! This is shaping up to be a really well supported device!
Sent from my OnePlus7Pro using XDA Labs

So hey everyone
want to lose a few more words here. I spent quite a bit of time getting this up as quickly as possible. I never had an OP device until now. So I needed to get familiar with it and get the hang of it.
I spent quite some hours and most of my free time since thursday, in the hope of getting this up before the weekend ends. Some people I spent less time with, were not quite as happy about this decision, but so be it.
I had quite a bit of experience with the CAF merge from the Pixel 3 XL, that made things a bit more easier and smooth. Upstreaming to latest linux-stable was quite a pain, because there are several commits, which cause the device to boot straight into Qualcomm Crash Dump mode.
In the end I got to 4.14.122
It´s still early here on this forums. So far now use adb sideload to install the kernel. The magisk module needs to be flashed otherwise some things, like accessing battery settings isn´t working, because of selinux-denials. If you can live without it, I´m pretty sure you can run this kernel also unrooted. But for the things I mentioned magisk is required, because you need to flash the companion module.
Once TWRP data decryption works, we can flash the zip simply in TWRP. Once EXKM and FKM are updated, we should be able to flash the zip via the apps too
For now it´s this way
I have a few more plans for this kernel, like wireguard, adding maybe some (not to much) features to it, maybe use f2fs and bringing it to latest state. I´m pretty sure I find more stuff as well.
The kernel is way more snappy than the stock kernel for me. It uses some of the EAS improvements from my Pixel 3/XL kernel, which can be utilized on this newer kernel base as well.
I confirmed it with a few little tests/benchmarks and for me the difference is night and day.
I´m running the device always full resolution and 90fps
If somebody can confirm, this it would be really great
If you encounter bugs, please take a look at post #2 and #3
there is a bit more in the kernel than the pure OP. I´ll update it the next few days
I wish everybody a nice weekend.

Great to see you here on this device!

Welcome to the world of OnePlus! This is my second device from Oneplus and finding it an awesome device. Sad to see HTC go down the tubes.

great to see you here freak!

Great news. Just flashed all working well so far

Great to see you here freak & we all appreciate you giving up your time. I'm staying stock until Stable Twrp is released, but as soon as it is I'll be using your kernel.....

@Freak07,
Never thought there would be a day that we would both be on the same device again.. ( I technically haven't gotten the device yet.. waiting till next month),
But glad you are here man. Your work is awesome... Now I got someone to cherry pick from JK man.............
BTW< stop by Slack every once in a while man.

Looks promising, I'll flash it! Good job!

hey bud message me on telegram guess we meet again lol im working on my stuff now glad to see you here @Freak07 and eleminator

Wow it's so nice to see you here! Never thought I'd see the day haha

Freak07 said:
I have a few more plans for this kernel, like wireguard, adding maybe some (not to much) features to it, bringing f2fs to latest state and I´m pretty sure I find more stuff as well.
Click to expand...
Click to collapse
Hey buddy,
I would love to see WireGuard support as I use it all the time. I much prefer the kernel implementation as it doesn't consume any battery compared to the userspace version which does.
In terms of F2FS are you also going to update in line with how Arter97 does things and also implement his Rapid GC commit and subsequent changes?
https://github.com/arter97/android_...mmit/34a4ea7309f551150628603f7ef71abc25e6b68e
Regards,
Ravi
Sent from my OnePlus7Pro using XDA Labs

Just flashed the kernel and companion module from within ex kernel manager 5.03 without issue. No pc or twrp needed

DC Dimming function in Utility/Oneplus Lab is not working...

Works fine here.

Related

[ROM][7.1.2_r36][27Jan2018 LineageOS-14.1] Custom Roms

Nougat ROM and beyond?
It's been almost three months that I started the development of K3-Note, challenging and funny. The last few minor issues are also fixed now. Since all the major issues are fixed, it's time to move on to other devices. I might take another look when I find something or when new Android arrive.
As a promise at the beginning, I built another custom ROM -- SlimRom. With the Lineage's setup, it only took me a hour to prepare and patch the platform. After the ROM was out, I polished a few things. I built the CarbonROM too. I also have DU in my hard drive but DU-team had forbidden releasing in xda earlier. My 1T hard drive is almost full and there is no room for another ROM. If anyone interest in taking over any of these, please let me know and I might guide you through. The requirement is simple -- you need to share your work too.
The objective of this project is not releasing a particular ROM. With the solutions to the issues, I hope it would enlighten more people to join our development.
After releasing the kernel, I'm glad there are new kernels come. I was hoping many custom ROM would follow. Sadly, seems Lenovo and Mediatek are not friendly to custom ROM developers. I don't think it's intentional. The changes in the AOSP source by MTK and each manufacturer would likely be the reason. Even if we have the full source, it would probably for LP or MM. Making the proprietary blobs to work for Nougat is not a simple task. I think that's the reason why devices with MTK chips haven't received Nougat updates yet. Most of the manufacturer might be waiting for the update from MTK too.
When I finished the job in hand earlier last month, I decided to try it myself. I already had the Carbon CR-5.1 (Android 7.1.1) source ready so I started with it first. Building it out and made it boot was not too difficult. With a few attempts, my first custom ROM for k3-note was out. Some of the features were not working as expected. RILD not started, no audio and GPS, camera crash, etc... RIL logs are disabled by default so I started fixing the camera which I thought would be easier. That was proved over optimistic soon. My experience told me CM always one step ahead so I downloaded the source when I stated. It's time switching to CM. In a week or two, I finally built a barely presentable ROM. There were questions from a few guys from time to time. All I heard were camera not a problem, audio not a problem, etc... I'm new to K3-note and I just can't imagine how "easy". I don't think I'm that good. I also don't have the patience and experience to try all the blobs. Therefore I upload the test builds for those guys to try. Sadly, up to this moment, no respond yet.
Although there is no complete source from Lenovo, other devices might provide something here and there. Fortunately, only a few pieces are required. The source we can found are for LP and for other devices. Make if work for us would be quite a challenge. I finally managed to fix a few things. I seldom release anything that early but there are just so many requests. I don't think I have enough time to make everything work soon. Seeking for other opinions is never a bad move.
I'm now sharing my experiences again. You are welcome to use and share my works. All I asked is "don't keep it to yourself, share yours too!"
If possible, I'll build a few different ROMs later. However, there won't be any weekly or monthly in schedule. This thread is more or less a stepping stone.
At this stage, report is not essential. You don't have to repeat what already mentioned. Thanks!
Existing issues:
I. Missing symbols
To deal with missing smybols (usually name space changed in platform upgrade), we may use a shim library and assigned it to LD_PRELOAD at init. GCC doesn't care who provide it. As long as it was loaded, others can access it. The up side is, this way would not touch the original source. The down side is it would be loaded/checked whenever a dlopen() is called. Clearly, it would increase overheads and affect the performance. For our K3-Note, there are also some missing symbols in blobs.
I personally don't like LD_PRELOAD libraries. I would usually add a build flag to Android.mk and add a new file if possible.
**In CM14.1, it already added the build flag BOARD_USES_MTK_HARDWARE in vendor_cm.
Set it to true would define a global flag MTK_HARDWARE.**
The patches are grouped in the device tree. At this moment, there are 4 group of patches:-
1. system_core
1.1 liblog (add the xlog function __xlog_buf_printf() and override the RLOG, see following section)
1.2 libnetutils (required by thermal and RIL). Can use the blob from stock ROM.
2. framework_av
2.1 a file mtkaudio_stubs.cpp was added
2.2 missing CameraParameteres
2.3 add extra profiles to AudioPolicy (2016/12/17)
2.4 fix audio recording in AudioFlinger (2016/12/17)
3. framework_native
3.1 Add a few symbols for backward compatible with MM calls.
4. sepolicy. - not compulsory
Mediatek never takes sepolicy seriously. They use permissive all the time. I planed to use enforcing eventually so I dealt with all the sepolicy from day one.
II. The RIL
Tool: To find out what's wrong, the logs are essential. I had made a patch to liblog. A new property "persist.ril.log" is added. Set it to 1 will push all RLOGs to main.
1. A missing symbol in mtkrild
With this help, I found a missing symbol in mtkrild. This symbol is in libnetutils.so. You may either use the file in stock ROM as a blob or rebuilt it.
2. The ccc_util
During debugging, I noticed there were garbage in the ccc_util logs. A source can be found for mt6595. After disassembled the binary blob, I found a few differences. I rewrote some part and added support for the two new properties. The final sources are grouped in the new project android_hardware_lenovo_aio_otfp
3. Default modem selection
There are two modem binaries in stock ROMs -- 5 (LWG) and 6 (LTG). They are in /system/etc/firware. In stock ROMs, the default modem is read from nvram. For some unknown reason (seems protection issue), ccci_mdinit can't get this value from nvram in custom ROMs. It would use the default value in Kernel (was 6). I noticed LWG was shown in About of stock ROM so I changed the kernel default to 5. Other areas might required this to be 6. Check the Modem in About for your area. If it is LTG, you may either swap the names of the two modems or change the kernel default. I wanted to use a build.prop but turn out that ccci_dminit is a blob from Mediatek. There are only binaries available. No way to add anything.
4. Custom RIL Class
This class is to handle MTK specific modem messages. Usually its for emergency dialling and modem info. It is not handled in AOSP. CM14.1 already taken care of it and that's one of the reason I switched to CM for testing.
A Custom class can be found in CM's device tree for mt6735. I think its too much to handle the emergency number list but don't want to waste time rewriting it. With a few modifications, it can work for us in Nougat. Seems there are unused/unhandled messages. **Need to verify it later.**
III. The Camera
After my first ROM was out, the most eye catching in the log would be the stack corruption in libcam.halsensor.so.
Code:
11-24 21:53:55.967 490 490 F DEBUG : #08 pc 00017459 /system/lib/libcam.halsensor.so (_ZN12ImgSensorDrv13getResolutionEPP34ACDK_SENSOR_RESOLUTION_INFO_STRUCT+60)
After study the source for mt6735, I found it was called within the blob libcam.halsensor.so. In the function ImgSensorDrv::getResolution(), an ioctl() call was passed to the kernel. I was thinking it was caused by user space data handling in the kernel. After a series of trials and dumping, I remarked that part of code from the kernel. The crash persisted. That means it was from the blob itself. I tried a shim library to replace the function ImgSensorDrv::getResolution() but the result is the same. That means the callee was responsible.
After some digging, I was pretty sure it was caused by the alignment (address sanitize) of struct addresses. The latest blob from Lenovo dev.1631 (also the latest for mt6752 devices) were built with gcc 4.9 Clang 3.6. Nougat now use Clang 3.8 by default. Those blob already have alignment support in Clang 3.6 might have issues with the new Clang 3.8.
What is address alignment? In short, a 32 bit processor can handle 32 bit at a time. It would be a easier for the register to locate memories in 32 bits (4 bytes) cells (aligned). If the head or tail for a block of memory is not aligned, extra code would required to separately handle those loose ends. The new clang compiler would fill leading bytes with its own algorithm to make the pointer or variable aligned. Why is ImgSensorDrv::getResolution() being "affected"? The argument of it is a pointer to ACDK_SENSOR_RESOLUTION_INFO_STRUCT. Its definition can be found in the kernel. It is a struct of an array of pointers to another struct. The source from Mediatek use direct reference to the address of struct variables all the time. This is inappropriate in sense of address alignment. Early compilers didn't handle alignments and won't have problem with that. Newer compiler would use its own algorithm to align the structs and pointers. I guess Clang 3.6 didn't handle the above complex struct as argument well. Nougat linker and loader are all built with Clang 3.8. Local variables are allocated at load time which might be handled differently. Thus a call to ImgSensorDrv::getResolution() would cause the stack corruption.
** Those interested may read this article for detail. **
1. Work around
Using older blobs built by gcc 4.8 or earlier might work. Jiayu S3's AOSP were using those old blobs. I'm new to K3-note. I don't think I have the patience and experience to test all the existing blobs. That's the main reason I uploaded the last two test ROM. Trying blobs and hoping some combination would work is passive. Stlport is also obsolete for some time now. I rather deal with the problem directly.
2. The solution
Without the source, building the whole blob is impossible. Even if we have the source from other devices, those custom parameters are unique to each image sensor. It's impossible to guess or back engineer...
If we can change the way ImgSensorDrv::getResolution() is being called or didn't touch the argument within the function. It would avoid the crash. Unfortunately, the function need to fill a local struct within the ImgSensorDrv class. That means it is not seen outside ImgSensorDrv. The only way is to replace the whole ImgSensorDrv class. Fortunately, it is self contained. We can write a wrapper to replace the ImgSensorDrv class only. The source from mt6735 or mt6595 are a bit different and obviously can't be used directly. Most of the struct can be cross referenced to the kernel source. There are two local sturct left unknown. One is for the commands sent to the kernel. The other is some info. collected from the kernel.
With the wrapper, the crash was gone but still no preview. I wrote a test HAL to dump the values in stock ROM. Guessing the values against the names was not a decent job. Fortunately, there were only a few differences. After nights of trial and error, I finally pulled everything together. Camera is working now! Video recording is still not working. Seems codec related. Some say it's not a problem "again". Hoping there will be some real solutions and helps soon...
TODO: HDR crashed
IV. GPS
While comparing my log to the stock's, I found all daemons are working properly. It must be the problem of the interface. The java interface of GPS was changed in Nougat. Seems there were transitions from GPS struct to GNSS struct. I accidentally noticed a line in the thousands lines of log.
Code:
gps_mtk : copy_GpsCallbacks_mtk: line = 4124Bad callback, size: 96, expected: 88 or 80
This showed some proof for my guess. After comparing the hardware/gps.h from MM and Nougat, I think the main problem is the difference in callbacks. There were a few ways in my mind. We can change the JNI and handle MTK differently to adopt the old style. Or, use another wrapper to shield the GPS HAL.
The solution
The best way is naturally to rebuild the GPS HAL. The sources I had were outdated. After another intensive search, I found the source for mt6795 from xiaomi and another source for mt6753 from ulefone. They were almost identical and matched all the symbols in the blob from Vibeui 3.5 1631. Their contents were quite standard GPS HAL but a lot had to patch for Nougat. Mediatek already handled some transitions to GNSS which made things a bit easier. The last piece left was the prebuilt libepos. There was no 64 bit library from xioami but there were a few from other devices. Nougat already have the open source curl in extension so everything seemed ready. In a few attempts, I managed to build the new HAL out. I also include Mediatek's apk YGPS for testing. Another reason is the uniqueness of GPS from MTK. Common GPS utilities like GPS Status doesn't work. Anyway, GPS is working now! Cheers!
update (2017/2/17): I was using a mt6795 source from github. Turn out that it was already modified. There were something missing. I rewrote the HAL from the official mt6797 source. Now it is fully support GPS, GLONASS and BEIDOU. It is also backward compatible with the AOSP callbacks. Most of the GPS apks (eg. GPS status which was not working in stock MM) would be working now.
update (2017/6/5): For some unknown reason, the country code can not be read from nvram. Thus mnld would use default value which disabled the GLONASS access. I made a patch in post #520. It would generate the file /data/misc/gps/mnl.prop. This is the default property file which never been used. Read the comment inside this file for detail. There are other default settings available. Anyone interested may PM me for detail.
V. Audio recording
After checking with a few test apks, I'm pretty sure the issue was the audio recording solely not Mic. related. Actually, I already fixed it for some time but I didn't know. I was mislead by the pause feature in CM's SoundRecorder apk. That pause feature is unique to CM. MTK's (probably some others) HAL didn't handle it at all. Whenever I pressed the pause, it would call the missing function in HAL and hang. I wrote a test apk myself and found that it worked! I then looked into the source of AOSP. That cleared things up immediately. I don't want to modify CM's apk so I replace it with the one from AOSP.
The solution
The definition of the struct audio_stream_in has changed in Nougat. The function get_capture_position() was added. It's just for reporting the time stamp. The audio HAL blob from MTK didn't have this function. When the input streams were loaded, it would crash. I reinstated the untouched BOARD_USES_LEGACY_MTK_AV_BLOB flag and made a patch in AudioFlinger service. I added the specific header "audio.h" in device tree. Check the source on my github for detal.
One less thing on the list now! Cheers!
VI. MTK Codec
Codecs are essential for recording and playback. Although we can use the software codec from CM or Google for playback, video recording normally required the codec from the manufacturer. That's why I spent a lot of time to make them work first. Samsung and Qcom usually put the codecs in kernel drivers but Mediatek didn't. MTK's codec use the gralloc_ext, ui_ext and gui_ext helper libraries to "assist" the allocations and queries. Unfortunately, platform changes arose some issues in these blobs.
The solution
Naturally, to make it fully support Nougat, we have to rebuild it. I found the sources for mt6797. They are small but have some dependencies. Only minor changes would make them Nougat compliant. Both depend on the dpframework and gralloc.mt6752 which are proprietary. I already rebuilt gralloc_ext from source. Proved to be the right move now. I grouped them into the graphics folder in the hardware_lenovo_aio_otfp project. With these newly built libraries, all codecs are working now.
update (2017/3/18): Found the latest codecs for mt6750t. They work for YouTube, Snapchat, etc. Check the attachment in post #272.
TODO: WVM not handled
VII. Video Recording
For my Samsung devices and Tilapia, I can make the cameraservice work on both camera and camcorder. I don't need the HAL1 flag reverting to the mediaserver. After fixing the extra allocation libraries for my K3-note, I could record the video to a mp4 file. Audio was normal but video wasn't. I had studied for a while. I thought it was colour format related but I don't know why yet. There would be too much changes to the original source so I decided to put aside first.
The solution
Although it's not my wish, I compromised. Everything went well when I use the HAL1 flag switching back to mediaserver. It's time to move on to the WifiHAL now. Would return to this part later. Anyway, it's kinda fixed now!
TODO: Reinstate Cameraserver
VIII. WifiHAL for Nougat
WifiHAL has been introduced for a few generations. It provides another way to access the WiFi in the frameworks. MediaTek's WifiHAL was clearly derived from Broadcom's source. LP and MM only used a small portion of the callbacks. Nougat uses a few more and some of them haven't supported in the kernel driver yet. I used a patched Brodcom's WifiHAL in my earlier builds. It could only be loaded to pass the check. Things like hotspot, 5G, hidden ssid, etc. were not handled. I then ported the sources from mt6795 and mt6797 to my early WiFiHAL. It took me a few days to handle most of the Wifi commands and queries. Together with the minor patch in netd, hotspot is working. An immediate issue arose -- WiFi wouldn't auto reconnect. It required to turn on manually. Hidden ssid was still not working. When a network was manually added, Wifi would fail to scan for APs. Clearly it was another major problem I overlooked...
A long road to the solution
I enabled the logs in all the relevant java and c files. Nothing seemed special pop up. I then added my own extra logs. An odd scenario appeared on the channel list. I traced back to the callee in libwifi-service. It was a query message for the available channel lists for 2.4G, 5G and 5G DFS bands. However, the lists to all bands were the same. There were 3 channels all started with 2412 (which is the 1st channel of 2.4G band). The default log in GetChannelListCommand only dump the first entry so I add a for loop to dump all. I got 2412,2413 and 2414! That was definitely impossible. I realized there must be something wrong with this vendor data. Clearly the firmware and proprietary blobs won't be the problem. There were also nothing similar in the nvram. I then traced back to its source -- the kernel driver. Following the defconfig and Makefiles, I found the handler for this message in drivers/misc/mediatek/connectivity/conn_soc/drv_wlan/mt_wifi/wlan/os/linux/gl_cfg80211.c.
Looking at the function mtk_cfg80211_vendor_get_channel_list() made me cry and laugh...
Code:
kalMemZero(channels, sizeof(wifi_channel) * 4);
/*rStatus = kalIoctl(prGlueInfo,
wlanoidQueryStatistics,
&channel,
sizeof(channel),
TRUE,
TRUE,
TRUE,
FALSE,
&u4BufLen); */
/* only for test */
num_channel = 3;
channels[0] = 2412;
channels[1] = 2413;
channels[2] = 2414;
NLA_PUT_U32(skb, GSCAN_ATTRIBUTE_NUM_CHANNELS, num_channel);
NLA_PUT(skb, GSCAN_ATTRIBUTE_CHANNEL_LIST, (sizeof(wifi_channel) * num_channel), channels);
It was clearly not handled! I found similar codes among all mt67xx and mt65xx devices. The latest MTK's 3.18 kernel, however, paid back. The codes seemed promising. Only minor adjustments were required but this time I got nothing... I then dumped all the arguments and results after each function calls. Things were clear instantly. Platform used band 1,2,4 for 2.4G, 5G and 5G DFS respectively but MTK use 0 for 2.4G which was also different from its own enum definition (which is similar to the platform). I believed they didn't test it in 3.18 too! I used the parameter band directly. Then simplified the code to have both 2.4G and 5G sharing the same call. After that the channels were reported correctly to the platform. As a bonus, I found the part handled 5G which was disabled by default. I enabled it in the kernel now. As expected, both 2.4G and 5G channels are reported correctly now. After this fix, WiFi can now auto reconnect. To avoid further land mines, I checked all the WiFi commands in the WifiHAL. Turn out that only a handful was actually handled in the kernel. Most of the useless codes are removed and the rest are properly handled now. It took me over a week! The WifiHAL turn out to be a big chapter!
The next and more annoyed issue was Hidden SSID. I'm pretty sure the WifiHAL was OK so I looked into the vendor lib lib_driver_cmd_mt66xx. Enabled a few MTK flags and started with a very limited code all resulted the same. Finally, the following line in log caught my attention:
Code:
E wpa_supplicant: wlan0: nl80211: Scan trigger failed: ret=-22 (Invalid argument)
A block of similar lines show repeatedly when a network was manually added. I believed wrong arguments were sent to wpa_supplicant. I downloaded the full wpa_supplicant manual and redirected the wpa_supplicants commands to the console. Nothing seemed special but I noticed there was an empty entry being pushed to the argument list. The error only occured when the added SSID appeared. With the empty entry, the arguments were one less. Even if its MTK's problem, wpa_supplicant should take care that. I saw a potential problem and I decided to add a check first. It really really paid back! That's the reason why hidden ssid not working! After two sweaty weeks of work, I would said WiFi is fully working now....
update (2017/6/22): p2p and WiFi-display is working.
VIII. FM radio
update (2017/2/27): After taking another look, I found that the FM radio was already fixed. Probably after the audio recording fix. So everything is more or less working now. Cheers!
Credits:
- With no doublt the LineageOS community should have most of the credits
- The CarbonROM, OmniROM, SlimROM and many other custom ROM teams who bring us the alternatives.
- Those who release the sources for MTK devices.
- And finally Lenovo who had released a castrated kernel source which motivate us to DIY.
Sources: https://github.com/danielhk
Download: AFH LineageOS, AFH SlimRoms, AFH CarbonROM
(百度网盘)LineageOS , (百度网盘)SlimRoms, (百度网盘)CarbonROM
My version of TWRP-3.1.1
Installation:
** backup your current /boot, /data and /system partition first **
TWRP 3.0.x is the only recovery tested. There are many TWRP using different device names out there. I already included a few but there would be more. If you got error (6) at flashing, you may change the line in updater-script or use different TWRP.
1. Do a factory reset (wipe /data and /cache)
2. Flash the ROM
3. Flash the Gapps
4. Flash latest SuperSU​Step 1. is essential if you are from other ROMs, otherwise you might get ERROR:7.
Reboot and hoping its not a night mare...
** Note: you don't need to wipe other partitions. Some important device specific data are in nvram and misc. **
Change Log:
Code:
[COLOR="Blue"][B]2018/1/27 - LineageOS-14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.2_r36 (NJH47F)
- Security patch Dec. 5,2017
- Kernel: New Bluetooth driver
- Bluetooth HAL build from source
- Adjust some Heap and VM settings[/INDENT]
[COLOR="Blue"][B]2018/1/2 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.2_r36 (NJH47F??)
- Kernel: a few minor patches
- Fix Hotspot issue in the last build[/INDENT]
[B]2017/12/29 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.2_r36 (NJH47F??)
- Cumulated patches from my previous Lineage-15.1 builds
- Kernel: a few drivers update
- Adjust some Heap and VM settings
- Security patch Dec. 5, 2017[/INDENT]
[COLOR="Blue"][B]2017/12/16 - LineageOS-14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.2_r36 (NJH47F)
- Security patch Dec. 5,2017[/INDENT]
[COLOR="Blue"][B]2017/12/3 - LineageOS-14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.2_r29 (NJH47F)
- Update SELinux rules[/INDENT]
[COLOR="Blue"][B]2017/10/31 - LineageOS-14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.2_r29 (NJH47F)
- Fix Sim settings crash
- Kernel: binder update[/INDENT]
[COLOR="Blue"][B]2017/10/15 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.2_r29 (NJH47F)
- Kernel: binder update[/INDENT]
[COLOR="Blue"][B]2017/10/1 - LineageOS-14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.2_r29 (NJH47F)
- Fix PicoTTS from Lineage
- Security patch Aug. 5,2017[/INDENT]
[COLOR="Blue"][B]2017/9/9 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.2_r29 (NJH47F)
- Security patch Aug. 5,2017[/INDENT]
[COLOR="Blue"][B]2017/8/20 - LineageOS-14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.2_r29 (NJH47F)
- Clean up unused RIL daemon and services
- Security patch Aug. 5,2017[/INDENT]
[COLOR="Blue"][B]2017/8/13 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.2_r29 (NJH47F)
- Clean up unused RIL daemon and services
- Settings: Enable the Ambient Display switch
- Security patch Aug. 5,2017[/INDENT]
[COLOR="Blue"][B]2017/7/29 - LineageOS-14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.2_r24 (NJH47D)
- Kernel: a few minor patches (mainly for O ready)
- Settings: Enable the Ambient Display switch
- Security patch July 5,2017[/INDENT]
[COLOR="Blue"][B]2017/7/21 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.2_r24 (NJH47D)
- Security patch July 5,2017[/INDENT]
[COLOR="Blue"][B]2017/7/2 - LineageOS-14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.2_r17 (NJH47B)
- With all patches from the last Carbon.
- AudioFX is removed. Seems useless now.
- PerformanceControl: With Arabic translation from @ziad shawki
- PerformanceControl: Improve the battery interface to report the battery voltage from MTK devices
- Kernel: fix a bug in Lenovo's code.
- Kernel: Further simplify the code in the touchscreen driver.[/INDENT]
[COLOR="Blue"][B]2017/6/29 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.2_r17 (NJH47B)
- Kernel: enable native gesture support
- Kernel: new touchscreen interface for gesture
- Kernel: enter pocket mode when gesture wakeup enabled
- PerformanceControl: upgrade to version 2.1.7
- PerformanceControl: New MediaTek settings with Slide and Gesture O and V handler
- PerformanceControl: fix a bug in drawer
- PerformanceControl: Filter out unnecessary system apps in Freezer[/INDENT]
[COLOR="Blue"][B]2017/6/20 - Kernel update[/B][/COLOR]
[INDENT]- Touchscreen: driver patch and clean up
- enable native gesture support
- enable native DT2W support, add double tap Home key to wakeup
- Enter low power mode at suspend
- pocket mode automatically enabled in native driver[/INDENT]
[COLOR="Blue"][B]2017/6/16 - LineageOS-14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.2_r17 (NJH47B)
- all patches/fixes from CR-5.1 are included
- Security patch June 5,2017[/INDENT]
[COLOR="Blue"][B]2017/6/14 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.2_r17 (NJH47B)
- Rewrite fstab
- Kernel: patches to a few drivers
- Bug fixes in CarbonFibers
- Security patch June 5,2017[/INDENT]
[COLOR="Blue"][B]2017/6/2 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.2_r8 (N2G47O)
- Default Carbon Browser
- Bug fixes in CarbonFibers
- Security patch May 5,2017[/INDENT]
[COLOR="Blue"][B]2017/5/3 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.2_r8 (N2G47O)
- Fixes from latest LOS-14.1
- codec update
- Fix longpress and doubletap behaviour of nav buttons[/INDENT]
[COLOR="Blue"][B]2017/4/30 - LineageOS-14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.2_r2 (N2G47E)
- kernel: default at 1.8G now
- New HDR approach[/INDENT]
[COLOR="Blue"][B]2017/4/12 - AOSP-7.1.2_r6[/B][/COLOR]
[INDENT]- The Android-7.1.2_r6 (NHG47K) source
- All fixes from previous builds
- PerformanceControl is included
- Equipped with the O/C kernel, default at 1.8G now
- Fix the Camera crash in 7.1.2
[COLOR="Red"][B]*** see [URL="https://forum.xda-developers.com/showpost.php?p=71828345&postcount=330"]post #330[/URL] for how to install and download link ***[/B][/COLOR][/INDENT]
[COLOR="Blue"][B]2017/4/8 - LineageOS 14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.1_r25 (NOF27B)
- All fixes from previous builds
- Workaround for HDR. Don't know if its better but faster than stock algorithm
- Equipped with the O/C kernel
- PerformanceControl is included
- Update codecs
- Include App Switch (Recent) in button settings.[/INDENT]
[COLOR="Blue"][B]2017/3/30 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.1_r25 (NOF27B)
- All fixes from previous builds
- patches to adapt the new Carbon build scripts.
- Fix the flashlight while taking picture
- Fix the custom key definition for menu key.
- The O/C kernel is equipped[/INDENT]
[COLOR="Blue"][B]2017/3/19 Kernel update, see [URL="https://forum.xda-developers.com/showpost.php?p=71490161&postcount=275"]post#275[/URL] [/B][/COLOR] for detail and download link.
[INDENT]- O/C for CPU upto 2GHz (Adjustable with PerformanceControl and other kernel tools)
- Voltage table control (Adjustable with PerformanceControl and other kernel tools)
[COLOR="Red"]*** The default values are already optimized for the PLL and power chip.
Don't mess with them if you don't know how. I already set the upper and lower limits.
Should there be any damage caused, it would be at your own risk ***[/COLOR]
- OC for GPU upto 819MHz.
- Work for most (hoping all, including stock) Roms with the VibeUI dev. 1631(and s433) blobs.[/INDENT]
[COLOR="Blue"][B]2017/3/18 Codec update, see [URL="https://forum.xda-developers.com/showpost.php?p=71476388&postcount=272"]post#272[/URL] [/B][/COLOR] and download link.
[INDENT]- Fix YouTube zooming issue
- Fix SnapChat recording.[/INDENT]
[COLOR="Blue"][B]2017/3/12 - [COLOR="Navyblue"]SlimRoms[/COLOR] build 0.15[/B][/COLOR]
[INDENT]- The latest SlimRom 0.15 source, Android-7.1.1_r26 (NOF27C)
- All patches/fixes in my 20170312 LineageOS-14.1
- Add long press AppSwitch (Recent) key for menu[/INDENT]
[COLOR="Blue"][B]2017/3/12 - LineageOS 14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.1_r25 (NOF27B)
- The latest GPS HAL from CarbonROM
- FMRadio: Fixed
- Media Profiles: update to support common video formats.
- Limit background processes to increase available RAM
- Camera app: replaced with Snap by Lineage
- [COLOR="Red"]Lineage is not ROOTED[/COLOR] by default now[/INDENT]
[COLOR="Blue"][B]2017/2/18 - [COLOR="Black"]CarbonRom[/COLOR] CR-5.1[/B][/COLOR]
[INDENT]- The latest Carbon CR-5.1 source, Android-7.1.1_r21 (NOF26W)
- Initial beta release
- New GPS HAL (fully working and faster)
- Add long press AppSwitch (Recent) key for menu
- All fixes from LineageOS-14.1[/INDENT]
[COLOR="Blue"][B]2017/2/14 - [COLOR="Navyblue"]SlimRoms[/COLOR] build 0.11[/B][/COLOR]
[INDENT]- The latest SlimRom 0.11 source, Android-7.1.1_r21 (NOF26W)
- Initial alpha test build 0.11
- All fixes from LineageOS-14.1
- Add prebuilt Chromium (from CarbonROM)[/INDENT]
[COLOR="Blue"][B]2017/2/14 - LineageOS 14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.1_r9 (NMF26V)
- Libstagefright: Add fixes to media streaming (Don't know if it work or not)
- LiveDisplay: Add support and settings
- RIL: Handle a few more MTK specific messages (WIP)
- GPS: Add backwards support for MM and earlier
- GPS: Fill up the extra fields in GNSS struct
- GPS: Add a override property to select GPS mode (GNSS/GPS) (Testing only)
- Fixed Power off charging screen
- kpoc_charger: keep the stock images (which are in the LOGO partition)
- Fixed LED notifications
- liblight: Rewrite the lights HAL for better support in Nougats and beyond (WIP)
- liblight: Add dual color support (WIP) [/INDENT]
[COLOR="Blue"][B]2017/1/17 - LineageOS 14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.1_r9 (NMF26V)
- RIL: Add a fix in custom RIL class (thx. @Moyster for the tip), don't know if it helps.
- hostap: build from source
- netd: a minor patch (wlan0 to ap0) for hotspot
- WifiHAL: Rewrite a new one (almost from scratch...)
- WifiHAL: Handle extra callbacks for Nougat
- Kernel: Handle the mtk_cfg80211_vendor_get_channel_list() correctly
- Kernel: Enabled 5G by default
- wpa_supplicant: Fix a potential bug (which fixed MTK's hidden SSID issue)[/INDENT]
[COLOR="Blue"][B]2017/1/5 - LineageOS 14.1[/B][/COLOR]
[INDENT]- The latest LineageOS-14.1 source, Android-7.1.1_r6 (NMF26Q)
- RIL: use the full set of blobs from S433 (newer than dev. 1631)
- MTKCodec: Fix the storage issue in MTK Codec
- MTKCodec: Include the complete set of MTK codec in dev. 1631
- media_profiles.xml: Include the vorbis decoder
- libion: Rebuilt with open source libion
- VideoRecording: Fix video recording
- SEPolicy: update for codec and media server
- kpoc_charger: rebuilt kpoc_charger from source [WIP][/INDENT]
[COLOR="Blue"][B]2016/12/17 - CM14.1[/B][/COLOR]
[INDENT]- The latest CM-14.1 source, Android-7.1.1_r6 (NMF26Q)
- Camera: Fix the flashlight in taking picture
- AudioRecording:Fix audio recording
- SoundRecorder: Replaced with the one from AOSP
- SEPolicy: update for 7.1.1_r6
- media_profiles.xml: Rewrote with the values in stock log
- AudioPolicy: Add extra profiles
- OMX: Fix the crash of nativeHandle in video recording (WIP)
- libhealthd: fix a few things (WIP)
- WifiHAL: Rewrote a new one for Nougat (WIP)[/INDENT]
[COLOR="Blue"][B]2016/12/11 - CM14.1[/B][/COLOR]
[INDENT]- The latest CM-14.1 source, Android-7.1.1_r4 (NMF26O)
- init.mt6752.rc: A few patches
- gps.mt6752.so: Rebuilt the GPS HAL from source
- libcurl.so: Use opensource curl
- YGPS: Include MTK's test apk for GPS
- SEPolicy: Further patches
- Built-in VPN is working now
- healthd: Add standard charging routines to (WIP)[/INDENT]
[COLOR="Blue"][B]2016/12/6 - CM14.1[/B][/COLOR]
[INDENT]- The latest DC-MTK kernel
- Kernel: Enable UID CPU time
- Kernel: Emulate the hardware random sysfs
- Kernel: Treat all A/C chargers the same (same charging current and limits)
- Kernel: rename led sysfs to AOSP defaults
- Kernel: set default modem to 5
- Handle all extra SEPolicy
- Fix the audio output
- Add the RLOG override and xlog suppress properties
- Fix RIL and mobile data
- Fix all sensors
- Add libhealthd.mt6752 to report battery status
- Fix the camera[/INDENT]
Known Issues:
Code:
- may be more...
Donations:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
XDA:DevDB Information
Nougat and beyond?, ROM for the Lenovo K3 Note
Contributors
daniel_hk
Source Code: https://github.com/danielhk
ROM OS Version: 7.x Nougat
ROM Kernel: Linux 3.10.x
Based On: AOSP, LineageOS, SlimRoms, CarbonROM
Version Information
Status: Stable
Stable Release Date: 2017-06-14
Beta Release Date: 2017-06-03
Created 2016-12-05
Last Updated 2018-01-27
Never bear more than one kind of trouble at a time. Some people bear three kinds of trouble - the ones they've had, the ones they have, and the ones they expect to have.
- Everett Hale
I might just know who that person is...
Cheers mate
theres a bug when i flash modem of a7000 plus the simcard don't detected but the baseband is written in the build prop
thanks
thanks for your work
Maybe you can ask Jiayu S3 developers to provide you with the source code, as they have nougat 7.1.1 already with everything working. Jiayu S3 is very similar to our device's hardware with MT6752 chipset.
Thanks for your hard work.
agdroubi said:
Maybe you can ask Jiayu S3 developers to provide you with the source code, as they have nougat 7.1.1 already with everything working. Jiayu S3 is very similar to our device's hardware with MT6752 chipset.
Thanks for your hard work.
Click to expand...
Click to collapse
Lenovo Has Different source I have spoke with M.A.D.
Thanks for the effort . I am able to use jio4gvoice in this ROM mic is accessible and Gapps are also working fine, but as described in issue section wifi tethering , video recording is not working I tried so many apps but no success and also battery is draining fast so Best of luck for next release
Is it compatible with k50a40?
Is it compatible with k50a40?
assaultsethu said:
Is it compatible with k50a40?
Click to expand...
Click to collapse
Yes
Flypast said:
Yes
Click to expand...
Click to collapse
Are you tested in k50a40?
not working
sir,
i have lenovo k3 note k50a40, india version, at first have installed miui 8 rom from gooddeath version 6.11.24, and was working fine with rom version 5.0.1 blispop, but i wanted to upgrade so i tried urs but it is not working i have downloaded ur last 11 dec file with 400mb approx and have installed twrp 3.0.2.7 with SuperSU v2.78 SR5, but ur rom is not installing the error says "e3004:THIS PACKAGE IS FOR DEVICE :K50-T5.AIO_M,K3NOTE;THIS DEVICE IS AIO_O.FP"
ERROR 7 , SO PLEASE HELP AND I HAVE ALSO TRIED TO INSTALL GAPPS FROM OPENGAPPS NANO FILE IT GENERATES ERROR TOO WITH "INCOMPATIBLE ROM DETECTED, THIS GAPS IS FOR 7.1.X ONLY BUT THIS IS 5.1.1 SDK 22" SO PLS HELP....
use other twrp ver to try.
---------- Post added at 11:39 AM ---------- Previous post was at 11:37 AM ----------
twrp 3.0.0-2 couco92 maybe work for you. any idea broda
SID_BAN said:
sir,
i have lenovo k3 note k50a40, india version, at first have installed miui 8 rom from gooddeath version 6.11.24, and was working fine with rom version 5.0.1 blispop, but i wanted to upgrade so i tried urs but it is not working i have downloaded ur last 11 dec file with 400mb approx and have installed twrp 3.0.2.7 with SuperSU v2.78 SR5, but ur rom is not installing the error says "e3004:THIS PACKAGE IS FOR DEVICE :K50-T5.AIO_M,K3NOTE;THIS DEVICE IS AIO_O.FP"
ERROR 7 , SO PLEASE HELP AND I HAVE ALSO TRIED TO INSTALL GAPPS FROM OPENGAPPS NANO FILE IT GENERATES ERROR TOO WITH "INCOMPATIBLE ROM DETECTED, THIS GAPS IS FOR 7.1.X ONLY BUT THIS IS 5.1.1 SDK 22" SO PLS HELP....
Click to expand...
Click to collapse
ezhome2046 said:
use other twrp ver to try.
---------- Post added at 11:39 AM ---------- Previous post was at 11:37 AM ----------
twrp 3.0.0-2 couco92 maybe work for you. any idea broda
Click to expand...
Click to collapse
There are just too many versions of TWRP and each carry different device names. Of course, it's up to the builders' will. But, I think the stock recovery's device name would be the best compromise for everyone. It would also work for official updates. I hope most of the fellow developers would accept and make the life of everyone easier.
For the time being, you have to edit the updater-script manually or use another TWRP....
The new CM-14.1 Android-7.1.1_r6 is out now.
Audio recording is fixed in this build. Cheers!
Plz help me iam a7000 plus user when I flash the modem my sim can't be detected but i can receive calls but I can't make calls plz reply
Thank you for your work you are amazing
ziad shawki said:
Plz help me iam a7000 plus user when I flash the modem my sim can't be detected but i can receive calls but I can't make calls plz reply
Thank you for your work you are amazing
Click to expand...
Click to collapse
This is the 2nd time I saw your post. I seldom ignore anyone but I honestly don't know what you meant. I was thinking someone wiser would know and answer you.
You flash the modem? I never mention any modem in my entire thread. What modem?
You don't need the correct grammar or even nice words. If you want help, please help others understand first. Having problem is frustrated but you need to list the detail so that anyone might help. A few word normally won't tell your story. You need to slow down and have some patience to describe your situation in detail first.
At least you have to tell.
1. Where are you? If you are not in my area, it's out of my reach. Hoping someone in your region might help.
2.. What else have you flashed or installed? It would let someone in your region to understand your problem clearer.
This would be my final answer. No one would have time and patience to ask again and again. You ask for help, it's your basic responsibility to provide the detail. Otherwise, you left others no choice but ignore you.
Good luck.
finally audio recording is working. thank you daniel_hk for your hard working.
Hi daniel_hk
Lenovo a7000 plus have another baseband version from k3 note so there's a modem patch zip that make lenovo k3 note custom ROMs works on lenovo a7000 plus and to make the SIM card detected but when I flashed with your ROM i get SIM card not detected but I can receive calls and massages only but i can't make calls so can you make a fix for that
Thank you for reply
By the way I am from Egypt :laugh:
hello daniel_hk ,
does internet video/audio call for whatsapp work?
hows the battery backup?
can work for ext access read/write?
thank you for your hardwork, itwill be the great if all bugs free.
is it port from Jiayu S3
in lenovo a7000+ indonesia sim not working. please fix for lenovo a7000+
You're doing such a great job with this rom! Thank you so much, really apreciate your effort and keep it up!

[GT-I9001][ROM] Customized LineageOS 11.0 (04.11.2018)

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hello everyone,
with this post i present you my Customized LineageOS 11.0 build (based on Android 4.4.4) for the Samsung Galaxy S Plus (GT-9001).
This Rom is based on the work from the ADC-Team and their CyanogenMod 11.0 ROM. The included Kernel is based on Christopher83's UV K^Kernel.
I made this Rom mostly for myself, because i still use this device as my daily driver.
Please take a look at the feature list to see if you like them or not. Also, please read the installation instructions carefully!
Disclaimer
Your warranty is now void.
We are not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed.
Please do some research if you have any concerns about features included in this ROM before flashing it!
YOU are choosing to make these modifications, and if you point the finger at us for messing up your device, we will laugh at you.
Click to expand...
Click to collapse
Features
Latest LinageOS version with current security patch level
Kernel 3.4.113 compiled with latest Linaro 7.3.1 Toolchain
Rom compiled with latest UberTC 4.8.5 Toolchain
Build with optimization flags and added misc performance optimizations
F2FS support for Data and Cache
SDFAT driver for ExFAT and vFAT support
Hardened Kernel and ROM configuration
A lot of fixed security vulnerabilities (e.g. the spectre bug)
Debloated by removing some apps and more stuff (like the theme engine)
microG support
Build with NoAnalytics
Removed some of Google's proprietaries
Up to Date Fennec web browser
Some Vendor Blobs got replaced with open source alternatives (rmt_storage, libgemini and rild till now)
Some upstream updates (Font, tzdata, APN, ...)
Rom and APKs signed with private keys
a lot more...
Installation
If you are installing this Rom for the first time, please do a clean installation:
Download this Rom and the latest TWRP recovery from the ADC-Team with F2FS support (look inside the Download section)
Optional: Download a Gapps package, even tho i strongly suggest not to install them, because of possible performance issues and privacy concerns
Put all of the downloaded files on an external SD card (if you don't have one, you can copy the Rom (and Gapps) on the internal SD card via MTP after the wiping step)
Optional: Backup all of your data
Install the new recovery, then reboot into recovery again
Change the filesystem for the Data AND Cache partition to F2FS (Wipe -> Advanced Wipe -> Select Data -> Repair or Change File System -> Change File System -> F2FS -> Swipe -> Redo steps for Cache)
Wipe Dalvik Cache, Cache, System and Data partition
Install the ROM
Optional: Install Gapps
Reboot the system
If you want to update from the 03.08.2018 build or older to a newer version you have to flash a migration zip first.
Read more about it in the second post.
If you already installed this build, then you can just update it:
Download the new build and copy it to your device
Wipe Dalvik Cache and Cache
Optional: Wipe System (I do this step every time. Its usually not needed and will (hopefully) tell you if it's necessary)
If you are using Gapps you have to install them after the Rom update again
If you are using Adaway, you have to download your Hostfiles after this step again
Install the Rom update
Reboot the system
Changelogs
04.11.2018 build:
LineageOS
-september security bulletin
-added disclaimer to the security patch level
Kernel
-a few patches from lineageos' msm8974 kernel repo and jdc teams kernel repo
-more spectre patches
-changed default governor to interactive
-fixed a "few" compiler warnings
Rom
-update tzdata to 2018g
-update apns
-remove more debug programs
-speed up (scroll-)animations and shutdown
-moved gps hal to the device tree
-add rom informations to the updater script
Apps
-updated fennec to 63.0
Again: if you browser starts to crash after updating, you have to clean Fennec's data. I am sorry if that happens.
Click to expand...
Click to collapse
Old Changelogs:
10.09.2018 build:
LineageOS
-august security bulletin
Kernel
-misc security patches
-updated ancora defconfigs (because of a request)
-implemention of a quickwakeup driver
-use gzip instead of xz for compression
-overclock GPU to 275MHz (thanks to marcindevelopment)
-some more small things
Rom
-updated apns
-removed some debug programs
-removed recovery resources from the zip
-misc cleanups
-readded all the languages and fonts! (thats why the build is about 30mb larger)
-signed builds!
Apps
-updated fennec to 61.0.2
Again: if you browser starts to crash after updating, you have to clean Fennec's data. I am sorry if that happens.
ZIPs
-addonsu zip
-addonsu-remove zip
-migration zip
Click to expand...
Click to collapse
03.08.2018 build:
LineageOS
-july security bulletin
-added some missing September 2017 patches
Kernel
-added LineageOS' SDFAT driver, removed ExFAT driver
-added Spectre V1 and V2 patches
-some security patches from LineageOS' samsung_msm8974 kernel tree
-added some more hardened kernel configurations from AndroidHardeningArchive's Kernel tree
-use optimizations for the memory manager again
-updated android-alarm driver
-a lot of firmware loader updates
-reverted all of the latest binder updates
This fixes the broken touchkey backlight timeout option
-added some K^Kernel patches i somehow missed
-switched some I/O schedulers and governors
-added an interface that lets you disable the logger
-removed execution domain support
Rom
-renamed Rom from UNOFFICAL to customized
-reworked brightness fix, now it works for every brightness value
-whitelisted some OpenGL ES methods (Google Maps and some other Apps my run faster now)
-readded arabic language and font (because of a request)
-disabled LineageOS statistics by default, only relevant for a clean installation
-removed CM's recovery keys
-updated Wallpaper Picker
-updated APNs
Click to expand...
Click to collapse
13.07.2018 build:
Kernel
-Compile GPU driver and crypto modules with -O3 again
-Reverted a faulty commit
-Removed F2FS encryption support (not supported for Kernel 3.4)
-Implemented CPU boost (thanks to MarcinDevelopment)
-Small performance optimizations
-Fixed some compiler warnings
Rom
-Deleted one unnecessary vendor blob
-Disabled GPS by default, only relevant for a clean installation
-Updated APN's
-Use low-res bootanimation
-Boot with 1/4 of the maximum brightness
-Implemented the hacky maximum-brightness-after-boot workaround
-Small cleanups
Apps
Fennec
-Updated Fennec (they forgot to build some languages)
If you browser starts to crash after updating, you have to clean Fennec's data. I am sorry if that happens.
Click to expand...
Click to collapse
08.07.2018 build:
Kernel
-Kernel compiled with -Os flags instead of -O3
This should fix the hw button bug (thanks to outofmemory13)
-a lot of binder updates
-properly implemention of UID-based routing
-some more things from LineageOS' samsung_jf kernel tree
Click to expand...
Click to collapse
06.07.2018 build:
Since this Changelog would be too big to add every change that was made from the latest CyanogenMod Rom from the ADC-Team, this is more a of a mashup, I am sorry if I forgot something important.
Notable CyanogenMod/LinageOS changes
-rebranding to LineageOS
-new Bootanimation
-updated translations
-some layout fixes
-some fixed FCs
-updated APNs
-some security vulnerabilities got fixed (like Krack and Blueborne)
-implementation of the security patch level
Current version is June 2018
Kernel
-updated Kernel version to 3.4.113 (EOL)
-compiled with latest Linaro 7.3.1 Toolchain
-changes from the ADC-Teams cm-12.1 branch
-switched to the UV configuration per default (if you notice stability issues related to the undervolting, you can manually change the voltage tables)
-update BFQ scheduler and make it default, also removed some other schedulers
-switched to Lulzactive as the default governor, also removed some others
-misc performance optimizations (e.g. disabled CRC check, some disabled logs, stats and debugging, LZ4 compression, disabled LMK and more)
-updates for F2FS and ExFAT (1.2.9 -> 1.2.19)
-TCP changed to Westwood
-build with some optimization flags (O3 and Graphite optimizations)
-mark SD card as non removable
-included power efficient workqueues
-a lot of fixed vulnerabilities
-hardened build configurations/changed some configs, that were really bad for security (e.g. disabled devmem, disabled AIO, updated LSM_MMAP_MIN_ADDR value and more)
-raised default min CPU frequency (this fixes the audio stuttering in Apollo music player)
-lowered min display brightness
-disabled virtual terminal (this means 1MB more available RAM OMG!!!)
-a lot more
Rom
-synced with latest CM/LOS changes
-compiled with latest UberTC 4.8.5 Toolchain
-changes from the ADC-Teams cm-12.1 branch (the ones that are applicable for cm-11.0)
-compiled with Archidroid Optimizations V3 (I cleaned them up a bit)
-F2FS support for Cache and Data
-upstream changes to the media drivers (CAF media, audio and display driver)
-implemented ioprio for a more responsive phone (thats why i recommend to use BFQ)
-switched from Superuser to SU (you can enable root inside the developer options, there is also a new SU panel inside the advanced privacy guard)
-microG support (fake signature support can be enabled inside developer options)
-replaced Google Analytics with a self-compiled NoAnalytics version
-hardened SQLite (enabled secure delete)
-hardened WPA Supplicant
-updated APNs from the lineage-15.1 branch
-updated time zone data
-optimized GPS (with a security fix)
-some vendor blobs got replaced with open source alternatives (rmt_storage, libgemini and rild till now)
-more volume steps
-improved performance (e.g. by optimizing the scrolling cache, by showing simple dialog for optimizing apps, or disabling some debugging)
-sounds cleanup
-updated fonts and emojis
-you can now pull down the status bar when your device is locked
-smaller touch target for the emergency call button on a locked screen
-updated wallpaper
-misc hardening (e.g. by increasing the maximum password length)
-use Cloudflare DNS servers instead Google's
-remove some precompiled stuff (like old face recognition files)
-removed theme engine (even when not in use, it used about 5MB of RAM)
-removed some apps (like Terminal, SoundRecorder, STK, CMAccount, CMHome, VoiceDialer, VoicePlus, VideoRecorder, LiveWallpaper, CMUpdater, Email, PrintSpooler and even more)
-removed some languages
-added ASCII art and real-time installation infos
-added lockscreen rotation option
-speed up some animations
-some upstream fixes
-new power off charging animation
-a new bootsplash logo
-a lot more
Apps
Browser
-changed it to Fennec 61.0 from F-Droid
The security issues in the original browser and Kitkat's webview are too terrible.
CMFileManager
-removed the exit warning
Apollo music player
-fixed back button
-remind the last song that was played
LockClock
-fixed the interface for low font sizes
-removed Google proprietary
Trebuchet
-updated all apps icon
Settings
-updated icon
-updated battery/system icons (gingerbread is now dead!)
-updated german translations
-new contributors cloud
-removed theme options
-support for microG and SU
Click to expand...
Click to collapse
Downloads
04.11.2018 build
Old Downloads:
10.09.2018 build
03.08.2018 build
13.07.2018 build
08.07.2018 build
06.07.2018 build
Sources
LineageOS sources: https://github.com/LineageOS
My repositories: https://github.com/wangenau?tab=repositories
My manifest files: https://github.com/wangenau/android
Credits and Special Thanks
LineageOS/CyanogenMod
Mozilla
ADC-Team
JDC-Team
LegacyXperia
CopperheadOS/thestinger
Christopher83
sirmordred
coldwindofnowhere
DafabHoid
outofmemory13/MarcinDevelopment
ArchiDroid/JustArchi
XDA:DevDB Information
Customized LineageOS 11.0, ROM for the Samsung Galaxy S Plus I9001
Contributors
wangenau
ROM OS Version: 4.4.x KitKat
ROM Kernel: Linux 3.4.x
ROM Firmware Required: TWRP Recovery with F2FS support
Based On: LineageOS
Version Information
Status: Stable
Created 2018-07-07
Last Updated 2018-11-04
Additional Informations
Signed Builds
Starting with the 10.09.2018 i will start to sign my builds with my own private keys. That includes the Rom itself, but also the APKs inside of it (instead of precompiled apps i include, which is only fennec till now).
This means you (or someone else) can only update the Rom and the system APKs with files that are signed by me. With this noone should be able to install a bad system APK or a bad build on your device.
To update your device from an older build, you have to add those keys to your device first. I made a flashable zip for that purpose. So if you want to update from an build that is older than the 10.09.2018 you have to flash this zip first.
Download migration zip
You only have to do this procedure once. If you do a clean installation you don't even have to it.
But that also means you can't go back to an older build after going to signed builds. (If you really want to for whatever reason, edit the migration zip for that purpose, or ask me how to do it)
To check if one of my builds has the correct signature, simply use:
Code:
keytool -J-Duser.language=en -list -printcert -jarfile zip_name.zip
The resulting fingerprints of my builds (after the 03.08.2018) are listed as follows:
Code:
Certificate fingerprints:
MD5: A2:42:4C:F5:4E:DD:3A:A2:C8:20:3A:AF:A1:D6:B9:99
SHA1: F2:13:38:21:53:55:89:CD:30:96:18:99:DD:7B:6D:81:DF:18:79:5F
SHA256: 94:56:09:A6:38:84:CB:BD:82:A5:A9:30:2F:D7:7C:EC:95:AA:57:FE:88:3B:9B:16:79:61:64:B4:AC:79:53:CC
SU
This Rom comes with su preinstalled. This means you have the ability to use Apps that need root permissions. If you don't want this you can remove su with this flashable zip.
Download addonsu-remove zip
If you want to add su back after removing it, you can do that with this zip.
Download addonsu zip
Simply flash these zips inside your recovery and reboot your device afterwards.
Bugs
There are a few small bugs, that will probably never get fixed (if you know how to fix these write me how to do it )
Bugs that can be fixed with a reboot:
no mobile data connection
SD Card stops working
Other Bugs:
MX Player does not work (and it will also freeze your system)
apparently this applies to RAR and Solid Explorer too
a user reported FC's and slowdowns inside the app "Aliexpress" with the lulzactive governor
Tips and Tricks
To get access to the Performance and Developer options go inside About phone inside Settings and tap 7 times on the Build number.
The default governor is interactive. Personaly i use lulzactive. Switching the governor may give you better performance and/or batterylife. But using interactive should be more stable. You can change the governor in the Performance section inside.
Under Performance Settings you can also overclock the cpu. I would say it is pretty save to overlock the cpu, since i am running my device for 5 years at 1.82 GHz (unless you have a different hardware revision)
If you experience random shutdowns after overclocking, you should lower the maximum cpu speed or raise your cpu voltage.
Using this Rom without Gapps is recommended. If you need some Google services you can use MicroG instead. To use it activate Signature Spoofing under Developer options. Google Maps i use, in combination with MicroG and Mozilla's Unified Nlp Backend. Also i use a rather old Maps version (9.14.0). But if you don't need the newest features und just some Maps, this version performs really good, even on our old device.
If you are using Adaway (also a recommendation) don't forget to add mtalk.google.com to your whitelist.
If you want an open source app store i can recommend F-Droid.
These pages (including the following posts) also contain useful informations about Rom and Kernel:
ADC-Teams CM11 Thread
Christopher83's K^Kernel Thread
Hello everyone again,
i finally created this thread and uploaded my rom. I had this in mind for a long time and i use my own LineageOS version since quite some time (i made my first commit in November 2015 i guess) and now it is in time for the 7th birthday from this device . I tried to make this device more secure, while still providing good performance and battery life.
I hope you like this rom, but again: I made this mostly for myself. And since i am not a power user (which is quite impossible with this device ), there might be some things that are broken that i didn't noticed, or stuff got removed because i didn't needed it. If you notice something of this or you find some bugs or have a question, feel free to post about it and i will take a look at it.
You can see all of my sources in the first post and even my manifest to make the build as reproducible as possible.
You can also take a look at the changelog for more informations (creating this changelog really took some time), at the two screenshots i uploaded and most important at the installation instructions.
I guess i don't have more to say for now, so happy flashing!
wangenau said:
-compiled with latest Linaro 7.3.1 Toolchain
Click to expand...
Click to collapse
HW Keys bug exist because of linaro. Switch to other toolchain or remove O3 flag (change to Os)
I'll use rmt_storage from sources you provided. I've used rmtfs all time, but seems that there's better replacement. Thanks!
outofmemory13 said:
HW Keys bug exist because of linaro. Switch to other toolchain or remove O3 flag (change to Os)
I'll use rmt_storage from sources you provided. I've used rmtfs all time, but seems that there's better replacement. Thanks!
Click to expand...
Click to collapse
You are welcome
And thank you for the infos about the hw buttons, i will definitely test this out!
Update
Hey, here is a small update. It should fix the hw button bug. I also merged some other changes to the kernel, but nothing big.
Changelog:
Kernel
-Kernel compiled with -Os flags instead of -O3
This should fix the hw button bug (thanks to outofmemory13)
-a lot of binder updates
-proper implemention of UID-based routing
-some more things from LineageOS' samsung_jf kernel tree
Click to expand...
Click to collapse
Download 08.07.2018 build
md5sum: 759dc4d116a68888e5bdfbd929b607bb
Update
Hey, here is another small update. This one fixes the brightness bug after booting. I couldn't find the cause of this, but I used my high-class scripting skills *cough* to create a workaround. I think there are no more major bugs left, unless you find one
Changelog:
Kernel
-Compile GPU driver and crypto modules with -O3 again
-Reverted a faulty commit
-Removed F2FS encryption support (not supported for Kernel 3.4)
-Implemented CPU boost (thanks to MarcinDevelopment)
-Small performance optimizations
-Fixed some compiler warnings
Rom
-Deleted one unnecessary vendor blob
-Disabled GPS by default, only relevant for a clean installation
-Updated APN's
-Use low-res bootanimation
-Boot with 1/4 of the maximum brightness
-Implemented the hacky maximum-brightness-after-boot workaround
-Small cleanups
Apps
Fennec
-Updated Fennec (they forgot to build some languages)
If you browser starts to crash after updating, you have to clean Fennec's data. I am sorry if that happens.
Click to expand...
Click to collapse
Download 13.07.2018 build
md5sum: 175f19c16373524fa16a56389b5ecc31
thanks, I have this phone locked in the drawer, I'm installing the rom, I'll let you know how it goes, thanks for everything.
If you have time and desire can you make a ressurection remix?
pablonik79 said:
thanks, I have this phone locked in the drawer, I'm installing the rom, I'll let you know how it goes, thanks for everything.
If you have time and desire can you make a ressurection remix?
Click to expand...
Click to collapse
You are welcome!
I am excited to hear your feedback.
Sadly I don't think that I will spend my time on another rom for this device, just because I still use this phone as my daily driver and I don't want to experiment to much with it. And my internet connection is also not the fastest, so downloading a whole new source code takes really long for me.
Hi Wangenau, This is to let you know thatI am very happy with this ROM, it is snappy, secured and almost everything is working. It looks like mobile data is not working. Any chance that you look into this?
noltha said:
Hi Wangenau, This is to let you know thatI am very happy with this ROM, it is snappy, secured and almost everything is working. It looks like mobile data is not working. Any chance that you look into this?
Click to expand...
Click to collapse
I am glad you like it!
But it is strange that mobile data is not working for you, for me it is working fine. Sometimes there is a rare case where mobile data randomly(?) stops working. You could try to reboot the device, while making sure that Settings->Mobile network settings->Data enabled is marked, wait a bit and see if the problem persists.
Let me know if this will fix your problem :fingers-crossed:
Edit: Removed second option because it is not a good tip
Solve my phone problem
I hope to solve the problem of a phone when I install the ROM is installed and does not work please respond quickly
hhssa said:
I hope to solve the problem of a phone when I install the ROM is installed and does not work please respond quickly
Click to expand...
Click to collapse
Hey, I just saw your post. Sorry if I don't understand, but what is your problem exactly?
wangenau said:
I am glad you like it!
But it is strange that mobile data is not working for you, for me it is working fine. Sometimes there is a rare case where mobile data randomly(?) stops working. You could try to reboot the device, while making sure that Settings->Mobile network settings->Data enabled is marked, wait a bit and see if the problem persists.
If that won't help, you could try to download , move it inside the zip under system/bin/ to replace the existing rild file and flash the zip again (after wiping cache, dalvik cache and system).
Let me know if this will fix your problem :fingers-crossed:
Click to expand...
Click to collapse
Thanks for your suggestions, a simple reboot fixed everything! Many thanks for all your time and efforts you put into this rom, highly appreciated!
noltha said:
Thanks for your suggestions. So maybe I will need to do a re-flash of the rom. I live in the Netherlands, maybe a different band or so. Will try all suggestions and come back
Click to expand...
Click to collapse
A reboot fixed it, so now everything is working!
Really like this Rom!
Many thanks for all efforts!
wangenau said:
Hey, I just saw your post. Sorry if I don't understand, but what is your problem exactly?
Click to expand...
Click to collapse
My problem is after installing the rum does not work the phone
hhssa said:
My problem is after installing the rum does not work the phone
Click to expand...
Click to collapse
I really need more informations to help you. Here are some:
Are you able to boot the device or did the flashing process fail? If it failed, is there an error message in the recovery terminal?
Did you followed the installation guide from the first post exactly?
Did you make a clean Installation, installed the needed recovery version und formatted data and cache as f2fs?
Do you have the right device? (this rom only works in the Galaxy S Plus, not on the Galaxy S or others)
wangenau said:
I really need more informations to help you. Here are some:
Are you able to boot the device or did the flashing process fail? If it failed, is there an error message in the recovery terminal?
Did you followed the installation guide from the first post exactly?
Did you make a clean Installation, installed the needed recovery version und formatted data and cache as f2fs?
Do you have the right device? (this rom only works in the Galaxy S Plus, not on the Galaxy S or others)
Click to expand...
Click to collapse
I've done all the steps but the phone stays in the animation mode for a long time and the phone is not working
hhssa said:
I've done all the steps but the phone stays in the animation mode for a long time and the phone is not working
Click to expand...
Click to collapse
That is strange. Have you tried to redownload the build and reinstall it?
And what was your rom before updating?

[Kernel][28.05.2023][4.14.315][A12][A13] Kirisakura 9.1.6 for Pixel 4/XL aka FLORAL

Kirisakura-Kernel for the Pixel 4 and Pixel 4 XL
Hello everyone,
After rising to the most popular kernel on the Pixel 3/XL forums, here is Kirisakura-Kernel for the Pixel 4 (FLAME) and Pixel 4 XL (CORAL), together FLORAL.
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!
The kernel aims to keep most of the subsystems updated, way ahead of the stock kernel, thereby improving security, stability and performance!
This includes Linux-Stable, CAF-Upstream, F2FS-Mainline and kernel/common.
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.
Main Features:
- Based on latest kernel sources from Google, Kernel is made for Android 13
- Linux-Stable-Upstream included to latest 4.14.315
- CAF-Upstream usually based on one of the latest tags for sm8150
- include all important fixes/improvements from kernel/common
- compiled with latest Clang 16.0.2 from Google prebuilts and built with -O3 optimizations
- F2FS implementation updated to latest state of kernel/common and kernel.org maintained by Jaegeuk Kim.
- devfreq backports from 5.4 (sd 888 qcom kernel base)
- Safety Net patches are included -> Kernel passes Safety Net (hardware attestation is not related to these kernel patches)
- Flashing the kernel will keep root!
- Tested to work on custom ROMs
- Flashable via EXKM and FKM on a rooted system!
- remove extensive Memory Management logging from Google
- removed nolog usage, remove rtb logging from the kernel
- remove selinux auditing from kernel for lower overhead
- remove IPC logging from the kernel
- introduce kmalloc reclaimable caches for improved memory management
- AnyKernel3 powered by @osm0sis (big thanks!)
EAS related features:
- CleanSlate options to dynamically control freq boosting and sched boosting of powerhal
- small improvements to tasks placement
- fixes from kernel/common to EAS
- improvements from Pixel 5
CPU related features:
- Power saving workingqueues enabled by default (toggleable in EXKM)
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
- s2idle-flow improvements from mainline
- improve efficiency while music playback
- arm64: lse: Prefetch operands to speed up atomic operations
- improve camera launch time
File System related features:
- Include latest f2fs changes found on f2fs stable git
- 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.)
GPU related features:
- KCAL to control various RGB related display configs (RGB, Hue, Saturation etc -> accessible via CleanSlate Config App)
- add ability to reduce minimum brightness
- add high-brightness-mode (HBM)
- Update GPU driver to latest CAF state
- improve GPU performance (overall smoother experience)
- reduce power consumption when rendering static images
- enable of usage of SD855+ GPU frequencies as optional feature
UI/UX/Usability related features from CleanSlate:
- CleanSlate features made by @tbalden
- Adjust all CleanSlate features with the CleanSlate-Apps found in the CleanSlate-Thread (if you profit from the CleanSlate features make sure to buy the premium versions on Play-Store to support
@tbalden
- CleanSlate options that require permissive selinux in any way are not included, as they can be easily achieved otherwise on a rooted environment and this kernel is not intended to be used rootless (adblocking, props spoofing etc.)
- Flashlight Notification/Call blinking
- Vibrating Notification Reminder
- Sweep to Sleep touchscreen gesture - highly customizable
- DoubleTap on Sweep2Sleep's area gestures - new way to pull down android Notification Area
- Face down screen off - new gesture, e.g. conveniently use together with 'flip to shh' to turn screen off
Network related features:
- Wireguard Support (Details)
Memory related features:
- updated PSI monitor with latest changes
- 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
- Backport to enable CONFIG_HAVE_MOVE_PMD (see here)
- Backport to enable CONFIG_HAVE_MOVE_PUD (see here) (reverted for now as it breaks audio driver)
- improvements to ZRAM writeback (thanks @arter97 )
- disable per cgroup tracking via psi to reduce overhead
Security related features:
- CFI and LTO both kept intact and are used to keep additional security Google implemented for us!
- ThinLTO used as of 3.9.0
- Shadow Call Stack
Tuned PowerHal
- allow kernel to idle on lowest frequencies when no interaction is happening
- increase swappiness during periods without interaction to favor swapping memory, relax swappiness otherwise
- scheduler camera processes to the big cluster and prime core when faceunlock is used
- adjust powerhal behaviour when the camera is used
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 to make the kernel more lightweight in various places (includes mm, vma, gpu, ipa etc)
- remove VLAs from the kernel (more info)
- add support for steam controller
- add support for nintendo switch controller
- merge upstream solution for PM/Wakeup driver, which reduces unnecessary logspam and also improves sleeping behaviour
- merge freezer v2 backport from google gerrit (required for developer option ""suspend execution for cached apps"")
Feature section for the "non visible" but perceptible improvements:
- updated binder section (responsible for interprocess communication)
- updated sdcardfs ; have a read about it here:
Requirements
- unlocked Bootloader
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
- working magisk environment
- latest stock rom (custom roms can have issue, several users reported success when rooted with magisk 24.3 instead of latest)
How to flash the Kernel:
1. Download the kernel.zip to your device
1a. While it may not be necessary all times when coming from another custom kernel: You may want to restore stock boot.img as well as stock dtbo.img, which can both be found in the factory image. If you´re on a custom rom, simply dirty flash your ROM. Reroot with magisk and optionally install twrp.zip (if existing). Before reporting issues make sure you do that! Thank you!
1b. If you used the SQLITE3 Magisk Module and the GPay Fix Magisk Module in the past look at this post: click me
You only need to do either 2a OR 2b
2a. If TWRP is available for this device and specific android version, boot to TWRP and flash my kernel.zip. Root will be preserved!
or
2b. Flash kernel zip in EX Kernel Manager or FKM app. Root will be preserved! If a kernel manager is not yet updated to work on a specific Android Version, you need to wait until it is updated or use another one.
4. Reboot and profit!
DOWNLOAD:
Download is located always in this folder or attached to the release post in case it´s now in AFH.
https://www.androidfilehost.com/?w=files&flid=301179
Please also check the release posts for download links or attched files. AFH is often down recently.
Important: Read after Download
Please take a look at the second post after flashing the kernel!
Changelog:
Android 10/ Q Kernels
1.0.0 Initial Release
1.0.1 https://forum.xda-developers.com/showpost.php?p=80712545&postcount=51
1.0.3 https://forum.xda-developers.com/showpost.php?p=80791393&postcount=181
2.0.0 https://forum.xda-developers.com/showpost.php?p=81069625&postcount=341
2.1.0 https://forum.xda-developers.com/showpost.php?p=81168297&postcount=424
2.3.0 https://forum.xda-developers.com/showpost.php?p=81244627&postcount=491
2.3.4 https://forum.xda-developers.com/showpost.php?p=81311861&postcount=561
2.6.0 https://forum.xda-developers.com/showpost.php?p=81408591&postcount=611
2.9.0 https://forum.xda-developers.com/showpost.php?p=81527369&postcount=692
2.9.2 https://forum.xda-developers.com/showpost.php?p=81575075&postcount=702
3.1.0 https://forum.xda-developers.com/showpost.php?p=81625099&postcount=725
3.2.0 https://forum.xda-developers.com/showpost.php?p=81679343&postcount=761
3.9.0 https://forum.xda-developers.com/showpost.php?p=81926617&postcount=802
3.9.1 https://forum.xda-developers.com/showpost.php?p=81943269&postcount=824
4.2.0 https://forum.xda-developers.com/showpost.php?p=82189985&postcount=851
4.5.0 https://forum.xda-developers.com/showpost.php?p=82485339&postcount=892
4.5.6 https://forum.xda-developers.com/showpost.php?p=82562029&postcount=941
4.7.5 https://forum.xda-developers.com/showpost.php?p=82725499&postcount=986
5.0.0 https://forum.xda-developers.com/showpost.php?p=83019609&postcount=1022
5.2.2 https://forum.xda-developers.com/showpost.php?p=83206123&postcount=1066
5.2.6 https://forum.xda-developers.com/showpost.php?p=83387505&postcount=1078
Android 11/ R Kernels
6.0.0 https://forum.xda-developers.com/showpost.php?p=83476821&postcount=1092
6.1.3 https://forum.xda-developers.com/showpost.php?p=83649491&postcount=1131
6.2.4 https://forum.xda-developers.com/showpost.php?p=83849179&postcount=1143
6.6.0 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84068177
6.6.6 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84227741
6.8.2 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84408147
7.1.0 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84588667
7.1.1 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84603881
7.2.3 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84747379
7.4.0 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84900715
7.4.1 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-84951399
7.4.2 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-85000553
7.4.3 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-85079523
7.4.4 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-85155405
7.9.0 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-85298631
7.9.1 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-85424575
7.9.2 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-85473277
7.9.3 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-85674963
Android 12
8.0.0 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-86063673
8.0.3 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-86236075
8.0.4 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-86413329
8.0.5 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-86550055
8.2.0 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-86843221
8.2.2 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-87006201
Android 13
9.0.0 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-87295655
9.0.2 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-87532941
9.1.0 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-87760941
9.1.1 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-87868847
9.1.4 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-88332237
9.1.6 https://forum.xda-developers.com/t/...r-pixel-4-xl-aka-floral.3992213/post-88583047
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:
@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 all of his work and the stuff I could learn from him
@flar2 for all his work
@joshuous for all the help he provided to me in the past!
@topjohnwu for magisk!
@arter97 , @kdrag0n for helping me out several times!
XDA:DevDB Information
Kirisakura Kernel, Kernel for the Google Pixel 4 XL
Contributors
Freak07
Source Code: https://github.com/freak07/FLORAL
Kernel Special Features:
Version Information
Status: Stable
Created 2019-10-27
Last Updated 2020-11-03
F.A.Q:
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 and dtbo.img from the factory image and flash them 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!
https://github.com/nathanchance/Android-Tools/blob/master/Guides/Proper_Bug_Reporting.txt
SQLite3 and GPay Fix Magisk Module:
The combination of these two modules and F2FS-Upstream patches included in the 1.0.x release kernels, caused the device to freeze sporadically after rebooting.
2.0.0 does not include F2FS-Upstream so these two modules can be used again.
To remove the modifications done by these modules and start clean again on Release 2.0.0 and the following releases do the following:
1. Remove the SQLite 3 Module and the GPay Fix Magisk Module by following instructions
2. Do a full reboot
3. Wait a few minutes after successfully booting
4. Clear data and cache for Google Play Services, Google Play Store and Google Pay
5. Wait a few minutes so all deleted stuff gets rebuilt properly and reboot again
6. I´d prefer to use the following method to enable GPAY functionality instead of the modules: https://forum.xda-developers.com/showpost.php?p=80763371&postcount=11
7. If you really have to, install both modules and make sure you´re on Kirisakura 2.0.0 or greater
Oh snap! The fun has begun boys! Good to see your kernel here!
Glad to see dev progress so quickly. Will check this out. Kudos
That was awfully quick! So glad to see you here.
Thank you @Freak07. Flashed without a problem with EX KM. Nice work.
That was quick! Thank you so much. :good:
I am unbelievably excited to see you here! I'm glad to see an amazing DEV working so hard, and quick, to bring an amazing kernel to the 4xl!
So very happy @Freak07 maintaining a kernel for the OP7/7pro and now the P4/P4XL. Thanks for all you do man!!
Anyone has an alternate download link? Because androidfilehost is extremely slow and terminate the connection after about 15-30 minutes
You got the 4 XL, awesome! Happy to see you here
Getting my 4 XL tomorrow, will be flashing this as soon as it's delivered
Ok the download worked finally. Such a crap, had a lot of similar problems with this lousy hoster in the past
Dies anyone know If it is possible to get 4k at 60 fps? On other Smartphones it was possible in the past but i don't know if it will be possible with our Pixel 4.
any big difference between exkm and fkm?
glad to see you here...
PS: Ignore my PM lol
Good to go!
CyberpodS2 said:
Good to go!
Click to expand...
Click to collapse
Nice! Flashed with EXKM or FKM? Or good old fashioned fastboot flash boot?
Edit: Flashed with FKM and no issues with flashing.
I do notice that charge speed is about 1500mA slower than with stock kernel. Although I do remember with my Pixel 2 XL similar behavior occurred with a slower reported mA, but overall charge time was basically the same as stock kernel.
Edit 2: And of course I jumped the gun. Just checked again and charging is back to stock speed, approximately 3200mA.
xdeslitx said:
any big difference between exkm and fkm?
Click to expand...
Click to collapse
For flashing no. Both flash the same way.
I Feel compelled to remind people dont ask for features or ETA's especially the day a kernel gets released. I already see that in the first page.
That being said:
The developer here wants feedback about how the kernel works on the device not a bunch of off topic comments /questions this is a development forum.
We do have a q/a and general section for this device feel free to create a proper thread.

[KERNEL][STOCK] N0Kernel [Android Q][G7/V35/V40]

DISCLAIMER: I AM NOT RESPONSIBLE IF YOUR PHONE BRICKS! YOU ARE FLASHING THIS KERNEL AND ITS YOUR CHOICE TO DO IT OR NOT TO DO IT AND YOU'RE THE ONE DOING IT. I JUST WANT TO HELP OTHERS OUT.
REQUIREMENTS: UNLOCKED BOOTLOADER AND ROOT.
IMPORTANT: THIS KERNEL IS MEANT TO WORK ONLY ON STOCK ROM, IT WONT WORK ON CUSTOM ROMS, CUSTOM ROMS ALREADY PROVIDE WITH THE ROM CUSTOM KERNEL AS ALMOST ALL CUSTOM ROMS ALREADY USE MY KERNEL, THIS IS A MODIFIED VERSION OF THE CUSTOM ROM KERNEL AVAILABLE IN DOTOS BUT FOR STOCK ROM. IT CAN WORK ON ANY LG G7 THINQ MODEL.
How to flash:
1. Download Smartpack Kernel Manager (free) from playstore or any other kernel manager that supports flashing zips such as Franco kernel manager, Ex kernel manager etc;
2. Go to Flash section in the kernel manager, in smartpack press on the 3 lines in the top left corner, scroll down and tap on SmartPack;
3. Press on the button that looks like a lightning, select the zip and wait for it to flash;
4. Reboot;
5. Enjoy.
Features:
- Compiled with Proton Clang 13.0;
- Upstreamed ZRAM compression and decompression algorithms, now ZRAM should be almost as fast as RAM;
- Sultan's Custom Input Boost;
- Sultan's Devfreq Boost;
- F2FS support.
- Rapid GC for F2FS thanks to Arter97;
- Modified CpuSets;
- Quad dac driver backported from LG V50 ThinQ;
- Simple lmk from sultan;
- 4.9.235.
- LA.UM.8.3.r1-08100-sdm845.0 CAF Tag, Why 8100 only and not newer ? Because it performs the best, i've tested even Android 11 tags, it performs worse, this tag is more efficient for battery life while maintaining same performance if not better;
- RCU backported from 4.14 kernel;
- Binder backported from 5.4 kernel;
- Cpu idle, lmp levels and pm qos improvements, should reduce idle drain.
- Sultan's Pid Map improvements. (Helps a lot in gaming performance, especially in genshin impact);
- A lot of KGSL improvements thanks to Sultan. (KGSL - GPU driver in the kernel);
- Cache improvements;
- Scheduler Improvements;
- CONFIG_HZ = 250;
- 128kb Readahead. Why ? Because thats the default value in linux and pixels as well;
- Updated Energy Model from freqbench result , this will lead to less power consumption;
- Removed inefficient frequencies;
- Added efficient frequencies in schedutil;
- Improvements in schedutil;
- Added support for steam & nintendo swich controllers;
- Many other improvements.
Download Link: Google Drive
Kernel Source: https://github.com/EmanuelCN/android_kernel_lge_sdm845/tree/stock
Useful Guides:
How to unlock bootloader
How to root:
This method works on any lg g7 thinq model apart TM (T-Mobile)
Firstly you have to unlock bootloader.
1. Install magisk manager
2. Boot into 9008 mode
3. Backup your boot_a image using Qfil (Read data)
4. Copy it to your phone
5. Rename it to boot_a.img
6. Go in magisk manager —-> install —-> Select and patch an image —-> select the image.
7. Copy the patched boot image file to your PC (its located in downloads folder in your phone)
8. Flash it with fastboot/qfil ( fastboot flash boot_a < drag and drop over the cmd the image > // select boot_a and load image in qfil)
NOTE: IF IT TELLS YOU THAT YOU ARE NOT ROOTED THEN DO THE SAME PROCESS BUT WITH BOOT_B.
Special Thanks:
- SGCMarkus;
- J0sh1x;
- Thenotonly;
- LlamaMonster;
- ErickG233;
- Sultan (kernel toast);
- Arter97;
- Many other great developers.
Changelog:
N0kernel 2.8:
- Fixed Apex mobile, pubg, bgmi lagging after their latest update;
- Overclocked GPU to 820mhz;
- Updated cpu-input-boost driver to match devfreq boost one;
- Removed force affine of surface flinger on big cores, it was unecessary, this will increase battery lifel;
- Using kmem_cache in various parts of the kernel;
- Crypto backports;
- KGSL & DRM backports for lower latency;
- Updated arm routines to latest versions;
- Other improvements under the hood, feel free to check my github page.
N0kernel 2.7:
- Rebased the kernel and cleaned it up;
- Compiled now with proton clang 13.0;
- Backported binder from 5.4 + improvements;
- Minimised wakeups from android's alarm timer;
- Backported lib sort changes from mainline linux kernel;
- Backported LG V50's dac driver from android 11 kernel;
- Introduced simple lmk from sultan;
- Disabled process reclaim & oom killer because we use simple lmk and they shouldn't co exist;
- Proc and profs, pidmap improvements;
- Many other changes but i don't remember them.
- Also supporting LG V40 ThinQ and LG V35 ThinQ
N0kernel 2.6:
- New thermal engine added in kernel, will provide cooler temps while better performance in gaming.
- Fixed direct references to hz
- Added state notifier for input boost and devfreq boost
- Added ability to track fps in games, now fk kernel manager or other apps should be able to read fps not the screen refresh rate.
- More changes, you can check the github to see the changes.
N0kernel 2.0:
- Removed uclamp;
- Added dynamic stune boost;
- Added efficient frequencies in schedutil;
- Performance Improvements regarding schedutil;
- mm improvements;
- CONFIG_HZ = 250 because it seems to reduce the jitter;
- Low latency display & touchscreen.
N0Kernel 1.2:
- Fixed ram management;
- Fixed "corrupted sdcard";
- Reduced battery drain on idle.
Thank you so much! is working so good!!!
U are my HEEEEROOOO. U gave me the hope over my lg. I was on 9 rooted due the xd kernel does not supp 10. My HEEEEROOOO.
How to modify f2fs tab ?
Shaggy_222 said:
How to modify f2fs tab ?
Click to expand...
Click to collapse
f2fs nosuid,nodev,noatime,discard,inline_data,nobarrier wait,quota,formattable,reservedsize=128M
note: you need to reflash vbmeta to unlock the vendor/system lock.
Hi I have a Lg g7 emw on A10 ,unlock the bootloader , after it rooted with magisk on boot_a
downloaded your kernel and smartpack kernel manager ,but when i tryed to flash it gives me the error:
repacking ramdisk falied aborting , please help me.
ps: sorry for the lame english
SeinjiroXD said:
Hi I have a Lg g7 emw on A10 ,unlock the bootloader , after it rooted with magisk on boot_a
downloaded your kernel and smartpack kernel manager ,but when i tryed to flash it gives me the error:
repacking ramdisk falied aborting , please help me.
ps: sorry for the lame english
Click to expand...
Click to collapse
use franco kernel manager. i experienced that problem before with smartpack
ErickG233 said:
f2fs nosuid,nodev,noatime,discard,inline_data,nobarrier wait,quota,formattable,reservedsize=128M
note: you need to reflash vbmeta to unlock the vendor/system lock.
Click to expand...
Click to collapse
is there a step by step tutorial for this? im a newbie
Thank you so much for sharing this. I've successfully flashed this on my Korean variant G7 [G710N]
I have a problem with my 128GB SD card, my phone can't use it anymore when it is formatted as exFAT. When I insert it in my phone it always say that it is corrupted and that I need to format it, but when I format it in my phone it's formatted as FAT32. I'm sure that I've used a couple of exFAT SD cards before, is it because of this kernel?
Tested the kernel.. so far the lg g7 stays cool on geishin impact, and the battery last a little longer, nice job developer, thank for your job, just two questions ..
1: will the kernel be updated from time to time?(i hope so)
2: what are the best configs for this kernel(for battery and for performance)?
Rylen101 said:
I have a problem with my 128GB SD card, my phone can't use it anymore when it is formatted as exFAT. When I insert it in my phone it always say that it is corrupted and that I need to format it, but when I format it in my phone it's formatted as FAT32. I'm sure that I've used a couple of exFAT SD cards before, is it because of this kernel?
Click to expand...
Click to collapse
fixed, use N0Kernel 1.2
SeinjiroXD said:
Tested the kernel.. so far the lg g7 stays cool on geishin impact, and the battery last a little longer, nice job developer, thank for your job, just two questions ..
1: will the kernel be updated from time to time?(i hope so)
2: what are the best configs for this kernel(for battery and for performance)?
Click to expand...
Click to collapse
1. Yes it will be updated when i find more improvements to do in the kernel.
2. There are no configs, do not use any other modules related to performance,tweaks whatever those do worse do not try any ( examples like: nfs tweaker, zeetatweaks, fde optimiser) or whatever they were called just do not use this type of modules if you want the best performance and battery life. The kernel is already tuned for the best meaning you do not have to tweak anything.
EmanuelCN said:
fixed, use N0Kernel 1.2
Click to expand...
Click to collapse
Wow thank you so much
I found a bug.
On 1.2 the gcam gone crazy, like no buffer fix installed (i already tried to disable and enable the module)
Edit: I was on 1.0 before the bug appeared.
manuhuelva said:
I found a bug.
On 1.2 the gcam gone crazy, like no buffer fix installed (i already tried to disable and enable the module)
Edit: I was on 1.0 before the bug appeared.
Click to expand...
Click to collapse
The kernel should not affect this kind of stuff, you can try flashing 1.0 again, over 1.2, becauuse you can do that as it replaces the entire kernel there's no "updating" process its just replacing the kernel.
manuhuelva said:
I found a bug.
On 1.2 the gcam gone crazy, like no buffer fix installed (i already tried to disable and enable the module)
Edit: I was on 1.0 before the bug appeared.
Click to expand...
Click to collapse
Gcam with buffer fix (Gcam_6.2.030_Advanced_BF_V2.2.1.190822.1145) is working fine for me.
Sorry guys, was the Secure boot. I enabled this after updated the kernel. Tried rollback 1.1, 1.0 and no sucess... the gcam was broken on 1.0 too. Then i thinked that could be the secure boot (Encendido Seguro in spanish). After reboot the gcam started going fine.
Sorry about my bull**** over 1.2.
Running the N0kernel for the first day and no problems so far, everything seems to be very stable. Cant really compare to stock, I only have the phone for a few days.

Development [Kernel][14.06.2023][Android 13.0.0 Stable]Kirisakura_Raviantah 1.1.0 for Pixel 7/Pro aka "Pantah"

Kirisakura-Kernel for the Pixel 7/Pro
Hello everyone,
To keep it short: Here is Kirisakura - Kernel for the Google Pixel 7 Pro aka Cheetah and the Pixel 7 aka Panther, together Pantah.
I would appreciate if everybody that flashes the kernel, reads at least once through this opening post and the following ones.
The kernel aims to keep most of the subsystems updated, way ahead of the stock kernel, thereby improving security, stability and performance!
This includes Linux-Stable, F2FS-Stable and kernel/common!
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.
By merging linux-stable regularly we get most security updates months ahead of the stock kernel and also before they even end up in the android security bulletin.
The kernel includes a lot of improvements and contributions from other developers as well. Without those contributtion this kernel would not exist as it is.
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!
Features:
Main Features:
- Based on latest A13 kernel sources from Google, Kernel is made for Android 13 Stable
- Linux-Stable-Upstream included to 5.10.183
- Compiled with prebuilt Google clang 17.0.2
- Backport entire RCU subsystem to linux 6.0
- Lazy RCU which should result in power-savings while the device is lightly-loaded or idling, more information here
- Backport Maple tree from Linux 6.1
- improve preallocations from maple tree (affects especially android)
- reduce necessity to rewalk the maple tree
- Per VMA-locks in conjunction with Maple Tree RCU-Mode (improve app launch time, this feature in general benefits greatly from lazy rcu!)
- further improve maple tree/per-vma locks introduced in an earlier release
- Dynamic Energy Models depending on device state
- make TEO-Cpuidle util-aware (improves latency, performance and decreases energy consumption for certain workloads, more information here)
- improve CPU throttling behaviour
- improvements to uclamp, prevent capacity inversion (reduce missed frames)
- greatly speed up camera launch time!
- merged kernel/common (improvements to android-common-kernel straight from google)
- MM subsystem reworked (more info and some patchsets linked in this post)
- Multi-gen LRU backported/reworked and enabled (more info here, here as well and here) to improve mm and reduce cpu cycles, latest V15 state
- pelt multiplier tied into powerhal to speed up scheduler during interaction (more info here)
- prevent frequency spikes caused by small transient tasks when the device is idle(more info here)
- tie mechanism to prevent frequency spikes caused by small tasks also into powerhal
- scheduler improvements for RT (realtime) tasks
- introduce and setup PMU limiter (prevents CPU from spiking to max when it isn´t needed, based on PMU reads, more information here)
- improve camera performance by tuning the powerhal during recording
- bias tasks of rt, sf and ta groups to prefer high capacity cpus during app launches, interactions
- improve app launches via powerhal
- restrict maximum CPU-Freqs during screen off/ idle to 1.4GHZ for all clusters to save power
- introduce unfair f2fs rwsems to prevent writer starvation and improve IO perf under heavy load
- fuse: give wakeup hints to scheduler to speed up compress/decompress in internal storage (details)
- enable RCU_BOOST (details here), also fix RCU_BOOST behaviour
- F2FS-Stable updated
- merge and enable f2fs block_age-based extent cache (improve the accuracy for data temperature classification, reduce the garbage collection overhead after long-term data updates)
- TCP backports from mainline
- SSG IO scheduler for reduced overhead and less CPU cycles (more lightweight and android optimized)
- scheduler backports from linux-main
- mm updates from linux-main
- locking updates frm linux-main
- improve memory performance by tweaking google´s eh zram implementation
- fix sysfs endpoint for googles eh zram
- affine IRQS to CPU 7 during camera usage for improved performance as it tends to overload the little cores
- use bbr as default TCP congestion algorithm (fasted algo according to this excellent research from @kdrag0n found here )
- include bbrv2 from google, more info here
- Enable support for TTL spoofing
- important patches from kernel/common for 5.10 (here are more details)
- increase priority of GPU work
- several updates from QPR beta, and a few from Pixel 6 that googles missed to include in the pixel 7 kernel
- improve thermals
- change compaction proactiveness based on device state for improveed memory management
- improve ZRAM usage
- reduce overhead
- improve performance and efficiency by properly wiring up pixel_sched with teo util awareness (thanks @ada12 for spotting this!)
- update to cpuset/cgroup subsystem (speeds up camera launches, device unlocks etc as cpusets are switched on those conditions, patches reduce overhead in those conditions)
- flashing the kernel will preserve root
CleanSlate Features
- CleanSlate Features from @tbalden, big applause here! (s2s, notification booster, battery saver, flashlight notifications. Please note: cleanslate features that work otherwise with rooted devices like kadaway (adblocking) are not implemented on this kernel since I´m running rooted)
- Check the CleanSlate thread for more information about those features
- The CleanSlate thread also contains the apps that allows you to control those features!
- If you consider those features useful, maybe consider purchasing the apps in the PlayStore or a small donation to @tbalden, he deserves it! Don´t forget to switch to beta channel for those apps, as this is needed for device running A13!
Various Optimizations:
- update several drivers to use power efficient workingqueues (for example wlan driver)
- f2fs: reduce timeout for uncongestion
- f2fs: Demote GC thread to idle scheduler class
- f2fs: set ioprio of GC kthread to idle
- tcp: enable advanced tcp, give user more options for tcp alorithm
- mm: vmstat: use power efficient workingqueues
Wakelock Blocker:
- advanced wakelock blocker with the ability to block kernel wakelocks (dangerous, use with caution, please read this for further info). You should only block kernel wakelocks in case you face uncontrollable scenarios, like company wifi causing a wakelock to be active 100% of the time! Blocking kernel wakelocks to "improve" battery life almost always backfires and causes issues!
Powerhint Module:
- restrict little cluster to 1,4ghz mid cluster to 1,4ghz and big cluster to 1,4ghz during screen off, to reduce battery usage for example during music playback
- only use little cores during screen off/device suspend
- account for scheduler and other changes done to the kernel
- boost memory interface controller during interaction (decreased missed frames, improved soc efficiency according to google docs)
- tie pelt multiplier into the powerhal (more info here)
- prevent frequency spikes caused by small transient tasks during idle operation (more info here)
- boost scheduler using the pelt multiplier during fingerprint unlock operation
- setup and control PMU limiter via powerhal (more info here)
- switch between default and custom idle energy model on device is being interacted with / device idle.
- reduce missed frames during scrolling/device interaction by adjusting uclamp boosts
- dynamically adjust target load for memory interface during interaction.
- remove dynamic GPU policy change as it´s causing instability and is unneeded due to GVFS period
- implement handling during video recording of CPU like Google did on QPR A13
- more small improvements
DOWNLOAD:
Downloads are attached to the release posts linked below in the changelog section.
Please note that androidfilehost is currently not working properly.
Link to AFH:
Spoiler
Deprecated afh download, still here for old releases:
https://www.androidfilehost.com/?w=files&flid=336658
Changelog:
Android 13.0.0 Stable (not QPR beta!)
1.0.0 Initial Release | Mirror for Download in case AFH is not working
1.1.0 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-87743627
1.2.0 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-87822161
1.2.1 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-87878321
1.2.2 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-87944505
1.2.3 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-87960183
1.2.4 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-88108123
1.3.0 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-88286027
Raviantah_1.0.0 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-88316285
Raviantah_1.0.1 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-88323527
Raviantah_1.0.2 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-88399915
Raviantah_1.0.4 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-88497279
Raviantah_1.1.0 https://forum.xda-developers.com/t/...-pixel-7-pro-aka-pantah.4509795/post-88645103
Requirements
- vbmeta flags for verity/verification disabled (this requires a wipe if you´re coming from stock with those flags enabled), check the FAQ for information on how to do this
- unlocked Bootloader
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment so you can flash back to stock in case something goes wrong
- working magisk environment (a device rooted with latest magisk, use stable in case you want to be absolutely safe)
- IMPORTANT: Unrelated to the kernel, but update both slots of your phone to A13 before you flash anything to your device!
- it´s handy to have a backup and a way to return back to stock (check the faq for that)
- make sure to download the correct kernel version for your firmware. (you can´t flash a kernel made for stable firmware on a QPR beta or dev preview and expect there to be no isses, the release posts mention which firmware the respective kernel releases are compiled for)
- this kernel is tested on stock google firmware. If you want to use it on custom roms you´re kind of on your own as I can´t account and give support for any changes custom roms apply that could render the kernel incompatible. (e.g. if you´re custom rom is still on the previous months update, there may be issues flashing an updated kernel for the next month on top or custom roms requiring specific kernel changes to work correctly )
- it´s always best to start on stock images and don´t have another custom kernel flashed when flashing this kernel for the first time. consecutive flashes can just be installed on top, if not I´ll mention it in the release post
- read the first and second post, there's a lot of valuable information
How to flash the Kernel:
1a. Make sure you tick all the requirements above
1b. Make sure to flash the release made for your firmware! Usually the release post contains information on that
1. Download the kernel.zip (unified for both devices) and the correct powerhint module depending on your device (Pixel 7 = panther || Pixel 7 Pro = cheetah)
2. Flash the powerhint module via magisk manager as you would any other magisk module! Make sure to flash the latest one. It will be mentioned in the release post if there´s an update.
3. Flash the kernel.zip via EXKM, FKM or kernel flasher. Root will be preserved.
4. Reboot and profit.
Donations:
Donations are not mandatory but very welcome if you want to support development or just buy me a coffee/tea/beer
If you like my work: http://paypal.me/freak07
Credits:
@osm0sis for all his work on AK3.
@tbalden for being the best HTC, Pixel, OnePlus and Asus wingman!
@capntrips for all his work on the pixels, avb, hashtree patcher, the counsel and the kernel flasher!
@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 and his entire work!
Source Code: https://github.com/freak07
F.A.Q:
Question: How do I check the state of avb flags for verity/verification on my phone?
Answer: Check @capntrips post here and get the magisk module for this from here. After flashing the magisk module reboot your phone. You can now use the commands from @capntrips post to check.
Question: How do I update my phone to a new monthly update if this kernel is installed?
Answer: The easiest solution is to just use any full firmware package to update your phone to the new stock firmware. You can do so with the android web flash tool, a factory image or a full OTA image.
An excellent guide on how to use the factory image to do so was posted by @roirraW "edor" ehT on this thread. Feel free to use this as a reference.
I also posted what I do each month to update my phone here.
This also serves as the easiest way to return back to stock, if you don´t like the kernel and feel not comfortable flashing anything via fastboot.
Just remember to disable verity/verification vbmeta flags each time you update your phone as described in the next question below.
If you boot once, without them disabled a wipe is required to disable them again.
Question: How do I disable the vbmeta flags for verity/verification?
Answer: The easiest solution is to use the android web flash tool and tick the correct checkbox.
Alternatively extract the vbmeta.img from the matching factory image and flash it in fastboot via:
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Please note that disabling those flags will require a full wipe for the device to boot if coming from flags enabled state!
And a further note: You need to repeat this command every time you flash a full firmware zip ( a factory image or a full OTA.zip) to update the firmware of your phone as those contain a vbmeta image. Otherwise the flags will be reset to default enabled and it will require another wipe to disable them again! As with the firmware.zips, you need to tick the checkbox in the webflasher every month you update your phone or flash a firmware there!
Question: How do I return back to stock?
Answer: Extract boot.img, dtbo.img, vendor_kernel_boot.img and vendor_dlkm.img from the matching factory image provided on googles download page.
Flash those images via fastboot/fastbootd and you will be back on stock kernel. If you don't know the fastboot commands to flash the images, check the instructions how to flash those images in post #4.
Alternatively dirty flash the whole firmware without wiping by using either the android web flash tool, a factory image or a full OTA image. If you disabled the vbmeta flags, don't forget to disable them again (or tick the correct options on the web flash tool) after flashing a full firmware package and re-root.
Kernel flasher has the capability to backup those partitions as well, but if your phone doesn´t boot, because you flashed a kernel for stable firmware on dev preview that backup will not help you.
Question: Does this kernel include a mod similar to the well known KCAL modification?
Answer: No it does not, as KCAL is tapping into a QCOM specific driver and that´s not included in the tensor source as it´s based on exynos.
There´s a very powerful app called CF Lumen from @Chainfire, that serves the same purpose and even includes far more options that were available from kernelspace. Link to the thread here.
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 supported firmware. Usually I'm announcing in the release post, the firmware the kernel.zip is compatible with, but most of the time the kernel is updated when a firmware update drops.
Please make also sure you're running a stock configuration.
That´s means you´re not using any mods, tweaks in kernel managers or other root tweaks , magisk modules, xposed/lsposed etc, 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. (kernel flashing apps usually support exporting logs of flashes too) 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.
I recommend taking a look at this excellent collection of helpful threads from @roirraW "edor" ehT!
It can be found following this link!
Question: I get a device corrupted message after flashing the kernel or just reboot to bootloader. How to get rid of it?
Answer:
There seems to be an issue with verity on Pixel devices that can trigger randomly. That means even if the expected hashes match the device refuses to boot due to this bug.
Short answer, flash magisk patched init_boot.img via fastboot, afterwards flash stock init_boot.img. That should clear this situation.
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. Same goes for the Pixel 7. 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 kernel needs to be compiled in the aosp kernel build environment just like the stock kernel. All necessary and modified repos are available on my github. Otherwise please refer to the aosp build environment and the instructions there.
Fastboot commands:
This serves just as a reference to restore the images via fastboot. This is not to install the kernel.
Flash the images in this order:
Boot to bootloader:
Either select Reboot to bootloader option via magisk manager, use the button combinations or run the following command while in the OS:
or type:
Code:
adb reboot bootloader
Now in fastboot flash boot.img, dtbo.img and vendor_kernel_boot.img
Commands:
Code:
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash vendor_kernel_boot vendor_kernel_boot.img
Now boot to fastbootd
Code:
fastboot reboot fastboot
Once in fastbootd:
Code:
fastboot flash vendor_dlkm vendor_dlkm.img
4. Reboot either via buttons
or by typing
Code:
fastboot reboot
5. Profit!
Prebuilts for custom roms.
last one I promise
So glad to see you here
Woowoo, let's GOOOO
Kiri is here! Thanks for this awesome kernel!
So unfortunately we´re at the moment out of ideas and options for the vbmeta verity/verification disable requirement. @tbalden and me tried a few things and failed with our final idea this morning, which worked on a similar device.
Maybe somebody finds a way so we can actually flash custom images with the avb/vbmeta flags enabled, but at the moment not. I didn´t want to delay the release any further so here we go.
I understand this is a pain for many, but unfortunately that´s how it is now. It was a pain for me too, because on the final test, we really hoped it would work, but we we´re trapped in the wipe ourselves.
Anyway, have fun everyone with the release. It basically includes everything from the Pixel 6 kernel, as they branches are similar.
Well this is awesome. Haven't modified my phones since Pixel 4 but this is very enticing
This made me smile. Loved your kernel on the P6P. So glad to see it available for my P7P.
QQ: Is High Brightness Mode (HBM) supported in this kernel?
nice to see you on here
I do hope its a firmware issue and next month update fixes issue and then workaround you guys been testing for flashing without disabling verity and verification works
@Freak07
Thank You very much for this kernel!
May I ask if this one from CleanSlate is included? How is this works?
VoLTE call properties patched in - no root/magisk needed for non supported carriers/countries and VoLTE calls.
Duuuuude! This kernel sounds amazing. And the Powerhint module? WHAT?!
Probably moving to the 7 Pro this weekend so this is very welcome!
Thanks
Edit: I'm a little confused: should we flash the zip as usual through EXKM/Kernel flasher or use the fastboot commands from post #4??
Because the OP also mentions the usual way of flashing...
Very excited for the kernel, thanks for your hard work!
Ghisy said:
Duuuuude! This kernel sounds amazing. And the Powerhint module? WHAT?!
Probably moving to the 7 Pro this weekend so this is very welcome!
Thanks
Edit: I'm a little confused: should we flash the zip as usual through EXKM/Kernel flasher or use the fastboot commands from post #4??
Because the OP also mentions the usual way of flashing...
Click to expand...
Click to collapse
I think that was just a copy and paste from the older P6 thread (also now deprecated for that device, from what I understand). Just use EXKM or Kernel Flasher and you'll be good to go!
Edit: and the companion zip in Magisk Manager. Whoops. In other words, you don't need to manually flash each image to install the kernel.
i5lee8bit said:
I think that was just a copy and paste from the older P6 thread (also now deprecated for that device, from what I understand). Just use EXKM or Kernel Flasher and you'll be good to go!
Click to expand...
Click to collapse
Nope,
The powerhint module was never actually depreciated, on P6 he was able to have it included in the kernel zip and it auto-installed into magisk at the same time.
That isn't working here at the moment so you have to manually flash it yourself again
i5lee8bit said:
I think that was just a copy and paste from the older P6 thread (also now deprecated for that device, from what I understand). Just use EXKM or Kernel Flasher and you'll be good to go!
Click to expand...
Click to collapse
Sorry, maybe I wasn't being clear: should I use quote #1 or #2 down there?
Freak07 said:
How to flash the Kernel:
1a. Make sure you tick all the requirements above
1. Download the kernel.zip (unified for both devices) and the correct powerhint module depending on your device (Pixel 7 = panther || Pixel 7 Pro = cheetah)
2. Flash the powerhint module via magisk manager as you would any other magisk module
3. Flash the kernel.zip via EXKM, FKM or kernel flasher. Root will be preserved.
4. Reboot and profit.
Click to expand...
Click to collapse
Freak07 said:
Fastboot commands:
Flash the images in this order:
Boot to bootloader:
Either select Reboot to bootloader option via magisk manager, use the button combinations or run the following command while in the OS:
or type:
Code:
adb reboot bootloader
Now in fastboot flash boot.img, dtbo.img and vendor_kernel_boot.img
Commands:
Code:
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot flash vendor_kernel_boot vendor_kernel_boot.img
Now boot to fastbootd
Code:
fastboot reboot fastboot
Once in fastbootd:
Code:
fastboot flash vendor_dlkm vendor_dlkm.img
4. Reboot either via buttons
or by typing
Code:
fastboot reboot
5. Profit![/SPOILER]
Click to expand...
Click to collapse
Ghisy said:
Sorry, maybe I wasn't being clear: should I use quote #1 or #2 down there?
Click to expand...
Click to collapse
The fastboot commands are for if or when you want to return to stock.

Categories

Resources