• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

What is Bootloader, custom ROM, Kernel, CWM, Firmware, Flashing, ADB, Root ?

Here I've gathered some info for newcomers to the Android world.

I've tried to keep it relatively simple. So if you want more info, follow the links!




What Is A Bootloader?
Taken from: Android 101: What is a bootloader? | Android-Does.com

In literal terms, the bootloader is code that is executed before any Operating System starts to run. Bootloaders basically package the instructions to boot operating system kernel and most of them also have their own debugging or modification environment. Think of the bootloader as a security checkpoint for all those partitions. Because if you’re able to swap out what’s on those partitions, you’re able to break things if you don’t know what you’re doing.

As the bootloader kicks off before any piece of software on your device, it makes it extremely processor specific and every motherboard has it’s own bootloader. This is one reason that all Android phones have different custom ROMS developed due to high variance of processing hardware present on the device.

Android Bootloader
Every Android phone has a bootloader that instructs the operating system kernel to boot normally. But you need to understand one thing here that as Android OS is an open source OS and is available on a variety of different hardware, every manufacturer has their own version of bootloader specific for the hardware present in it’s environment. At its most basic level, your Android smartphone is like a hard drive, made of up several partitions. One of those partitions holds the Android system files, another holds all the app data you accumulate (which is how you’re usually able to update without losing all your stuff), and others to do more behind-the scenes stuff.

A lot has been said about bootloaders being “locked” and even the developer-friendly Nexus devices shipped with a locked bootloader (Nexus devices and a couple tablets are easily unlocked with a single command).In fact, a lot bootloaders are locked and encrypted, meaning simple commands like “fastboot oem unlock”, won’t do a thing.

Why are Bootloaders Locked?
A bootloader is usually locked on an Android device because although it’s an open source OS, still the manufacturers want you to stick to their Android OS version specifically designed for the device. In order to apply this concept, manufacturers lock the bootloader. With a locked bootloader on Android devices, it is virtually impossible to flash a Custom ROM and forced attempts void warranty as well as usually end up in bricks. Therefore, the first step is to always unlock the bootloader.

Why keep a bootloader out of reach? One of the biggest reasons is that the carriers and manufacturers don’t want to have to support hacked phones. The other is that a lot of time and money is spent developing these things. HTC Sense ain’t cheap. Neither is TouchWiz. But Samsung and HTC both have managed to find a middle ground with the modding community, and pressure is on other companies to do so as well.

Also a very good read about bootloaders: http://www.tested.com/news/feature/1879-know-your-android-bootloaderwhat-it-is-and-why-it-matters/
---------------------------------------------------------------------------


What is a kernel?
Taken from: Android A to Z: What is a kernel? | Android Central

A kernel isn't something unique to Android -- iOS and MacOS have one, Windows has one, BlackBerry's QNX has one, in fact all high level operating systems have one. The one we're interested in is Linux, as it's the one Android uses. Let's try to break down what it is and what it does.

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.

When software needs the hardware to do anything, it sends a request to the kernel. And when we say anything, we mean anything. From the brightness of the screen, to the volume level, to initiating a call through the radio, even what's drawn on the display is ultimately controlled by the kernel. For example -- when you tap the search button on your phone, you tell the software to open the search application. What happens is that you touched a certain point on the digitizer, which tells the software that you've touched the screen at those coordinates. The software knows that when that particular spot is touched, the search dialog is supposed to open. The kernel is what tells the digitizer to look (or listen, events are "listened" for) for touches, helps figure out where you touched, and tells the system you touched it. In turn, when the system receives a touch event at a specific point from the kernel (through the driver) it knows what to draw on your screen. Both the hardware and the software communicate both ways with the kernel, and that's how your phone knows when to do something. Input from one side is sent as output to the other, whether it's you playing Angry Birds, or connecting to your car's Bluetooth.

It sounds complicated, and it is. But it's also pretty standard computer logic -- there's an action of some sort generated for every event. Without the kernel to accept and send information, developers would have to write code for every single event for every single piece of hardware in your device. With the kernel, all they have to do is communicate with it through the Android system API's, and hardware developers only have to make the device hardware communicate with the kernel. The good thing is that you don't need to know exactly how or why the kernel does what it does, just understanding that it's the go-between from software to hardware gives you a pretty good grasp of what's happening under the glass. Sort of gives a whole new outlook towards those fellows who stay up all night to work on kernels for your phone, doesn't it?
---------------------------------------------------------------------------

What is CWM?
Taken from: AddictiveTips
 
can't thank you enough for this!

I don't quite understand the relationship between the OS and kernel... I'll elaborate:

Say you get CM10, which runs off the linux kernel. If you swap out the linux kernel for say... GLaDOS.... how do you know that CM will be able to talk to GLaDOS?

Is there a standard set of APIs that all kernels implement which are used by the OS?

Edit: Found the answer to my question:
The kernel is compatible with ROMs that are of the same Android version.
e.g. kernel built for android 2.X will not be compatible with 4.x, however
kernel built for android 4.0.1 should be compatible with 4.1.1

Source: Link
 
Upvote 0
can you explain whats the difference between rom (flashed via cwm or any other recovery) and firmware (flashed via sp flash tool)? i previously downloaded stock firmware for my mobile (micromax a45) which contains files - android-info.txt, boot.img, DSP_BL, login.bin, mt6573_android_scatter.txt, preloader_tinnoes73_s8030_2g.bin, recovery.img, secro.img, system.img uboot_tinnoes73_s8030_2g.bin, userdata.img and what are the uses of these files? if i flash this firmware would it erase my imei no or any other thing i should know before flashing it? and how can i extract these img files?:thinking:

sorry!!!! asking you for many questions

waiting for your reply...........
 
Upvote 0
can you explain whats the difference between rom (flashed via cwm or any other recovery) and firmware (flashed via sp flash tool)? i previously downloaded stock firmware for my mobile (micromax a45) which contains files - android-info.txt, boot.img, DSP_BL, login.bin, mt6573_android_scatter.txt, preloader_tinnoes73_s8030_2g.bin, recovery.img, secro.img, system.img uboot_tinnoes73_s8030_2g.bin, userdata.img and what are the uses of these files? if i flash this firmware would it erase my imei no or any other thing i should know before flashing it? and how can i extract these img files?:thinking::thinking:

sorry!!!! asking you for many questions

waiting for your reply...........
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones