A Beginner’s Guide to Android Kernels
However, once I did figure out what they were it certainly changed my attitude toward them. Swapping out your kernel is one of the best ways to take advantage of rooting and I highly, highly recommend you try it. With the right kernel, you can double your battery life or squeeze it for that extra performance. Understanding this concept is very helpful, and here’s why.
Alright, What’s a Kernel?The term kernel comes from Linux, which is kind of the forerunner of Android. All Android phones come with a kernel installed on them. It is the communication link between hardware and software. One of its most important functions is Battery usage and the kernel dictates the life of your phone battery.
Your phone ships with the stock kernel. Phone manufacturers like HTC and Samsung are not exactly known for their willingness to take risks. The stock kernel put in your phone by the manufacturers is nice and safe that won’t ever break down.
New and Improved KernelsThis is where the Android community comes in. If you’re rooted and have some sort of recovery system like ClockworkMod or Amon-Ra installed, you can flash (install) a new kernel that’s more efficient.
The advantage of custom one is that they can output variable amounts of power. Say you want to save the battery. You can undervolt the phone’s processor. Undervolting is when you tell the kernel to only provide a tiny amount of power for the phone to run.
Alternatively, you can overclock a phone. This is when the kernel outputs large amounts of power, amounts higher than the phone usually uses. This will eat through a battery extremely quickly, but it is great for apps that would lag otherwise (like N64 emulators). Not to mention everything loads extremely quickly when a phone is overclocked.
There are a few risks to installing a new kernel. If you tell it to use an amount of battery that’s too small, there is a chance that the phone won’t be able to turn on. This is called bootlooping, or when the phone cannot access enough power in order to start itself. However, there is a way around bootlooping, as we will discuss later.
Picking a KernelThere are a million different options out there. That’s probably a good thing, seeing as there are about a million different phone-ROM combinations with Android. Finding a good one for your specific phone and ROM can be a bit difficult, though.
I recommend starting with Kernel Manager Lite. It’s a free app from the Android Market that will list out a couple popular kernels for some of the more popular ROMs like CyanogenMod7 and MIUI.
Each abbreviation and item like overclocking and undervolting is a power mode that comes with that kernel. CFS, HAVS, and BFS are all power plans that scale the amount of power used up and down, depending on how much battery your phone requests. Each plan scales differently (faster or slower), but the concept is the same.
Terms Commonly Used with Kernels:
- Completely Fair Scheduler (CFS) is generally more consistent and stable. Stock HTC kernel uses CFS.
- Brain F*** Scheduler (BFS) is faster and generally gives more battery life but may be a bit inconsistent.
- Hybrid Adaptive Voltage Scaling (HAVS) manipulates the phone voltage for a better battery life. Performance usually varies for different devices.
- Static Voltage Scaling (SVS) provides a steady voltage.
When looking for a kernel, ideally you want one with as many of these features as possible. It’s nice to have choices. A good kernel comes at least undervolting, overclocking, and some sort of scaling plan (like CFS/HAVS/BFS).
If you don’t find any in Kernel Manager that look good, the last resort is lots of Googling. Just search “(your phone) (your ROM) kernels” and something from XDA Developers should come up.
Installing (Flashing) The Kernel:Once you’ve found that perfect kernel that is compatible with your phone model and ROM, you have to actually install it. Download the kernel from whatever website or Kernel Manager. It should come as a .zip file. Copy that over to your SD card.
For installing a kernel, there are two options. If you pay for Kernel Manager Pro, the app will install the kernel for you. That’s the nice and easy way.
Once in recovery there are a few things that have to be done to prepare the way for the kernel. First and most importantly, make a nandroid backup of your phone. If anything goes wrong or if the phone gets stuck in an endless bootloop, this is how to fix it. Backups are very important.
There should be an option to “wipe cache.” Choose this and let it run. Next wipe the Dalvik cache. If you don’t see either of those options, look under “advanced” in ClockworkMod.
Now choose to install a .zip and choose the option to pick one from the SD card. Navigate to wherever you put the downloaded kernel. Pick the kernel and let it install. Once it’s finished, reboot your phone.
Apps for Kernel Management:The kernel can work its magic now that it’s installed. However, you have to tell it to do so first. You can manually control it from the settings with certain ROMs like CyanogenMod. Everyone else will need third-party apps like SetCPU and Tasker.
SetCPU is simple and it works. Just tell it which power plan (undervolt, overclock, etc) you want to use and it does it for you. SetCPU works just fine with no glitches or anything. Just be careful how high you set the voltage- I crashed my phone once by overclocking it a little too much.
This small change makes a titanic difference. Now my phone only uses a fraction of its battery power when it sits in my pocket. Instead of lasting about a day on a full charge, I can go twice as long without going near a power cord.
Of course, the ultimate judge of battery is how often you use your phone and how rigorously that usage gets. However, automated undervolting is a fantastic way to cut down on battery drain.