You might have heard about rooting your android previously, but rooting it without complete knowledge about it may be harmful. So, here I am going to provide you information from basics to top level with a view to know what really happens in background when you root your phone.
What is rooting?
Generally when you search google for this, you find answer in one or two lines which says that rooting means gaining root access of your phone. But what does this root access really means! You might be knowing the answer if you are familiar with Linux. But still, let me explain about it.
The thing that one should know is, "Android is based on Linux". Now, let us elaborate the statement for understanding.
Android may be based on Linux, but it’s not based on the type of
Linux system you may have used on your PC. You can’t run Android apps on
typical Linux distributions and you can’t run the Linux programs you’re
familiar with on Android. You would be wondering why!
The answer is, Linux makes up the core part of Android, but Google hasn’t added all
the typical software and libraries you’d find on a Linux distribution
like Ubuntu i.e. the System Call Interface and the API designed for android is different than that of Linux. This makes all the difference.
The core part of any operating system is its kernel. It holds control over the system and its hardware. Android uses the Linux kernel under the hood. Because Linux is open-source,
Google’s Android developers could modify the Linux kernel to fit their
needs. Linux gives the Android developers a pre-built, already
maintained operating system kernel to start with so they don’t have to
write their own kernel. You can even see the Linux kernel version running on your device under About phone or About tablet in Android’s Settings.
As I said that Android runs over Linux kernel, but it too has a security over its kernel. So that any user cannot modify a system file that causes harm to the computer. But still there might be needs to modify system files and hence the concept of superuser(root user) was used.
A user who has the total control over the system is called the root user in Linux. And as Android uses Linux kernel, we can also use the same concept in android to gain access to the system files. Hence, rooting refers to gaining root access in our android device. Gaining root access means to become a superuser(root user) of the system.
Glossary of Rooting Terms:
As you will start learning more about rooting process, you'll probably run into a bunch of terms and that might confuse you. Here are some of the most
important ones and what they mean. If you think there are more terms we should discuss on, write to me in the comment box given at the end of this article.
- Root: Rooting means you have root access to your device—that is, it can run the
sudo
command, and has enhanced privileges allowing it to run apps like Wireless Tether or SetCPU. You can root either by installing the Superuser application or by flashing a custom ROM that includes root access. - ROM/Firmware: A ROM is a modified version of Android. It may contain extra features, a different look, speed enhancements, or even a version of Android that hasn’t been released for your phone yet. We won’t discuss ROMs in depth here, but I will write a separate guide on it.
- Stock/Stock Frimware: “Stock” refers to a few different things, depending on the context. When we refer to “Stock Android,” we mean the Google-built version you’d find on Nexus devices, with no extra UI chances like HTC Sense or Samsung TouchWiz. Many ROMs are based on stock Android with some additions, like CyanogenMod, while others are based on the version that came with your phone. In other cases, “Stock” can also mean the version of Android that came with your phone—e.g., if you want to get rid of your ROM and return your phone to factory settings, you might say you’re “going back to stock.”
- Kernel: A kernel is the component of your operating system that manages communications between your software and hardware. There are a lot of custom kernels out there for most phones, many of which can speed up your phone and increase your battery life, among other things. Be careful with kernels, though, as a bad one can cause serious problems with your phone and possibly even brick it.
- Radio: Radios are part of your phone’s firmware. Your radio controls your cellular data, GPS, Wi-Fi, and other things like that. You can sometimes find custom radios for your phone that you can flash yourself, but beware as sometimes these can cause problems.
- Flash: Flashing essentially means installing something on your device, whether it be a ROM, a kernel, or a recovery that comes in the form of a ZIP file. Sometimes the rooting process requires flashing a ZIP file, sometimes it doesn’t.
- Brick: To brick your phone is to break it during flashing or other acts. There is always a small risk with flashing, and if your phone becomes unable to function—that is, it basically becomes a brick—you’ve bricked your phone
- Bootloader: Your bootloader is the lowest level of software on your phone, running all the code that’s necessary to start your operating system. Most bootloaders come locked, meaning you can’t flash custom recoveries or ROMs. Unlocking your bootloader doesn’t root your phone directly, but it does allow you to root and/or flash custom ROMs if you so desire.
- Recovery: Your recovery is the software on your phone that lets you make backups, flash ROMs, and perform other system-level tasks. The default recovery on your phone can’t do much, but you can flash a custom recovery—like ClockworkMod or TWRP—after you’ve unlocked your bootloader that will give you much more control over your device. This is often an integral part of the rooting process.
- Nandroid: From most third-party recovery modules, you can make backups of your phone called nandroid backups. It’s essentially a system image of your phone: Everything exactly how it is right now. That way, if you flash something that breaks your phone, you can just flash back to your most recent nandroid backup to return everything to normal. This is different from using an app like Titanium Backup that just backs up apps and/or settings—nandroid backups backup the entire system as one image. Titanium backups are best when switching between ROMs or phones.
- ADB: ADB stands for Android Debug Bridge, and it’s a command line tool for your computer that can communicate with an Android device you’ve connected to it. It’s part of the Android Software Developers Kit (SDK). Many of the root tools you’ll find use ADB, whether you’re typing the commands yourself or not.
We will discuss more about all these when I will write tutorials on rooting, unlocking bootloader, flashing custom ROMs and more.. Till then, stay in touch.