Thursday, December 27, 2012

Installing A Custom Kernel on A Nexus Device

We all know that it is great to have an Android phone that is rooted, with a custom recovery and a custom ROM, especially with that of Nexi devices as the Android developmental scene is huge. However, have we ever shown appreciation for having a custom kernel included in our phones? Perhaps we have, and perhaps we have not.

Today, you will find three methods of how to install a custom Kernel on a Nexi device, particularly with that of a Nexus 4. The custom kernel I will be installing on my Nexus 4 device is no other than Mr. Franco's kernel. I am sure some of us may or may not have heard of Mr. Franco or his kernels, but all I can say is that he works for Google at Mountain View, CA.

A little tidbit for what custom kernels do, you can overclock/under clock your CPU/GPU frequencies. You can control your volt settings but under volting for example. Or better yet, it helps improves batteries based on certain governors*. There are other features that custom kernels do.
So here we go!

NOTE: I AM NOT RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR PHONE! THIS IS A GUIDE. 

Method 1: 

Installing via Fastboot:
*The Recovery I am using here is TWRP. It also works with CWM (ClockWorkdMod). Please ensure you have the latest custom recoveries installed before going ahead* 

1) Always make a Nandroid backup of your phone. This can be done by booting into the custom Recovery then clicking on Backup.

2) Once that is done, you can now boot your phone into the bootloader/fastboot mode. This is done by either pressing Vol Down + Power button altogether OR opening up Command Prompt on Windows or Terminal on Mac OS X. Then you type in "adb devices" to ensure your device is recognized for Windows or type in "./adb_Mac devices" for Mac OS X.

Then type in "adb reboot bootloader" for Windows or "./adb_Mac reboot bootloader" for Mac OS X.

3) Go ahead and flash the kernel image file.

4) This can be done by typing in "fastboot flash boot *image file* (in this case "boot-r20.img") using Windows or "./fastboot_Mac flash boot *image file* using Mac OS X

5) You will see a successful message on your screen. Then type in "fastboot reboot" for Windows or "./fastboot_Mac reboot" for Mac OS X.

Here's a video guide as well showing the above steps:





Method 2: 

Installing via Custom Recovery

1) Ensure you move the zip file into your phone's internal storage. For simplicity sake, I created a folder called Kernels and moved the zip file there.

2) Boot into the Custom Recovery on your phone. Then select Install

3) Select zip file. In this case, it would be "franco.Kernel-nightly-r20.zip"

4) Proceed to install. Wait for successful message.

5) Reboot your phone.

Here's a video guide as well showing the above steps:



Method 3:

Installing via Franco's Kernel Updater. THIS ONLY APPLIES TO YOU INSTALLING CUSTOM KERNELS BY FRANCO. DOES NOT APPLY TO ANY OTHER KERNELS SUCH AS MATRIX FOR EXAMPLE

First off, you would need to have downloaded and installed Franco's Kernel Updater app from the Play Store. The link can be found here: Franco's Kernel Updater

1) Open up the app.

2) To backup/restore the current kernel (be it stock or another custom Kernel), click on "Kernel backup/restore". Then click on "Backup" and click OK to finish the process.

3) Go back and click on "franco.Kernel updater"

4) Click on Download latest nightly kernel.

5) You'll see a change log/release notes.

6) Click on either "Auto flash" (reboot required) - does the process for you OR click on "Download Zip" (you would need to boot into recovery and then install the zip"


Here's a video guide as well showing the above steps:


REVERTING BACK TO STOCK KERNEL/BOOT IMAGE:


Now if you want to restore back to the stock kernel or any other custom kernels, you can follow the necessary steps. This is also if you mess up. 

1) If your phone gets messed up for any reason, you can always restore your Nandroid back up. Provided of course you have made a Nandroid backup already. 

2) The other way is to flash the stock kernel/boot image. Link can be found here Nexus 4 Stock Boot/Kernel Image

i) Once you have that downloaded, boot your phone into fastboot mode

ii) Type in "fastboot flash boot boot.img"

iii) When its done, reboot by typing "fastboot reboot"

Here's a video guide showing the above:



There you have it folks. You have now successfully flashed/installed a custom kernel for your Nexus device.


No comments:

Post a Comment