[Sprint  Galaxy Note 4 Original Android Development] ffolkes:
Disclaimer: I am not responsible for any damage caused by or done with this kernel.

.

About

Welcome! Plasma kernel is a unique and specially tailored custom kernel for the Snapdragon variant of the Note 4. It is the product of my strange brain and the monkeys that reside within it. Plasma kernel is designed to be very flexible, able to cater to those who wish to miser every bit of power, as well as those who demand performance, speed, and fluidity. It combines some common features from brilliant developers around the world, along with a great deal of my own work. One thing worth mentioning is that unlike most other kernels, this one does not offer many CPU governors, as much work was put into its flagship governor, ZZMoove. Currently Plasma kernel is only for TouchWiz ROMs, but an AOSP version is already in the works. Thank you for your interest!​

.

Screenshots

.

..........​

.

..........​

.

.

General Features

Compiled with Linaro 4.9, tuned and optimized for Cortex A15

Initially based on Starkissed's (twistedumbrella) repo

All settings fully configurable with andreilux's free Synapse app

Mpdecision and thermald disabled

Additional I/O schedulers (noop, deadline, row, cfq, bfq, sio, fifo, zen, vr, fiops)

CPU under/overclocked to 268 MHz - 3,072 MHz

CPU voltage control

GPU under/overclocked to 166 MHz - 800 MHz

Simple GPU Algorithm

Charging control

mDNIe Hijack color control for KitKat

KCAL color control for Lollipop

Kernel Samepage Merging (KSM)

CRC control

TCP control

SELinux always permissive

Frandom

Rngd control

Stereo call recording

Fauxsound

Plasma Features

Extended LED control

Touchkey multipress lockout

Touchkey remapping at the driver level

Touchkey Flicks

Touchkey Slides

Turbo Home button

Plasma Simple Scaling Lock instead of Hardlimit

Optional kernel-level universal wakelock

Optional always-on voice detection tweaks

Optional always-on touchscreen (can wake from deep sleep)

Touchscreen reduced scanrate while sleeping to save power

TouchWake (my implementation)

Slide2Wake (my implementation)

Pull2Wake (my implementation)

Arc2Wake (my implementation)

PlasmaUnlock 2.0

MultiButton

Stem Gestures

Tactile controls (vibrate when touched with finger or S-Pen)

S-Pen adjustable minimum pressure (aka sensitivity)

S-Pen adjustable fixed pressure

S-Pen WorryFree mode

Detailed Plasma Features

ZZMoove: Plasma Edition

Heavily modified version of ZZMoove

Supports various low-level boosts that hook into all other Plasma features

Music detection to help avoid skips

Native Input Booster

Applies a different up_threshold and various other parameters when input events are detected

Dynamically restarts governor timer to instantly apply the requested boost

Can detect, restart, and change frequency within 1ms (according to Wikipedia, 1ms = the time for a neuron in human brain to fire one impulse and return to rest, 100-400ms = time for the human eye to blink).

Many, many other features to be documented later

Extended LED control

Full sub-LED control (RGB) allows you to calibrate to a beautiful white, since not all LEDs are the same and may exhibit ugly tints with factory settings

Adjustable global high and low power sub-LED brightness

Optional pulse (fade) style blinking

Adjustable blink timing

Customizable driver-level TouchWiz LED colors

High/low missed notification sub-LEDs color, defaults to white

High/low charging sub-LEDs color, defaults to white with a red tint

High/low charged sub-LEDs color, defaults to white with a green tint

Touchkey multipress lockout

If you find yourself accidentally pressing a touchkey, this feature can require a double or triple press. Useful for handing someone your phone and not having them accidentally press the Back button.

Touchkey remapping at the driver level

Touchkey Flicks

Quickly pressing and flicking up from either touchkey can perform 2 unique actions

No residual pass-through - meaning only your action gets performed, the touchkey press and any touchscreen input are blocked at the driver level

Supported by Automatic Media Mode

Optional crossed mode to offer an additional 2 unique actions

Touchkey Slides

Quickly slide across the touchkeys from either left or right for 2 unique actions

No residual pass-through - meaning only your action gets performed, the touchkey presses are blocked at the driver level

Only works while the screen is off

Can wake from deep sleep, but may be unreliable for now

Turbo Home button

By default the home activity is executed after the home button has been pressed AND released, which can introduce as much as 100ms of wasted time. This feature will immediately send an up-event as soon as a down-event is detected. Unfortunately this breaks the ability to press and hold the home button - however there is one workaround - another optional mode that will send the up-event, then immediately send another down-event, and whenever you lift your finger, that will provide the mating up-event. This will allow long-pressing the home button, but the downside is that it always must send a complete press before starting to hold.

Plasma Simple Scaling Lock

A very simple replacement for hardlimit

Locks governor name and min/max for anything but Synapse

Kernel-level control of back (flash) LED

Optional kernel-level universal wakelock

Optional always-on voice detection tweaks

Force screen on when activated - If you use a 3rd-party lock screen, you may have noticed "ok, Google" is acknowledged, but doesn't wake anymore. This will send a power-on event to mimic the normal behavior.

Turn power off on second activation (from screen-off) - This was a silly idea I had, but it sorta works. I was frustrated because after saying "ok, Google" and asking my question, the screen would stay on. When this is enabled, it will turn the screen off when you say "ok, Google" a second time. Example: Ok Google...what time is it in NYC?...[The time is 12:21 AM]...ok, Google...[screen turns off]. This obviously only works for things that don't require more input, in which case touching the screen will restore normal behavior. It's sorta cool though because in a quiet car you can ask a question to your pocket and then tell it to turn itself off.

TouchWake (my implementation)

When the screen times out you can wake it with a tap or button press. Functionality is like the existing, well-known TouchWake.

DoubleTap2Wake (see PlasmaUnlock)

Slide2Wake

Pull2Wake

Pull2Wake will wake your device when swiping from the top of the screen, to the bottom. If done slowly, you can use your fingertip to

Arc2Wake

Now part of Stem Gestures

Turn your phone on while grasping it - left/right arc with your thumb from above Home to the side

Touchscreen

Support for waking from deep sleep

Adjustable width for valid Slide2Wake/Pull2Wake to filter out false positives

Reduced scanrate while sleeping to save power

Support for detecting finger hovering (very buggy at the moment)

PlasmaUnlock (previously called PatternUnlock)

A kernel-based screen/input locking mechanism. It is designed to be as flexible as possible, from serving as a simple way (eg. DoubleTap2Wake) to augment your existing power-on methods, to a robust means of protecting your phone from prying-eyes. It features up to a 20-step lock pattern, verified against not only x/y coordinates, but also time between taps, and tap peak-width. Because it resides within the kernel, low-level access provides some unique features not found elsewhere, such as power key blocking, screen blanking, and locking that takes effect so early, it even blocks the boot-animation.

Can be on at all times, doesn't need a wakelock

No complex coordinates to set, the pattern recording feature accessible via Synapse makes creating your pattern easy

Up to 20 taps can be recorded

Mode for taps only, or swipes only (like connect-the-dots), or both

Taps are validated against x/y coordinates, optionally milliseconds between taps, and optionally width

Relative coordinate mode allows for abstract patterns to be input anywhere on the screen, as long as the display is in a portrait orientation

All detection methods can be independently disabled, achieving a variety of results such as:

Unlock with a sequence of wide-thin-wide presses anywhere on the screen, by turning off x/y coordinate and time validation

Unlock with one wide press at a specific spot on the screen, by turning off time validation and using absolute x/y mode

Unlocking with a simple double or triple tap anywhere on the screen, by turning off width validation and using relative x/y mode

Unlocking with a rhythm, by turning off x/y coordinate and width validation and using time only

Adjustable pattern entry timeout (so you don't have to wait for the normal Android screen timeout delay, which is usually at least 30 seconds)

Lockout mode

Can take effect at the boot animation

Locks the touchscreen, S-Pen, and disables USB data connections until the correct pattern is entered

Can also black the screen out. Besides obvious privacy reasons, it also has the potential to confuse/delay thieves.

Optionally disables the power and/or home button (three very fast power presses will always turn on)

When screen is on, power long-pressing is prevented

Option to automatically disable/restore lockout

When connected to USB

When connected to a defined safe WiFi SSID

Adjustable delay before relocking after the screen goes off

Tamper evident mode will flash the front LED when any attempt has been made to turn the screen on

Optionally block all LED activity while locked (to help give the appearance of a dead phone)

Optionally disables itself while on a call, then immediately relocks when hung up

Optional automatic home button press (so you always unlock to your home screen)

Optional delayed blackout restoration (when used with the automatic home button feature, this is so no one will see what app is in the foreground the instant your screen turns on)

Can automatically unlock for Touchwake

Option to coexist with Slide2Wake, Arc2Wake, Pull2Wake

Stem Gestures

A series of versatile touch gestures that are specially designed to be unintrusive. By existing within the kernel, the Stem engine is capable of blocking and restoring input events, allowing the gestures to be triggered and used without interfering with normal device usage. This iteration is a hybrid of previous Plasma kernel features "Arc2Wake" and "HomeUp".

Supported by Automatic Media Mode

Works in deep sleep

20+ customizable payloads delivered via VirtualKey engine

Tap2Repeat repeats last action when finger is lifted then put back down in the same place

Equal for right or left handed people

Gestures (some can have different screen-off and screen-on payloads)

High Left

High Right

Low Left

Low Right

Side Up Left

Side Up Right

Arc Spike Left

Arc Spike Right

Center Spike High

Center Spike Low

Center Spike Bottom

MultiButton

When enabled, pressing different combinations of buttons will yield up to 6 different payloads. This iteration is a version of the previous Plasma kernel feature the "Volume MultiKey."

16 customizable payloads delivered via VirtualKey engine

Combinations (each can have different screen-off and screen-on payloads)

Volume Up + Volume Down

Volume Down + Volume Up

Volume Up + Power

Volume Down + Power

Volume Up + Home

Volume Down + Home

Long-Press Mode

Supported by Automatic Media Mode

Combinations (each can have different screen-off and screen-on payloads)

Long-press Volume Up

Long-press Volume Down

Automatic Media Mode

Detects when music is playing, and overrides certain payloads with music-oriented ones instead (volume, track control, play/pause)

Allows for altered parameters in ZZMoove to prevent skipping, include when recording audio

Userspace Booster

Provides small boosts for common things, like the keyboard opening, files being transferred, incoming calls, packages being installed or updated, etc.

Adjustable frequency and core count boosts for:

New app starting

Scrolling in a list

Activity changes

Progress bar being shown (KitKat only)

S-Pen

Adjustable minimum pressure to help prevent errant input, especially when doing things like crossing t's or dotting i's.

Adjustable fixed pressure to effectively disable actual pressure input, to make writing easier for some people.

WorryFree mode that always disables the touchscreen and touchkeys while the S-Pen is out.

GPU

Adjustable minimum frequency while interacting

Adjustable minimum frequency while plugged-in

Nightmode

A very fast home button double-press will toggle nightmode (red screen)

Synapse

Set DPI to 640/480/320

Built-in support to apply the surround sound hack at 3 volume levels: stock, medium and loud

Changelog

v.1.00

Initial release

Installation

Download

Flash via recovery

Reboot

Optional: Install Synapse

Download

Plasma kernel 1.00 for Sprint Note 4 - KitKat (4.4.4)

Plasma kernel 1.00 for Sprint Note 4 - Lollipop (5.0.1)

Until I update this post, please see my replies in this thread for the latest versions (1.21 for CM-13, 1.20 for CM-12.1, and 1.17 for TouchWiz)

Known Issues

Lollipop (5.1.x)

Surround Sound mod untested

Donations

Developing Plasma kernel takes an enormous amount of time and effort. Features like MultiButton, PlasmaUnlock, and the Stem Gestures represent hundreds upon hundreds of hours of planning, testing, development, more testing, squashing bugs, and even more testing. If the functionality they offered were apps, each would be worth a few dollars in the store. But alas, they are merely free. If you find my work useful, consider helping your starving developer out and make a donation - it would be GREATLY appreciated! However, if you do, please understand that donations are reciprocation for all this existing work, and are not guarantees of support. It's not because I'm mean, it's because like all the other developers here, I do this in my free time, and sadly that is a very finite resource

Donate!
​

.

Credits

LoungeKatt (TwistedUmbrella), ZaneZam, AndreiLux, Faux123, Franciscofranco, Friedrich420, savoca, Yank555.lu, and many others.

A special thank you to bjrmd and everyone else who has helped test and support Plasma kernel on the Note 4

.

Source

Source code can be found on my github.​

XDA:DevDB Information

Plasma kernel, Kernel for the Sprint Samsung Galaxy Note 4

Contributors

ffolkes

Kernel Special Features:

Version Information

Status: Stable

Current Stable Version: 1.00

Stable Release Date: 2015-06-18

Created 2015-06-18

Last Updated 2015-11-25