Watch This Now!

[KERNEL] [Oct 1] ElementalX-N5-4.09 (Lollipop) | ElementalX-N5-5.04 (Android M)

8,417 posts
Thanks Meter: 41,994
View First Unread Post Reply Subscribe to Thread Email Thread
Announcement from flar2: Version 4.09 is out!
ElementalX Kernel
for Nexus 5 (hammerhead)

  • Easy installation and setup with AROMA installer
  • Best balance of performance and battery life
  • Advanced color control
  • USB fastcharge (optional)
  • Sweep2sleep (optional)
  • Sweep2wake and doubletap2wake (optional)
  • Disable wake functions with timeout or power button
  • Wake Gestures app support
  • MultiROM support
  • Disable fsync (optional)
  • Sound control
  • Cooler color preset (optional)
  • backlight dimmer (optional)
  • Underclock or overclock CPU
  • L2 and bus overclocking options
  • Choose automatic minimum voltage
  • kernel-based thermal control
  • GPU overclocking options
  • voltage control
  • NTFS read/write and exFAT support
  • init.d support
  • Charge light support (enabled by some ROMs)
  • No forceencrypt

Google+ Community


Q. Does doubletap2wake/sweep2wake drain battery?
A. Yes, on this device it does (around 2% per hour). If you choose to enable the wake functions, you can set a timeout or use the power key toggle option to quickly disable dt2w if you won't be using the phone for a while.

Q. My min frequency is stuck at 1267MHz.
A. No, it's not. When you touch the screen, the frequency is temporarily boosted to 1267MHz. The min frequency will go back to 300MHz when you're not looking. But there is a way for it to get stuck at 1267 if you have certain apps (eg, TricksterMod). My recommendation: DON'T MESS WITH THE FREQUENCIES!!! Set them in the installer and leave it alone.

Q: What is the difference between standard and express versions?
A: Standard uses the Aroma installer to customize kernel settings. Express is a standard .zip flashed in recovery with default kernel/aroma settings. Any previous aroma install settings will be kept when flashing express. It is recommended to install the aroma version the first time, and the express version for subsequent installs (unless you want to change some settings).

Q. I have really bad battery drain, any ideas?
A. You might have sweep2wake or doubletap2wake enabled. Otherwise, there is something wrong with your phone.

Q. I have [some random problem], any ideas?
A. There is something wrong with your phone. Wipe and reinstall. The major releases of this kernel are 100% stable and everything works.

Do NOT flash this over other custom kernels!
Dirty flash your ROM if you've used another kernel!

Please consider a donation to support ongoing development
Many thanks to those who have donated!


Android 5.1/5.1.1 (Lollipop)

Android M preview 3

Flashable zip for permissive mode (required for some ROMs and mods):

App to customize Wake Gestures:

Android 5.0.1/5.0.2 (Lollipop):

Stock/AOSP (Android 4.4.3/4.4.4):

Cyanogenmod/CAF (Android 4.4.3/4.4.4):

Stock/AOSP (Android 4.4.2):



XDA:DevDB Information
ElementalX Kernel, Kernel for the Google Nexus 5

Source Code:

Kernel Special Features:

Version Information
Status: Stable
Current Stable Version: 4.09
Stable Release Date: 2015-10-01
Current Beta Version: 5.04
Beta Release Date: 2015-10-01

Created 2013-11-09
Last Updated 2015-10-01
The Following 929 Users Say Thank You to flar2 For This Useful Post: [ View ]
9th November 2013, 03:08 PM |#2  
flar2's Avatar
OP Recognized Developer
Flag Ottawa
Thanks Meter: 41,994
Donate to Me


ElementalX Configuration File
Your choices in the Aroma installer are used to build a configuration file. The config file is located at /etc/elementalx.conf. You can edit this file to change kernel settings. Whatever is set in this file will take effect when the device is booted (unless other scripts or apps interfere!)

If settings are not sticking:[*]Make sure you have busybox installed correctly and updated to the latest version[*]Make sure the file permissions for /etc/init.d/99elementalx are set to execute.[*]Check to see if any /etc/init.d scripts or apps (such as Kernel Tuner or TricksterMod) are interfering with your settings.

ElementalX Log File
Every boot, a log file is created at /data/local/tmp/elementalx-kernel.log. This file shows the date and time and all settings that have been applied. Use this to verify and troubleshoot configuration options.

ElementalX Governor
The ElementalX CPU governor has been specifically designed and tuned to get the best balance between battery life and performance. By default, it is more conservative than Ondemand. During routine usage, the CPU frequency does not ramp up very often. If gboost is enabled, during gaming or any other graphics intensive situation, the CPU frequencies boost much easier in order to maintain maximum performance. There is also a built in input boost. There are several tunables specific to the governor:

input_event_min_freq: takes four values separated by comma. These are the input boost frequencies for cores 0, 1, 2, and 3 (default 1728000, 1267200, 1267200, 1267200)

input_event_timeout: this is the length of time in milliseconds that the input boost will be active (default 500). Setting this to 0 disables input boosting.

ui_sampling_rate: when you touch the screen, the sampling rate changes temporarily to whatever you set here (default 15000)

two_phase_frequency: this sets the max frequency for moderate loads. Accepts four frequency values separated by comma, for cores 0, 1, 2, and 3. (default 1728000, 1728000, 1728000, 1728000)

How does it work? It's basically a multiphase ondemand governor.

The basic governor is very conservative for most phone activities, spending most of its time at 1267MHz. If there is graphics load, we switch to a two phase ondemand. The first phase runs with a max freq of 1728MHz (default). If the load increases, it goes to max frequency (default is 2265MHz) and the minimum frequency changes to 1267200 (I will probably make this tunable)

The input boost does a couple things. First, it lowers the sampling rate for the timeout duration to make the governor more responsive. Second, it boosts the frequency of any online cores. You can disable this by setting input_event_timeout to 0.

If you want to experiment, delete /system/lib/hw/ and set the input_event_timeout to about 1000. But I recommend leaving it alone for optimal smoothness.

Faux Clock/TricksterMod/Kernel Tuner/etc
You don't need these apps because the ElementalX installer sets everything up automatically, but if you want to check or change settings, you can use these apps. Just be aware that some of them (e.g. Kernel Tuner) are set by default to apply settings on boot, which can interfere with the settings you chose in the ElementalX installer.

Overclocking (or underclocking) is optional. The installer lets you choose the maximum frequency. You can set the maximum frequency individually for each CPU core in the installer. Whatever frequencies you chose in the installer will be set at boot for each CPU. Not all devices can handle overclocking. I don't recommend overclocking, this device is fast enough. If you overclock, the CPU frequency will likely be throttled due to heat. I recommend the stock frequencies, as this device is plenty fast.

CPU voltages
The installer allows you to choose from several undervolting options. These automatically undervolt the lowest frequency (300MHz) where the CPU spends most of its time. The voltages for other frequencies are assigned based on the PVS bin of your phone. CPU voltages are fully customisable with apps such Kernel Tuner or Trickster Mod, but I recommend leaving these other voltages as-is unless you are prepared to do a lot of testing. Be careful, lowering voltages can cause instability. Generally, having reboots while the phone is asleep or other weird problems is a sign that your minimum voltage is too low.

GPU Governor
The default GPU govenror is ondemand. It works well and is recommended for best balance between performance and batter life. The simple governor is also available, but ramps up the GPU frequency much quicker than ondemand, so may impact battery life. The governor can be set in /etc/elementalx.conf

fsync can be disabled if you're looking for the last ounce of performance. I recommend leaving it enabled as there is a slight risk of data loss if your phone shuts off unexpectedly before filesystems are synced.

Max screen off frequency
The default max screen off frequency is 1190MHz, which is a good balance between limiting the voltage/frequency and the time required to complete tasks while the screen is off. This can be changed manually at /sys/devices/system/cpu/cpu0/cpufreq/screen_off_max_freq

Installing a new ROM
If you install a new ROM, it will probably replace this with the stock kernel and will definitely overwrite /etc/init.d/99elementalx and /etc/elementalx.conf so you will lose your settings and certain features. So always reinstall the kernel after installing a ROM.

NTFS and exFAT support
This is for anyone who wants to use OTG to connect a USB stick or portable harddrive formatted with Microsoft's NTFS or exFAT filesystems. You will need Stickmount or a similar app.

F2FS support
F2FS support is built into the kernel, however, you will need to have an F2FS compatible kernel installed before you install ElementalX to get all the proper ramdisk stuff.

Wake Gestures
This is a new feature similar to the Motion Launch Gestures on the HTC One m8. Requires this app:

Set /sys/android_touch/wake_gestures to 1 to enable input events for wake gesture actions. Set to 0 to use traditional sweep2wake or doubletap2wake (wakes up the phone and turns on the screen only).

Note that if you enable wake_gestures, nothing will happen if you don't install the Wake Gesture Xposed module.


Sweep2wake allows you to turn on your phone by swiping your finger across the screen. There are four sweep actions that will work

Sweep right......1
Sweep left........2
Sweep up.........4
Sweep down....8

Add up the values for each gesture you want to enable and put the total in /sys/android_touch/sweep2wake. For example, to enable all gestures, the value is 15 (1+2+4+8). To enable sweep right, sweep left and sweep up, the value is 7 (1+2+4)


DoubleTap2Wake (DT2W) allows you to wake the device by double tapping anywhere on the screen. This causes significant battery drain. You can edit /etc/elementalx.conf to change the setting on boot.


0 = disabled
1 = enabled (bottom of screen only)
2 = enabled (full screen)

Vibration Strength

Haptic feedback can be enabled for the wake gestures in /sys/android_touch/vib_strength. This setting takes a number between 0 and 90. Default is 20. Setting this to 0 disables haptic feedback for gestures.

S2W/DT2W power key toggle
If enabled, turning the screen off with the power button disables s2w and dt2w to save battery (since s2w/dt2w cause significant battery drain). When you turn the screen back on, s2w and dt2w return to their previous settings. If the screen times out, s2w/dt2w are not disabled this is only if you use the power button to turn it off. You can edit /etc/elementalx.conf to change the setting on boot.

S2W/DT2W Timeout
Doubletap2wake and sweep2wake can be automatically disabled after a certain number of minutes. I give a few choices between 5 and 120 minutes in the installer. Default is 30 minutes. You can put in whatever you want in /etc/elementalx.conf.

When the screen is turned on, the timeout is canceled and will start again next time you turn the screen off. This means that if you have your screen set to come on for incoming messages or notifications, the timeout will start over again.

If you also enabled the power button to toggle s2w/dt2w, there is no timeout when you use the power button, the wake functions are immediately disabled (same as before).

You can edit /etc/elementalx.conf to change the setting on boot.

Sweep2Sleep allows you to put the device to sleep by sweeping your finger across the navigation bar area. Unlike Sweep2wake, this does not cause any battery drain. You can edit /etc/elementalx.conf to change the setting on boot.


0 = disabled
1 = sweep right
2 = sweep left
3 = sweep left or right

Color preset
There are two color presets: stock and slightly cooler. You can edit /etc/elementalx.conf to change the setting on boot.


0 = stock color
1 = slightly cooler color

Backlight dimmer
Backlight dimmer allows you to adjust the LCD screen brightness lower than is possible with stock. Be careful, you can lower the brightness so much you can barely see it. You can edit /etc/elementalx.conf to change the setting on boot.


0 = disabled
1 = enabled

USB fastcharge
USB fastcharge is optional. This will allow you to charge at a faster rate when connected to a USB port. The default limit for USB ports is 500ma, this increases it to 900ma. Be sure that the computer/laptop/whatever you are plugged into can handle it. Some will automatically cap it at 500ma. Please note that this does not force AC charge mode like previous implementations of force fastcharge. Your battery setting will still say USB mode. You can edit /etc/elementalx.conf to change the setting on boot.
Last edited by flar2; 17th July 2015 at 08:16 PM.
The Following 205 Users Say Thank You to flar2 For This Useful Post: [ View ]
9th November 2013, 03:08 PM |#3  
flar2's Avatar
OP Recognized Developer
Flag Ottawa
Thanks Meter: 41,994
Donate to Me
Sep29, 2014 - ElementalX-N5-1.10
-revert i2c update
-clean up voltage control
-ext4 speedup

Sep15, 2014 - ElementalX-N5-1.09
-update to fauxsound 3.6
-i2c update
-update audio subsystem (cm version only)

Sep10, 2014 - ElementalX-N5-1.08
-update msm-sleeper
-fix installer

Sep 6, 2014 - ElementalX-N5-1.07
-fix permissions for vib

Sep 5, 2014 - ElementalX-N5-1.06
-fix permissions for vib and color settings
-update msm-sleeper
-fix flashlight permissions
-add support for USB Keyboard app

Aug 25, 2014 - ElementalX-N5-1.05
-fix long timeouts in wake_timeout
-support 3G USB dongles
-lower i2c clockrate

Aug 8, 2014 - ElementalX-N5-1.04
-latest updates to fauxsound
-support Logitech Unifying Receiver
-NFS support

Aug 3, 2014 - ElementalX-N5-1.03
-security updates and fixes
-ability to use proprietary chargers

July 2, 2014 - ElementalX-N5-1.02
-fix touchboost not enabled on recent builds (CM/CAF version)

June 29, 2014 - ElementalX-N5-1.01
-CAF updates to audio subsystem (CM/CAF version)

June 19, 2014 - ElementalX-N5-1.00
-all features same as before

June 10, 2014 - ElementalX-N5-0.44
-update installer
-various tweaks and optimizations
-fix slimport irq not enabled

June 4, 2014 - ElementalX-N5-0.43
-update with Android 4.4.3 kernel source
-fix vibration intensity

June 3, 2014 - ElementalX-N5-0.42
-faster boot up
-revert enable proprietary charger

June 1, 2014 - ElementalX-N5-0.41
-new wake timeout method
-various fixes and optimizations
-stereo call recording support (untested)
-update installer

May 25, 2014 - ElementalX-N5-0.40
-fix installer
-adjust vertical sweep length
-adjust doubletap timeout
-update slimbus oc (@poondog/@zeroinfinity)

May 25, 2014 - ElementalX-N5-0.39
-bidirectional sweep2sleep
-omnidirectional sweep2wake
-wake gestures interface (requires xposed module)
-optional haptic feedback for gestures
-updated installer
-option to use stock ondemand governor
-build with Linaro GCC 4.9.1 toolchain (@Christopher83)
-other fixes and optimizations

Apr 25, 2014 - ElementalX-N5-0.38
-adjust hardfloat compile option

Apr 21, 2014 - ElementalX-N5-0.37
-update F2FS support

Apr 5, 2014 - ElementalX-N5-0.36
-revert sched tweaks

Apr 2, 2014 - ElementalX-N5-0.35
-update backlight_dimmer
-rgb color control (savoca)
-a few fixes and optimizations

Mar 17, 2014 - ElementalX-N5-0.34
-fix installer typo
-fix playback of secure video

Mar 16, 2014 - ElementalX-N5-0.33
-add F2FS support
-add wake function timeout option
-add readahead options
-update installer

Mar 4, 2014 - ElementalX-N5-0.32
-many CAF updates and fixes
-rework and cleanup elementalx governor
-ROW is default i/o scheduler again

Feb 27, 2014 - ElementalX-N5-0.31
-s2w/dt2w power button toggle fix
-update backlight dimmer (more gradual steps)
-revert some changes from 0.30

Feb 22, 2014 - ElementalX-N5-0.30
-deadline is default i/o scheduler
-update backlight dimmer (more gradual steps)
-export storage for usb otg
-update installer
-save elementalx.conf to sdcard
-express installer sees all options now
-many optimizations and fixes (see github)

Feb 1, 2014 - ElementalX-N5-0.29
-fix photos taken with flash

Jan 27, 2014 - ElementalX-N5-0.28
-cyanogenmod support

Jan 26, 2014 - ElementalX-N5-0.27
-CAF updates to audio
-update installer
-save elementalx.conf to sdcard
-express installer sees all options now

Jan 21, 2014 - ElementalX-N5-0.26
-improve compatibility with various ROMs

Jan 20, 2014 - ElementalX-N5-0.25
-remove simple GPU gov
-update gamma sysfs interface (credit: myfluxi)
-enable C2 and C3 states
-maintain touchboost in all ROMs
-update Aroma Installer to 2.70RC2
-fix installer cmdline creation
-fix green line on videos
-express installer keeps previous max freq, l2 and uv options

Jan 11, 2014 - ElementalX-N5-0.24
-slight boost to elementalx governor
-small boost to l2/bus for touchboost frequency
-many fixes and optimizations (see github)
-update installer
-add DriveDroid support

Jan 5, 2014 - ElementalX-N5-0.23
-tweak deadline i/o scheduler
-slimbus overclock (credit: poondog)
-implement always on rgb led support (requires rom support)
-i/o scheduler option in installer
-express version

Jan 1, 2014 - ElementalX-N5-0.22
-update installer
-doubletap2wake default is bottom of screen only
-doubletap2wake fullscreen option
-various tweaks and optimizations

Dec 30, 2013 - ElementalX-N5-0.21
-revert some tweaks
-update installer
-cfq is default scheduler

Dec 28, 2013 - ElementalX-N5-0.20
-move elementalx.conf back to /etc
-update installer
-remove async_fsync
-restore enable/disable fsync option

Dec 26, 2013 - ElementalX-N5-0.19.1
-move elementalx.conf to /data/local/elementalx.conf

Dec 26, 2013 - ElementalX-N5-0.19
-adjust doubletap2wake sensitivity and return to full screen
-slight boost to elementalx gov
-return to older backlight dimmer mod
-move /etc/elementalx.conf to /sdcard/elementalx.conf
-option for stock thermal throttling
-update installer

Dec 21, 2013 - ElementalX-N5-0.18
-restrict doubletap to bottom half of screen and make less sensitive
-elementalx is default CPU governor
-add gboost option
-add cooler thermal option
-various tweaks and optimizations
-update installer

-fix multirom support
-default i/o scheduler is FIOPS

-replace backlight dimmer option with @showp1984's backlight mod
-add asynchronous fsync from HTC One
-remove fsync options (no longer needed)
-Makefile adjustments
-slight adjustments to elementalx governor
-update gamma control support
-add kexec-hardboot (multirom support)
-update installer

-experimental elementalx governor
-Makefile adjustments

-fix cpu frequencies

-update config

-update for Android 4.4.1
-various tweaks and optimizations

-various tweaks and optimizations
-update gamma control interface

-ramdisk options
-experimental gamma support (@myfluxi and @faux123)
-adjust Makefile optimizations
-adjust mpdecision parameters (slightly less aggressive)

-prevent touches during phone calls while screen is off and s2w or dt2w are enabled

-wifi fixes
-faux123 sound fixes
-remove some CPU frequencies

-update installer for greater compatibility with various ROMs

-use existing ramdisk

-add option for sweep2sleep only
-add option for S2W/DT2W power key toggle

-add doubletap2wake

-add color presets
-add sweep2wake (thanks @show-p1984)
-dimmer backlight option
-increase default screen off frequency to 1190MHz

-do not use existing ramdisk

-add CIFS support
-revert shut down cores while screen off
-remove early_suspend
-max screen off frequency optional
-update installer
-use existing ramdisk
-remove ultra optimization
-add faux123 sound patches

-max screen off freq 730MHz
-shut down cores while screen off
-use lowest GPU frequency (200MHz)
-restore early_suspend
-simple GPU governor
-overclocking up to 3GHz

-use Aroma installer
-installer ensures mpdecision and thermal-engine are present
-init.d support
-increase thermal limits
-add CPU optimization levels
-CPU overclock to 2726MHz
-automatic undervolting
-add TCP congestion algorithm options
-add fstrim to init script
-add exfat support
-Input: Send events one packet at a time
-cleanup from other kernels
-wireless bug fixes

-Makefile optimizations
-optimized AES and SHA1 routines
-undervolting option
-add /dev/frandom
-show pvs number in sysfs
-NTFS r/w support
-optimized AES and SHA1 routines
-add FIOPS and SIO i/o schedulers
-force fastcharge
-lib/int_sqrt.c: optimize square root algorithm
-AIO: Don't plug the I/O queue in do_io_submit()
-voltage control
-add option to enable/disable fsync
-update ARM topology
-add cpu_power driver
-enable loadable kernel module support
-build -O3 with linaro 4.7 toolchain
Last edited by flar2; 17th July 2015 at 08:00 PM.
The Following 88 Users Say Thank You to flar2 For This Useful Post: [ View ]
9th November 2013, 03:12 PM |#4  
Senior Member
Flag Brooklyn
Thanks Meter: 4,347
Donate to Me
It is here!!! Love your kernel on Flo!
The Following User Says Thank You to jarjar124 For This Useful Post: [ View ]
9th November 2013, 03:37 PM |#5  
Senior Member
Thanks Meter: 46
omg <3

i just wish there were ways to flash boot.img without connecting the device to my computer.

i was in bed and had to get up just to flash this!

i had no doubt that it was worth it!
The Following 2 Users Say Thank You to rootuser11 For This Useful Post: [ View ]
9th November 2013, 03:41 PM |#6  
dex2grigg's Avatar
Senior Member
Flag Salisbury
Thanks Meter: 226
Originally Posted by rootuser11

omg <3

i just wish there were ways to flash boot.img without connecting the device to my computer.

i was in bed and had to get up just to flash this!

i had no doubt that it was worth it!

Try flashify from play store

Sent from my Nexus 5 using Tapatalk
The Following 3 Users Say Thank You to dex2grigg For This Useful Post: [ View ]
9th November 2013, 03:41 PM |#7  
Senior Member
Thanks Meter: 108
Now this will be interesting. Checking out

Sent from my Nexus 5 using Tapatalk
9th November 2013, 03:46 PM |#8  
Senior Member
Thanks Meter: 46
Originally Posted by dex2grigg

Try flashify from play store

Sent from my Nexus 5 using Tapatalk

The Following 2 Users Say Thank You to rootuser11 For This Useful Post: [ View ]
9th November 2013, 03:58 PM |#9  
flar2's Avatar
OP Recognized Developer
Flag Ottawa
Thanks Meter: 41,994
Donate to Me
I hope to work on a nice installer tonight
The Following 14 Users Say Thank You to flar2 For This Useful Post: [ View ]
9th November 2013, 04:05 PM |#10  
P.Mobile's Avatar
Senior Member
Flag RhOdE IsLAnD... 401
Thanks Meter: 936
nice!! man im sooo happy i got a nexus phone now! love having great kernels to play with thanks flar
The Following 2 Users Say Thank You to P.Mobile For This Useful Post: [ View ]
9th November 2013, 04:42 PM |#11  
dondavis007's Avatar
Senior Member
Thanks Meter: 253
Nice to have you here, my One loves your work: )

Sent from a mobile Gadget...

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread