So I've Been Rooting Phones...


What Is “Root”?

Normal Operating Systems

Phones and tablets are possibly the most locked down computing devices I can think of. The fact that “rooting” a phone is even a term is ridiculous to me. Before I continue, I should detail what “rooting a device” even means. For those who use linux, the concept of users and the “root” user is second nature, but people who don’t use linux may not quite understand what this means.

On all operating systems (Windows, macOS, iOS, Android, Linux, BSD) you have a user profile that you log into and use. This is a given to most people, you turn on a computer and log into it! But what most people don’t realize is that your user is limited to what it can do on your computer. This plays out differently on each operating system, with notable examples being below:

  1. On Windows, let’s say you download an application to install. When you go to install the program, it will ask you if you’re sure with a yes / no prompt. This is the prompt asking if you, the regular user, should be allowed “Administrative user rights” to install the application to your computer.
    1. The regular user is not allowed to install programs, but the admin user is allowed to give and remove those permissions at will.
  2. On macOS, you’ll typically need to “unlock the padlock” in the various Settings menus to actually modify and save the settings.
    1. This is beause the regular user does not have permissions to change all settings (they can change some though). The admin user is allowed to change all settings.
  3. On linux, this plays out constantly with day to day situations. But to be easy we’ll just say that someone wants to edit the file /etc/hosts on linux. You can’t do so unless you use sudo which means super user do
    1. Super user is interchangable with root

In all of these examples across various Operating Systems we covered how there is always a regular user and a user above that called either

  1. admin
  2. root
  3. super user

What About Phones?

You may have noticed that I explicitly said that phones do have super users, but I did not include them in my list of 3 examples. That’s because typically on your phone, you don’t have access to the root user. In day to day operations, this is normally not a hassle. In fact, the operating system is designed in a way where the regular user doesn’t need root. From a security standpoint, not being able to access root at all is actually a completely viable practice. In fact there’s entire linux distributions built around this called immutable operating systems, but that’s for another day.

OK, Thanks For The Lesson, But Why Do You Care?

Not having root means that you can not do whatever you want with the device you bought. Google, and your phone manufacturer, are setting the rules for your device after selling it to you. I used to never care about this, but over time I’ve realized how insane this is. You’re telling me that I’m supposed to pay up to $1000 for something that I can’t even install an ad blocker on? Because…. reasons?

In case you couldn’t tell, the reason why I care so much about being able to have root access to my device is simple: It’s the principle. I refuse to let someone tell me what I’m allowed to do with my computing devices. It’s why I use linux, it’s why I install Android Alternatives, and now it’s why I root my phones!

Isn’t Rooting Super Hard?

Well, it depends on a couple factors, but not really. The real difficulty is honestly caused by two problems:

  1. Device Fragmentation: There’s A LOT of android devices, and depending on the make & model you own, it will involve more steps than other devices. Some devices just flat out CANT be rooted, as it hinges on at the very least being able to unlock the bootloader.
  2. Terrible Instructions: The instructions you’ll find when typically searching for “Your Phone Model Install Lineage” are awful. You’ll find links to random xda developers forum thread where someone links to random files hosted on their personal Google Drive. Some terms and commands have changed over the 10+ years of rooting devices, and the people writing these random forum threads don’t update them after the fact.

I would say #2 in that list is the top reason why I waited until this long in my life to root my phone. I was under the impression that rooting my phone would be an hours long process involving multiple commands and reboots. I was extremely surprised when the two devices I rooted were done within 5 minutes of each other, with maybe 3 commands typed into a terminal.

So How Do You Do It?

I can’t give you detailed instructions on how to do this. It’s just not possible since each phone has different sets of instructions. However, the general premise is as follows:

  1. Unlock developer options on your phone
    1. Allow OEM unlocking
    2. Allow USB Debugging
  2. Get your phones boot.img or recovery.img
    1. You can get this either via flashing twrp to your phone or by just finding it online.
    2. For example, google has a collection of images for their pixel phones available here.
      1. https://developers.google.com/android/images
  3. Install magisk on your phone that you plan on rooting
  4. Send the boot.img or recovery.img to your phone
  5. Patch the *.img file with magisk
  6. Send the .img file back to your computer
  7. From your computer use the command line to flash the patched .img file to your phone
  8. You can use root

That’s really it. If you have experience installing multiple linux distrivutions, you should have no issues doing this. One of the biggest problems is just sourcing the boot.img file. It really comes down to how popular your device is. Pixel devices and samsung devices are very well documented, once you stray off those paths it gets more dicey.

The Suspense Is Killing Me - What Did You Root & What Are You Doing With It?

The Devices

This is where things are pretty interesting. The two devices that I decided to root are:

  1. Samsung Tab A (2016)
    1. SM-T350 is the specific model number
    2. Running Stock Android 6
  2. Pixel 3xl
    1. Running /e/ OS Android 12
  3. Pixel 6 Pro
    1. While not rooted (yet) this does get an honorable mention for being my daily driver.
    2. Running Graphene OS Android 14

What Are You Doing With These Devices?

Honestly? Nothing that interesting yet. I attempted to run docker containers via termux on my phone but ran into issues there with cgroups. I believe you can run docker containers inside LXC containers inside of termux on android, but that sounds painful as hell.

In terms of actually useful things you can do with root on a device, I did the following on both already

  1. Removed stock apps that I didn’t want
    1. You can’t remove “system” apps unless you are root on android
    2. On some phones, this means even Facbeook can’t be removed unless you root your phone
      1. This should be a crime.
  2. Installed system level ad blockers
    1. This is somewhat redundant for me considering I already solved the issue of blocking ads at the dns level for all devices in my networks.

Any Future Plans?

My only solid plan I can think of is just seeing how much of a linux desktop (or server) I can make an android device. Convergence could be close to achieve with this setup even though the real best solution would just be a linux phone. I think I bricked my Pinephone today… so I’m not going to get into that. Maybe another day.