Home
Nexus

ElementalX: The Only Custom Kernel You Need on Your Nexus 5

Sep 12, 2014 12:58 AM
635460336435233956.jpg

Straight out of the box, the Nexus 5 is an awesome device, but even it can be faster with better battery life. Luckily, one of the things that makes it so awesome is that there are tons of developers creating mods for it, since it runs stock Android by default. When it comes to gaining speed and better battery life, flashing a custom kernel is the way to go.

Created by developer flar2, the ElementalX custom kernel is one of the most downloaded and flashed mods for the Nexus 5 ever. But it doesn't stop there—ElementalX is also available for the HTC One (M7, M8, and S), the Nexus 7, and the Motorola Xoom.

It has a wide feature set, ranging from overclocking and undervolting to custom wake gestures like knock-to-wake and swipe-to-sleep. Battery life improvements and a whole host of under-the-hood tweaks make this the go-to custom kernel for most modders. For this how-to, I'll guide you through installing the kernel and how to get the most functionality out of it.

Prerequisites

Make sure you have all the requirements met before you continue on with this tutorial. You must have your bootloader unlocked with TWRP (or another custom recovery) installed so the custom kernel can be flashed.

Custom Kernels 101

A kernel is essentially the central nervous system of your phone. Whenever anything is done, like turning down your screen brightness or making a call, Android talks to the kernel and then it connects it to the phone's hardware.

A custom kernel has been modded with additional features and speed improvements not found on stock versions. They are usually made using Google's own source code released to developers, then built with mods added in.

Step 1: Make a Full Backup

As with any system mod, having a working backup of your phone is important. Boot into TWRP by choosing Recovery in your power menu if you have a custom ROM.

If you're running stock, boot into TWRP manually by turning off your phone and then pressing Power + Volume Down to get into the fastboot menu. From there, press the Volume keys until Recovery mode is chosen, followed by the Power button.

635451851181545702.jpg
635451851821080559.jpg
635451851181545702.jpg
635451851821080559.jpg

From within TWRP, tap Backup, then swipe right in Swipe to Back Up. Once that finishes, tap Reboot System.

635451854035922504.jpg
635451854892326443.jpg
635451855503890354.jpg
635451854035922504.jpg
635451854892326443.jpg
635451855503890354.jpg

Step 2: Download ElementalX

Now that you have a backup made, it's time to download ElementalX. If you're running a stock Android 4.4.4 ROM like I am, download the latest version by tapping here and choosing the latest update under Stock/AOSP.

635460276796014084.jpg

I recommend the version without "express" in the file name, so that you can customize the kernels settings while installing. If you want a quick-and-easy install without having to pick and choose settings, then download the express one.

If you have CyanogenMod installed on your phone, download the latest update under Cyanogenmod/CAF. With CyanogenMod being the exception, most custom ROMs will use the custom kernels listed under Stock/AOSP. To find out which kernel applies to your Nexus 5, look for the words AOSP or CAF in the release thread on XDA for your custom ROM.

Here's a brief list of which kernel to install for some popular ROMs:

Downloads for HTC Ones and Motorola Xooms can be found here.

Step 3: Install ElementalX

With the ElementalX kernel downloaded, boot back into TWRP. Tap Install, then navigate to sdcard/Download and select the ElementalX-N5-#.##.zip file to begin installation.

635451860133733248.jpg
635451860760609490.jpg
635451872443265269.jpg
635451860133733248.jpg
635451860760609490.jpg
635451872443265269.jpg

ElementalX will begin guiding you through all of the options and settings that can be customized—select Next on the first screen, followed by checking the box for I Agree with these Terms Of Use... and tapping Next again.

635451881177951376.jpg
635451881735451466.jpg
635451881177951376.jpg
635451881735451466.jpg

Step 4: Tweak the CPU, CPU Frequency, & Undervolting

In this step, we'll be adjusting the CPU settings to speed up your Nexus 5, along with improving battery life. Below are images of the three menus we'll be working with, which correspond to the sections below.

635451882746546142.jpg

CPU Settings

635451888201232908.jpg

Maximum CPU Frequency

635451901241233807.jpg

Auto Undervolting

635451882746546142.jpg

CPU Settings

635451888201232908.jpg

Maximum CPU Frequency

635451901241233807.jpg

Auto Undervolting

1. CPU Settings

In this menu, you can choose to set each CPU core's speed individually, but I recommend choosing No. Under Select CPU optimization level, choose elementalx for better speed and performance. In Select thermal throttling, leave it at Default.

Thermal throttling is the amount of heat that's allowed by the CPU before it lowers its clock speed to cool down. What this means is more cooling leads to slower speeds, while less cooling will have higher performance.

2. Maximum CPU Frequency

In this menu, you can overclock (make your CPU run faster than normal) or underclock (make it run at a slower speed). Overclocking will increase speed, but drain battery faster. Be careful with overclocking because choosing too high of an overclock will lead to random reboots and crashes, so don't automatically pick the fastest speed at 2957 Mhz. Underclocking on the other hand will save battery, but your phone runs slightly slower.

3. Auto Undervolting

In this menu, you can lower the amount of power that a CPU core uses. This can help with battery life, but not all phones are the same and can be undervolted. I always leave this at the default level, but try out one of the other settings on your phone. If your phone is unstable afterwards, just reflash ElementalX kernel and choose Stock.

Step 5: Tweak Disk Settings & Custom Wake Gestures

In this step, we'll be managing

635451907912170083.jpg

Disk Settings

635451908313419926.jpg

Sweep2Wake and DoubleTap2Wake

635451907912170083.jpg

Disk Settings

635451908313419926.jpg

Sweep2Wake and DoubleTap2Wake

1. Disk Settings

I/O scheduling is how your phone manages processes and user requests. Processes are random, so I/O scheduling is a way of managing and ordering them. I recommend just the default setting by ElementalX.

Buffer readahead is how much data your phone reads ahead of time so that it can be retrieved quickly. The default 256 setting is fine, but I usually like 512 for helping my phone play music off the SD card faster.

2. Sweep2Wake / DoubleTap2Wake

Sweep2Wake (S2W) and DoubleTap2Wake (DT2W) with ElementalX are my favorite mods. S2W will wake your phone by just swiping over your screen. DT2W wakes your phone by tapping twice when it's sleeping, which is just like knock-to-unlock on LG's own line of flagship smartphones. Just note that enabling Traditional S2W/DT2W will use up a lot of battery.

Custom wake and app gestures can be set by choosing Wake Gestures support and installing an additional Xposed module. If you enabled this setting, scroll down for how to fully set this up (after Step #7).

635452568454513907.jpg
635452569399514051.jpg
635452568454513907.jpg
635452569399514051.jpg

Check all the gestures you want enabled in the kernel. If you'd like to have haptic feedback (a small vibration) when you do a gesture, enable it here, too. In the next screen, leave the S2W/DT2W timeout settings alone and tap Next.

Step 6: Enable Swipe2Sleep & Other Kernel Settings

In this step, we'll be adding swipe-to-sleep and checking out a ton of other kernel settings that we can enable.

635451923808420349.jpg
635451924181857585.jpg
635451923808420349.jpg
635451924181857585.jpg

1. Swipe2Sleep

This will put your phone to sleep by swiping across the on-screen navigation buttons. Unlike Sleep2Wake or DoubleTap2Wake, this does not cause battery drain. I find myself using this feature a lot, so enable it and give it a try.

2. Other Settings

In this menu, additional tweaks can be enabled in the kernel. Here are my recommended settings to enable and what they all do:

  • Enable USB fastcharge

If you find your Nexus 5 charges too slowly with some power adapters, this allows the phone to draw more power from USB to charge your battery faster. Just a warning, this may reduce the life of your battery, but I haven't noticed any problems yet.

  • Enable exFAT filesystem support

Enabling exFAT support will allow your phone to read and write to exFAT filesystems. Windows has support for this and some USB drives are formatted as exFAT. If you have a USB OTG cable, connecting your exFAT formatted drive to your phone can now have files read and written to.

  • Backlight dimmer

This option allows the screen to become even dimmer than default. Personally, I find the stock lowest brightness to be still too bright, so this option is another one of my favorites.

  • Disable fsync

Fsync is a process where data is buffered ahead of time in case there is a crash, but it slows down your phone. Disabling fsync puts your phone at a slightly greater risk for data loss if it crashes, but I haven't experienced issues leaving this off.

Step 7: Finish the ElementalX Install

Now that we have gone over all of ElementalX's kernel settings and features, you can now Install ElementalX to finish up the process. When finished, you'll be sent back to TWRP where you can select Reboot System.

635451933557951675.jpg
635451934265295337.jpg
635451934594045296.jpg
635451933557951675.jpg
635451934265295337.jpg
635451934594045296.jpg

Optional Steps

You're all done now, but if you want to get even better performance out of your Nexus 5, check out the optional steps below.

Step 8: Set Custom Wake & App Gestures (OPTIONAL)

For those who enabled custom wake and app gestures in Step #5, here's how to set that up. You'll need to have the Xposed Framework on your phone, so if you don't have it, click the link back at the top of the page to get that done.

In the Xposed Installer app, tap Download, then search for Wake Gestures by developer C3C076.

635451975935451424.jpg
635451976049670446.jpg
635451976170764066.jpg
635451975935451424.jpg
635451976049670446.jpg
635451976170764066.jpg

From there, swipe over to Versions and install the latest update of the module.

635451977115920447.jpg
635451977347951219.jpg
635451977466389306.jpg
635451977115920447.jpg
635451977347951219.jpg
635451977466389306.jpg

Once it's done, enable it in Modules from within Xposed.

635451978430295291.jpg

You'll be prompted to reboot, so do that by tapping Framework, followed by Reboot.

635451979284201715.jpg

Once you're booted back up, open your app drawer and launch Wake Gestures. Now, it's as simple as picking and choosing which gesture does what. I like to have Google Play Music launch with the swipe up gesture and skip tracks with the left-right gestures. Having double-tap set to unlock makes getting into my phone a breeze.

635451982311232751.jpg
635451982624826643.jpg
635451982311232751.jpg
635451982624826643.jpg

Once everything is set how you like it, just quit the app and try them out. That's all there is to it!

Step 9: Boot CD Images (OPTIONAL)

One feature that often goes unmentioned with ElementalX is its support using your Nexus 5 to boot CD images from a computer. That's right—you can set it to imitate a flash drive for USB installs of your operating system.

To get this done, download and install DriveDroid from Google Play. Developed by Softwarebakery, it allows your phone with a supported kernel to be used to boot CD images with a computer.

635452010780139165.jpg

If you feel like supporting the developer for their app, there's a paid version here for $2.70 without ads.

With DriveDroid installed, launch it and tap Setup. In the next window, tap Proceed and then Acquire Root. SuperSU will ask for root permissions, so grant them.

635452039895920196.jpg
635452040449982863.jpg
635452040851232868.jpg
635452039895920196.jpg
635452040449982863.jpg
635452040851232868.jpg

Once that's done, plug in your USB to your computer and tap I plugged in the USB cable to continue (leave it plugged in). In the next window, tap Proceed, then choose Standard Android Kernel. Don't worry if your computer pops-up with a "drive inaccessible" message. You're now ready to start booting CD images from your phone.

635452041671544866.jpg
635452042539045113.jpg
635452043243107668.jpg
635452041671544866.jpg
635452042539045113.jpg
635452043243107668.jpg

Depending on if you want to boot Windows, MacOS X, or Linux, look for your specific OS under the appropriate heading below.

Booting Mac OS X

Booting OS X takes a few steps, but it's not too complicated. In DriveDroid, tap the add icon to create a new image with the following parameters:

  • 9GBs in size
  • Name it Mavericks
  • Uncheck Partition table (MBR)
  • Set the filesystem from FAT to none

Once it's set up, tap the check icon at the top right and let it make the image. When the blank image is done being made, tap Mavericks in DriveDroid. From there, tap the option for Writable USB under Host image.

635452045435765738.jpg
635452047999826826.jpg
635452049401233860.jpg
635452045435765738.jpg
635452047999826826.jpg
635452049401233860.jpg

We're now done with everything on our Nexus 5. To finish, head over to your Mac and open Disk Utility. In the left sidebar, you'll see a # GB Linux File-CD Gadget Media—click on that and choose the option for Erase. Next, set the format to Mac OS Extended (Journaled) and name it Mavericks, then click Erase.

635452063682641396.jpg

After that, exit out of Disk Utility and you will see a new USB drive appear in Finder.

635452065553420238.jpg

Now, just download Mavericks from the App Store. Download and use DiskMaker X to put it on your USB drive.

Launch DiskMaker X and choose Mavericks (10.9). It will find your download of Mavericks to transfer over. Select your Mavericks USB drive and wait for the process to finish.

635452573852485177.jpg

Now, that it's done, switch off your Mac and plug in your Nexus 5. Make sure you have selected Mavericks in DriveDroid once it's plugged in. When turning on your Mac, press and hold down the Option key. In the menu that appears, select your USB drive and press enter. You can now do a USB install of Mavericks using your phone!

635453420316388700.jpg
635452583563264232.jpg
635453420316388700.jpg
635452583563264232.jpg

Booting Linux

Getting Linux set up is by far the easiest. Launch DriveDroid, tap the add icon, and select Download image. Now just select your Linux distro and let DriveDroid download it. Once that's done, just tap on the distro to enable it, then plug in your phone to your computer and have it boot from USB when it turns on in the splash screen. That's it!

635452588253108089.jpg
635452588401232691.jpg
635452588253108089.jpg
635452588401232691.jpg

Windows

The process for creating a Windows bootable drive is not nearly as painless as it is for Mac and Linux, but Softwarebakery has a great guide for getting Windows on your phone here. It's lengthy, but if you're scrambling to look for a USB flash drive, it works in a pinch.

ElementalX is a phenomenal kernel and I hope you give it a try on your phone. There are a ton a features and it's constantly being updated by the developer. Keep an eye on it and tell us how you like the kernel in the comments below, or on Facebook or Twitter.

Comments

No Comments Exist

Be the first, drop a comment!