FORUMS
Remove All Ads from XDA

[kernel][v3.5] leanKernel: minimalistic kernel (1/28/16)

2,464 posts
Thanks Meter: 8,873
 
Post Reply Email Thread
leanKernel is not for everyone.

My philosophy is to keep the kernel footprint as small as possible by trimming as much fat as possible, and at the same time keeping it stable, power efficient, and fast. leanKernel is designed to be a drop in replacement for stock kernel, and so it tries not to deviate too far from stock.

You will find that it's lacking some of the bells and whistles of other custom kernels, so if you like features you came to the wrong thread.

Here's a longer post on what leanKernel is about.

Also folks, please read the FAQ before asking questions.

INSTRUCTIONS
If you like to stay as close to stock as possible: 1) Download and flash the normal leanKernel build here (find the latest zip file) in recovery. 2) Reboot and enjoy better performance and battery life (hopefully). That's it! There's no need to flash stock kernel first, or to wipe caches.
If you like to customize, read through the feature list below, the FAQ (post #2), the changelogs, and optionally the entire thread. Then you'll know what to do.

DOWNLOAD (flash in recovery)
v1.x is for Android 5.0, and v2.x is for Android 5.1
PREREQUISITE
Unlocked bootloader, custom recovery installed

Push bullet channel: imoseyon

FEATURES
  • custom voltage control - use your favorite app
  • updated to latest 3.10 Linux
  • interactiveX - screen_off_maxfreq support (default 2.2Ghz)
  • sw crypto drivers updated (to use arm NEON instructions) for better encryption/decryption performance. Sequential 180MB/s reads, 60MB/s writes (using dd)
  • latest Linaro gcc 4.9 toolchain (optimized for a15 - thanks to Christopher83)
  • fat trimmed and various performance tweaks
  • f2fs support (updated to latest source from Samsung)
  • force encryption turned off (changed to encryptable)
  • overclocked to 2.9ghz (experimental - available as a separate build for now)
  • underclocked to 223mhz (experimental - available as a separate build for now)
  • Async Fsync
  • init.d support
  • cpu-boost control - enable/disable via lkconfig
  • lkconfig script for customizing leankernel (open terminal app, become superuser, then type "lkconfig" without quotes)
  • patched mpdecision to prevent changing min/max freq provided as flashable zip (in util directory)
  • color control (thanks to @savoca)
  • charging led support
  • a lot of unnecessary stuff removed from stock kernel
  • some components updated to Linux 3.18
  • random generation optimization including e/frandom support
  • pc/usb charging with boosted current ~300-400mA
  • some selinux fixes, selinux is enforced by default - staying true to stock (you can easily disable using lkconfig)
  • SLUB allocator updated to Linux 3.18
  • wake gesture control from flar2, modified for leankernel (also disabled in-call)
  • vibe strength control
  • much of the code is up to date with latest from CodeAurora
  • (mostly for devs) /sys/module/selinux/parameters/force_audit sysfs node to audit all/hidden selinux denies.
  • power aware cpu scheduling
  • faux sound enable/disable by sysfs (and lkconfig)
  • wakelock control (smb135x, wlan_rx, msm_hsic and sensor_ind)
  • leanKernel core control script
  • user option to prevent mpdecision/msm_thermal from changing min/max frequencies: frequency mitigation preventer
  • supports kexec for multirom

LKCONFIG
You can use lkconfig script to make custom changes to leanKernel (along with popular apps like Kernel Tweaker and Trickstermod). To run lkconfig, open terminal app, "su" (without quotes) to become superuser, enter, and then type "lkconfig" without quotes, then enter.
Code:
[email protected]:/ $ su
[email protected]:/ # lk

leanKernel configurator
---
0) display current settings

1) cpu frequency control
2) wake gesture control
3) wakelock control
4) charging led
5) rgb/picture control (advanced)
6) rgb/picture control (simple)
7) vibe strength
8) power saving mode for cpu scheduler
9) faux sound control
10) selinux mode
11) min/max freq change prevention

21) check top 10 wake locks (ie. wakeup sources)

please enter a number (or press enter to exit):
CHANGELOG
https://github.com/imoseyon/leanKern...llow-ChangeLog

Thanks to @guitarshredder87, @Wera750, @akellar, and @grisha1 for testing test builds!

XDA:DevDB Information
Leankernel: Minimalistic Kernel, Kernel for the Nexus 6

Contributors
Imoseyon
Source Code: https://github.com/imoseyon/leanKernel-shamu

Kernel Special Features:

Version Information
Status: Stable

Created 2014-11-26
Last Updated 2016-01-31
The Following 233 Users Say Thank You to Imoseyon For This Useful Post: [ View ]
 
 
26th November 2014, 08:32 PM |#2  
Imoseyon's Avatar
OP Recognized Developer
Flag Mountain View, CA
Thanks Meter: 8,873
 
Donate to Me
More
FAQ
I'm having trouble waking the phone sometimes. Help!
We haven't really figured out exactly what's causing it - but there seems to be evidence that it's not limited just to leanKernel. One thing to try: if your ROM has a feature that prevents accidental wakeups, disable it!

I can't seem to get min and max freq to stick! What are these mpdecision zip files in the util directory?
* Read this post: http://forum.xda-developers.com/show...postcount=1474
* Short version: This is actually by design of mpdecision. If you want this behavior to change, I recommend that you 1) flash latest stable leankernel, 2) flash the custom no-freq mpdecision, and then 3) disable cpu-boost via lkconfig. Do not disable mpdecision if you go this route. Also, if you flash ROM, you must re-flash custom mpdecision. To go back to normal, flash the stock mpdecision file.. Launch lkconfig, choose core control, and choose one of the options in core control.

Will flashing leankernel decrypt my phone storage?
If you're already encrypted, then it will stay encrypted after flashing kernel, *until* you format data. Once you format you will stay decrypted until you decide to encrypt again (see below). If you're already decrypted, leanKernel will not force encrypt automatically.

What do I do to encrypt again?
There are several ways to do this. One way (easiest for me at least) is to adb in (or in terminal emulator):
Code:
[email protected]:/ # start encrypt
You will see the phone hot boot and once it comes up you will be encrypted again. Keep in mind that if you want to decrypt again you'll have to wipe.

How do I check the PVS BIN of my cpu?
Code:
[email protected]:/ # cat /proc/cpu/msm_acpu_pvs
The number you get should range between 0 and 15 (inclusive). If you ended up with 15 congratulations. If you ended up with 0, go get it exchanged! Stock frequency/voltage table: http://pastebin.com/ZyGA9Tec

Which kernel control app do you recommend?
When v1.0 gets released it should come with "lkconfig" for tweaking some of the options. Otherwise, I tried Trickster and KernelTweaker, and they both seem to work ok.

What are ondemandX and interactiveX?
ondemandX and interactiveX are very very close to "stock" ondemand and interactive governors, respectively. The only difference is screen_off_maxfreq sysfs support. This means that it gives you the ability to limit phone's max frequency when screen is off. This feature could be effective in reducing battery usage, especially if you have a misbehaving app (or two) that consume cpu cycles while screen is off. The default value is 2265600 - if you change the value to your top speed you're effectively disabling the feature and restoring stock behavior completely. You can use an app like Trickster or Kernel Tweaker to modify screen_off_maxfreq.

HELP! I messed up with lkconfig - how do I go back?
Do not fret. Flash lkconfig_cleaner.zip from the "util" directory.
(If you want to do this manually), reboot the phone into recovery, mount /data, and delete everything in /data/data/leankernel. Once things are back to normal, re-run lkconfig to re-do your settings.

What is cpu-boost?
Read this post: http://forum.xda-developers.com/show...&postcount=535

What is the best RGB setting?
http://forum.xda-developers.com/show...&postcount=620 (old)
http://forum.xda-developers.com/show...postcount=3017 (new)

What is power aware scheduling?
Read this post: http://forum.xda-developers.com/show...postcount=1651
The Following 63 Users Say Thank You to Imoseyon For This Useful Post: [ View ]
26th November 2014, 08:35 PM |#3  
freddienux's Avatar
Senior Member
Flag NEPTUNE CITY
Thanks Meter: 126
 
More
I missed your kernel when I switched to N5. Glad to have you here
The Following 2 Users Say Thank You to freddienux For This Useful Post: [ View ] Gift freddienux Ad-Free
26th November 2014, 08:38 PM |#4  
simms22's Avatar
Recognized Contributor - R.I.P
BROOKLYN!
Thanks Meter: 26,426
 
More
hmm.. a kernel. since its the first one posted here, im trying it out
The Following 2 Users Say Thank You to simms22 For This Useful Post: [ View ] Gift simms22 Ad-Free
26th November 2014, 08:38 PM |#5  
Senior Member
Thanks Meter: 758
 
More
Hell yeah. Ready to flash

Sent from my AOSP on Shamu using XDA Free mobile app
26th November 2014, 08:41 PM |#6  
Senior Member
dallas, tx
Thanks Meter: 392
 
More
If I flash this it will decrypt right cool
26th November 2014, 08:44 PM |#7  
Imoseyon's Avatar
OP Recognized Developer
Flag Mountain View, CA
Thanks Meter: 8,873
 
Donate to Me
More
Quote:
Originally Posted by digweed4me

If I flash this it will decrypt right cool

It should not decrypt if you're already encrypted, unless you re-format/wipe. But no guarantees.
The Following 6 Users Say Thank You to Imoseyon For This Useful Post: [ View ]
26th November 2014, 08:46 PM |#8  
Senior Member
dallas, tx
Thanks Meter: 392
 
More
Quote:
Originally Posted by Imoseyon

It should not decrypt if you're already encrypted, unless you re-format/wipe. But no guarantees.

What app should we use to control? I remember you used to have your app right
26th November 2014, 08:47 PM |#9  
tflogic's Avatar
Senior Member
Thanks Meter: 82
 
More
holy **** Imoseyon. you made my Thunderbolt usable way back when. so glad to see you developing for the N6 now
26th November 2014, 08:47 PM |#10  
Senior Member
dallas, tx
Thanks Meter: 392
 
More
Quote:
Originally Posted by digweed4me

What app should we use to control? I remember you used to have your app right

Flashed it and yes decrypted thanks a lot
26th November 2014, 08:47 PM |#11  
Senior Member
Flag West Virginia
Thanks Meter: 2,167
 
More
IMO!! Good to see ya again man. Can't wait to run your work again.
Appreciate it!
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes