An Introduction to Android Custom ROMs

This is written for tech-savvy, curious people who have never heard of words like custom ROM, AOSP, etc. I want to begin blog-writing by making you aware of this world.

Let’s cover some basics before we turn our attention to custom ROMs.

What’s an operating system?

The Wikipedia definition for this is concise and accurate.

An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.

Operating systems manage digital devices, including all mobile phones.

A mobile operating system manages its hardware (e.g. processor, ram, camera, battery, WiFi), software resources (e.g. clipboard, on-screen keyboard), and provides common services (e.g. way to access camera, internet, libraries) for programs (typically called apps in the mobile world).

Android and iOS are two well-known mobile operating systems.

Android and AOSP

Android is the world’s most widely used operating system. With one exception of the iPhones, Android is the OS used in virtually all smartphones of the world. Android is what makes them smart. Who makes Android?

If you thought Google, you’re almost correct. Android is developed in a collaborative effort by a group of companies (Open Handset Alliance). This consortium is sponsored by Google. Just like any program or app, Android is made of code, lots of code. This code is primarily written by Google and then released to the public as a part of its open-source initiative, the Android Operating System Project (AOSP). This means anyone can download all of Android code, make changes and submit improvements! It also means that if there are any vulnerabilities in the code, they are more likely to be found, reported and quickly fixed. Just like any code program, Android has to be build from its source code before it can be used. Android which is built from AOSP is often called Stock Android. But wait… is your phone running this exact AOSP code? No!

The Android that your phone comes with

There are two major differences between the Android available in AOSP and the one that comes preinstalled in your phone:

1. Google Play Store and GMS

Google Play Store is the app marketplace that’s preinstalled in almost all devices. You go to the play store to find, download and install apps on your phone. They can be free or paid. You might not have heard of the other term, GMS — Google Mobile Services.

Google Mobile Services (GMS) is a collection of Google applications and APIs that help support functionality across devices.

GMS includes the Play Store, it makes app updates easy, GMS is in fact very important of messaging and real-time chatting apps. GMS enables you to link your Google account with your phone and sync contacts and other data. This is completely developed by Google. I’ll quote what Google says about it on their website:

While the Android Open Source Project (AOSP) provides common, device-level functionalities such as email and calling, GMS is not part of AOSP. GMS is only available through a license with Google and delivers a holistic set of popular apps and cloud-based services.

It is important to note here that Google provides a license to phone manufacturers so they can preinstall these apps and services. Google does not provide any other way to install GMS into a phone, you cannot just grab the ‘apks’ (Android application packages), install them on a phone and expect it to work. Also important to note here is that some of these services are ‘more privileged’ than normal apps, a.k.a, they are installed as system apps. You cannot uninstall Play Store and Play Services from your phone. Fun fact: Play Services will always try to update Play Store to the latest version silently in the background, even on mobile data.

GMS is used by almost all Android phones. However, since some countries (like China) have banned Google, phones in those countries do not have GMS pre-installed. This is why there is usually a different software version of phones in China (without GMS).

2. Proprietary hardware code, Vendor UI and Bloatware

Up next, sometimes there is a bit of proprietary code required to run specific hardware on phones. Proprietary code is that which isn’t revealed to the public, copyrighted by the maker, created for business. It could be the camera code, could be a tweaked Android library itself, depends on the phone vendor company.

MIUI, OneUI, ColorOS, OxygenOS, ZenUI, etc. All these are flavors (custom UIs) of Android tweaked by the respective phone vendor companies who want to give their users a different, special experience of using their Android phones. These vendors start with AOSP code as the base and then modify the code to create their own flavor of Android. This modified code is proprietary and confidential. These flavors aim to provide extra features in addition to what AOSP provides, a consistent, signature look, improved user experience, etc.

Think back to when you bought a new phone. You might have noticed right after setting it up, there are some preinstalled apps like Facebook, Amazon, maybe some games, Netflix, some vendor-specific apps (like Samsung and Xiaomi provide their own app store) etc. You may want some of these, but most of the times, they are unwanted. These are referred to as bloatware. The reason these apps are preinstalled is because the phone companies are paid by the app companies to do so. This is more common for budget smartphones than flagship ones for profitable business. The phone company determines whether you can uninstall them or not and if you cannot uninstall them, whether you can disable them or not.

We now have a basic idea of what Android is, and also about the Android installed in our phones. So let’s start with custom ROMs.

Android Custom ROMs

These are (usually open-source) aftermarket distributions of Android. Open-source: they are forked from AOSP, i.e., their code base is AOSP and the developers make some changes into that code. The difference here is that they make this code publicly available. Aftermarket distributions: These are usually not preinstalled on phones, rather users can manually install these custom ROMs on their devices.

Some examples of popular custom ROMs are LineageOS, DirtyUnicorns, PixelExperience ROM, etc.

Let’s go over the Pros and Cons of using a custom ROM on your phone.

The Pros

  1. The chief advantage of using a custom ROM in my opinion is the freedom, the flexibility, the power to choose. This will be explained as I list the other pros.
  2. Clean, Stock Android experience: Custom ROMs look very similar to AOSP. The same UI that was intended to be used in Android in the first place. It is extremely similar to what Google provides in the Pixel phones, the Nexus phones and phones that are a part of Android One project. Very few vendors keep this Stock Android experience alive. The rest of them impose a quite different looking UI, to stand out from the rest, for marketing and branding, for pleasing a tiny but loud ‘fanbase’.
  3. Performance and battery life gains: If you have a phone with a very resource-hungry flavor of vendor UI, then you are probably not getting the best of what the hardware of your phone has to offer. Heavy custom UIs like MIUI consume a big chunk of resources in running the UI itself, leaving less resources for the apps that you run, especially RAM. If like me, you own a budget phone for 4GB RAM or less, then your custom-UI-powered Android could be having a hard time multitasking.
    If you open 4–5 apps at once, then the app opened earliest is probably closed by the OS, it simply can’t afford to have that app in RAM. Also, the vendors make the system more aggressive in closing background apps to compensate for their heavy UI, and other background services. In a custom ROM, there are no vendor side services or extra UI processes, the system is far more competent at RAM management, and significantly better at multitasking. The stock UI, written by proficient AOSP developers, is much smoother. Lesser visual lags throughout the system. And slightly improved graphical (gaming) performance because the UI is using lesser resources to render.
    An real-life example: If I’m using MIUI (which came preinstalled on my phone Redmi Note 7 Pro), playing a game like Call of Duty, switching to Whatsapp for a quick reply (or a phone call) and then coming back to Call of Duty, the game has restarted itself. But if I’m using a custom ROM, the game does not restart when I come back to it from another app even after a couple of minutes.
  4. No bloatware: Most custom ROMs are very barebones. The good ones make sure that all the apps preinstalled are open-source and they are necessary for basic phone functionality. Although some ROMs these days try to follow the Pixel route and replace most system apps with their Google counterparts. With a custom recovery (I’ll cover this in another blog), you can actually choose which google apps you want preinstalled.
  5. Privacy: Custom ROMs carry no data collection and analytics software that many vendors include in the name of “improving user experience”. Although some custom ROMs have a simple, anonymous stats reporting, it can be turned off with a tap. You can choose to install GMS apps and services through what we call a ‘GApps package’ or you can install an alternative like microG. With microG, you can have a completely Google-free, truly open-source Android, which is secure and privacy-focused.
  6. Faster updates: Custom ROM developers usually work in smaller teams and test each new update on their own phones before releasing them for the public. So you would get much faster updates, as compared to vendor ROMs. After AOSP releases a new monthly Security Patch, developers take just a few days to update their custom ROMs. Faster updates mean that your Android phone is more secure against newly found vulnerabilities in the system.
  7. No Ads: Open-source software simply can’t have ads. If one does, someone can just tweak that part of code and release the ad-free version of the same software. Meanwhile, some preinstalled vendor apps contain annoying ads.
  8. Newer versions of Android: Phone vendors often provide only one or two Android version upgrades. For example, I had an Asus Zenfone 3, which came with Android 6.0 (Marshmallow) and got updates up to Android 8.0 (Oreo). Custom ROM developers are able to provide phones with more recent versions of Android. For the Zenfone 3, Custom ROMs based on Android 9.0 (Pie) are available! Another example: Lenovo ZUK Z2 Pro officially got updates till Android 8.0 (Oreo) but Custom ROMs are available even upto Android 11.0!

There are more Pros, but let’s turn to the cons.

The Cons

Most of these can be avoided with a simple measure — Do your research.

  1. Installing a custom ROM requires unlocking a phone’s bootloader. Many vendors provide tools for this, but they will discourage you from unlocking your bootloader. Some vendors will void your device warranty when you install a custom ROM on it. They do this because you’ll be installing custom software on your phone for which they cannot provide support. It does make sense if you were careless and managed to ‘hard-brick’ (see point 3) your device, the company shouldn’t be held responsible. But this is very rare and warranty is lost for hardware issues too. Note: some companies (like Xiaomi) will consider warranty if you lock the bootloader and install the vendor’s custom UI again. This varies from vendor to vendor and you’ll more information about this on their own sites.
  2. Bugs: Vendor ROMs undergo heavy testing and is supported by professional developers paid to develop them for the company. The vendor also provides warranty and is liable to some extent. None of these apply to custom ROMs. Bugs, or software issues, depend on mainly two factors:
    A. The bug could be in the ROM itself or the device side sources. These can be fixed, depending on the developers.
    B. Sometimes bugs simply cannot be fixed in custom ROMs. It could be due to a poor implementation of some component by the vendor, could be any other unavoidable reason.
  3. Finally, the most ‘scary’ con is that things could go wrong. If you are not careful and install a file not meant for your device, meant for some other device, it may lead to your phone being unusable in the worst case. It can also happen that the developer made an error in the code leading to the same thing, or minor bugs in most cases. Hence, it is important that you make sure that the ROM you are installing in compatible with your device and works fine. Developers often attach screenshots of their own device with the custom ROM installed when they publish ROMs. Being careful and doing appropriate lookup beforehand is essential when it comes to custom ROMs. I’ll define two commonly used terms in this regard:
    A. Soft-brick: A state of the phone in which it is unusable. You can recover your phone back to normal, but it require some time and effort. In some cases, you might need to take it to a service center to get it fixed.
    B. Hard-brick: Phone becomes a literal piece of brick. If you are very unlucky or careless, you get a hard-brick. You cannot recover your phone from this state. It usually happens when sensitive phone partitions get corrupted or they are altered in a way that the phone can no longer start.
  4. Some apps might not work or might become unavailable for the device. Apps requiring higher security like Netflix, Banking apps, very few games are able to detect that you are using a custom ROM with an unlocked bootloader. There are workarounds to avoid this issue, I’ll discuss it in a relevant blog post.

I’ll write more blogs on Android, Custom ROMs, Rooting, etc, taking up selected topics in detail. I think this is a good place to start for a novice. Feedback is appreciated. Let me know what you think!

Android enthusiast. IIT grad in Computer Science and Engg