[Android] Albe96:
What Is Kernel?

The kernel is a computer program that is the core of a computer's operating system, with complete control over everything in the system.[1] It is the first program loaded on start-up. It handles the rest of start-up as well as input/output requests from software, translating them into data-processing instructions for the central processing unit. It handles memory and peripherals like keyboards, monitors, printers, and speakers.

Is There A Connection Between Kernel And Android?

Haha,Sorry but yes.Kernel is the main component for Android.Basically Android devices use the Linux kernel, but it's not the exact same kernel other Linux-based operating systems use. There's a lot of Android specific code built in, and Google's Android kernel maintainers have their work cut out for them. OEMs have to contribute as well, because they need to develop hardware drivers for the parts they're using for the kernel version they're using. This is why it takes a while for independent Android developers and hackers to port new versions to older devices and get everything working. Drivers written to work with the Gingerbread kernel on a phone won't necessarily work with the Ice Cream Sandwich kernel. And that's important, because one of the kernel's main functions is to control the hardware. It's a whole lot of source code, with more options while building it than you can imagine, but in the end it's just the intermediary between the hardware and the software. So basically if any instruction is given to mobile it first gives the command to kernel for the particular task execution.​

Ah It's Work Time! Lets Get Started!​

Part – I​

Setting Up Your Build Environment​

Open The Terminal and Paste following Command!

Upgrade The Built-In Environments!

sudo apt-get update && sudo apt-get upgrade

Install Required Tools.

sudo apt-get install git ccache automake lzop bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 g++-multilib python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng

PART-I.II​

​

​

Get The Kernel Source!​

Now When It Comes About Kernel Source,Where You'll Find That?

No Worries,Search In Your Device Open Source Projects Websites To Get The Source OR You May Met With Github. Search In Github For Kernel Source For Your Device!

Here Are Some Sites,Where You Can Download Kernel Source Though:

For HTC: http://www.htcdev.com/

For Samsung: http://opensource.samsung.com/

For Sony: http://developer.sonymobile.com/wportal/devworld/search-downloads/opensource

For LG: http://opensource.lge.com/index

Note: If You've Download The Source Then Extract It In A Directory. Or If You Want To Clone/Download Source From Github Then Follow Next Steps!​

How To Download/Clone Kernel Source From Github?​

To Clone From Github,You Have To Install Repo Tool!

A. Open The Terminal and Paste Following Command!

sudo apt-get install phablet-tools

1. To Clone Go To Your Kernel Source Page.Like This -->>

[IMG="My Kernel Source"]http://i.imgur.com/DzuPYiD.jpg[/IMG]

2.Then Click On Clone Or Download Button,And Copy The Link!

B. Open A Terminal And Type This Command!

git clone <the link that you copied from github> android/kernel

For Me I Type The Following -->>

git clone https://github.com/Alberteno/android_kernel_samsung_on7xelte.git android/kernel

[IMG="Cloning Kernel Source"]http://i.imgur.com/ezi8OJI.jpg[/IMG]

Explaination:

1. <the link that you copied from github> -->> Replace With The Link You Copied From Github To Clone The Source!

2. android/kernel ->> This Is My Directory Where I Want To Clone It!

C. Done.You Cloned The Source!​