Rooting Android: All You Need To Know From Scratch.

Mosam Shambharkar
15 min readAug 13, 2021

--

Stock Android Smartphone (unsplash.com)

Table of contents

1. Introduction to Rooting Android

2. Rooting Dictionary

3. Benefits and Disadvantages of Rooting

4. Applications and Risk of Rooting

5. Recovery and Download mode in Android

6. Conclusion: Should you root or not?

Introduction to Rooting Android

Rooting is a process that allows you to attain root access to the Android operating system code (the equivalent term for Apple devices id jailbreaking). It gives you privileges to modify the software code on the device or install other software that the manufacturer wouldn’t normally allow you to.

Android Rooting is the art of technique with the help one can get easily unrestricted access to the System files. Access means change, delete or modify according to the needs. Equivalent to the JAIL Breaking executes in IOS. It gives the power to modify the software code on the device or install other software that the manufacturer wouldn’t normally allow to and for good mobile security reasons. Rooting can give tremendous gains over a regular Android Phone or Tablet but gaining access to the sensitive files can create any kind of problems for the user as well as Android Phone.

App requesting Root Permissions

What exactly is root?

Source: Android Central

When you root your Android, you’re simply adding a standard Linux function that was removed.

Root, at least the way we’re talking about it here, is the superuser. Your Android phone uses Linux permissions and file-system ownership. You are a user when you sign in, and you are allowed to do certain things based on your user permissions. Apps you install are also given a type of user ID, and they all have permissions to do certain things — you see those when you install them on older versions of Android, or you are prompted to allow them on Marshmallow or higher — in certain folders with certain files. Root is also a user. The difference is the root user (superuser) has permission to do anything to any file anywhere in the system. This includes things we want to do, like uninstall application forced on us, or things we don’t want to do that can put your Android in an unusable state. When you’re doing things with superuser permissions, you have the power to do anything.

When you root your Android, you’re simply adding a standard Linux function that was removed. A small file called su is placed in the system and given permissions so that another user can run it. It stands for Switch User, and if you run the file without any other parameters it switches your credentials and permissions from a normal user to that of the superuser. You are then in complete control and can add anything, remove anything and access functions on your phone or tablet that you couldn’t reach before. This is pretty important, and something you should think about before you begin.

Rooting Dictionary

1. Bootloader: The bootloader is the piece of software on your phone that boots up the system recovery and the operating system. When you boot up the phone, this is the first piece of software that runs.

2. Root: The term “root” is a relic of the Linux world (Android runs on Linux). Gaining root access means gaining administrator or superuser access to the entire device, at its most basic level.

3. Recovery: The first thing the bootloader rings up is the recovery. A custom recovery like TWRP will let you back up the entire device, flash tweaks, and install a new custom operating system.

4. Custom ROM: A custom ROM is a replacement operating system. It’s compatible on the most fundamental level, but customized or changed in some other aspect. A custom ROM can have special apps, extra features, or tweaks to the code that make your phone faster and more secure.

5. SuperUser: When you root your phone, it installs a “su” binary. You can use apps like SuperSU to manage superuser access. Grant it to apps so they can interact with the root level of the operating system.

6. ADB: Android Debug Bridge lets you communicate to your Android device from your PC using the command line. For some devices, this is the only way to gain root access.

7. Kernel: A kernel is what sits between the phone’s hardware and software, making it easy for the software to communicate, interact, and tinker with the hardware. If you’re the ambitious kind, you can switch out the kernel for something custom. This can give you a performance increase and access to more features.

8. Xposed Framework: Xposed is a modding tool. The modules available for Xposed let you tweak system and app behavior. You can get features from custom ROMs without actually switching to one.

9. Brick: When your phone just won’t boot up, it’s officially bricked. Don’t worry — you can usually get it up and running again by restoring a Nandroid backup.

10. Nandroid: Once you’re rooted, you’ll be able to perform Nandroid backups using the custom recovery. This backs up your entire phone, including apps and data that you can restore after you’ve installed a different custom ROM. So even if you update a ROM, you won’t lose out on any data.

Benefits of Android Rooting

  1. Extend Battery Life of the phone and some other features like we can delete all the System apps like play store, YouTube, and many more.
  2. RAM can be increased with the help of rooting and also we can add custom ROM to over device that totally changes the OS of the device.
  3. After Rooting your device is like a gadget many kinds of application which is restricted on your device can easily run after Rooting.
  4. Blocking ads in any app and also we can alter the freeze data of particular applications like coins and gems.
  5. Alter and modify the third party app configuration with the help of root for e.g., give permission to show the application to show the Wi-Fi password.

Disadvantages of Rooting Android

  • If Rooting can go wrong it will convert your phone into a dummy phone.
  • Gaining root access of the device the warranty of the phone void the warranty
  • Heat issue and slow processing can be shown on your phone

Security Issue:

  • After Rooting the device your device is like an open door for the harmful malware and viruses. This can corrupt your entire mobile phone and your data.
  • Hackers can easily access your entire sensitive information and can make the credentials public
  • If we do root we need a strong VPN or Antivirus to protect our System.
  • Today’s smartphones operate in such environment filled with so many malicious threats and payloads, as well as occasional accidental missteps by trusted users, anything that reduces the internal controls in the Android operating system represents a higher risk
  • Rooting alters some of the predefined features of the operating system, and these features are very important for the smooth working of the Phone.
  • Rooting isn’t the answer to every solution. If you’re not sure how to root properly you can destroy by doing them as root, we have to should learn more about it before going to start. It’s OK to not know things and to try and learn, but not knowing and doing them anyway can turn a very serious issue.

Applications of Rooting

Some Custom ROMs installed by rooting

Gaining root access on Android is akin to running Windows as an administrator. Rooting an Android Phone gives us access beyond normal usage of the smartphone. Rooting is used mostly for customizing your phone, such as themes, fonts, status bar items, widgets, animations, etc. You have full access to the system directory and can make changes to the way the OS operates. As part of rooting, you install a management client like Magisk or SuperSU used to be the top option but has fallen into disrepair. These tools are basically the gatekeeper of root access on your phone. When an app requests root, you have to approve it using the root manager.

In the case of Magisk, you can also use the client to make other changes to the phone via numerous community-developed modules. Let’s say you don’t like the system theme on your phone. With root, you can change that. You can also manually back up app data so you never lose it again. Want to change the way your device’s CPU characteristics? That’s also possible with root.

Root Management client (Magisk Manager)

If you’ve ever looked at your phone and thought, “I wish I could do [some very specific thing],” rooting might make it happen. Modern tools like Magisk are also “systemless” root managers. That means the changes are stored in the boot partition rather than modifying the system. That makes it easier to go back to an unrooted system (or make apps think you’re unrooted) than it used to be.

The Risks of Rooting

Rooting your phone or tablet gives you complete control over the system, but honestly, the advantages are much less than they used to be. Google has expanded the feature set of Android over the years to encompass many of the things we used to need root to do. With that in mind, there are risks to rooting, and you should only do it if you know what you’re getting into. Android is designed in such a way that it’s hard to break things with a limited user profile. A superuser, however, can really trash the system by installing the wrong app or making changes to system files. The security model of Android is also compromised when you have root. Some malware specifically looks for root access, which allows it to really run amok.

For this reason, most Android phones are not designed to be rooted. There’s even an API called SafetyNet that apps can call on to make sure a device has not been tampered with or compromised by hackers. Banking apps, Google Pay, and others that handle sensitive data will do this check and refuse to run on rooted devices. Magisk supports hiding root, but that won’t always work. It’s a constant game of cat and mouse with Google. If losing access to high-security apps is a big deal, you might not want to mess around with rooting.

Testing SafteyNet Status (App- RootChecker)

Root methods are sometimes messy and dangerous in their own right. You might brick your device simply trying to root it, and you’ve probably (technically) voided your warranty doing so. Rooting also makes it harder (or impossible) to install official updates, and ROMs like Lineage can be difficult to install and buggy once you do. If having root access is really important to you, you might be left waiting on flawed software while you beg for a new root method or a modded OS update.

Warranties and legalities — is rooting legal?

This leads us nicely onto warranties, which is another grey area in the world of rooting. While carriers don’t much like you tampering with their hardware and software, some manufacturers have become kinder to rooters and even those who install third party software. However, few have a clear stance on what software tweaks will void your warranty and you certainly can’t count on having your rooted handset fixed if something goes wrong. Devices with locked bootloaders, the very low-level software that starts up your phone, are designed specifically to prevent rooting, so don’t expect any sympathy from these manufacturers. In the US rooting is perfectly legal.

Manufacturers and sellers can often identify root, even after you unroot, thanks to clues like Knox on Samsung. Note that there are ways to hide evidence of having rooted your device, but these won’t always work. There’s a kind of arms race going on between hackers and manufacturers and your chances of unrooting and covering your tracks will often come down to who is winning at the time! This is why a lot of people only root older phones that are already out of warranty.

This might also lead you to wonder whether rooting your device is even legal? This is tough to answer as it depends on your own country’s laws. Many countries allow for the bypassing of digital rights management and locks, providing that this is not used for other illegal purposes, such as circumventing copyrights. In Europe, the Copyright Directive includes exceptions which work as above, as do India’s copyright laws. At one point, things were less clear in the US, though recently the situation has been clarified: rooting is perfectly legal.

Recovery and Download Mode in Android:

You can’t call yourself an Android pro without knowing about Recovery or Download Mode. These menus are critical to do more advanced tasks on your phone, include sideloading software updates and un-bricking a device.

Usually, you enter these modes using a combination of hardware buttons held down when shut off or rebooting. However, because of the lack of a Bixby button, it’s not as obvious on the Note 10+.

Booting into Recovery Mode

Recovery Mode is a menu that every Android phone has access to. Using either a button combination or ADB, you can access this mode to help fix problems. For your Galaxy Note 10, this includes factory resetting the phone, running a graphical test, clearing the cache partition, and much more.

To boot into Recovery Mode, you need to shut down the phone completely.

Method 1 (Without ADB)

Once shut down, hold the volume up button and the power button at the same time. Continue to hold down these buttons even after it vibrates and “Samsung Galaxy Note 10+” appears on the screen. It will then boot into the Recovery Mode. At this point, let go of the two hardware buttons.

Image by Jon Knight/Gadget Hacks

Method 2 (With ADB Commands)

The tried and true method of entering recovery mode for the Samsung Galaxy Note 10+ (or any other Android phone) is by using ADB commands. To run ADB commands, you’ll need a computer and USB cable.

If you have never used ADB commands, you need to establish an ADB connection between your phone and computer. To accomplish this, check out

ADB and Fastboot are probably the most essential tools for any Android aficionado. They can do everything from backing up your device to unlocking your bootloader with a few simple steps. This paves the way for many new tweaks and customizations that weren’t possible before. The required platform works with the three most popular computer operating systems, too, which is good news for everyone.

Step 1 Download the Platform-Tools Package

There was a time when installing ADB and Fastboot on your computer required a bit of effort. It involved universal ADB drivers, installing the Android SDK, and often a little troubleshooting. Thankfully, Google has simplified things by releasing their SDK Platform Tools package.

This standalone package gives you everything you need in an instant — no messy drivers to work with, and no fancy programs to install either. The process is quick, straightforward, and it comes directly from Google, as well. Click one of the links below to download the tool, then extract the ZIP and place the extracted folder on your desktop.

Step 2 Enable USB Debugging on Your Phone

First, make sure you have “USB debugging” enabled on your Android device. This setting can be found in the Developer options menu, which can be activated by tapping the build number several times (located at Phone’s Settings/About Phone/Build Number). From there, simply connect your phone or tablet to your computer with a USB cable, then you should see the following prompt on your Android device. Tick the box next to “Always allow,” then press “OK” on this prompt.

Step 3 Open a Command Window in Platform-Tools

Now it’s time to move onto the fun stuff! The platform-tools folder is where you’ll be executing all ADB and Fastboot commands for your rooting and modding needs.

In short, you’ll need to open a command window on your computer then change directories to the platform-tools folder. You’ll do that using the “cd /Users/Desktop/platform-tools” format. If you need more help with that, check out the link below to get that taken care of real quick.

Step 4 Verify Your Phone Connection

To make sure your computer and phone can talk to one another properly, you’ll need to type the following command from the terminal and then hit the enter key:

adb devices

Note: Mac and Linux users likely have to add a period and a slash before entering specific ADB or Fastboot commands (e.g., ./adb devices). Windows PowerShell users sometimes have to do the same, but it depends on the type of command being used.

Running the above command should reveal a grouping of numbers and letters. This is the unique identifier for your ADB device that has been recognized by the system. All finished! Now your Android device is set up to use both ADB and Fastboot commands whenever you need them.

The first command shows the connected device is being recognized by the ADB interface. The second command shows the same connected device being identified in Fastboot Mode as well.

And finally Enter the following command into the Command Prompt or Terminal window. Be aware that if you are using macOS or Linux, you will need to put a “./” at the start the command.

adb reboot recovery

Once you input this command and press “Enter,” the phone will reboot into Recovery Mode.

Booting into Download Mode

Download Mode is a special mode on Samsung devices which allows you to update with official software and install packages manually using a tool like Odin. For example, when the Android 9 Pie beta leaked in 2018 for the Galaxy S9, it was through this mode that you were able to install it.

To boot into download mode, there are two ways to accomplish this.

Method 1 (Without ADB)

Enter Recovery Mode using either method described earlier. Once there, use the volume rocker to navigate to “Reboot to bootloader” and press the power button. The phone will reboot, but this time, enter Download Mode.

Image by Jon Knight/Gadget Hacks

Method 2 (With ADB)

With an ADB connection set up (see above), enter the following commands in the command prompt on your computer:

adb reboot bootloader

If you are using macOS or Linux, place “./” at the start of the command. The phone will restart, and this time reboot into Download Mode.

Conclusion: Should I Root my phone or Not?

If you’ve been using Android for a while, you’ve probably noticed gaining root access on most devices is much harder than it once was. There were exploits years back that could root almost any Android device in a few minutes, but that’s much less common now. The last essentially universal exploit was Towelroot in mid-2014, but Google patched that rather quickly. Google patches these flaws often before we even know they exist because having active exploits in the system is a very bad thing for most users. These are security holes that can be utilized by malware to take over a device and steal data. There are monthly security updates to patch these holes, but on a rooted phone, you are responsible for security. If you’re going to root, you have to accept that your device will require more frequent attention, and you need to be careful what you install. The security safety net offered by Google and the device maker won’t be there to save you.

If you’re not familiar with Android’s tools and how to fix issues with a command line, you probably shouldn’t dive into rooting your phone. Root can be a lot of fun to play around with, but it can also lead to plenty of frustration as you try to fix errors caused by overzealous modding. If you bought your phone with the intention of tinkering, by all means, go nuts.

Basic prerequisites that you should know before rooting your phone:

1)Root
2)Download mode & Recovery mode
3)The model of your phone
4)Basic concepts like Bootloader Locking and Unlocking
5)Installing .zip files using Custom Recovery

When something does go wrong (and it will at some point), it’s all on you to fix it. You might be left scouring old forum posts and begging for help in chatrooms to fix your phone. You have to be willing to tackle some vexing issues if you’re going to live the rooted lifestyle. You also have to look at what you’re getting; Android in its unmodified state is much better than it used to be. A decade ago, people rooted phones to get features like imposing low-power sleep for apps, managing permissions, and taking screenshots. Unmodified Android can do all of that now. Most people just don’t have a good reason to root phones anymore.

In short if you are confused whether you should root or not, keep the below point in mind and take the decision:

If you are a normal phone user like listening to music, using WhatsApp/ Facebook, social networking, shopping etc. then there is absolutely no need for you to root your phone.

If you have an interest in Android rooting and are fed up with your phone’s interface, lag, bloatware, or want to experience what the latest version of Android has to offer,or just want a add a ton of new features that weren’t originally available in your phone(mostly software based, because rooting can’t add a new camera or extra hardware, obviously), and ready to take risk if anything goes wrong with your phone, then you may want to root your phone and install a custom ROM.

--

--

Mosam Shambharkar
0 Followers

Programmer | Android Developer | Reverse Engineer (Android Apps) | Python Developer