[KERNEL] RebelKernel by RebelLion

Search This thread

RebelLion_

Senior Member
Nov 1, 2017
204
70
Moto E4
OnePlus Nord N10 5G
Introducing RebelKernel for all variants of the Moto E4 'perry' device. Upstreamed to the latest linux-stable 3.18 tag and loaded with features and optimizations. The aim of this kernel is to make the User Experience as smooth and efficient as possible, while also bringing in features like DoubleTap2Wake (DT2W), KCAL (advanced color control processing), and USB OTG that help bring this budget phone on par with mid-end devices.


A lot of testing has been done to get this kernel stable, however there is always a chance that flashing this kernel could leave something not working correctly. Please take logs (dmesg and ramoops) in this event and send them to me.


Features:

* Linux-stable: 3.18.63 -> 3.18.134

* F2FS Loopback Bug patched

* LZ4 Compression

* CPU Input Boost driver

* KCAL color control driver

* DT2W driver

* Boeffla Wakelock Blocker driver

* Wireguard Support

* XPad Rumble and LED support

* USB OTG Native support

* USB HID Keyboard support

* Cmdline flags removed to pass SafetyNet

* Toolchain: GCC 4.9.4 --> Linaro 7.4.1

* I/O Schedulers: Zen, Maple

* Governors: Electron, Zzmoove, Lionfish

* Hotplugs: Alucard

* GPU: Adreno Idler, Adreno Boost

* TCP: Westwood

* FSync On/Off

* Swappiness: 15

* VFS Cache Pressure: 10

* Drastically reduced logging overhead and spam

* Migrated many workqueues to Power Efficient WQs


Installation:


1) BACKUP. Always have a recent system backup when flashing anything.

2) Download the zip from the link below and flash from TWRP.

3) If you get bootloops or issues, please take kernel logs and logcats (if booted) and report back so I can address the issue.


Please give feedback. A lot of work is being put into this kernel so I hope it improves your experience.


Download:

Version: 2.0

https://mega.nz/#!M6J2ESiZ!xUpI5yQvhpta3TSWr_MQQYmi-xFhiEEJa_JnGBIfdww


Source:

* Branch 'rebel'

https://github.com/RebelLion420/kernel_perry


Credits:
@squid2
@facuarmo

@jasonmerc


*** While donating is not required to use my work, it is certainly appreciated. Thanks in advance!

https://paypal.me/rebelliouslion


Note:
I posted this on XDA to bring attention to my project, but I will not be regularly updating this thread. You can find the active thread on Android Forums
 
Last edited:

AeonFlux1603

Senior Member
Feb 1, 2019
188
164
Very nice work @RebelLion_
This kernel is extremely fluid and responsive. The baked in KCAL works great with Kernel Adiutor-Mod in customizing the display contrast & vibrance with the presets included in the app. No noticeable lags or instabilities. Wonderful work. Thank you for your contributions and hard work.
 
  • Like
Reactions: RebelLion_

RebelLion_

Senior Member
Nov 1, 2017
204
70
Moto E4
OnePlus Nord N10 5G
Very nice work @RebelLion_
This kernel is extremely fluid and responsive. The baked in KCAL works great with Kernel Adiutor-Mod in customizing the display contrast & vibrance with the presets included in the app. No noticeable lags or instabilities. Wonderful work. Thank you for your contributions and hard work.

I'm glad you like it, it was a lot of hard work lol. Don't forget to turn on DT2W in Kernel Adiutor 'Gestures' as well, and look through all the settings to see everything that's included. I know CPU Input Boost is disabled by default and requires a little tuning to get right. I have it set to boost to 1094 for 250 ms, which might not be as big of an improvement I hoped for since there are only 4 clock frequencies for the cpu to cycle through. But I'm working on fixing that too if it's possible for this device
 

AeonFlux1603

Senior Member
Feb 1, 2019
188
164
I'm glad you like it, it was a lot of hard work lol. Don't forget to turn on DT2W in Kernel Adiutor 'Gestures' as well, and look through all the settings to see everything that's included. I know CPU Input Boost is disabled by default and requires a little tuning to get right. I have it set to boost to 1094 for 250 ms, which might not be as big of an improvement I hoped for since there are only 4 clock frequencies for the cpu to cycle through. But I'm working on fixing that too if it's possible for this device
1094 MHz for 250ms appears to give a nice little boost when the load gets heavy. If you can improve upon that, you are a beast indeed. I have also set DT2W in Kernel Adiutor as you advised. And the Gesture settings....Wow!!
Don't cut yourself short with this nice piece of work. If you never added another mod, I would continue using this kernel over bone stock any day. I'm with zeal to see such a dedicated and skilled dev on this device. My many thanks are most sincere.
Out of curiosity, is this kernel compiled using the latest upstream sources?
 
Last edited:

facuarmo

Senior Member
Apr 13, 2014
572
995
22
Pilar
Wow! I'm glad you finally got it working. Thanks for giving me some credits (although I'm more or less just a cherry-pick machine lel), I'll get an eye on this thing, probably even grab some patches for the msm8916 repo and maybe I'll send a PR at some point :).
 
  • Like
Reactions: RebelLion_

KevinDel

Senior Member
Apr 7, 2014
53
3
Been using this kernel since it's beta releases and it's amazing. I love the work put into this!

---------- Post added at 01:53 PM ---------- Previous post was at 01:51 PM ----------

Yes it is. As far as I know

1094 MHz for 250ms appears to give a nice little boost when the load gets heavy. If you can improve upon that, you are a beast indeed. I have also set DT2W in Kernel Adiutor as you advised. And the Gesture settings....Wow!!
Don't cut yourself short with this nice piece of work. If you never added another mod, I would continue using this kernel over bone stock any day. I'm with zeal to see such a dedicated and skilled dev on this device. My many thanks are most sincere.
Out of curiosity, is this kernel compiled using the latest upstream sources?


Yes it is
 
  • Like
Reactions: AeonFlux1603

zahna

Member
May 23, 2017
25
6
Your kernel fixed my sd card storage access problem! After unlocking/no-verity'ing, some apps couldn't access sdcard storage (Google Maps and Here Maps were a few). Your kernel allows them to finally access sd card storage perfectly! What did you do? Thank you!

---------- Post added at 04:41 PM ---------- Previous post was at 04:35 PM ----------

Follow up question: this new kernel eliminates the need for dm-no-verity, correct?
 
Last edited:

madbat99

Senior Member
Mar 1, 2014
5,536
3,289
Your kernel fixed my sd card storage access problem! After unlocking/no-verity'ing, some apps couldn't access sdcard storage (Google Maps and Here Maps were a few). Your kernel allows them to finally access sd card storage perfectly! What did you do? Thank you!

---------- Post added at 04:41 PM ---------- Previous post was at 04:35 PM ----------

Follow up question: this new kernel eliminates the need for dm-no-verity, correct?
I would think @RebelLion_ removed dmverity in his kernel.
If he has, definitely list that in your features dude. If not, that's a great (fairly straightforward) feature to add.
Noice work bro
 
  • Like
Reactions: AeonFlux1603

AeonFlux1603

Senior Member
Feb 1, 2019
188
164
I would think @RebelLion_ removed dmverity in his kernel.
If he has, definitely list that in your features dude. If not, that's a great (fairly straightforward) feature to add.
Noice work bro
@madbat99, I decompiled this kernel with an image kitchen; the ramdisk appears to have AVB/dm-verity set to disabled. Also, force encryption seems to be set to opt-encrypt. And, to note, I am using this kernel on my CDMA xt1766 "SPerry," and I've experienced no adverse issues or problems.
 
Last edited:
  • Like
Reactions: madbat99

madbat99

Senior Member
Mar 1, 2014
5,536
3,289
Very nice. An updated kernel with f2fs loopback bug patched is great news for this device. Magisk with no extra junk. (F2fs loopback bug workaround)
 

AeonFlux1603

Senior Member
Feb 1, 2019
188
164
Very nice. An updated kernel with f2fs loopback bug patched is great news for this device. Magisk with no extra junk. (F2fs loopback bug workaround)
Amen @madbat99. Nice to use a root file explorer without kernel panic/dead lock. The Alucard hotplug on this kernel is solid as well. Man, this is just an all around badass piece of work. Excellent. Hey @madbat99, do you know if there are any CPU/SoC differences between the SPerry & the Perry?
 
Last edited:

zahna

Member
May 23, 2017
25
6
Very nice. An updated kernel with f2fs loopback bug patched is great news for this device. Magisk with no extra junk. (F2fs loopback bug workaround)

OP fixed the F2FS bug as well?!? I didn't even think to check on that! IMO, his kernel has saved the Moto E4.

Now I'm wondering if this kernel has also fixed the echo cancellation problem with 3rd party ROMs...
 

madbat99

Senior Member
Mar 1, 2014
5,536
3,289
Amen @madbat99. Nice to use a root file explorer without kernel panic/dead lock. The Alucard hotplug on this kernel is solid as well. Man, this is just an all around badass piece of work. Excellent. Hey @madbat99, do you know if there are any CPU/SoC differences between the SPerry & the Perry?
Small difference. Snapdragon 425 and Snapdragon 427
 
  • Like
Reactions: AeonFlux1603
Jul 24, 2018
37
4
Awesome kernel @Rebellion. Definitely appreciate your work on this. Just wondering though, is safetyNET supposed to pass by default with this kernel installed or do I need to do any additional steps to make it pass?
 
Last edited:

AeonFlux1603

Senior Member
Feb 1, 2019
188
164
Awesome kernel @Rebellion. Definitely appreciate your work on this. Just wondering though, is safetyNET supposed to pass by default with this kernel installed or do I need to do any additional steps to make it pass?
I know you directed this question to OP, but on my device (xt1766 Boost Mobile), running latest stock Android 7.1.1 Nougat (NCQS26.69-64-11)with OP's kernel, SafetyNet passes ctsProfile & basicIntegrity on Stable Magisk v18.1 -- by default and without any additional patches, mods or tweaks.

---------- Post added at 11:01 PM ---------- Previous post was at 10:15 PM ----------
@RebelLion_,I know you're probably tired of hearing my two cents, but I just wanted to inform you that I've tested all aspects of your kernel, and I have encountered no bugs or instabilities. I'm running debloated & Magisk rooted stock from this thread (NCQS26.69-64-11) with your kernel, with no additional Magisk Modules or mods. I'm using the Lionfish CPU governor with 960 MHz minimum and 1401 MHz maximum clocks; the Alucard Hotplug, I/O Busy, 65% Sampling Rate, 4 maximum cores online, GPU Adreno Idler, 20 Down Differential, 15 Idle Wait, 7 Workload, Vomer BrightBalance Color Profile w/ KCAL, DT2W Halfscreen, SoC Sound Drivers High Performance Mode, I/O Scheduler Maple 512kb Read Ahead for Internal Storage, Add Random enabled, I/O Stats enabled, RQ Affinity 2, Low Memory Killer set to Very Aggressive, Virtual Memory Dirty Ratio 20%, Dirty Background 5%, Dirty Expire Centisecs 200cs, Dirty Writeback Centisecs 5200cs, Overcommit Ratio 50%, Swappiness 100%, VFS Cache Pressure 9, Laptop Mode enabled, 2500kb Min Free, 10,800kb Extra Free, 510 MB Z-RAM Disksize, Entropy 64 Read, 128 Write; SELinux set Permissive, Westwood TCP Congestion Algorithm, FSync & Android Logging enabled.
Under normal to light use, my CPU averages around a 7% workload, whereas extremely heavy to heavy use (gaming, multitasking) will never average more than about 53% workload consumption.
Compared to unmodified stock, this kernel definitely improves upon responsiveness and overall performance on both normal and heavy usage. I'm seeing a 2 - 3 hour increase in battery life on the settings I referenced in comparison to the pure stock kernel. Also, during normal use, I'm seeing around 750 - 800 MB free RAM on average.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    Introducing RebelKernel for all variants of the Moto E4 'perry' device. Upstreamed to the latest linux-stable 3.18 tag and loaded with features and optimizations. The aim of this kernel is to make the User Experience as smooth and efficient as possible, while also bringing in features like DoubleTap2Wake (DT2W), KCAL (advanced color control processing), and USB OTG that help bring this budget phone on par with mid-end devices.


    A lot of testing has been done to get this kernel stable, however there is always a chance that flashing this kernel could leave something not working correctly. Please take logs (dmesg and ramoops) in this event and send them to me.


    Features:

    * Linux-stable: 3.18.63 -> 3.18.134

    * F2FS Loopback Bug patched

    * LZ4 Compression

    * CPU Input Boost driver

    * KCAL color control driver

    * DT2W driver

    * Boeffla Wakelock Blocker driver

    * Wireguard Support

    * XPad Rumble and LED support

    * USB OTG Native support

    * USB HID Keyboard support

    * Cmdline flags removed to pass SafetyNet

    * Toolchain: GCC 4.9.4 --> Linaro 7.4.1

    * I/O Schedulers: Zen, Maple

    * Governors: Electron, Zzmoove, Lionfish

    * Hotplugs: Alucard

    * GPU: Adreno Idler, Adreno Boost

    * TCP: Westwood

    * FSync On/Off

    * Swappiness: 15

    * VFS Cache Pressure: 10

    * Drastically reduced logging overhead and spam

    * Migrated many workqueues to Power Efficient WQs


    Installation:


    1) BACKUP. Always have a recent system backup when flashing anything.

    2) Download the zip from the link below and flash from TWRP.

    3) If you get bootloops or issues, please take kernel logs and logcats (if booted) and report back so I can address the issue.


    Please give feedback. A lot of work is being put into this kernel so I hope it improves your experience.


    Download:

    Version: 2.0

    https://mega.nz/#!M6J2ESiZ!xUpI5yQvhpta3TSWr_MQQYmi-xFhiEEJa_JnGBIfdww


    Source:

    * Branch 'rebel'

    https://github.com/RebelLion420/kernel_perry


    Credits:
    @squid2
    @facuarmo

    @jasonmerc


    *** While donating is not required to use my work, it is certainly appreciated. Thanks in advance!

    https://paypal.me/rebelliouslion


    Note:
    I posted this on XDA to bring attention to my project, but I will not be regularly updating this thread. You can find the active thread on Android Forums
    4
    Thanks OP. I'm very noobish when it comes to really fine tuning and optimizing kernel parameters. If you see anything I can really improve upon in reference to my listed settings, please let me know. Many parameters I listed are your default tuneables, which work great for me.

    I think the only difference in my setup is swappiness is at 15, laptop mode = 0, and fsync is disabled. The only one I would suggest changing is swappiness, zram is much slower than actual RAM so you want your phone to prefer RAM when it has enough. Which ours does
    2
    Awesome kernel @Rebellion. Definitely appreciate your work on this. Just wondering though, is safetyNET supposed to pass by default with this kernel installed or do I need to do any additional steps to make it pass?

    The patches for SafetyNet modify flags to pass the ctsProfile check. From what I've gathered, basic integrity relies on your device system remaining unmodified. Which is where Magisk and systemless SU's come in play, so the system is never actually touched by root operations. So you should be good to go as long as the ROM you're running can pass it as well
    2
    Also noticed write entropy/seeder is set to 896 (default 128) which may result in unnecessy wake-ups and CPU activity. Modern Android ROMs (post ICS) no longer use the classic entropy pools for IO operations. It is a mystery why this myth and the associated controls still exist.

    Tracked this down after noticed my E4 was exiting deep sleep more frequently on RebelKernel.
    2
    Awesome kernel @Rebellion. Definitely appreciate your work on this. Just wondering though, is safetyNET supposed to pass by default with this kernel installed or do I need to do any additional steps to make it pass?
    I know you directed this question to OP, but on my device (xt1766 Boost Mobile), running latest stock Android 7.1.1 Nougat (NCQS26.69-64-11)with OP's kernel, SafetyNet passes ctsProfile & basicIntegrity on Stable Magisk v18.1 -- by default and without any additional patches, mods or tweaks.

    ---------- Post added at 11:01 PM ---------- Previous post was at 10:15 PM ----------
    @RebelLion_,I know you're probably tired of hearing my two cents, but I just wanted to inform you that I've tested all aspects of your kernel, and I have encountered no bugs or instabilities. I'm running debloated & Magisk rooted stock from this thread (NCQS26.69-64-11) with your kernel, with no additional Magisk Modules or mods. I'm using the Lionfish CPU governor with 960 MHz minimum and 1401 MHz maximum clocks; the Alucard Hotplug, I/O Busy, 65% Sampling Rate, 4 maximum cores online, GPU Adreno Idler, 20 Down Differential, 15 Idle Wait, 7 Workload, Vomer BrightBalance Color Profile w/ KCAL, DT2W Halfscreen, SoC Sound Drivers High Performance Mode, I/O Scheduler Maple 512kb Read Ahead for Internal Storage, Add Random enabled, I/O Stats enabled, RQ Affinity 2, Low Memory Killer set to Very Aggressive, Virtual Memory Dirty Ratio 20%, Dirty Background 5%, Dirty Expire Centisecs 200cs, Dirty Writeback Centisecs 5200cs, Overcommit Ratio 50%, Swappiness 100%, VFS Cache Pressure 9, Laptop Mode enabled, 2500kb Min Free, 10,800kb Extra Free, 510 MB Z-RAM Disksize, Entropy 64 Read, 128 Write; SELinux set Permissive, Westwood TCP Congestion Algorithm, FSync & Android Logging enabled.
    Under normal to light use, my CPU averages around a 7% workload, whereas extremely heavy to heavy use (gaming, multitasking) will never average more than about 53% workload consumption.
    Compared to unmodified stock, this kernel definitely improves upon responsiveness and overall performance on both normal and heavy usage. I'm seeing a 2 - 3 hour increase in battery life on the settings I referenced in comparison to the pure stock kernel. Also, during normal use, I'm seeing around 750 - 800 MB free RAM on average.