What is Rooting?

Rooting was a big deal around seven to eight years back. Majority of the android guides used to give just one advice for every problem you looked up online — getting your device rooted. And there was a craze among users to crack and patch things a lot.

Times have changed since then. You probably haven’t even heard of “rooting” if you started using android phones around the year 2016 or so. So, why not start with the definition first ;)

“Rooting is the process of gaining privileged access to your phone’s system”

What does it mean?

Android actually houses a modified Linux Kernel. So, like most other UNIX-like systems, you should be able to access and modify any system component as per your wish.

However, to keep you from bricking your phone and compromising the security, hardware manufacturers impose restrictions on your level of system access and the apps you run. Which is all good if you are not tech-savvy and use your phone as a daily-driver. The power users though do not like restrictions. This is where rooting comes in.

Upsides of Rooting

  1. You can clean your device of all the resource-hogging bloatware. And customize it the way you want.
  2. You can increase device’s performance by doing things like over-clocking your CPU, since rooting gives you control over your hardware.
  3. You get the ability to test out the latest bleeding-edge technology as soon as it comes out.
  4. You can lead a more private, ad-free, and secure life.

Downsides of Rooting

  1. You leave your phone even more vulnerable than before if you don’t know what you are doing.
  2. You always risk bricking your device in the process of rooting and flashing ROMs.
  3. Your warranty is void as soon as you root your device.

The actual process

The rooting process is fairly same for every android device. Flash a custom recovery, then a root binary, and then any other device specific mods necessary. If everything goes well, you will have root access on your phone within 15 minutes.

What is a custom recovery?

If you don’t know, a recovery environment is a minimal standalone system that helps you reset your phone to factory defaults, flash official OTA updates and perform other basic diagnostic tasks.

A custom recovery replaces the stock recovery shipped with your phone, and unlocks the ability to install custom ROMs, full system backups and much more.

TWRP is one of the most popular open-source recovery projects.

What kind of mods do you need?

Manufacturers put several security measures in place to prevent unauthorized system modifications, remember? DM-Verity scanning, FRP locks, DEFEX security, and reverse binary protections, all come under it. If not taken care of, they cause boot loops, and data corruption. That is why you need specific mods to bypass these barriers.

For example, to root a J7 all you would need is the Odin (Samsung specific) executable, the OrangeFox recovery image (project based on TWRP), a mod to disable DM-Verity and encryption, and the Magisk binary.

Lessons from My Experience with Rooting

I have rooted four devices till now. Two of them in the year 2014, one in 2018 and the most recent one is J7 in 2021. I was barely 10 years old the first time, and I have learnt a lot in the process.

Do not use one-click root solutions

A fundamental mistake a beginner makes is to use some kind of a one-click solution. That should be avoided at all costs since you don’t know what files that software replaces or modifies. It is like giving an open invitation to a hacker. In my case, one such app filled my device with hundreds of trojans and adware. And the situation only worsened each time I uninstalled one or connected the device to the internet. In such cases you are left with no choice but to flush your device down the gutter.

Maintain a copy of the stock firmware

This should be your very first move before making any changes to your device. Having the stock firmware at hand will help you resuscitate your phone from all sorts of problems. Just make sure you find and download the exact firmware that is installed on your device before making any changes. Some manufacturers prevent flashing of older ROMs if a new one is already installed.

Do not mess up the partition table on your device

This generally happens when you try to install a GSI based Treble ROM on a non-treble device. This modifies your device’s default partition table and creates a new partition to support those ROMs. However, you then also lose the ability to install back your stock firmware or any other non-treble ROM for that matter.

To return to the default state, you will need a special PIT file (at least for Samsung devices) to restore the partition structure. So, keep this file handy too.

Only use trusted resources

This is the most obvious advice. And yet the most neglected one. Do not flash files, mods and ROMs form random websites. Cracked apps and mods more often than not contain malicious code that, with root privileges, can give the hacker access to your entire life. Remember,

With great power, comes great responsibility.