How To Install Kernels On Android Phones [Custom ROMS]

What is a Kernel?

The central component of most operating systems. Its responsibilities include managing the system’s resources (the communication between hardware and software components) and can provide the lowest-level abstraction layer for resources (especially memory, processors, and I/O devices)

[Definition Courtesy CyanogenMod Wiki]


How To Install Kernels:

Many of us love to install CyanogenMod custom ROMs on our compatible Android phones the instance they  are released. Although most of us wait for a stable and extensive CM tested version, but many enthusiasts like to go with night builds and release candidates. The RCs and nightly builds are usually buggy versions of CyanogenMod ROMs and are meant for testing and reporting purposes only. Cyanogen periodically also releases test kernels between different builds in order to test new performance tweaks or fix some bug in the current version. You can find test kernels from Cyanogen on CyanogenMod.com and occasionally and from other developers on forums like XDA and Samdroid. We can also generalize

Here is the step by step guide on installing test kernels [boot.img] on your Android phones:

Installing a boot.img from the phone CyanLogo

Note: flash_image may have memory related issues on CM5 that cause this to fail with various errors. Re-running the flash_image command until it doesn’t give any errors may work, but the fastboot method is preferred. Running this from recovery console/adb shell in recovery shouldn’t have the same issues as in terminal emulator on a booted OS.


  1. Download the boot(-new).img to the root directory of your sdcard
  2. If using terminal emulator enter ‘su’ or if using recovery console enter ‘mount /sdcard’, then:
flash_image boot /sdcard/boot.img
reboot

Installing a boot.img from fastboot

  1. Have the Android SDK installed and working, with the fastboot binary in sdk/tools
  2. Download the boot.img to the /tools directory of the SDK
  3. Plug in the phone and boot to fastboot mode (back+power or camera+power)
  4. Once the screen with skating ‘droids appears, press the back button (the center bar should say "Fastboot" or "Fastboot USB")
  5. On the computer, from within the /tools directory:
fastboot flash boot boot.img
fastboot reboot

Please note that we do not recommend this guide for novice users as complete and stable CyanogenMod Releases has pre-integrated kernels. This guide is only intended for advanced users aspiring for more knowledge regarding installing kernels.

 

[Via CyanogenMod Wiki]

Advertisement
  • ron

    This is not very step by step, what is terminal emulator and where do you get it?
    how do you start recovery console? can’t use the computer because I have no USB (one of the reasons I need a new kernel)

  • ron

    where do I get the kernels? which kernel should I use? how many kernels out there? if I use the wrong one will it brick my phone?