Android and Rooting
One of the features often praised about Android is its flexibility and customizability as a platform. And, to that end, some users have been deciding to “root” their phones. In some cases a root is required to run a certain application, sometimes a user just wants more control over how their phone operates, and sometimes you just need to install the latest version of Android without waiting on your carrier. In this post, I will discuss the what, why, and how of rooting your Android device.
Just what is rooting anyways?
The Android operating system itself is based on Linux with many added features and protections layered on top. Usually, a user is only allowed to interact with the system in certain ways: for instance, one normally can’t view all of the file system or make changes to the OS itself. However, since Android is based on the Linux kernel, there is a way to access many of these hidden aspects of a device. Similarly to Linux, if a user can acquire superuser privileges, then they can access any part of the system that is normally hidden; this acquisition of superuser privileges is what is commonly referred to by the term rooting.
Why would I want a rooted device?
For many casual users, rooting a device may not be necessary. Most applications do not need anything so strong as root access, and the Android version that comes installed on devices is stable. However, getting root access can open the door for some slightly more tech-savvy changes. There are a lot of nifty custom versions of Android out there, and gaining root access is the only way to install many of them on a device. Additionally, much of the ‘bloatware’ that comes installed on devices from the cellular carriers can only be removed with root access. And, if a user wants to remove the phone manufacturers’ custom UI features – think TouchWiz for Samsung or Sense for HTC – then they can do so and install the basic Android released by Google.
Even many developers do not need to root a device; after all, making an application that runs inside the regular user framework allows one to take advantage of the safety features inherent in most modern operating systems. However, there are some handy features that become accessible to a developer once root permissions are gained. First off, gaining root access allows the user to have unlimited access to the file system. And, while it is very easy to brick a device playing around with the memory willy-nilly, this could be a boon to anyone who is looking into memory allocation or management techniques. Furthermore, with root access a user can manage the permissions of applications installed on their phones. And while this is a way to cause many applications to fail, it can certainly be empowering for the user if they are wondering why that flashlight app needs to have internet permissions.
And finally, it is absolutely necessary to obtain root access if one is thinking of developing any sort of custom features or versions of android. Doing so can be complicated and dangerous for the device, but also very rewarding. There are many communities that are dedicated to producing and distributing quality custom version of android: CyanogenMod, MIUI, and LiquidSmooth are just some of many options out there. Working on projects like these can be a great way to hone skills or make a segue into the world of mobile development.
So how do I root my device?
This is where a problem may arise. The easiest way to get root access is to use one of the pre-existing applications that are already out there. There are a lot of them, and they often offer the user a nice GUI or means of interacting with the device and performing common procedures that require root access. However, this can also be a dangerous thing to attempt. By the very nature of what is going on, the software is going to gain access to complete control of the device, which could put personal information at risk. As a matter of fact, currently there is a known bug where rooted devices running Google Wallet have a security flaw that allows financial information to be gleaned by outside sources. In addition to malicious attacks, though, one should always use trusted programs or developers for such things because no one wants to unintentionally ruin their device.
However, if a developer wants to get root access on their own and not use another program it becomes more complicated. The quick and dirty way is to make a program that uses the Java Runtime class to start a process as the superuser. Furthermore, while this command itself requires only a few lines of code, it does present some additional challenges. First of all, in order to interact with the OS as a superuser the developer needs to give commands to execute in the style of a commandline. And after the commands are presented in the commandline format, the program still needs to be able to interpret return values from the commands and any potential exceptions that might get thrown. Add to that the possibility of causing some serious damage to the development device, and it is a daunting challenge indeed.
Rooting an Android device can have many perks. Customizability and accessibility are offered at a premium to anyone with the savvy to use them, and the custom OS versions can give any user the device of their dreams. It can also offer a developer the chance to experiment and learn a new side to mobile development. With the addition of the pitfalls it becomes a bit of a mixed blessing as well, but the potential in rooting a device is immense. While I cannot unconditionally recommend one way or the other, I would certainly say that it represents a very intriguing opportunity to anyone who is interested in building mobile technologies or being introduced to the bleeding edge of common tech.