{
"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"
}
arter97 Pie Software Collection for the Mi Pad 4
/* Summary */
Stock software stack on this Mi Pad 4 is horrendous and full of retarded junks top to bottom.
This is a project to replace most of the software stack on the Mi Pad 4.
This is done by reworking the entire kernel and the vendor image, and providing a custom TWRP recovery with f2fs support.
Please read the entire post to get an idea how to use as this ain’t like other ROMs/kernels on this forum.
(Please don’t quote this entire post and spam the thread.)
/* System */
You may use Android Pie-based GSI images. Oreo is not supported. MIUI is obviously not supported. (Are you f***ing serious?) Compatibilities between other source-built ROMs targeting clover(Mi Pad 4) specifically is not guaranteed and most likely to cause issues.
You can also use Paranoid Android for Mi Pad 4, which is recommended for best performance.
/* Kernel */
The kernel is fully rebased to the latest Pie CAF tag, which is a different base from the stock Oreo CAF tag, not to mention most of Xiaomi’s ultra-poor-quality codes are gone.
- To mitigate the horrendous touch latency, numerous touch panel optimizations were made.
- Mi Pad 4 is using eMMC instead of UFS. Numerous changes were made to improve its performance including the enforcement of f2fs filesystem and optimizations to CFQ I/O scheduler.
- 3/4 GB of RAM is quite insufficient these days. zram is activated with updated LZ4 compression algorithm to provide a better memory management along side revamped lowmemorykiller.
- Touch boost is set aggressively due to the reality of most ROMs lacking QPerformance. This improves responsiveness.
- Kernel module support is disabled to make it a bit lighter.
- WireGuard is supported.
- Automatically sets correct Android version and security level to prevent booting issues caused by keymaster.
- Double-tap-to-wake is enabled by default.
- A whole lot more that I forgot.
/* Vendor */
For the best compatibility with Pie ROMs, Pie vendor must be used. To make this happen, the entire vendor firmware is ported from the Mi A2. This process took me weeks to debug and make it stable to this point.
Since this is the only one of its kind on the Mi Pad 4, the software experience with this vendor image will be quite different from other ROMs.
Also, an overlay is integrated to give the correct corner overlay for rounded corners.
Unfortunately, it’s not bug-free, but way beyond usable. Bugs will be listed below.
/* Recovery */
As I said, f2fs is enforced. Reason for this will be explained below.
You must format your userdata partition(erasing everything on the device) to f2fs before using this project.
You cannot use existing TWRP for 2 reasons:
a) The TWRP kernel won’t support f2fs.
b) TWRP’s mkfs.f2fs tool is outdated.
A custom TWRP is also provided, powered by my kernel and the latest mkfs.f2fs tool. You must use it to format /data to f2fs before using this project.
/* Harmony */
The whole kernel and the vendor image is meant to be used together. If you mix one another(e.g. using my kernel on other vendor image or vice versa), you will definitely encounter issues. Please don’t.
To make the experience consistent and since you’re locked with the kernel/vendor combination anyways, I decided to force f2fs. Please be extremely cautious when you want to test out other kernels that claims to support f2fs. If the f2fs version isn’t inline with my kernel, you may experience random panics, or even worse - data corruption.
It’s extremely recommended for you to wipe the entire /data back to ext4 if you want to switch from using this project.
/* Instructions */
You must be familiar with fastboot.
- Download kernel, vendor and TWRP from the link below.
*.img.xz is for fastboot. Extract the .xz files before feeding it to fastboot. *.zip is for TWRP.
- Download an Android Pie based GSI of your choosing.
- Flash kernel by ‘fastboot flash boot /path/to/kernel/image’.
- Flash TWRP by ‘fastboot flash recovery /path/to/recovery/image’.
- Flash vendor by ‘fastboot flash vendor /path/to/vendor/image’. This process will take about 5 minutes(it took 275 seconds for me).
- Enter TWRP by ‘fastboot boot /path/to/recovery/image’.
- Do ‘Wipe > Format Data’. This will automatically wipe to f2fs.
- Follow the instructions you got from the GSI ROM developer and flash system image.
- Reboot.
- Leave feedback.
Note about Magisk
Due to a (supposed) Magisk bug with f2fs. You must flash Magisk after the first initial setup to avoid memory leaks(which ultimately causes the kernel to shutdown). After Magisk is installed, reboot again after confirming Magisk Manager is installed.
/* Disclaimer */
Your warranty is now void.
I am 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 project before flashing it! YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.
/* Warning */
I won’t be granting permissions to redistribute or extract files from this project to serve others, without actually contributing something to this project.
You will be reported to XDA forum moderators.
Making mirrors, re-uploading to another servers are also prohibited with no exceptions.
/* Thanks to */
TheCrazyLex
xboxfanj
joshuous
jjajjaroni - for reporting bugs ahead of public release
nathanchance - for android-linux-stable
/* Downloads and links */
arter97.com
Kernel source
XDA:DevDB Information
arter97 Pie Software Collection for the Mi Pad 4, ROM for the Xiaomi Mi Pad 4
Contributors
arter97
ROM OS Version: 9.x Pie
Version Information
Status: Beta
Created 2019-01-13
Last Updated 2019-03-07
/* Bugs */
- Phone calls won't work
- Fingerprint sensor and GPS on the Mi Pad 4 Plus doesn't work
- For the Wi-Fi variant, the device may get confused and think it’s a phone. Not a big deal.
- Didn’t notice anything else.
/* Changelog */
20190810
This update is made with Paranoid Android in mind.
Go checkout the updated Paranoid Android thread.
Vendor image:
Base firmware updated from V10.0.8.0.PDIMIXM to V10.0.10.0.PDIMIXM
Camera hacks removed and reworked to fix camera on many ROMs
Kernel:
Fixed a commit mismerge that broke deep-sleep
Linux v4.4.188 merged
Wi-Fi drivers updated to 5.1.1.73Q
Bunch of memory allocations from various subsystems were reworked to perform much better (thanks to Sultan)
32-bit vDSO added for improving performance on arm32 programs
Backported speculative page fault to improve system performance
Latest f2fs-stable merged
Switched to zswap/vnswap approach
- Ditched conventional zram swap approach and taken zswap+vnswap for more efficient memory operations
- Backported zsmalloc memory allocator from mainline
- Backported zswap compressed page cache from mainline
- Samsung's Galaxy S9 memory modifications merged for better swapping efficiency tuned for Android
- This new kernel's memory management will be drastically different from existing kernels
20190428
Vendor image:
Base firmware updated from V10.0.1.0.PDIMIFJ to V10.0.8.0.PDIMIXM
Added missing goodix touch firmware
General LTE network stability improvements
Kernel:
Various changes from Proton kernel by kdrag0n
- Use flatmem to save kernel memory usage
- Use optimized memcmp
- Optimize rbtree
- Disable erratum 843419 properly
- Delay vmstat updating interval to avoid jitter
- Disable I/O stat accounting completely for lower overheads
- Reverted a cpuidle change for possible fix for power consumption regression during sleep
- Faster crypto algorithms ported(chacha20, sha2, crc32)
A bit lower power consumption by using WFE for long delays
Add accelerated crc32 routines
Use -O3 for input drivers for avoiding overheads
Various changes made to f2fs rapid GC to make it more efficient
dirty_expire_centisecs set to 30 seconds to reduce flash wearouts and power consumption
Various changes merged from the Razer Phone 2 and Snapdragon 855
Kernel is now built with -O3 optimization flag
Use CONFIG_HZ = 300
- This changes context switching interval from 10ms to 3.33ms
- Pixel used this for years and Google recommends other vendors to do the same for fewer jitters
Removed RTB(interrupt) logging entirely
Wi-Fi drivers updated to 5.1.1.71C
Linux v4.4.179 merged
ExFAT support added(ROM-side support required too)
Idle power consumption improved
Camera drivers stability improved
LA.UM.7.2.r1-06700-sdm660.0 merged
LV.HB.1.1.5-10310-8x96.0 merged
LA.HB.1.1.8-03910-8x96.0 merged
20190223
Fixed an issue causing kernel panics to enter dump mode
Fixed a f2fs merge durp causing issues from the recovery and potentially long-term performance on daily usage
RWSEM priority-aware enhancement merged from CAF
Added CIFS(SMB) support (requested by @currowth)
LA.HB.1.1.5-11310-8x96.0 merged (some minor bug fixes)
20190221
Paranoid Android breakage from 20190128 fixed
A totally new kernel base merged - LV.HB.1.1.5-10010-8x96.0
- Total of 471 commits and about 20,000 lines of code difference
- A lot has changed ranging from scheduler, memory management, GPU and panel handling, MMC device driver, ION, audio subsystem, cpuidle, binder and a whole lot more
Kernel configuration fixed for proper scheduler operation
Background Wi-Fi HAL scanning issue fixed
LA.UM.7.2.r1-05900-sdm660.0 merged
Linux v4.4.175 merged
Mainline f2fs fixes merged
WireGuard updated to 20190123
seccomp disabled in favor of less system-call overheads
Minor issue with f2fs rapid GC fixed
IRQ balancer settings updated to include MMC and USB interrupts for better overall smoothness
20190128
Bunch of stuffs missed from previous port were applied
Fixed video recording
Booting issues fixed for ROMs with 2019 security patch level
MTP fixed
Wi-Fi drivers' inconsistencies fixed
Merged Linux 4.4.172
Enabled ULPS for lower power consumption
Merged several changes from Sultan's kernel
- GPU performance improved with corrected priority
- Faster display wake-up
- Lower power consumption
20190123
Fixed an error causing Wi-Fi to not function for some users
Merged Linux 4.4.171
Disabled MMC SPI CRC for better eMMC performance
Removed brightness remapper to fix adaptive brightness
Compiler updated to GCC 2019.01
20190114
Initial release
/* Fundraiser */
After consulting with 2 forum moderators, I got a clarification that fundraiser is acceptable with some terms like transparency and a rough timeline.
A fundraiser is opened for me to purchase a Mi Pad 4 Plus LTE. This particular variant was chosen since it's extremely likely for me to make Mi Pad 4 non-Plus LTE and Mi Pad 4 Plus Wi-Fi model supported during the process.
Within a month after the goal is met and the device is shipped, I'll work to make the current kernel and vendor image working on the Mi Pad 4 Plus LTE. After this is done, I anticipate other variants to be supported as well. In the unlikely event that it ends up otherwise, I'll work on some members on the community to get logs and test. It'll be way easier then since both LTE and fingerprint sensor will be working on my project.
While I will try my best to keep up with my goal, do note that it is entirely possible that it could not be done(which is extremely unlikely). You're making a donation after all. Just note that donation doesn't give you rights to force me to do anything with the received device.
The price for the lowest end Mi Pad 4 Plus LTE seems to be around $295 with a seller that would actually use DHL for shipment, which is required as the standard Ali-Express shipping usually takes 20~30 days.
There's another 10% importing tax in Korea on top of $295 which would make the total around $330. I've opened a fundraiser for $350 to avoid possible headaches like PayPal and bank's fee for withdrawing the money back to my credit card.
With that said, here's a fundraiser's link.
You can see the progress of the fundraiser as well.
https://fundrazr.com/81RpR8
Reserved
Reserved 4
This device took an enormous amount of my time that it clearly didn't deserve.
Thanks!
To my knowledge Mipad4 will someday get MIUI Pie. Does that effect the vendor then or are you already decided sticking with ported one?
stunned said:
Thanks!
To my knowledge Mipad4 will someday get MIUI Pie. Does that effect the vendor then or are you already decided sticking with ported one?
Click to expand...
Click to collapse
I'm certain that general experience will be still better with mine even after Mi Pad 4 gets official Pie release.
It'll allow me to fix some bugs though.
Thanks arter. That is why I made a small donation to u knowing that u were working on clover.
Hope more people do the same to keep the motivation alive!
P.S. very nice thread title ?
@arter97 few bugs i found
1)wifi seems to be broken, it's turning off by itself and can't find any networks. (broken on both PA & pixelexp GSI)
2)file transfer broken, only charging is permitted, it keeps going back to charging only (able to test only on PA, on Pixel experience GSI, cant get pass the WIFI set up)
arter97 said:
And since the vendor image is rebased, this means anything other than what I’ve used is not supported.
Mi Pad 4 LTE, Mi Pad 4 Plus, Mi Pad 4 Plus LTE model is not supported. Only Mi Pad 4 Wi-Fi model is supported.
Click to expand...
Click to collapse
Hope you will have time and possibility to support mi pad 4 plus version in near future nice done.
Thank you for you work with this (weird) device!
- Performance seems to be so so good, at least for now, the touch latency also seems to be better.
- Wifi is stable for now (It didn't work on the first boot, but I rebooted and it worked).
- File transfer works randomly for me (I'm trying to get logs and dmesg right now).
And just a little of OT: What do you think about zstd? I was using that algorithm with a flash kernel in Taimen and, in my humble opinion, it works very well, maybe it's a placebo, but I think multitasking was a little better.
PS: best post name evear, lol.
onliner said:
Thank you for you work with this (weird) device!
- Performance seems to be so so good, at least for now, the touch latency also seems to be better.
- Wifi is stable for now (It didn't work on the first boot, but I rebooted and it worked).
- File transfer works randomly for me (I'm trying to get logs and dmesg right now).
And just a little of OT: What do you think about zstd? I was using that algorithm with a flash kernel in Taimen and, in my humble opinion, it works very well, maybe it's a placebo, but I think multitasking was a little better.
PS: best post name evear, lol.
Click to expand...
Click to collapse
I am stucked.
onliner said:
Thank you for you work with this (weird) device!
- Performance seems to be so so good, at least for now, the touch latency also seems to be better.
- Wifi is stable for now (It didn't work on the first boot, but I rebooted and it worked).
- File transfer works randomly for me (I'm trying to get logs and dmesg right now).
And just a little of OT: What do you think about zstd? I was using that algorithm with a flash kernel in Taimen and, in my humble opinion, it works very well, maybe it's a placebo, but I think multitasking was a little better.
PS: best post name evear, lol.
Click to expand...
Click to collapse
zstd is ratio oriented algorithm. lz4 is speed and latency oriented algorithm.
Unless you're really starving on memory like Samsung, using zstd for swap is a really bad idea.
For those having Wi-Fi issues, I need an actual logs to debug the issue.
I have 2 devices on my hand and neither of them have an issue with Wi-Fi, alongside 5 other testers.
arter97 said:
For those having Wi-Fi issues, I need an actual logs to debug the issue.
I have 2 devices on my hand and neither of them have an issue with Wi-Fi, alongside 5 other testers.
Click to expand...
Click to collapse
there you go arter, if you need other specific logs let me know
xzr3b0rnzx said:
there you go arter, if you need other specific logs let me know
Click to expand...
Click to collapse
mac adress is read from wrong path and thats why it fails
Thanks very much for this brilliant project
Waiting for mi pad 4 lte
rcstar6696 said:
mac adress is read from wrong path and thats why it fails
Click to expand...
Click to collapse
i didnt alter anything, what should i do to solve this?
@arter97 you're a legend bro, great job. One thing I noticed is that adaptive brightness fails in pitch dark room. The screen stays completely dark. Other than that everything else works great.
Related
Hello dear developers.
I'd like to share with you effect of nearly 300 hours spent on trying to optimize Android and push it to the limits.
In general. You should be already experienced in setting up your buildbox, using git, building AOSP/CyanogenMod/OmniROM from source and cherry-picking things from review/gerrit. Solving git conflicts would also be nice. If you don't know how to build your own ROM from source, this is not a something you can apply to your ROM. Also, as you probably noticed, this is not a something you can apply to already prebuilt ROM (stocks), as these optimizations are applied during compilation, so only AOSP roms, self-compiled from source may use this masterpiece.
So, what is it about? As we know, Android contains a bunch of low-level C/C++ code, which is compiled and acts as a backend for our java's frontend and android apps. Unfortunately, Google didn't put their best at focusing on optimization, so as a result we're using the same old flags set back in 2006 for Android Donut or anything which existed back then. As you guess, in 2006 we didn't have as powerful devices as now, we had to sacrifice performance for smaller code size, to fit to our little devices and run well on very low amount of memory. However, this is no longer a case, and by using newest compilers and properly setting flags, we can achieve something great.
You probably may heard of some developers claiming using of "O3 Flags" in their ROMs. Well, while this may be true, they've applied only to low-level ARM code, mostly used during kernel compilation. Additionally it overwrites O2 flag, which is already fast, so as you may guess, this is more likely a placebo effect and disappears right after you change the kernel. Take a look at the most cherry-picked "O3 Flags commit". You see big "-Os" in "TARGET_thumb_CFLAGS"? This is what I'm talking about.
However, the commit I'm about to present you is not a placebo effect, as it applies flags to everything what is compiled, and mostly important - target THUMB, about 90% of an Android.
Now I'll tell you some facts. We have three interesting optimization levels. Os, O2, O3. O2 enables all optimizations that do not involve a space-speed tradeoff. Os is similar to O2, but it disables all flags that increase code size. It also performs further optimizations to reduce code size to the minimum. O3 enables all O2 optimizations and some extra optimizations that like to increase code size and may, or may not, increase performance. If you want to ask if there's something more like O4, there is - Ofast, however it breaks IEEE standard and doesn't work with Android, as i.e. sqlite3 is not compatible with Ofast's -ffast-math flag. So no go for us.
Now here comes the fun part. Android by default is compiled with O2 flag for target ARM (about 10% of Android, mostly low-level parts) and Os flag for target THUMB (about 90% of Android, nearly everything apart from low-level parfts). Some guys think that Os is better than O2 or O3 because smaller code size is faster due to better fitting in cpu cache. Unfortunately, I proven that it is a myth. Os was good back in 2006, as only with this flag Google was able to compile Dalvik and it's virtual machine while keeping good amount of free memory and space on eMMC cards. As or now, we have plenty of space, plenty of ram, plenty of CPU power and still good old Os flag for 90% of Android.
I've made countless tests to find out what is the most efficient in terms of GCC optimization, two selected tests I am about to present you right now.
{
"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"
}
As you may noticed, I compiled whetstone.c benchmark using three different optimization flags - Os, O2 and O3. I set CPU to performance, maximum frequency, and I repeated each test additional two times, just to make sure that Android doesn't lie to me. Source code of this test is available here and you may download it, compile for our beloved Android and try yourself. As you can see O3 > O2 >> Os, Os performs about 2.5x times worse than O2, and about 3.0x times worse than O3.
But, of course. Android is not a freaking benchmark, it's operating system. We can't tell if things are getting better or worse according to a simple benchmark. I kept that in mind and provided community with JustArchi's Mysterious Builds for test. I gave both mysterious builds and didn't tell my users what is the mysterious change. Both builds have been compiled with the same toolchain, same version, same commits. The one and only mysterious change was the fact that every component compiled as target thumb (major portion of an android) has been optimized for speed (O3) in build #1 (experimental), and optimized for size (Os) in build #2 (normal behaviour). Check poll yourself, 9 votes on build 1 in terms of performance, and 1 vote on build 2. I decided that this and benchmark is enough to tell that O2/O3 for target thumb is something that we want.
Now it doesn't matter that match if you wish to use O2 or O3, but here is some comparison:
1. Kernel compiled with O2 has 4902 KB, with O3 4944 KB, so O3 is 42 KB bigger.
2. ROM compiled with O3 is 3 MB larger than O2 after zip compression. Fast overview: 97 binaries in /system/bin and 2 binaries in /system/xbin + 283 libraries in /system/lib and other files, about 400 files in total. 3 MB / 400 = 7,5 KB per file size increase.
3. It's unlikely that code working properly with O2 level might break on O3 level, most issues are on the Os <-> O2 part.
4. If it doesn't cause any issues, and speeds up a binary by a little bit, why not use it?
5. The only real reason to not use O3 is potential higher memory usage due to oversized binaries.
In general, I doubt that this extra chunk of code may cause any significant memory usage or slower performance. I suggest to use O3 if it doesn't cause any issues to you compared to O2, but older devices may use O2 purely for saving on code size, similar way Google did it back in 2006 using Os flag.
[SIZE="+1"]Now let's get down to business[/SIZE].
Here is a list of important improvements:
- Optimized for speed yet more all instructions - ARM and THUMB (-O3)
- Optimized for speed also parts which are compiled with Clang (-O3)
- Turned off all debugging code (lack of -g)
- Eliminated redundant loads that come after stores to the same memory location, both partial and full redundancies (-fgcse-las)
- Ran a store motion pass after global common subexpression elimination. This pass attempts to move stores out of loops (-fgcse-sm)
- Enabled the identity transformation for graphite. For every SCoP we generate the polyhedral representation and transform it back to gimple. We can then check the costs or benefits of the GIMPLE -> GRAPHITE -> GIMPLE transformation. Some minimal optimizations are also performed by the code generator ISL, like index splitting and dead code elimination in loops (-fgraphite -fgraphite-identity)
- Performed interprocedural pointer analysis and interprocedural modification and reference analysis (-fipa-pta)
- Performed induction variable optimizations (strength reduction, induction variable merging and induction variable elimination) on trees (-fivopts)
- Didn't keep the frame pointer in a register for functions that don't need one. This avoids the instructions to save, set up and restore frame pointers; it also makes an extra register available in many functions (-fomit-frame-pointer)
- Attempted to avoid false dependencies in scheduled code by making use of registers left over after register allocation. This optimization most benefits processors with lots of registers (-frename-registers)
- Tried to reduce the number of symbolic address calculations by using shared “anchor” symbols to address nearby objects. This transformation can help to reduce the number of GOT entries and GOT accesses on some targets (-fsection-anchors)
- Performed tail duplication to enlarge superblock size. This transformation simplifies the control flow of the function allowing other optimizations to do a better job (-ftracer)
- Performed loop invariant motion on trees. It also moved operands of conditions that are invariant out of the loop, so that we can use just trivial invariantness analysis in loop unswitching. The pass also includes store motion (-ftree-loop-im)
- Created a canonical counter for number of iterations in loops for which determining number of iterations requires complicated analysis. Later optimizations then may determine the number easily (-ftree-loop-ivcanon)
- Assumed that loop indices do not overflow, and that loops with nontrivial exit condition are not infinite. This enables a wider range of loop optimizations even if the loop optimizer itself cannot prove that these assumptions are valid (-funsafe-loop-optimizations)
- Moved branches with loop invariant conditions out of the loop (-funswitch-loops)
- Constructed webs as commonly used for register allocation purposes and assigned each web individual pseudo register. This allows the register allocation pass to operate on pseudos directly, but also strengthens several other optimization passes, such as CSE, loop optimizer and trivial dead code remover (-fweb)
- Sorted the common symbols by alignment in descending order. This is to prevent gaps between symbols due to alignment constraints (-Wl,--sort-common)
Click to expand...
Click to collapse
Sound cool, doesn't it? Head over to my ArchiDroid project and see yourself how people react after switching to my ROM. Take a look at just one small example, or another one . No bullsh*t guys, this is not a placebo.
However, please read my commit carefully before you decide to cherry-pick it. You must understand that Google's flags weren't touched since 7 years and nobody can assure you that they will work properly for your ROM and your device. You may experiment with them a bit to find out if they're not causing conflicts or other issues.
I can assure you that my ArchiDroid based on CM compiles fine with suggested steps written in the commit itself. Just don't forget to clean ccache (rm -rf /home/youruser/.ccache or rm -rf /root/.ccache) and make clean/clobber.
You can use, modify and share my commit anyway you want, just please keep proper credits in changelogs and in the repo itself. If you feel generous, you may also buy me a coke for massive amount of hours put into those experiments.
Now go ahead and show your users how things should be done .
Cherry-picking time!
Android "Lollipop" (5.1.1 & 5.0.2 tested)
JustArchi's ArchiDroid Optimizations V4.1 for CyanogenMod (latest)
A set of commits you may want to pick to fix O3-related issues:
external_bluetooth_bluedroid | hardware_qcom_display | libcore | frameworks_av #1 | frameworks_av #2
Older entries are provided for reference only. I suggest using only latest commit above.
Android "Lollipop" (5.1.1 & 5.0.2 tested)
JustArchi's ArchiDroid Optimizations V4 for CyanogenMod
Android "Kitkat" 4.4.4:
JustArchi's ArchiDroid Optimizations V3 for CyanogenMod
JustArchi's ArchiDroid Optimizations V3 for OmniROM
JustArchi's ArchiDroid Optimizations V2
JustArchi's ArchiDroid Optimizations V1
AFTER applying above commit and AFTER EVERY CHANGE regarding flags, ALWAYS make clean/clobber AND empty ccache (rm -rf ~/.ccache)
Q: How to properly change toolchains used in local manifest?
Open from your source rootdir .repo/local_manifests/roomservice.xml (or create one). Here is a sample manifest that replaces default 4.8 toolchain (both eabi and androideabi) with 4.8 SaberMod and 4.9 ArchiToolchain:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remove-project name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" />
<project name="ArchiDroid/Toolchain" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" remote="github" revision="architoolchain-5.2-arm-linux-gnueabihf" />
<remove-project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" />
<project name="ArchiDroid/Toolchain" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" remote="github" revision="uber-4.9-arm-linux-androideabi" />
</manifest>
This is only an example, you should use the toolchains that suit you best. My ArchiDroid/Toolchain github repo is a good start to test various different toolchains and decide which one you like the most, or which one causes the least problems for you. I do not suggest any other magic tricks to include custom toolchains, putting your selected one in proper path is enough, avoid magic android_build modifications.
[size=+1]Troubleshooting[/size]
Q: Compiler errror:
Code:
(...)/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../libexec/gcc/arm-linux-androideabi/4.8.x-sabermod/cc1: error while loading shared libraries: libcloog-isl.so.4: cannot open shared object file: No such file or directory
This error can be fixed by installing missing library. libcloog-isl.so.4 is provided by libcloog-isl4 package, so on debian-like OSes, you should be able to fix it with:
Code:
apt-get install libcloog-isl4
Q: Compiler errror:
Code:
(...)/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../libexec/gcc/arm-linux-androideabi/4.8.x-sabermod/cc1: error while loading shared libraries: libisl.so.13: cannot open shared object file: No such file or directory
This error is very similar to above, but considers other shared library. libisl.so.13 is provided by libisl13 package. Now the problem is that this package is in testing/sid, so we'll need to install it from there.
Add to your /etc/apt/sources.list following entries:
Code:
deb http://ftp.debian.org/debian testing main contrib non-free
deb-src http://ftp.debian.org/debian testing main contrib non-free
Then apt-get update && apt-get install libisl13.
Issues below are for older commits and should be used for reference only
Kitkat THUMB O2+ errors?
These are the most common issues.
* Change -O3 flag from TARGET_thumb_CFLAGS back to -Os, make clean/clobber, empty ccache and try again. This fixes most of the issues.
* RIL problems for for the Exynos 4210 family? Add -fno-tree-vectorize to TARGET_thumb_CFLAGS.
* Broken exFAT -> https://github.com/JustArchi/android_external_fuse/commit/78ebbc4404de260862dca5f0454bffccee650e0d
Errors caused by toolchain?
1. Try Google's GCC 4.8 if you used Linaro 4.8 or SaberMod 4.8
2. Fallback to Google's GCC 4.7 if above didn't help (change TARGET_GCC_VERSION back to 4.7)
Errors caused by GCC 4.8+?
* ART Fix (bootloop) -> https://github.com/JustArchi/android_art/commit/71a0ca3057cc3865bd8e41dcb94443998d028407
* Not booting kernel -> https://github.com/JustArchi/androi...mmit/9262707f4ea471acf40baa43ffe4bfb3cff64de9 and https://github.com/JustArchi/androi...mmit/41a70abcdad746d9415f3ee40f90528feb0c9bdd
Errors caused by GCC 4.9+?
* Graphical glitches in PlayStore -> https://github.com/JustArchi/android_external_webp/commit/36c6201fbb108d6b757f860e2cd57f3982191662
Errors caused by Linaro?
* error: unknown CPU architecture -> https://github.com/JustArchi/androi...mmit/5e5e158a7c147725beae1eeb6785174baacecb03 (Keep in mind that this is a sample fix for smdk4412 kernel, you may need to use similar solution in your own case. Also, this error happens only with Linaro toolchain, doesn't happen with Google's GCC)
Other errors?
* error: undefined reference to 'memmove' -> https://github.com/XperiaSTE/androi...mmit/679a4e571ef77f47892a785e852d8219c1e6807a
[size=+1]Credits[/size]
@IAmTheOneTheyCallNeo - For inspiration and first steps
@metalspring - For some nice commits
@sparksco - For SaberMod, some nice commits and support for the optimization idea
Bravo! I see flags in here that I am yet to try. Thanks for all your work and dedication to this effort.
Going to do a comparison this week against my "neofy" initiative
Thanks!
-Neo
Forum Moderator
This is amazing man!
Enviado desde mi Moto G mediante Tapatalk
Damn... Wish I had an international gs3. I'd be on SlimKat, find your thread and be like:
I'm gonna be 20 years old in about an hour... Should I ask?
Great work :highfive:
I saw you had already a custom 4.10 linaro. If I use it, do I need to change anything on your commit?
Thanks
Sent from my SAMSUNG-SGH-I747 using Tapatalk
_MarcoMarinho_ said:
Great work :highfive:
I saw you had already a custom 4.10 linaro. If I use it, do I need to change anything on your commit?
Click to expand...
Click to collapse
It won't boot, stl port has segfaults when using GCC 4.9+. If you want to use it, sure, change TARGET_GCC_VERSION and include proper toolchain.
JustArchi said:
It won't boot, stl port has segfaults when using GCC 4.9+. If you want to use it, sure, change TARGET_GCC_VERSION and include proper toolchain.
Click to expand...
Click to collapse
Is this the best toolchain [stability/performance] to compile a ROM?
https://github.com/JustArchi/Linaro/tree/4.8-androideabi
_MarcoMarinho_ said:
Is this the best toolchain [stability/performance] to compile a ROM?
https://github.com/JustArchi/Linaro/tree/4.8-androideabi
Click to expand...
Click to collapse
Yes.
JustArchi said:
Yes.
Click to expand...
Click to collapse
Just one last question. Do I need to configure envsetup.sh to the custom toolchain directory?
_MarcoMarinho_ said:
Just one last question. Do I need to configure envsetup.sh to the custom toolchain directory?
Click to expand...
Click to collapse
No, but you need to add Linaro entries to your local_manifest.
https://github.com/JustArchi/ArchiDroid/blob/2.X-EXPERIMENTAL/__dont_include/roomservice.xml#L3
Thank you @JustArchi
i make a build for Slimkat (nexus 5)
Everything is fine but just a noobish question,
I have to enable "TARGET_USE_O3=true" in BoardConfig.mk ?
micr0g said:
Thank you @JustArchi
i make a build for Slimkat (nexus 5)
Everything is fine but just a noobish question,
I have to enable "TARGET_USE_O3=true" in BoardConfig.mk ?
Click to expand...
Click to collapse
No, you shouldn't have any commits apart from mine. It already specifies O3 for everything.
Can I use a 4.7 toolchain with the ArchiDroid optimizations? I've tried compiling my kernel with different 4.8 toolchains before, and it's always resulted in boot loops.
Codename13 said:
Can I use a 4.7 toolchain with the ArchiDroid optimizations? I've tried compiling my kernel with different 4.8 toolchains before, and it's always resulted in boot loops.
Click to expand...
Click to collapse
Actually you can. Just change TARGET_GCC_VERSION back to 4.7.
Well done mate, I'll try contributing from my side to this project
great work archi !! also after porting a fully working 4.4.2 touchwiz to i9300 is it possible to make aosp for i9300 more stable now?
@JustArchi which flags could be used for kernel compiling? And where should I put it in in the Makefile? I don't compile the complete ROM because I have to low machine for that, but I am developing a custom kernel for my Xperia Z. BTW Fajnie trafić na innych Polaków
dragonnn said:
[B @JustArchi[/B] which flags could be used for kernel compiling? And where should I put it in in the Makefile? I don't compile the complete ROM because I have to low machine for that, but I am developing a custom kernel for my Xperia Z. BTW Fajnie trafić na innych Polaków
Click to expand...
Click to collapse
Ktoś tu mówił o Polakach?
Świetna robota @JustArchi :highfive:
dragonnn said:
@JustArchi which flags could be used for kernel compiling? And where should I put it in in the Makefile? I don't compile the complete ROM because I have to low machine for that, but I am developing a custom kernel for my Xperia Z. BTW Fajnie trafić na innych Polaków
Click to expand...
Click to collapse
If you have whole ROM tree then you cherry-pick this commit, lunch your target and make bootimage. This is enough.
If you have standalone kernel, take a look at main Makefile .
{
"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"
}
Floppy is kernel for all custom rom based on LineageOS 14.1, support the Moto G 2014 LTE (4G)
Code:
#include <disclaimer.h>
* Your warranty is now void. *
* No guaranteed this'll explode your device, be careful, follow the instructions ! *
*don't point at me if your alarm dies after flashing this kernel ! *
Based on Linux Kernel 3.4.113
Based on LineageOS Kernel
GCC Linaro 7.2.1
Governors: yankdemand, yankactive, smartmax, lionheart, impulse, dancedance, BioShock, zzmoove, intellidemand, intelliactive, Interactive, Conservative, Ondemand, Powersave and Performance.
I/O Schedulers: Zen, Noop, Sio, Sioplus, Tripndroid, vr, bfq, row, fiops and deadline
Compiled with -Os
Full Linaro Optimizations ON
Optimized Parameters from L Speed @Paget96
Overclock CPU 1593600Hz
Overclock RAM to 566MHz
Reclaim RAM from loggers
Google Snappy Algorithm
ARM RWSEM Algorithm
S2w and Dt2w - credits : showp1984
USB Fast Charge Mode
Spectrum support
Kernel Samepage Merging (KSM)
Dynamic File Sync and Asynchronous FIle Sync - credits : andip71 | Francisco Franco
Frandom - Entropy Generator
USB OTG NTFS r/w Support
SYSInterface Gentle Fair Sleepers
Performance enhancements
Intelliplug 4.0, Alucard Hotplug, autosmp
OC Slimbus frequencies to provide better sound quality
Arch Power saving - credits : kirananto | Cl3Kener
Adreno Idler- credits : arter97 | yarpiin
Sound Control
Support f2fs, exfat, ntfs filesystem
Quick WakeUp Driver and power suspend 1.7 - credits : Paul Reioux | Jean-Pierre Rasquin | Francisco Franco
Support cpu boost
MDSS color control - credits : savoca
Sysfs interface to Enable/Disable CRC
Intelli-thermal v2
Kexec-Hardboot - credits : hurtsky
Sysfs interface wakelocks - credits : Francisco Franco
TCP Congestion Algorithms: Westwood (default), Reno, Bic, Highspeed, Hybla, HTCP, Vegas, Scalable, Lp, Yeah and Illinois.
And much more!
First time:
Reboot to recovery
Flash FloppyKernel.zip
Wipe cache e dalvik cache
Reboot
Update the kernel:
Reboot to recovery
Flash FloppyKernel.zip
Wipe cache e dalvik cache
Reboot
Coming from another kernel:
Reboot to recovery
Flash your ROM
Flash FloppyKernel.zip
Wipe cache e dalvik cache
Reboot
Floppykernel
LineageOS builds for Thea
LineageOS
Mi5Devs
@GreekDragon
XDA:DevDB Information
FloppyKernel, Kernel for the Moto G 2014 LTE
Contributors
Jonas Cardoso, Caio99BR, InsideMuz, Artur Macedo Costa
Source Code: https://github.com/JonasCardoso/android_kernel_motorola_msm8226
Kernel Special Features: A magical support, I am all day here, reading the publications of the posts, ready to help in any doubt (unless you have not read the OP that contains the information that you need).
Version Information
Status: Stable
Current Stable Version: RC1
Stable Release Date: 2017-12-19
Created 2017-12-19
Last Updated 2017-12-19
RC1 - 19/12/2017
Initial release
Frequently asked questions
Q: Will this conflict with any mod I'm using?
A: As long as it doesn't have any entropy related stuff, its okay. Since the kernel already comes with an inbuilt entropy generator, it will conflict with the ones from mod, causing a poor, stuttered performance!
Q: Deep Sleep isnt working for me, Google Services causing wake-locks, what to do?
A: Go to settings, Privacy, Privacy Guard, All apps, long press Google Services, and deny/disable wake-locks! (Thanks to @Paget96 for the solution)
Q: Is your kernel secure?
A: You MAY face some issues, but it's safe! My cell phone has not exploded yet.
Q: WiFi doesnt work for me.
A: Reflash ROM and Kernel.
Q: What application can I use to configure the kernel?
A: Use Spectrum, and if you have enough knowledge of what to modify or do in the application use together Kernel Adiutor.
Q: Can I use the kernel source in my ROM?
A: If you want to use my kernel in your ROM, just put my name in the credit, just like I did.
Q: Does your kernel support writing to the NTFS file system?
A: Yeeh, you can use flash drives and HD with NTFS via OTG.
Q: My cpu clock is locked with any governor.
A: Just disable the thermal control in the kernel temperature settings.
Q: I have problems with your kernel.
A: Take a logcat and kmesg, this website and this video should help you
Q: Why does my magisk and root disappear after installing your kernel?
A: The kernel script makes changes that directly interfere with both, reinstall the magisk that it will function normally, follow this installation line always: FloppyKernel -> Magisk -> Reboot system.
Q: What is the "Battery" profile in the spectrum?
A: Based on Project Zhana & X.A.N.A was made for trying to be as efficient as possible without compromising the performance. Thanks to the discovery on Voltages used by our SD820 I could make a profile that utilizes more the BIG cluster. My first attempt was to move ALL the load to the BIG cluster, it was against anything that I have learned about little. BIG CPU but I tried, it turned really good at first, low usage was just amazing... But on more usage things didn't go that good. So what I did it was to give a twist to things, but not such twist. It kind of works like Nameless and Shotgun, Mostafa Wael and I worked the same idea. #LITTLE cluster will be running on low-mid frequencies but delivers full performance when is needed. # BIG Cluster will help LITTLE ease Load, but in a great way than before. Things can be done faster and more efficient giving us profit in form of battery. It should run smooth on all scenarios, but you guys tell me. You can easily get around 7~9 hours SOT for 24 hours even more If you don't play game. This will, of course, may vary, but it will definitely be better.
Q: What is the "Balanced" profile in the spectrum?
A: Based on GhostPepper was made to uses a quantized, frequency-aligned parametric curve to influence low core clock rates while providing extremely smooth transitions from each clock rate and exceptional battery life. Really well-defined clock speed escalation for a good battery and performance.
Q: What is the "Performance" profile in the spectrum?
A: Based on FusionP this profile brings a more "agressive" way to scale frequencies. It will scale frequencies sooner(regarding load values from cpu) and will use more the big cluster to provide more performance doing the tasks on hands. Battery should not take a big hit but using heavy demanding tasks you can expect a higher drain.
Q: What is the "Gaming" profile in the spectrum?
A: Based on Burnout PR5, this profile's main goal is to provide absolute maximum performance when needed, but lies low quite well. You see, some times I see the CPU hitting some of the high freqs of 1190 while making something as simple as watching YouTube or playing some spotify tracks needlessly, and sometimes I feel it is a bit slower than it should be in things like brute multitasking. Most profiles do aim at bringing a mid-ground to rest on. But with the sensible words of one of my favourite idols Jeremy Clarkson, he says 'Power solves everything' and right he is. By eliminating the mid freqs of the Little cluster and efficiently using some specific frequency steps, you get some power savings by staying on lower freqs as much as possible, and even on brutal tasks you get the job done faster as well, since the CPU will give you all the power to finish the job as fast as it can, and hit back to idle faster.
Q: I want more information about your spectrum profiles.
A: Read this thread.
Hi there.
Is it possible to run this kernel on the LOS 15.1?
Did read that it is for the 14.1, but you know, why not try to brick it?
Have you tested it? Cause the android go version of oreo with a good kernel could really make thea a brand new entry-level phone. With google camera 5 it could even compete with some budget phones from 2017.
Thanks for the kernel, Just flashed it on AOKP Nougat and it's running smoothly.
I discovered Spectrum with your post, amazing app to don't have an headache with kernel tweaking.
However does Spectrum activates a hotplug or does I have to activate it with kernel adiutor or else ?
PS: Spectrum profile's values can't be seen in Kernel Adiutor, I just see Lineage profile values... Also by looking at your spectrum init script I see that you assume that Thea have BIG and small clusters. when I'm trying to `cat` the value for some lines they do not exist.
Thanks a lot for keeping our good old Thea alive.
One more thing.
Could you make the kernel compatible with the oneoplus camera from this post ?
What camera app are you using?
BridouZ said:
Thanks for the kernel, Just flashed it on AOKP Nougat and it's running smoothly.
I discovered Spectrum with your post, amazing app to don't have an headache with kernel tweaking.
However does Spectrum activates a hotplug or does I have to activate it with kernel adiutor or else ?
PS: Spectrum profile's values can't be seen in Kernel Adiutor, I just see Lineage profile values... Also by looking at your spectrum init script I see that you assume that Thea have BIG and small clusters. when I'm trying to `cat` the value for some lines they do not exist.
Thanks a lot for keeping our good old Thea alive.
Click to expand...
Click to collapse
Yes, I got this script from the source of my Mi5, some lines do not change it, because the kernel moto g 2014 does not have the resources
Breno Spangler said:
One more thing.
Could you make the kernel compatible with the oneoplus camera from this post ?
What camera app are you using?
Click to expand...
Click to collapse
For this i need source kernel to put this feature
Breno Spangler said:
Hi there.
Is it possible to run this kernel on the LOS 15.1?
Did read that it is for the 14.1, but you know, why not try to brick it?
Have you tested it? Cause the android go version of oreo with a good kernel could really make thea a brand new entry-level phone. With google camera 5 it could even compete with some budget phones from 2017.
Click to expand...
Click to collapse
In the build that I made available probably does not work because of the need Oreo changes
s2w for thea? Amazing
zitronenmelissa said:
s2w for thea? Amazing
Click to expand...
Click to collapse
So far it only works on titan
Any can test in LOS 15.1?
Unfortunately not booting on my phone
Jonas Cardoso said:
Any can test in LOS 15.1?
Click to expand...
Click to collapse
Tried flashing your new build...dirty flashed and then, because it wasn't working, clean flashed on 28/12 and 29/12 build of LOS 15.1 with TWRP 3.2.1-0. But unfortunately the phone (thea - XT1072) was stuck on boot logo every time. I really would like to see the kernel working on LOS 15.1, because it worked really good on LOS 14.1.
A few questions mate:
So the cpu is clocked to 1.6 Ghz right? Cpu z shows it reaching 1.2 only. Perhaps on performance profile?
How do i enable dt2w?
Got some lags in some animations, for example in settings, going to display, the animation in between is kinda sluggish. Whats funny is, overall the device is smoother! Some settings must be changed perhaps?
Is the permissive Selinux a big deal?
Im using Los 14.1 with your balanced profile. Thanks, happy new year!
Arcline said:
A few questions mate:
So the cpu is clocked to 1.6 Ghz right? Cpu z shows it reaching 1.2 only. Perhaps on performance profile?
How do i enable dt2w?
Got some lags in some animations, for example in settings, going to display, the animation in between is kinda sluggish. Whats funny is, overall the device is smoother! Some settings must be changed perhaps?
Is the permissive Selinux a big deal?
Im using Los 14.1 with your balanced profile. Thanks, happy new year!
Click to expand...
Click to collapse
Use kernel adiutor, cpu z is not very good to get info, dt2w dont work on thea, only in titan, it is normal to have some lags, after all it is an old device already, it also depends on its use, selinux dont will stop the lags, if that's what you're thinking
I'm using in titan, your kernel doesn't lag but battery gets horny (bad joke) I mean that the battery duration got worst, you maybe consider undervolting a little and upgrading your lmk parameters because it does make apps don't lag but it's a little aggressive, it does FC my keyboard (google keyboard) and I don't wanna be annoying but I have a request, can you bake voltage control into the kernel?
---------- Post added at 09:39 PM ---------- Previous post was at 09:26 PM ----------
I can provide sources for voltage control if you want and, where I send logs?
---------- Post added at 10:21 PM ---------- Previous post was at 09:39 PM ----------
The fix for laggy animations when opening recents and for almost the animations is disabling the adreno idler, or tweaking it
If you have any other test builds for 8.1 just pm me so I can test it
I am using Thea. I like your kernel but had to remove it and restore a backup because the battery usage settings was hanging. When I unplugged after charging it still showed up as charging. That I could fix with a restart but then it wouldn't show what apps was used since last charge. Didn't note any significant improvement in battery duration the days I tried out your kernel.
BTW is there a way to remove your kernel without having to install a backup?
Are you still here?
Is this kernel compatible with Android 8.1? I am running LOS 15.1 but I want to use FloppyKernel because I loved it when I was running Nougat.
However, there is a problem. I can't afford to flash it because I am currently using my device a lot and there is no boot.img in your script. I tried to manually repack a boot image with your Zimage and hot-boot it from Fastboot but it stays stuck in the Motorola logo when I do it. I dumped LuK's Oreo kernel and it hot-boots fine. I'll also try to build your kernel from source.
I really hope that you didn't abandon this device too, but if you did then I will try to become a developer for this nice old phone.
Wattsensi said:
Is this kernel compatible with Android 8.1? I am running LOS 15.1 but I want to use FloppyKernel because I loved it when I was running Nougat.
However, there is a problem. I can't afford to flash it because I am currently using my device a lot and there is no boot.img in your script. I tried to manually repack a boot image with your Zimage and hot-boot it from Fastboot but it stays stuck in the Motorola logo when I do it. I dumped LuK's Oreo kernel and it hot-boots fine. I'll also try to build your kernel from source.
I really hope that you didn't abandon this device too, but if you did then I will try to become a developer for this nice old phone.
Click to expand...
Click to collapse
No item didnt work it causes Brock on 15.1 or anthther but 14.1
{
"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"
}
Proto Kernel
Huawei Honor 9, P10 and P10+
This kernel is aimed for optimal relation between Performance and Battery on the Honor 9 and the P10 family.
It's built with Function and Optimization in mind, no mile-long list of Features and unnecessary Bloat.
P10/P10+ users should download appropriate version.
Users with CN versions (AL-00's, TL-00's, C636 Region and alike) must also download appropriate version (CN) or it will cause a major bootloop.
As of August 23rd, following recent Huawei decisions and intentional provocation of issues with custom firmware, EMUI 8 is only Officially supported up to B369. It will work with more recent versions up to September Patch but WE WON'T TAKE ANY BUG REPORTS FROM THEM.
OpenKirin 8.1 Roms and HavocOS-hi3660 are Officially supported, Compatible with other Treble 8.1 and 9.0 Projects BUT WE ADVISE STRONGLY TO BASE YOUR TREBLE ROMS ON B368 OR B369 AT THE MOST.
DISCLAIMER
I'm not responsible for bricked devices and nuked SD Cards or the inability of reading instructions. Unlocking bootloader, flashing kernels and such, voids your warranty. If you have any doubts or don't know what you're doing, SEARCH, READ and then ASK. And i can't and therefore won't respond to issues without logs.
FEATURES
- Compiled with Linaro AArch64 GCC 5.5 2017.10 and GCC 4.9 2017.01 (CN Versions) (ARMv8,A53 Optimized)
- Native ARM big.LITTLE CPU Driver while keeping Huawei's specific SMP Flow for Kirin SoC
- HiSi GPUFreq driver and Frequency Hopping Spread Spectrum feature
- UV (UnderVolt) on both CPU Clusters and GPU for better efficiency (All thanks to @nutcasev1.5)
- Energy Aware Scheduling (EAS) with "Schedutil" CPU Governor
- blu_active and blu_schedutil CPU Governors
- CAF CPU Boost driver and SchedTune Boost v3
- GPU Scene Aware (set as default)
- Maple, SIOPlus and Zen additional I/O Schedulers
- Aggressive GPU Suspend on Low Frequencies
- Swap and zRam disabled
- NTFS R/W Support
- Reduced Kernel Wakelock Sources by 90% in relation to Stock
- Advanced TCP Algorithms with "Westwood" Default
- Reactivation of the "setenforce" command
- Huawei's Analytics Engine disabled
- Capacitive Button Fix by @zxz0O0
- Wireguard VPN Support
REQUIREMENTS
- Unlocked Bootloader
For EMUI 8:
- TWRP Recovery - @zxz0O0 TWRP Mandatory for the H9
- EMUI 8 Stock Firmware up to B369 Officially Supported. Others may work.
For Treble 8.1 and 9.0:
- TWRP for 8.1 - Get it here -> Link
- You will have to place Zips on external SD because this TWRP can't decrypt internal storage.
- OpenKirin Projects and HavocOS-hi3660 Officially supported. Other projects should work as well.
ACKNOWLEDGEMENTS
- Huawei/Honor for the source code
- @osm0sis for the AnyKernel2 and AIK tools
- @zx2c4 for Wireguard
- @eng.stk for his awesome blu_active and blu_schedutil CPU Govs
- @franciscofranco for the small bits and pieces that just make things work
- @zxz0O0 for initial tips on EMUI8 boot structure and the Capacitive Button Fix
EAS DISCLAIMER
- It is possible, as reported on other device threads, that EAS may increase your active battery drain during the first 2 or 3 cycles of usage. This is normal. Just continue to use the device normally and it will tune itself to your use and battery life will stabilize afterwards.
DOWNLOAD H9
AFH
DOWNLOAD H9 CN
AFH
DOWNLOAD FOR P10/P10+
AFH
DOWNLOAD FOR P10/P10+ CN
AFH
XDA:DevDB Information
Proto8, Kernel for the Honor 9
Contributors
JBolho, nutcasev1.5
Source Code: https://github.com/JBolho/Proto
Kernel Special Features: EAS, UnderVolt, GPU Optimization, Persistent Spectrum Support, Wireguard
Version Information
Status: Stable - Final
Current Stable Version: 5.1F
Stable Release Date: 2018-10-24
Created 2018-04-21
Last Updated 2018-10-24
ProtoSSC, Changelog, Init.d Script and EMUI8 Theme
Q&A, Proto-Spectrum System Control, Proto init.d Script and Proto EMUI8 Theme
Proto-Spectrum System Control (ProtoSSC)
- Spectrum App - Google Play Link
- Spectrum System Control - AFH Download
"What is Spectrum and ProtoSSC?"
Spectrum, to put it simply, it's a quick and easy way of changing between Kernel settings oriented for 4 different scenarios, using pre-programmed profiles. More info? Check out the XDA link:
Spectrum App XDA Thread
Huge thanks to @frap129 for this work (and for Maple I/O too by the way)
ProtoSSC is a set of intructions that will give you full power over your system, completely eliminating Huawei's Management and Override Framework, replacing it with Spectrum-based Management, without having to mess around with files on internal storage.
Profiles are now built-in and are persistent after reboots (read notes)
ProtoSSC Instructions
First download the SSC flashable zip for your device file from the link above and place it on external SD card
Go to <root>/vendor/etc and delete the "perfgenius_boost_policy" and "perfgenius_config" XML files.
Go to <root>/vendor/bin/hw and rename (do not delete) "[email protected]" and "[email protected]" (just add ".bak" in the end)
Go to <root>product/etc/xml and delete the "uniperf_config_cust" XML file.
Go back to <root>/vendor and open the build.prop, find the lines "ro.config.hw_perfgenius" and "persist.sys.iaware.cpuenable" and change them from 'true' to 'false'.
If you were already using Spectrum, on your Internal Storage, delete the Spectrum folder, along with the profiles. Leave the Spectrum app installed.
Reboot to TWRP and flash the SSC file and reboot. (If you do not have Spectrum app installed, install it - Play Store link is above). Just give root permissions to the app and set whatever profile you want to use.
Every SSC Profile is now EAS based and separated by device family and was designed and tested for each purpose.
Every single profile has also some degree of underclocking, according to its design and purpose.
Therefore, we don't want to hear any noobs ranting about Antutu points.
Balance - Designed for normal everyday use. Best balance between performance and SOT.
Performance - Designed for more demanding use, heavy multi-tasking and heavy Camera usage.
Battery - Designed for the best Battery life while maintaining minimal settings to avoid lags. GPU and Big cluster capped to minimum frequencies.
Gaming - Specifically designed and tested for sustained performance with heavy 3D gaming.
IMPORTANT NOTES:
After a lot of headaches and trying to figure all this Huawei system out, with the precious help of people at fRom Future Roms TG Group, and of course the ProtoKernel Testing Team, we finally made the profiles 100% persistent, and CPU/GPU freqs will no longer be overriden by the system.
There is only one logic exception to this, and that is of course, the Thermal Engine. Suffice to say, we will never mess with this.
These devices are not gaming consoles, i've heard the complaints, and i adjusted Boost settings on Gaming profile to be less agressive and underclocked the Little Cluster as well. With highly demanding games it will heat anyway, but should be better now. I take no complaints regarding PUBG or hour-long gaming sessions.
What is the Proto init.d Script and how do i use it?
- The Proto init.d Script tweaks the TCP buffers to optimize Mobile Data performance and enables the USB Fast Charging by default.
The script is best used with Magisk and you have to place it under <root>/magisk/.core/post-fs-data.d or <root>/sbin/.core/img/.core/post-fs-data.d depending on Magisk version.
Download is attached to this post as a zip file.
There's a Proto EMUI8 Theme? Where do i get it?
Right this way! --> Download Proto Kernel EMUI 8 Theme
Put it on Themes folder on Internal Storage and it will show up on your Themes app.
"My device started to lag a bit, what's happening?"
- If this occasionally happens, you really should know that rebooting your device every other day is a good thing. Swap and ZRam are dead for good and i'm not bringing them back.
Enjoy!
Version 5.1F - 10.24.18 [Final Feature-Development Release]
- Upstreamed to Linux 4.4.159
- Disable Huawei's D.U.B.A.I. functionality (No More Analytics for the H Company)
- Optimize build for big.LITTLE (GCC 5.5 based version only)
- Full Rebase of EAS to AOSP
- Implement Schedutil Governor
- Port Blu_Schedutil from OP6 Blu_Spark Kernel
- Deprecate Sched Governor
- Fix and Implement WALT (Window-Based Load Tracking)
- Add Tuned Zen I/O Scheduler (Now part of SSC Balance Profile)
- Separate SSC Profiles between Honor9 and P10 family (avoids error spamming on init logs and tailored freqs)
- Update Wireguard
- It's recommended you use the Kernel along with SSC and the init.d Script
Older Versions:
Version 3.0R - 09.19.18
- Upgrade to Linaro GCC 5.5-2017.10 (Keep Linaro GCC 4.9 for CN versions)
- Upstreamed to 4.4.103 - Kernel now on par with stock K970
- Increased Buffer on GPUFreq driver
- Port HiSi JPEG Processing Engine
- Update Wireguard to 0.0.20180910
- Update on SSC - All profiles are now based on EAS with heavy frequency customization
- Revert Proto init.d Script back to v1 due to Huawei's poor implementation of Skia
Version 2.5R - 08.20.18 [GPU Supercharger Edition]
- GPU - Reduce TLB Pressure and Prevent Memory Fragmentation
- GPU - Port and Optimize HiSilicon GPUFreq Driver and FHSS GPU Feature
- GPU - Re-Tune Scene Aware and Disable D.U.B.A.I. Analytics on GPU Govs
- Update Wireguard to 0.0.20180809
- Optimize Async I/O for SSD Storage
- Disable HiSi PerfHub
- Minor FS Optimization
- Initramfs Optimizations
- Minor Memory Fragmentation Optimization
- Updated Proto init.d Script to v2
Version 2.0R - 06.29.18 - Major Milestone Update
- Upstreamed to 4.4.73
- New Optimal Timer Frequency - 156HZ Set as Default
- Go Tickless - Enable Full Dynticks System
- Power Efficient Workqueues can now be toggled
- Revert CPU DDR Link Enabling and other HiSi CPU Functions
- Keep Kirin Specific SMP Flow but move to ARM big.LITTLE CPUFreq Driver
- Reduce Kernel Max Wakelocks down by 90% relative to Stock
- Minor RAM and DevFreq Tweaks
- GPU Scene_Aware Tuned for Power Efficiency
- Minor Log Spam on CPU's Silenced
- Reduce Timeout to Stop Processes and Enter Sleep
- Optimized Sound Output Gains and Eliminate Rates below 16Khz
- Implement UKSM 0.1.2.6
- Upgrade SchedTune Boost to v3
- Major Update to Spectrum Profiles to accomodate new features as well
- Update Wireguard to 0.0.20180620
Version 1.7.1R - 06.02.18 - Minor Fix Version
- @zxz0O0 Capacitive Button Fix now included
- Update Wireguard to 0.0.20180531
Version 1.7R - 05.28.18
- Upstream to 4.4.63
- Implement USB Fast Charging Capability
- Minor Efficiency Tweaks to Sched, SchedTune CPU Boost and LMK
- Removed Sociopath TCP Algorithm (Not needed, performance similar to Westwood)
- Update Wireguard to 0.0.20180524 and make it built-in instead of module
- Updated Spectrum Profiles
- Introduction of Proto init.d script - Tweaks TCP and Enables the USB Fast Charging by Default
Version 1.6R - 05.19.18
- Upstream to 4.4.52
- Add FRandom RNG Driver
- Add Dynamic SchedTune Boost
- Update Westwood TCP Algorithm
- Add Boeffla Wakelock Blocker
- Fix for possible Entropy depletion
- Update Wireguard to 0.0.20180519
Version 1.5R - 05.10.18
- Add blu_active CPU Governor and CAF Boost driver for non-EAS users
- Enable CPUFreq DDR Link
- Enable HiSilicon Low Temp CPU Frequency Set
- Timer Frequency set to 300HZ
- Powersave, Userspace and Conservative CPU Govs no longer available
- Automatic Process Group Scheduling Support
- SMT Scheduler Support for Multi-Threading Optimization
- Disable Scheduler Logging to reduce Overhead
- GPU Scene Aware - Battery friendly balanced GPU management. OpenGL may suffer, Vulkan is favored.
- Add Powersave GPU Gov for users that really don't need any GPU performance
- Maple I/O Scheduler tuned and set to default
- ZRam Disabled
- Entropy Tuned for improved performance
- Add FSync Toggle capability
- Disable CRC checks
- NTFS File System R/W Support
- Enable CleanCache Driver
- Skip Kernel Sync on Suspend
- Disabled Huawei Root Scanner
- Add Sociopath TCP Algorithm
- Update Wireguard to version 0.0.20180420
Version 1.2R - 05.04.18
- Add Maple and Tuned SIOPlus I/O Schedulers (SIOPlus now default)
- Tuned CFQ and Deadline I/O Schedulers
- Updated Sched Governor to Kirin970 .103 Source
- Updated CPUFreq Drivers and Governors to Kirin970 .103 Source
Version 1.1R - 04.26.18
- [FIX] Knuckle Gestures now work
- Reverted Huawei Max Freq. Detection for Increased Granularity on "big" Cluster
- Sched Governor now tuned for faster Freq Ramp-Down - [This may affect Benchmark Performance but not device overall performance and/or behaviour]
Version 1.0R - First Official Release 04.21.18
- Linaro AArch64 GCC 4.9 2017.01 (ARMv8,A53 Optimized)
- UnderVolt CPU/GPU by @nutcasev1.5
- Activate built-in EAS and set "Sched" Governor as default
- Enable Kirin Hotplug Flow for big.LITTLE
- Enable Aggressive GPU Suspend on Low Frequencies
- Deactivated Swap
- Reduced Kernel Wakelocks by 50%
- Set CFQ as Default I/O Scheduler
- Renamed Interactive Gov to bypass EMUI Governor Overrides
- Set Westwood as Default TCP Algorithm
- Reactivated "setenforce" command
- Added Wireguard VPN Capability
YES! a custom kernel, will take a look at this with AOSP oreo.
You say it under volts the CPU, is it possible to allow CPU OC'ing, since the A73 cores can hit 2.6GHz according to ARM, but we get stuck with 2.4GHz?
ambitiousButRubbish said:
YES! a custom kernel, will take a look at this with AOSP oreo.
You say it under volts the CPU, is it possible to allow CPU OC'ing, since the A73 cores can hit 2.6GHz according to ARM, but we get stuck with 2.4GHz?
Click to expand...
Click to collapse
The frequency is there on the kernel CPU files but it's not being considered, and plus, the max frequency is locked by Huawei on a hardware config file on vendor partition that sets all kinds of parameters. So far, fortunately, we managed to get around the override on that file that forced "interactive" to be default governor, no matter what was set on kernel, or else, EAS with its Gov as default wouldn't be possible.
But tampering with the file itself is not an option at this point in time.
JBolho said:
The frequency is there on the kernel CPU files but it's not being considered, and plus, the max frequency is locked by Huawei on a hardware config file on vendor partition that sets all kinds of parameters. So far, fortunately, we managed to get around the override on that file that forced "interactive" to be default governor, no matter what was set on kernel, or else, EAS with its Gov as default wouldn't be possible.
But tampering with the file itself is not an option at this point in time.
Click to expand...
Click to collapse
Ah, ok, still nice anyway, maybe someone will find a way to get around this lock.
ambitiousButRubbish said:
Ah, ok, still nice anyway, maybe someone will find a way to get around this lock.
Click to expand...
Click to collapse
Time will tell. Huawei's manner of doing things is a bit tricky. They set one thing on the kernel but then override it on the rom, or on Vendor (because of Treble compatibility)
I'm still pissed at them for switching to 64bit audio drivers exclusively, which nukes the ability to use currently available audio mods.
so , hang on, on the AOSP rom, i am able to change the CPU governor, and it DOES have an effect (bench on interactive gave ~180000 antutu v7, on performance gave ~200000) so, is it a setting in vendor, if its in the ROM itself, then a custom ROM might allow modifications from the kernel to take an effect, though the ROM may have to exclusively support the feature.
ambitiousButRubbish said:
so , hang on, on the AOSP rom, i am able to change the CPU governor, and it DOES have an effect (bench on interactive gave ~180000 antutu v7, on performance gave ~200000) so, is it a setting in vendor, if its in the ROM itself, then a custom ROM might allow modifications from the kernel to take an effect, though the ROM may have to exclusively support the feature.
Click to expand...
Click to collapse
You misunderstood me. You can change the governor after boot with any kernel management app, that's not the question. (I use KA for example)
But if you do not use one of those apps, the governor by default is interactive, even if you go into the kernel code and change it to something else. (that's why we had to find a way to override that)
Also, that vendor file sets Performance as governor during boot, and sets different governors also when the device is charging.
oh, ok, yes, that makes sense
Use su.d or service.d for change govs or sched like you wish with time wait until process found.
I use this way for my mod .
My H9 have no values stock , cpu at Lmk and no kernel app
k1ks said:
Use su.d or service.d for change govs or sched like you wish with time wait until process found.
I use this way for my mod .
My H9 have no values stock , cpu at Lmk and no kernel app
Click to expand...
Click to collapse
That's not a user-friendly solution. It's not even a solution in itself when it comes to developing...
If I want my kernel to be set a certain way, I have the obligation to make it so, without telling users to follow extra steps... Furthermore, no user should be forced to root in order to have a kernel work as it is intended. This is flash-and-forget, no extra steps needed.
If a certain user doesn't want to use it as-is, then of course, they can install a kernel app or use your method to set things their way, but that's out of my control or responsibility.
JBolho said:
That's not a user-friendly solution. It's not even a solution in itself when it comes to developing...
If I want my kernel to be set a certain way, I have the obligation to make it so, without telling users to follow extra steps... Furthermore, no user should be forced to root in order to have a kernel work as it is intended. This is flash-and-forget, no extra steps needed.
If a certain user doesn't want to use it as-is, then of course, they can install a kernel app or use your method to set things their way, but that's out of my control or responsibility.
Click to expand...
Click to collapse
It's a solution anyway.
By the way, great to see a custom kernel here.
Good initiative.
k1ks said:
It's a solution anyway.
By the way, great to see a custom kernel here.
Good initiative.
Click to expand...
Click to collapse
Thank you!
In the meantime i've been looking through some files and there are things that may be possible to improve but require root access and "manual labor" since TWRP still can't flash stuff on certain partitions.
If i can validate them with my testing, they may end up as some form of "Optional Root-Only Additional Optimizations" but the goal should be to provide something that performs without extra work.
Anyway, any and all feedback is appreciated, this device has great potential.
Nice work bro.. Will definitely give it a try.. :good:
JBolho said:
Thank you!
In the meantime i've been looking through some files and there are things that may be possible to improve but require root access and "manual labor" since TWRP still can't flash stuff on certain partitions.
If i can validate them with my testing, they may end up as some form of "Optional Root-Only Additional Optimizations" but the goal should be to provide something that performs without extra work.
Anyway, any and all feedback is appreciated, this device has great potential.
Click to expand...
Click to collapse
What do you mean " TWRP still can't flash stuff on certain partitions " ??
Twrp flash well .
If you want some support for the optionnal root add.
Yes great potential , sadly Huawei does not do like the others.
k1ks said:
What do you mean " TWRP still can't flash stuff on certain partitions " ??
Twrp flash well .
If you want some support for the optionnal root add.
Yes great potential , sadly Huawei does not do like the others.
Click to expand...
Click to collapse
Last time I checked, it still couldn't mount system... But thanks for the suggestion, this is still a work in progress, Huawei's methods are a bit mind bending and we're still figuring out what works and what doesn't. But there's still much room for improvement, I'm sure.
JBolho said:
Last time I checked, it still couldn't mount system... But thanks for the suggestion, this is still a work in progress, Huawei's methods are a bit mind bending and we're still figuring out what works and what doesn't. But there's still much room for improvement, I'm sure.
Click to expand...
Click to collapse
Of course , for sure . Stille much.
About mount system , i can help.
My mod that I develop on G+ need to mount system and mount root img too and works perfectly.
Works on most Huawei devices , H9 , P9 , P10...
Twrp Oreo manage successfully this step.
New Magisk use another way to mount because .img is in /data/adb/**.
@JBolho your kernel is working on my P10 (VTR-L29c432 Oreo b365), it's pretty fast I'm impressed with it, great work!
Update: Wifi and Bluetooth not working.
Working great on latest 362 ROM with KangVIP341. Safetynet passed, setenforce supported. But I still can not make VIPER4ANDROIDFX work in any way. Also nandroid backup is impossible from latest TWRP 3.2.1-0 v3. Error 255.
This kernel work on honor 8 pro.
Ehm... hello everyone
Our phone is quite a little powerful beast, but Xiaomi really made a crappy job on optimizing it, right?
After unlocking the bootloader I felt the need to go back to my roots and get my hands dirty to fix the wrongs in the kernel they released. The phone felt slow and heavy, the battery barely lasted a day. I use my phone for my job and I need to be snappy, stable and last way more than a day. So I started tweaking, digging and experimenting and the result is this kernel that I'm releasing today, in an attempt to make our MI9SE a bit better for all those people who actually use this phone... as a phone...
This kernel is GSI / AOSP only. Don't flash it on Miui based roms unless you are suicidal or want to lose some features, in which case you're free to do as you please and I'm free to ignore your posts, right?
There will be, from time to time, experimental/unstable versions that I release for public testing (usually they're not harmful, but... ehm.... ok you get it) so watch out for the second post if you feel brave and want to be on the bleeding edge. Official kernels are released when the beta testing phase is done and 100% of the feedback is positive.
Don't ask for ETA or you'll be fish slapped... badly! Ignore this warning only in case a nasty bug slips in the release, then you can fish slap me
Ok, enough talk, let's get down to business now.
Features
* Compiled in release mode (all debug stripped)
* Removed all auditing
* Disabled modules support to avoid interference from Xiaomi vendor
* Battery friendly, performance aware
* DT2W support. If disabled the display and touchscreen will power down
* 3G modem small optimizations
* K-Lapse 5.0 support (thanks to tanish2k09 for this awesome piece of code)
* Flicker Reduction via heavily modified Exposure Adjustment module from Sony
* Boeffla Wakelock Blocker pre-configured to block most of the bad boys
* BFQ and CFQ I/O Schedulers
* Adreno Idler support (your gpu will thank me)
* Westwood TCP congestion algorithm enabled by default (and a lot more enabled)
* Support for NTFS (read only)
* Support for F2FS
* And loads more... yeah just ask or check my github
Q & A
Q: Battery !!! Why it's so baaaad ! My phone doesn't sleep !!!
A: Well, don't get it badly, it's not really my problem, is it ? 99.999% is an app you have installed that's preventing deep sleep... go ahead and install BetterBatteryStats, check the Partial Wakelocks and se what's killing your phone. Have fun
Q: App X crashes ! OMG all my data is gone !!!
A: Read again on top, not my fault, sorry. I try my best to give out a stable kernel, but "**** happens" and i can't control it...
Q: I get tons of bsods, my phone doesn't wake up from sleep, it freezes and omg... it just exploded !!!
A: No dmesg / logcat, no party. And please don't post messages like those in the thread if you're not ready to attach a log to the post.
Q: When will you enable gpu overclock, road runner speed mode or wile e. coyote immortality ?
A: Never... on a second thought... maybe... who knows ?
Q: When will you release the new version ? It's a week we're using the old one !!
A: Is it stable ? Then please allow me to fish slap you with a huge trout !
Downloads
All downloads for Kowalski Kernel will be linked in the second post AND in the thread when a new version is released and a changelog will be filed accordingly.
The downloads are labeled as "kowalski-XY-grus" where X can be either "r" for release or "b" for beta. Y is the version number. Eg: kowalski-r1.4-grus is a release, while kowalski-b4-grus is a beta version.
Source will be pushed to my github about 2 or 3 days after a release (or before if I'm not careful), to make sure that no major bugs are introduced in the public repository. You can find the magic code here
This kernel can be compiled with any clang 4.9.x that supports the aarch64-linux-gnu target, so if you want to compile it by yourself you'll have either to build your own toolchain, or use one of the many prebuilt ones (for example from aosp).
Please don't rip-off my work. Please don't kang this kernel. Please don't c&p from my github without proper credit. I'm a nice guy, but i will report you.
Little code of conduct for my threads is necessary: no drama, no OT. Oh and please don't message me on Telegram privately when we have this awesome platform where everyone can benefit from the Q&A.
Thanks
* Okita for the awesome job she made on the base kernel cleanup (this kernel is based on one of her first releases)
* Linus, well, for the linux kernel
* francescod for taking the risks of testing possibly harmful pre-releases
* qualcomm, because codeaurora is awesome!
* osm0sis, the one who allowed us mortals to provide flashable kernels without pain
Oh, I was almost forgetting... on a side note... i'm not really responsible if you decide to test it and your phone melts... right ?
XDA:DevDB Information
Kowalski Kernel, Kernel for the Xiaomi Mi 9 SE
Contributors
pengus77, okitavera, francescod
Source Code: https://github.com/pengus77/kowalski-grus
Kernel Special Features:
Version Information
Status: Stable
Current Stable Version: r1.9.3
Stable Release Date: 2019-09-13
Created 2019-07-25
Last Updated 2019-09-13
Version 1.9.3 release - Download here
* Implement display idle states and expose sysfs nodes to manage them
* qcacld-3.0: Add sme_power_save_api.h include
* Add toggle for disabling newly added USB devices
* sched: don't allow userspace to boost at will
* defconfig: disable misc device and rework a bit
* kernel: implement vDSO64 and vDSO32
* spi: increase timeout to make FOD more reactive
* Bump Linux version to 4.9.192
Version 1.9.1 release - Download here
* updated ion, binder and uapi apis to latest upstream versions
* backported schedutil governor from 4.14 with a subset of improvements tree-wide
* backported qcacld-3.0 from 4.14 msm nicobar tree and cleaned it up
Version 1.8 release - Download here
* reverted the update to the latest wifi driver
* disable ssbd mitigations
* mm:compaction: raise priority
* kernel:sched:fair: align periods to our kernel config (100Hz)
* techpack:audio: remove compat code
* mmage-writeback: tune values for better memory handling
* kernel: nasty hack to bypass VTS/VINTF checks
* defconfig: disable AUDIT,PROFILING,TRACING and MORE...
* kernel: build with -O3 optimizations
* defconfig: re-enable BFQ as default scheduler
* block: add zen scheduler
* binfmt_elf.c: use get_random_int() to fix entropy depleting
* net/wireguard: add wireguard
* PM: devfreq: Use high priority workqueue
* cpuidle: don't disable cpuidle when entering suspend
* gpu:drm:msm: convert all pr_info into pr_debug
* Version 1.7 release - Download here
* Merged Linux v4.9.189 from upstream
* Version 1.6 release - Download here
* Merged Linux v4.9.188 into MSM base
* Fixed a few wifi issues
* Fixed a possible memory leak in the ext4 driver
* Limited zRam to 1GB
* Rewritten defaults for blu_schedutil with an eye on power saving
* Disabled spammy audit logs
* Stripped all symbols from the kernel (smaller, speedier)
* Reverted an old commit in F2FS that was considered harmful
* Version 1.5 release - Download here
* Merged Linux v4.9.187 from upstream
* Fixed K-LAPSE upper bounds and drafted a "saner" default target
* Reinstated VTS / VINTF compliancy
* Version 1.4 release - Download here
* Pretty much initial release with all the goodies from OP after a month of testing...
All the kernel tweaks can be edited as usual with any kernel management app (EX, FK, etc...)
About the Flicker Reduction system, if your ROM doesn't support it or if you want to tweak it a bit and you feel adventurous, you can play with these sysfs endpoints
* /sys/devices/platform/soc/soc:qcom,[email protected]/msm_fb_ea_min (the minimum amount of exposure added)
* /sys/devices/platform/soc/soc:qcom,[email protected]/msm_fb_ea_enable (kinda self explanatory, isn't it? 1 = enabled, 0 = disabled)
* /sys/devices/platform/soc/soc:qcom,[email protected]/msm_fb_ea_elvss_off_treshold (the brightness threshold under which the system is enabled)
Wow, finally a full battery and features oriented kernel. Great to see it for our little beast. And with no Miui support
I hope you don't fall in modern famous useless stuff as Overclock/Overvolting Cpu-Gpu and Overclocking display. Grus doesn't need it at all, at least now.
I'd like to thank you of course, for all of your hard work done. It was a pleasure to help just a little with testing!
After many test of various configurations I've come to these stable settings useful only if you're searching for some more battery juice, so, no high demanding games at all! Performances on daily light use, seem to me like the same as with stock values.
Cpu Governor: Blu_Schedutil
Freq small cores: 576-1516MHz
Freq big cores: 300-1536MHz
wq_power_saving: enabled
Gpu Governor: Simple_ondemand
Freq: 180-267MHz
Adreno Idler: active (should work only on MsmAdreno Governor, but I like to see it enabled anyway)
I/O scheduler: Maple
Readahead 384kb
Fsync: disabled
Tcp congestion algorithm: bbr or westwood
To maximize even more the battery saving use black/dark grey apps as much as possible, use the right brightness, turn off any fancy features as AOD, FOD, AmbientDisplay, PocketMode, every unused sensors, install AdAway, Greenify, use 2G when in Wi-Fi or 2G/3G/4G on mobile connection and pray for someone :cyclops:
All of these settings are fine on my device with my personal use and my personal apps, so, don't complain about bad behavior on your phone.
Which what GSI are you using your kernel? I'm on PE but it will be snappy to have your same experience... :fingers-crossed:
champagne66601 said:
Which what GSI are you using your kernel? I'm on PE but it will be snappy to have your same experience... :fingers-crossed:
Click to expand...
Click to collapse
Hey there, at the moment I'm on Floko because I need stability. Using it with latest xiaomi.eu vendor/firmware blobs and all is good so far
I know people using this on crDroid or Havok and no problems or issues are known so far.
Stupid question: What is different / advantage against Okita kernel?
I'm glad to see new and new kernels and ROMs for 9 SE. Thank you @pengus77
Does it work in miui rooms? Thanks
Fran Montero said:
Does it work in miui rooms? Thanks
Click to expand...
Click to collapse
Read the OP.
vecino said:
Stupid question: What is different / advantage against Okita kernel?
Click to expand...
Click to collapse
This is a fully debloated Kernel from Miui/useless/redundant stuff, so, for an only custom roms lover as me, it's perfect.
K-Lapse, Adreno Idler, unlocked frequencies and flickering reduction are the main visible points, with ofc more under the hood. I left OkitaKernel when it was perhaps on v4 build, so check it out what's changed recently on it.
While they're born from the same base, each Dev makes own customization, so it's up to you to try them both and choose the one who satisfies you better.
Finally I wanna thank again @okitavera for her dedication. Probably without her kernel I wouldn't have bought the 9 SE so fast :highfive:
@pengus77
I flashed your kernel ... is it working but after every restart I give this message: "Device has an internal problem. Contact the manufacturer for more information." Is it problém with firmware / vendor?
vecino said:
@pengus77
I flashed your kernel ... is it working but after every restart I give this message: "Device has an internal problem. Contact the manufacturer for more information." Is it problém with firmware / vendor?
Click to expand...
Click to collapse
Hi, yeah, it's absolutely normal and harmless. It's a standard thing Android *****es about on GSIs when the kernel is too "stripped" and can't neither debug it nor load modules and/or there is a mismatch between system and vendor props. Search for that message in XDA and you'll see that tons of people have the same "issue". It's nothing to worry about, the system will work just fine.
Some ROMs are more strict than others. I know Floko says that, while Havok doesn't.
Roger that - I will be keep testing.
Testing on havoc
Enviado desde mi MI 9 SE mediante Tapatalk
Kernel have in default min 576 MHz - is it so intentionally? Otika was 300 MHz if I'm not wrong. Doesn't this have a negative effect on higher consumption?
vecino said:
Kernel have in default min 576 MHz - is it so intentionally? Otika was 300 MHz if I'm not wrong. Doesn't this have a negative effect on higher consumption?
Click to expand...
Click to collapse
It's just the default to keep it a bit more responsive. Little technical explanation follows: When the phone is in suspend, the cores are disabled and the cpu goes in low power state, so the frequency doesn't really matter. When in active use, the energy and time required to reach a target frequency (when boosting on touch for example) is pretty high. Having a tiny higher min frequency actually lowers the power needed when a boost is required and the time to reach the target frequency is lower. When idling the energy consumption between 576 and 300 is basically the same and doesn't impact the battery life.
Of course the frequencies are unlocked, so you can set it back down to 300 if you feel more comfortable with it
Beta Release [ b1.5a ]
In the releases page on my github (and in the second post) I just pushed a little beta release.
Thanks @fereidooni for finding out a nasty bug occurring during hard memory copy operations .Will fix it soon, in the meantime ignore this version.
Changes:
* Adopted a drastically more power-efficient and reduced IOMMU implementation (your battery will say thank you)
* Cleaned up a few things (this will never end I think... sigh...)
* Disabled the MSM Performance min frequency override. Now YOU decide, not qualcomm.
Have fun
pengus77 said:
In the releases page on my github (and in the second post) I just pushed a little beta release.
Changes:
* Adopted a drastically more power-efficient and reduced IOMMU implementation (your battery will say thank you)
* Cleaned up a few things (this will never end I think... sigh...)
* Disabled the MSM Performance min frequency override. Now YOU decide, not qualcomm.
Have fun
Click to expand...
Click to collapse
Hi
I tried this version
Any video playing cause phone restarted
Thanks for your work
fereidooni said:
Hi
I tried this version
Any video playing cause phone restarted
Thanks for your work
Click to expand...
Click to collapse
Wow thanks mate, an adventurous soul that tested a beta version... gotta love this people
Anyway, just confirmed the problem and will soon get to fix it. In the meantime use the stable version if you want. It should be safe
pengus77 said:
Wow thanks mate, an adventurous soul that tested a beta version... gotta love this people
Anyway, just confirmed the problem and will soon get to fix it. In the meantime use the stable version if you want. It should be safe
Click to expand...
Click to collapse
Thanks mate
Sure I'm using stable version
I am using beta about 10 hors and I had only one problem with UI FC but after wipe cache and dalvik is all ok.
Kirisakura-Kernel for the Rog Phone 3
Hello everyone,
To keep it short: Here is Kirisakura - Kernel for the Rog Phone 3 aka OBIWAN.
I would appreciate if everybody that flashes the kernel, reads at least once through this opening post and the following ones.
Kirisakura - Kernel is designed to bring a handful of beneficial features to the device, while ensuring excellent performance and smoothness to get you safely through the day!
This project aims to keep most of the subsystems updated, way ahead of the stock kernel, thereby improving security and performance, while keeping stability as the foucs during testing! This includes Linux-Stable, CAF-Upstream and kernel/common.
Kernel Control Flow Integrity (Kernel-CFI), which is achieved by linking the kernel with LLD and Link Time Optimization (LTO), more precisely ThinLTO, are quite unique security features. In fact this, alongside Kirisakura-Kernel for the OnePlus 8 Pro, may be (and probably is) the first 4.19 msm kernel with a fully working Kernel-CFI implementation and CFI-Violations fixed on a smartphone.
The only kernels made by OEMs offering this security feature are the ones for the Pixel 3 and Pixel 4 devices.
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.
Another security feature is Shadow Call Stack (SCS). Similar to CFI, only the Pixle 3 and 4 Kernel 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 865/+ that´s built into the different SKUs of the Rog Phone 3.
The kernel-bases available on the Codeaurora-Forums, are basically the foundations OEMs use, to build their own kernel additions on top for devices featuring Qualcomm SoCs.
The Qualcomm developers push regular updates to the bases of the different SoCs, a bit similar to how Linux-Upstream works. OEMs usually stop updating the initial base after the phone is released.
This kernel focuses amongst the other features to provide the latest CAF-Updates merged in a regular manner, to provide updates, improvements and enhancements for SoC specific drivers and subsystems! This might take a while, because a lot of device specific testing is done on my end to ensure stability.
The kernel includes a lot of improvements and contributions from other developers as well. Without this kernel would not exist.
I´d like to mention @tbalden ´s excellent CleanSlate features at this place. They improve usability by a big margin for me personally. The highly customizable sweep to sleep implementation (adjustable to different navigation settings), long tap to bring down status bar (very useful on a big device), backlight dimmer and notification reminder are very useful features that I use personally every day.
Another big part of improvements originate from @arter97´s, @kdrag0n´s and @Sultanxda´s work. Many others contributed in some way or another to this kernel.
A big thanks to all of them at this place!
Now lets continue with a list of features in the next paragraph!
Main Features:
- Based on latest kernel sources from Asus for Android 12 and intended for use on the latest Asus Stock-Firmware
- compiled with Clang 13.0.1 and built with -O3 speed optimizations
- Linux-Stable-Upstream included to 4.19.240
- CAF base for the Snapdragon 865/+ (SD865/+) updated to upstream CAF
- Kernel Control-Flow-Integration (CFI) andLink-Time-Optimization (LTO) ported from 4.19 kernel/common and Pixel 4/XL Kernel
- Shadow Call Stack (SCS) Security-Feature
- Use ThinLTO which was first used in the Pixel 4 XL Android R-Preview Kernel instead of full LTO for full program visibility (needed by CFI)
- fix CFI-Violations found in various subsystems like Asus/device specific drivers and qualcomm drivers
- Link the kernel with LLD and use RELR-Relocation
- include important fixes/improvements from kernel/common
- Flashing the kernel will keep root!
- Cleanslate Features included! See @tbaldens´s CleanSlate Thread for more information
- Flashable via EXKM, FKM or TWRP on a rooted system!
- Anykernel zip is based on the Anykernel3 release from @osm0sis
- disable various debugging configs, that are not needed in a perf build kernel according to google.
- disable selinux auditing (we don´t have to adress selinux denials running a stock rom)
- display tweaks to reduce power consumption on statically rendered images
- tweak display to allow better visibility of black levels/colours on low brightness ( example pictures )
- allow experimental 165hz refresh rate for the panel. (use with caution)
EAS related features:
- EAS implementation patched up to latest CAF state
- disable autogroups and use cgroups for more efficient task placement!
- updates from kernel/common
- scheduler updates from Googles Pixel kernel
CPU related features:
- Change various drivers (WLAN, MM, audio, charger, power, thermal, glink etc) to user power efficient workingqueues. This compliments EAS
- include cpuidle patches from CAF
- improvements to cpufreq/times/stats
- improve memory allocations in binder driver
- use s2idle for deepsleep, as pixel 4/5
- vdso32 patches as found on Google Pixel devices (brief documentation here)
- enable lse atomics
- arm64: lse: Prefetch operands to speed up atomic operations, thanks @kdrag0n
- implement fast refcount checking
GPU related features:
- GPU driver updated to latest CAF-State
- remove POPP functionality from GPU driver to avoid constant fight about downscaling with msm-adreno-tz
- don´t wake the gpu on touch input, instead wake when receiving an ioctl
- don´t copy fence names by default to save a bit of cpu-time (explanation)
- msm: kgsl: Stop slab shrinker when no more pages can be reclaimed
- gpu/kgsl improvements from pixel 4/pixel 5 kernel
File System related features:
- improve memory allocations in sdcardfs
- improve eventpoll logging to stop indicting timerfd (improves kernel wakelock readability)
- improve memory allocations in kernfs
- writeback: hardcode dirty_expire_centisecs=3000 based on this commit
- f2fs-stable upstream, that includes ATGC
- ufs improvements from pixel 4/ pixel 5 kernel
UI/UX/Usability related features from CleanSlate:
- CleanSlate features made by @tbalden
- Disclaimer: All CleanSlate features can be controlled via the free companion and config app found on CleanSlate thread here on the ROG 3 Forums on XDA. Please consider buying the premium versions if you enjoy using the CleanSlate features, to give a little something back to @tbalden.
- 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
- Backlight Dimmer - possibility to use lower panel brightness
- Force FPS Level on Low Brightness
- Squeeze Control
- advanced notification LED control, chromatic charge LED, pulsating LED, LED dimming
Network related features:
- Wireguard Support (Details)
- advanced TCP algorithms enabled
- includes new bbr and bbr2
- fix CVE-2020-14386
Memory related features:
- Speculative Page Faults left enabled (1. 2) (CAF default)
- various fixes for PSI-Monitor, which is used by the userspace lowmemorykiller-daemon
- Fix various memory leaks in different subsystems
- improved mm with patches from mainline
- various other changes from mainline
- included zstd as an option for ZRAM-algorithm (lz4 is probably the best all around, so only change it if you know why and what you are doing)
- improve memory allocations in various subsystems
- ported per process reclaim from Pixel 5 kernel, instead of using outdated CAF implemenation
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
- Backport mainline Selinux commits, thanks @arter97 (you must be on magisk 21.0, otherwise the kernel won´t boot)
Misc Features:
TCP Congestion Algorithms:
- advanced algorithms enabled, enable them with your favorite kernel manager
- includes new bbr2
Wakelock Blocker:
- advanced wakelock blocker with the ability to block any wakelocks (dangerous, use with caution)
- please read [URL="https://arstechnica.com/gadgets/2018/08/p-is-for-power-how-google-tests-tracks-and-improves-android-battery-life/"]this for further info
- blocking a kernel wakelock should only be done in case of firmware incompatabilities (WiFi network at work (can´t be changed) causes deep sleep to not work on the phone.) That´s the only use case I see for this feature. The kernel does not features this to improve battery life!
Other features:
- disable logging and debugging to make the kernel more lightweight in various places (includes binder, mm, vma, gpu, ipa etc)
- fix several coding issues detected by newer Clang-Toolchains
- add support for steam controller
- add support for nintendo switch controller
- ufs improvements from pixel 4/ pixel 5 kernel
- gpu/kgsl improvements from pixel 4/pixel 5 kernel
- display tweaks to reduce power consumption on statically rendered images
Feature section for the "non visible" but perceptible improvements:
- updated binder section (responsible for interprocess communication)
- updated sdcardfs ; have a read about it here:
Flashing Guide, Download and Changelog
A description how to flash the kernel, links for download and a changelog can be found in the second post!
Contributors
Freak07
Source Code: https://github.com/freak07/Kirisakura_OBIWAN
Version Information
Status: Stable
Requirements
- unlocked Bootloader
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
- latest magisk stable root environment
- a backup of boot.img and dtbo.img to be able to restore to stock.
How to flash the Kernel:
1. Download the latest kernel.zip and make sure you have properly updated to the latest matching Asus Stock-Firmware. When the Rog 3 receives an update it takes Asus a while to release the source code for the new OS and me a while to build a new kernel. If you don´t want to face any issues, wait until I either release an updated kernel or give green light because there were no kernel changes.
Always make sure to run the firmware the kernel is built for!
1a. Optional: While it may not be necessary all times, you may want to restore stock boot.img as well as dtbo.img, re-root with magisk and optionally install twrp.zip if coming from another kernel. Before reporting issues make sure you do that! Thank you!
2. Make sure to meet all the requirements listed above.
3. Flash the kernel.zip via latest EXKM or FKM app, or TWRP and do a full reboot.
4. Reboot and profit. Set CleanSlate features as you desire by installing both apps and choose according to your liking.
DOWNLOAD:
Download is located always in this folder:
https://www.androidfilehost.com/?w=files&flid=316676
Important: Read after Download
Please take a look at the second post after flashing the kernel!
Changelog:
Android 10
1.0.0 Initial Release
1.0.1 https://forum.xda-developers.com/showpost.php?p=83393257&postcount=12
1.0.2 https://forum.xda-developers.com/showpost.php?p=83409591&postcount=28
1.1.7 https://forum.xda-developers.com/showpost.php?p=83518681&postcount=32
1.2.2 https://forum.xda-developers.com/showpost.php?p=83539471&postcount=33
1.2.3 https://forum.xda-developers.com/showpost.php?p=83552967&postcount=38
1.5.0 https://forum.xda-developers.com/showpost.php?p=83815367&postcount=74
1.8.2 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84199477
1.9.4 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84404331
2.1.0 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84693785
2.1.1 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84717725
2.2.0 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84752157
2.2.2 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84762283
2.2.4 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85029489
2.2.5 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85119205
Android 11
1.0.0_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85434269
1.0.1_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85437987
1.0.5_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85540573
1.0.7_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85797081
1.0.9_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-86238185
1.1.0_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-86428163
1.1.1_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-86444523
Android 12
2.0.0_S https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-87102871
Donations:
Donations are not mandatory but very welcome if you want to support development or just buy me a coffee/tea
If you like my work: http://paypal.me/freak07
Credits:
Asus for the development device, giving me the opportunity to create this project!
@osm0sis for all his work, including the ak3 installer!
@tbalden for being the best HTC, Pixel, OnePlus and now Asus wingman!
@LeeDroid and @mwilky for their awesome roms and work I used on multiple devices!
@Captain_Throwback for all the mentoring and guidance!
@Eliminater74 for bringing me into the game and the Inspiration
@nathanchance for his upstream guidance and assistance
@RenderBroken for helping me out
@flar2 for all his work
@joshuous for all the help he provided to me in the past!
@arter97 for giving me advice
@kdrag0n for his help and advices!
@topjohnwu for magisk!
FAQ
F.A.Q:
Question: Why does the kernel version show as "unavailable" in settings after flashing it.
Answer: Asus does not allow for custom kernel names in their settings. If the kernel string doesn´t fit their regex, it will display as unavailable there. Nothing can be done about it. Use a kernel manager to check the kernel version.
Question: Is root preserved when flashing this kernel?
Answer: Yes, the AnyKernel.zip will detect root and keep it.
Question: How do I return back to stock or another kernel.
Answer: Extract boot.img as well as dtbo.img from matching firmware you are on and flash the extracted boot.img and dtbo.img via fastboot. If you want to keep root flash back the magisk_patched_boot.img. Or dirty flash your rom.
Question: Why is having Magisk installed mandatory for this kernel?
Answer: Android 10s changes to partitions, doesn´t allow files in system/ and vendor/ to be replaced. This kernel is very far from the stock kernel. To account for this I can´t force load the stock kernel-modules for certain drivers as it happens on kernels that are closer to stock.
Instead we use Magisks function to overlay certain files during boot. Without a working Magisk environment the kernel cannot function.
Question: I have a phone that is converted from CN to WW and now there´s a warning from hardwarestub. Can I hide it?
Answer: Yes, I created a Magisk Module for those that want to hide the notification, so nobody needs to rely on paid apps.
The Magisk module can be found attached to this post.
Please note that refresh rate can´t be changed when the module is flashed. To able to change refresh rate or to remove the module, simple remove it in Magisk Manager and do a full reboot. I´ll attach it to the third post on this thread. There will be no support for this module from my side and no other support for converted devices.
Question: How to report bugs properly?
Answer: Have a look at post #3 in the linked thread. The linked guide is a pretty good starting point.
Before reporting any bug make sure you´re running on a stock configuration. That´s means you´re not using any mods, tweaks in kernel managers or other root tweaks , magisk modules, scripts or other modifications that alter various functions like sound mods, data traffic, sleeping behaviour, scheduler, magical battery tweaks etc.
Try to describe the issue as detailed as possible! Give your exact setup, like rom, magisk version, kernel version.
Is the issue reproducible? Does it happen frequently?
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 .zip with the contents of sys/fs/pstore.
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!
CleanSlate Features and how to use them
CleanSlate Features and how to use them
This kernels offers its users the possibility to use CleanSlate features. CleanSlate-Kernel is developed by @tbalden.
CleanSlate kernel follows a different approach than Kirisakura-Kernel.
We know each other well over the years now and often have worked together.
For more information about CleanSlate visit @tbaldens CleanSlate thread on the Rog 3 Forums linked here.
The CleanSlate features add a lot of flexibility to a device. That´s why I like to include the features in my kernel.
Notifications Reminder, Flashlight Notifications, Turn Phone to sleep and a very advanced sweep to sleep interface that works well with Android 10 Gestures.
We decided to transform Brightness Dimmer and FPS-Override into CleanSlate accessible features as well.
That allows users to easily control these features with the CleanSlate apps.
CleanSlate features are easily accessible via the CleanSlate Configuration app. The Cleanslate Companion app provides a userspace backend for the kernel and is required for some features.
Make sure to install both of these apps, when flashing my kernel and you want to utilize these features.
The apps ask for some permissions. Enable them and do a full reboot to make sure everything is playing nicely
that´s how the companion app will look after enabling it.
https://photos.app.goo.gl/x6sFJc5cUFT9Q7U47
It´s needed for userspace related features, like double tap swipe area for notification pull down.
Every section of the Configuration App has different settings. Basic, Advanced and Preset. You can click on these buttons to change between them.
Advanced will offer you more customization if available.
See the screenshots here:
https://photos.app.goo.gl/avPsiHHrzPwpMqMC8
To change settings, change them according to your liking and hit the "Save" Button. It is the second from the bottom right and will be greyed out if your settings are currently applied.
As you can see in the following screenshot:
https://photos.app.goo.gl/qaFKfLbfwUuyHW717
Brightness Dimmer is enabled, FPS override is set to 144FPS on low brightness. Power button is blocked in pocket and screen gets disabled when putting the phone face down on a desk.
You should be able to find both apps for free on the CleanSlate thread. However if you benefit from the features, think about getting the premium apps on the playstore to give a little bit back to @tbalden.
I hope this post might help some
Excellent! Keep it up
tbalden said:
Excellent! Keep it up
Click to expand...
Click to collapse
U aswell... Both of you keep up the great job
This is amazing, can't wait for the others to try and read their reviews..
just a small heads up before anybody complains.
We, @tbalden and me, just noticed a bug went unnoticed during our previous testing.
If you flashed this kernel or CleanSlate-Kernel, have the CleanSlate config app installed and Backlight dimmer enabled in the CleanSlate Config app. Make sure to keep the screen on for 3-4 minutes after rebooting your phone and the boot process finished.
Otherwise your screen will stay black. Display-Panel driver doesn´t seem to like our mod at the moment.
After keeping the screen on for 3-4 minutes the bug will not be triggered and you can use the phone as you wish.
Sorry for the inconvenience
The issue will soon be resolved in a new update
Freak07 said:
just a small heads up before anybody complains.
We, @tbalden and me, just noticed a bug went unnoticed during our previous testing.
If you flashed this kernel or CleanSlate-Kernel, have the CleanSlate config app installed and Backlight dimmer enabled in the CleanSlate Config app. Make sure to keep the screen on for 3-4 minutes after rebooting your phone and the boot process finished.
Otherwise your screen will stay black. Display-Panel driver doesn´t seem to like our mod at the moment.
After keeping the screen on for 3-4 minutes the bug will not be triggered and you can use the phone as you wish.
Sorry for the inconvenience
The issue will soon be resolved in a new update
Click to expand...
Click to collapse
Also just start the app manually on reboot, as a workaround.
Coming here from your OG Pixel kernel. Is this kernel for 2007.47 or 2007.32?
MrxSiN said:
Coming here from your OG Pixel kernel. Is this kernel for 2007.47 or 2007.32?
Click to expand...
Click to collapse
Nice to see you made the jump! Must be a hell of an upgrade on your side!
the .47 sources are merged. I´m using it on .47 at the moment.
I guess you can just give it a try and check if it boots/works on .32. If you decide to do so, it would be nice if you could report back here. It might help others
Make sure to have a PC with working fastboot environment nearby and a boot.img handy.
In case it doesn´t work, just force the phone to power down by holding power button plus volume down, once it powers off, keep holding power and volume up to boot to bootloader.
Connect to side port and flash your backup boot.img via fastboot. Always make sure to flash the matching boot.img for your firmware.
Hey guys and girls,
Here´s the fix that solves the black screen issue, that occurred when the screen was off while Brightness Dimmer got activated via CleanSlate Config App on boot.
It wasn´t detected immediately, because usually the screen of my device is on when I boot the phone as to check the logs and ensure everything is working
Now everything is working, so just flash the kernel and enjoy I´ll do a post soon, explaining the features a bit more for people unfamiliar with how the CleanSlate features work.
I´d advise everybody to read the instructions in the OP and follow them. They are written for a reason, because they ensure everything will be working as expected.
Kernel is made for the latest stock rom from Asus, you must update your phone to the most recent Asus update, before flashing the kernel.
Enjoy!
Changelog:
- Fix Screen not being able to wake up on a certain condition.
I wish you all a nice day/evening!
Download is below
Download:
Disclaimer/Important:
Kernel: https://www.androidfilehost.com/?fid=8889791610682925903
Instructions how to flash the kernel can be found in the OP!
But look at this post too
To make use of the CleanSlate features, like force FPS on Low Brightness or Brightness Dimmer you need to download both CleanSlate Apps:
Please take a look at the CleanSlate thread for CleanSlate features. I will provide the link to the free to download apps here.
If you use the CleanSlate features and benefit over time, maybe think about giving something back to @tbalden and purchase them from PlayStore.
CleanSlate Configuration App (to control the features):
https://www.androidfilehost.com/?fid=8889791610682925529
CleanSlate Companion App (provides additional information from userspace for CleanSlate Kernel features to work correctly)
https://www.androidfilehost.com/?fid=8889791610682925528
Have fun, enjoy the kernel and your phone.
If you like my work please consider a donation.
Donations are not mandatory but very welcome.
If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07
I'm using Tencent Version, but already fully converted to Global ROM. Updated from 32 to 47. Already flash your kernel. It's works.
MrxSiN said:
I'm using Tencent Version, but already fully converted to Global ROM. Updated from 32 to 47. Already flash your kernel. It's works.
Click to expand...
Click to collapse
So what's the difference after?
AldRezaine said:
So what's the difference after?
Click to expand...
Click to collapse
If you mean CN to Global ROM, Global has no China bloatware. If you mean 32 to 47, here the changelog from Asus website.
1.Added “Quick launch camera” option in System Settings->Advanced
2.Added “Navigation blocking” feature for Game Genie which disables system gesture operations to avoid accidental touches in games.
3.Improved multi-touch when three or more fingers simultaneously touch the screen in games.
4.Fixed a problem with insensitive multi-finger touch response when playing PUBG
AldRezaine said:
This is amazing, can't wait for the others to try and read their reviews..
Click to expand...
Click to collapse
AldRezaine said:
So what's the difference after?
Click to expand...
Click to collapse
Just to steer this a bit in the right direction. This isn´t directed towards anybody in particular it´s just a general reminder what this thread is about.
There is no need to review the kernel. The kernel offers exactly what is described in the first post of this thread.
My advice is to read the description in the OP. All changes are explained in great detail there. Look around XDA, most OPs are kept way shorter with less explanations.
If you´re not into technical details, use google when descriptions or terms are unclear to you.
This is primarily a development focused thread. That´s why it is in the development section.
If there are issues when using the kernel or its features, provide logs and I will be glad to help you. If there are questions or things unclear, ask and I will try to answer. But I expect people to put in a bit of effort.
If you expect a review like, flashing this kernel causes my phone to use more or less battery as the stock kernel, you may want to re-read the OP on what to expect. I generally don´t like to see this in my threads.
Just to give an example that a "review" will never be applicable to each user:
Everybody uses their phone different. So certain changes to the scheduler may benefit user A, while they don´t benefit user B.
There is no need for a review. Just flash the kernel and try for yourself.
It´s very easy and straightforward to flash the kernel. And it´s also easy to return back to the stock kernel. If you don´t like it describe your problem as detailed as possible, as pictured in the FAQ and I will take a look at it or consider it.
Usually post like: "this kernel reduces my battery life by xyz" will just be ignored
It´s covered in the FAQ how to do all of this.
This is also a general reminder to everyone Let´s keep this thread development related and I hope this will turn out to be a good project!
I´m really looking forward to it. This phone is an absolute beast and so far I really enjoy using it.
For people a bit unfamiliar how everything works I plan to soon post a little guide on how to use the CleanSlate features.
Have a nice day everybody.
Here´s a small tutorial for CleanSlate features:
https://forum.xda-developers.com/showpost.php?p=83387681&postcount=3
Hopefully it will help some, that are not yet familiar with these.
I wish everybody a nice weekend.
Amazing work. Low battery temp while fast charging. Now I can just leave my phone with 30w charger without worry.
Do you have Telegram Channel?
I thought its not working after i flash but suddenly all the features is needed an app CleanState Config/Companion i downloaded it and it works the 144hz in 0 brightness nice2. i will use this kernel as my daily bases.
I turn on the facedown to table to turnoff the screen or vibrate but its not working for me.
Edit: Its working btw there is a 1 sec delay after facedown so far so good.