Jump to content

General Guide To Custom ROMs and Rooting (w/ FAQ)

_ASSASSIN_

 

 

Android Custom ROM and Rooting Guide

by me, _ASSASSIN_, and those mentioned in credits.

 

So why did I create this guide?

Since we have a lot of people that are new and want to completely change their phone, it’s crucial to understand the fundamentals of what you are doing so when you come across an issue it will be easier to address. Everything in normal text is by me, and everything that is in italics is by other sources.


thanks to :

@Whiskers, @TheSLSAMG, @nsyedhasan for all the edits

@lekro for a bit of adding and ideas

@Levent for our Odin & Knox sections

Cyanogen Wiki

 

Also, before I say anything:

BY DOING THIS YOU ARE VOIDING YOUR WARRANTY

 

DO NOT DOWNLOAD ANY ROOT APPLICATION THAT IS NOT ON THE PLAYSTORE/DOESN'T HAVE A XDA THREAD ON IT

 

*EDIT* 3/30/18
I think it's also important to keep in mind here that root IS a security vulnerability. Android for the most part secure, however if you root, you have to be extra careful with what you do with your device.

Even simple things such as init.d are able to be exploited to do some pretty nasty things. I strongly recommend that you always check what you are granting superuser to.

 

 

FAQ

First, let me start up with some basic FAQ

 

1. How do you install a custom rom?

A: Custom ROMs require a lot of pre requisites, you first need

  1. an unlocked bootloader

  2. a custom recovery installed

  3. need to be rooted

Now then, there are multiple ways to get steps 1 and 3 done which is why I’m not putting in root methods, because they are so different for each device. Basically, once you have found a method that is reliable for your device, do that, and then install a custom recovery, using which you can install a custom ROM. Another alternative is Odin which you can use to install custom ROMs with (see below).

 

2. Rooting / What is Root?

In layman's terms, it’s similar to having administrator level access on a Windows machine, but for android. Root access is a part of the Linux kernel, but was removed from android because Google would prefer to have a safer environment for their OS. Rooting is a way of modifying your device to give users access to the /root partition on your phone. Why does this matter? Rooting allows you, the user, to read and write from the /system partition, which allows for you to do a lot more with your phone than you could before, such as:

-backing up apps

- removing pre-installed bloatware

- installing a custom recovery, custom ROMsand custom kernels (we will get further in-depth with this later)

- extensive customizability and other customized apps.

 

3. What is the benefit of custom ROMs?

A: To make it easy, a custom ROM will be faster, more stable (if you get a proper release) and have faster updates than any other manufacturers could possibly claim.

If you have an older device that has had it’s support dropped, you can easily just install the latest version of android from a custom ROM if it is supported.

Not only that, but they also have lots of customizations that can be done to the UI to streamline the OS to your liking.

And since most custom ROMs are AOSP/stripped down manufacturer based ROMs, and are inherently more minimal, they can improve battery life also by not having an excess amount of background process and useless animations that might slow down your device.

It can also help influence your choice in buying a phone, no longer do you have to worry about purchasing a beast phone with a bad OS, you can easily just change the OS and have a device you always wanted with an OS that is just as great, however you have to keep in mind that certain manufacturers do not support the 3rd party development community. Notable examples recently being LG and Samsung.

 

4. When I install a custom rom, how do I move all of my information from my current ROM to my new one?

A: Before you install the custom ROM, create a backup in TWRP, of your /system, /data, and /boot. This install will allow you so that if the install fails, you can go back and re-do it without a bricked phone.

 

5. Why should I install ROM X over ROM Y?

A: For me, there is no reason why people should install a ROM because I say so, I recommend ROMs based on how I use my phone, and I like their features and support. There is nothing holding you back from trying new ROMs, just make sure they are from reliable developers.

 

AOSP

AOSP stands for Android Open Source Project. This project is just the stock Google version of android’s source code. This allows for developers to customize the OS in ways they seem fit. This also allows for the manufacturer versions of Android such as Sense (HTC) or Touchwiz (Samsung) to happen since those companies bring in their own developers to create their own skinned versions of Android. It also allows for custom ROMs .

 

Custom

A custom ROMs are custom firmware(s) that changes your /system. This basically changes the entire OS of your system. Also it isn’t technically a ROM, more so a P-ROM (Programmable Read Only Memory).

So why exactly would you want to install something like a custom ROM? Custom ROMs typically come with custom kernels, which in short allows for performance and stability tweaks compared to a manufacturer distributed kernel. Most come with slightly modified stock AOSP, which means you are going to get on of the least bloated versions of android. Some custom ROMs also pride themselves on original development with original features.

Of course there are also other ROMs out there. There are ones that are based on both Sense and TouchWiz. Typically these ROMs de-bloat the skinned version and add customization to it. These ROMs can be great if you are really accustomed to that version of Android and don’t want to take a big leap to stock AOSP.

However, as many “feature packed” ROMs there are, each ROM is a different experience that caters to different users. There really is no such thing as a perfect ROM. You are just going to have to find a ROM that you like.

 

Custom Kernels

A kernel is low-level code that allows the OS and any other high-level code (applications) to interact with the hardware. It essentially fits the same purpose as a kernel for other Operating Systems such as Windows, Mac OS X or Linux. AOSP or CM based roms typically come with a custom kernel. When people say that you can get an improvement in regards to performance and stability with a custom ROM, they mean that the included kernel for this ROM comes with tweaks and improvements that do this. Custom kernels allow also for Overclocking/Underclocking, Overvolting/Undervolting, TCP congestion control, Governor options (Governors determine how the CPU reacts to load, such as enabling/disabling cores and how it ramps to different frequencies), I/O Scheduler options (Disk Scheduling), Touch controls (these can vary from the double tap to wake feature from Sony devices) to the Logo2menu feature created by XDA developers that makes the HTC logo a menu button) and undervolting.

 

Custom Recovery

Custom Recovery is a better alternative to stock Android 3E Recovery as it adds multiple features that were not included in the stock recovery (such as creating backups, partitioning your SD card, Mounting your phone’s SD card to PC without needing it to boot in to Android OS). There are multiple choices you can make when you are installing custom recovery

- TWRP (TeamWinRecoveryProject)

- CWM (ClockworkMod), CWM Touch (ClockworkMod with touchscreen compatibility)

- Philz Touch Recovery (CWM based).

 

Busybox

You might be wondering what Busybox is since so many root applications require that you need it, like for example Titanium Backup. Busybox is essentially just a bunch of UNIX programs that can be installed into the /system for applications to use when granted Superuser permission.
 

Xposed Module

Created by XDA member rovo89, Xposed Framework allows for many of the customizations that are bundled into custom ROMs to be implemented into other ROMs simply by using .apk files (android package file) to modify your system. It requires root but it’s a great way to extensively customize your ROM without having to change out ROMs. Using the Xposed Installer APK found on this thread, you will be able to download the framework and all applications that support Xposed Framework. Some applications that I recommend that use Xposed are:

 

I personally love Xposed, as it allows for a ton of features to be used with even the stock ROM which your device came with. My only complaint is that it requires a lot of rebooting and the API goes away when flashing nightlies, so when you flash a nightly you should prepare to reboot again in order to install Xposed.

 

FASTBOOT

“Fastboot is a small tool that comes with the Android SDK (software development kit) that can be used to re-flash partitions on your device. It is an alternative to the recovery mode for doing installations and updates.

Because fastboot mode can start on your device even before Android loads (and can even run when Android isn't installed at all), fastboot mode is useful for updating the firmware quickly, without having to use a recovery mode. In fact, it's frequently the preferred way to initially install the recovery image on many devices. Fastboot can also be used for developer operations like unlocking the bootloader of Google's Nexus devices.

Not all devices support fastboot, but many do.

There are two "sides" to using fastboot-- the computer side and the device side. Typically your device first is connected to your computer via a USB cable. Then you boot into the "fastboot mode" on the device. On your computer, you then run the fastboot tool to issue commands. Please note that fastboot commands will ONLY work while the device is in fastboot mode.”

(Source: Cyanogen Wiki- http://wiki.cyanogenmod.org/w/Doc:_fastboot_intro)

 

Fastboot can be used to unlock the bootloader and install custom recoveries on devices.


 

ADB

“ADB ("adb"), or the Android Debug Bridge, is a development tool included with the Android SDK (Software Developer Kit), which allows for communication from an Android device (such as a phone or tablet) to a personal computer, and vice-versa. This communication can be made over a wifi connection. However, more commonly, it is made via a USB cable.”

(Source: Cyanogen Wiki- http://wiki.cyanogenmod.org/w/Doc:_adb_intro)

 

ADB can be used via the ADB shell using CMD in Windows and running the adb.exe inside the platform-tools in the SDK. Some common uses for ADB is backing up a phone without use of root access, restoring said backup, using adb sideload to easily install a custom ROM placed in the platform-tools folder. ADB push to push files to your phone, etc. An easy way of seeing all of the ADB commands, enter in the cmd located in the proper folder, "ADB" and a list of commands will appear.

 

“Alternatively, you can add the adb directory to your PATH environment variable, eliminating the need to “cd” to the adb directory every time you wish to use it. Of course, this is only necessary if you are using adb all the time rather than just once.

 

Note that you will need to add your device id to the adb driver’s configuration file in order to use adb sideload in most cases.”

- Lekro


 

How to setup ADB & Fastboot

Method 1 (Recommended)

*Google has made it easier on everyone, and has released the adb and fastboot binaries independent of the Android SDK*

Here's the link where you can find the downloads for Windows, Mac, and Linux operating systems.

https://www.xda-developers.com/google-releases-separate-adb-and-fastboot-binary-downloads/

unzip the binaries, go to a terminal and use the 'cd' program to go to the directory/folder where it's located, and you are good to go with using both adb and fastboot.

Method 2:

Alternatively, If you don’t want to install everything that comes with the android SDK, you can download the ADB & Fastboot minimal tools here. It is installed like any other windows application. Once installed, it will run and give your a command prompt that will open that will allow you to use both adb and fastboot tools.

Something to note with this program is that it has gotten rather out of date, it would be recommended to go with method 1.

Here is adb/fastboot

example screenshot.png


 

then you need to set up the adb drivers to work with your device.

it’s much easier on windows 7 than windows 8. Win 8 is the same process, only difference is you need to disable driver signature verification.

 

ODIN

Odin is used for select devices found in this thread. This is used for both rooting and installing custom ROMs on mostly Samsung deviceswatermarked4odin.jpg

Make sure Auto Reboot and F.Reset Time is checked ,once that is done you can click to AP button and manage to your .tar.md5 file (must be the one downloaded from samsung-updates.com)

 

watermarked3odin.jpg

Once application loaded the Flash files you can click Start

 

NOTE:IF ODIN SOMEHOW CRASHES OR GETS INTERRUPTED DURING THE FLASH PROCESS YOU CAN HARD BRICK YOUR PHONE.

(-Levent)

 

There is also mobile Odin by XDA dev Chainfire, which you can also use.

 

What is Knox and why is it important

Knox is a eFuse that is in Samsung devices with Qualcomm processors, simply it is a fuse that checks if phone has 3rd party recovery (this also counts flashing unsigned or modified images through Odin).

How to check Knox Status (First you need to keep knox apps to see if you triggered knox)

boot into Download Mode at the top left side of the screen you will see

Knox Warranty Void ,if its set to 0x1 you have triggered knox and your warranty is no longer valid

If it’s set to 0x0 you haven’t triggered knox and your warranty is still valid

 

NOTE: YOU CAN’T REVERT KNOX STATUS (yet) if you try to downgrade your rom to a older one without knox you will also trigger Knox


 

Recommended Apps For Root Users.

Here are some of the free apps that I personally use:

 

SuperSU (not maintained by chainfire, and the rights are given to some random chinese software firm, watch out) R.I.P. (I personally use Magisk nowadays)

Kernel Adiutor

Greenify

SD Maid

Busybox Free

Adaway

Titanium Backup

Spoiler

 

Link to comment
Share on other sites

Link to post
Share on other sites

Additional Q&A

 

Deodexed vs Odexed

Spoiler

Deodexed allows you to customize all the colors in your ROM by an insane amount, if you are like me and love to customize everything to your liking, You might like deodexed. However, the only issue currently for 4.4 with deodexed ROMs is that you cannot run the new experimental ART runtime introduced in Kitkat (more on ART runtime here)

also probably a more important part of Deodexed, brought to you by Mark.

The original point of deODEX is to repack the ODEX file that is usually kept separate, into the APK itself. This means that the entire application needs to be loaded into memory at once however, it is easier to modify. The fractions of a second longer it takes to load is outweighed by the ability to have full control over the app and its behavior. An example is theming and another is app patching. When modifying an application on the fly or patching an app permanently, it is just easier to have one file modified rather than two, and besides ODEX comes with its own selection of complications. I always recommend deODEX, simply because it's usually considered a benefit of root or specific ROMs. Besides, very few ROMs come in ODEX form.

~.:MARK:.

 

What is SaberMod/Uber/Linaro Toolchains?

 

Spoiler

Linaro and Sabermod are toolchains (more info in that here, basically it is software that is used to create and optimize software. If we want to be specific, it takes files written in a programming language, processes it, compiles it, and then links it with libraries to create an executable) that are used to further optimize a ROM while building a ROM (often though compiler optimizations, the most well known and commonly used is -O3 on GCC. There are other compiler optimizations out there like loop flattening to make use of the CPU's datapath, or Graphite flag, but I won't get into that mainly because these things are extremely complex and require a very in-depth knowledge about how computers actually operate). These do not add FEATURES to a ROM, rather they could potentially make your ROMs slightly faster and more power efficient. Note that there is a performance benefit from -O1 and -O2 for GCC compiled C code (Which the Linux kernel is made in), but -O2 and -O3 don't make nearly as much a difference.

Linaro is a open-source project getting Linux on ARM where as Sabermod was originally a tool created by Team AOSPAL, which made SaberROM, which is now a dead project. However Sabermod continues to get updates

 

Why are Qualcomm based phones the only ones to get the fun of AOSP Custom ROMs?

 

Spoiler

Simply put, they provide their source very timely and up to date for every single revision of android using their Code Aurora Forums (Found here). Where as Samsung with their Exynos line and MediaTek with their processors, never release FULL documentation which can allow for AOSP ports. So if you just bought that fancy new S6, don't expect Cyanogen for a long time until devs that actually care enough would theoretically reverse engineer to the kernel source to work with AOSP

 

Things to be Added:

S-OFF/S-ON

why are bootloaders locked?

ART Runtime

What is CAF?

Link to comment
Share on other sites

Link to post
Share on other sites

Kernel Customization

 

How do I overclock my phone?

- So here's a real common question I get asked. Simply put phones don't have a BIOS where you change the clock multiplier and the voltage.
 rather, here is where you are going to want a custom kernel. Why? Because these kernels store the frequency table for the CPU to use as well as their voltage steps for each frequency step respectively. Some kernel will come with their on overclock frequencies to use (most popular known one being ElementalX for HTC and Nexus devices). Using a kernel tweaking app (highly recommended: Kernel adiutor) you can set them as your max frequency to "overclock" your phone. However, keep in mind that not all chips are the same, just as CPUs are binned, so are SoC's, and your chip my be good and can handle less voltage, or require to be overvolted just to maintain those higher clocks otherwise you may occur random reboots. If this occurs, I'd recommend you just stick with manufacture specified clock speeds. 

Also sidenote: since kernels store the frequency table and voltage, some kernels try and add intermediary steps for frequencies. In my experience, this just leads to a less responsive device, I'd recommend steering clear of these kernels (IE AK kernel for the OnePlus One)

 

What is undervolting?

For each frequency, a certain amount of millivolts are specified to go to the CPU to meet that demanded clockspeed. Depending on how well binned your SoC is, you can undervolt globally to reduce the overall amount of voltage going to your device.

So what are the benefits?

- Most importantly, a cooler device, meaning less thermal throttling meaning better performance

- Less battery consumption, this may be minimal to drastic based on how well you chip can be undervolted

The cons?

- causes instability if you undervolt too much

 

The best way to check if a undervolt is stable is by going by increments of -5 or -10 mV, then testing using AnTuTu run and if it makes it through, it's most likely stable. The true test is obviously just using it throughout the day. Also another important note is that no matter what kernel or ROMyou are using, your undervolt will always be the same, you won't get gains from flashing a custom kernel or ROM in this respect, it's all hardware.

Link to comment
Share on other sites

Link to post
Share on other sites

I can't believe I forgot to add this, but in the comments please add anything you have questions on and I will be happy to answer them in the reserved comments as additional FAQ questions and answers :)

Link to comment
Share on other sites

Link to post
Share on other sites

You could say that rooting is like being on an admin account in Windows.

Recommendations:  ODEX vs DEODEXED

Maybe add that XDA is a good website for basically everything android

that;s all I can think of, good job   :)

Linux "nerd".  If I helped you please like my post and maybe add me as a friend :)  ^_^!

Link to comment
Share on other sites

Link to post
Share on other sites

On 3/17/2014 at 6:17 PM, ohJey said:

You could say that rooting is like being on an admin account in Windows.

Recommendations:  ODEX vs DEODEXED

Maybe add that XDA is a good website for basically everything android

that;s all I can think of, good job   :)

1. I already said that

2. I'll answer that

3. I personally don't like some of the members there because they are quite rude, but I'll talk about their original development stuff, thanks for the additional comments and support :)

Link to comment
Share on other sites

Link to post
Share on other sites

1. I already said that

2. I'll answer that

3. I personally don't like some of the members their because they are quite rude, but I'll talk about their original development stuff, thanks for the additional comments and support :)

np

Linux "nerd".  If I helped you please like my post and maybe add me as a friend :)  ^_^!

Link to comment
Share on other sites

Link to post
Share on other sites

6. omg i put a custom ROM on my device and nao it's liek super unreliable. HELP!!!!)1110!!! (for @TopWargamer ;))

Hey, in my defense, I've gotten better recently.

;_;

COMIC SANS

Link to comment
Share on other sites

Link to post
Share on other sites

Hey, in my defense, I've gotten better recently.

;_;

huey lol no I don't think so, you still ask silly questions ;)

Link to comment
Share on other sites

Link to post
Share on other sites

huey lol no I don't think so, you still ask silly questions ;)

Shush. I hope you brick your HTC One, then you will know my pains. 

;)

COMIC SANS

Link to comment
Share on other sites

Link to post
Share on other sites

Shush. I hope you brick your HTC One, then you will know my pains. 

;)

I have:

flashed dirty kernels

wrong ROMs

Wiped my baseband ( I can't recieve texts/phone calls/data)

softbricked it from using S-OFF auto-root methods.

 

 

I think I have a decent bit of experience and it's still alive lol.

Link to comment
Share on other sites

Link to post
Share on other sites

I have:

flashed dirty kernels

wrong ROMs

Wiped my baseband ( I can't recieve texts/phone calls/data)

softbricked it from using S-OFF auto-root methods.

 

 

I think I have a decent bit of experience and it's still alive lol.

Totally not butthurt over this at all. I'm still scarred from that week without my G2. 

;_;

COMIC SANS

Link to comment
Share on other sites

Link to post
Share on other sites

Totally not butthurt over this at all. I'm still scarred from that week without my G2. 

;_;

maybe you should have listened to my advice...just saying.

Link to comment
Share on other sites

Link to post
Share on other sites

maybe you should have listened to my advice...just saying.

It's not my fault though...I was doing everything right.

>.>

 

It was stupid VanirROM. All of the current versions borks G2s. At least the 2nd time it happened I was able to access my recovery and backup my old ROM, whereas before I couldn't. 

COMIC SANS

Link to comment
Share on other sites

Link to post
Share on other sites

It's not my fault though...I was doing everything right.

>.>

It was stupid VanirROM. All of the current versions borks G2s. At least the 2nd time it happened I was able to access my recovery and backup my old ROM, whereas before I couldn't. 

would you look at that, my guide says what to do, and I might add the part in italics

If your device has a big problem with the ROM, you should really think about e-mailing the developer about the issue, as in most cases, they most likely don't own the device themselves and require the community to advance the ROM to make it more stable. e-mail the dev asking what you can do to fix the current issue at hand with the ROM.

Link to comment
Share on other sites

Link to post
Share on other sites

Assassin thought you might want to add in the recovery section that a custom recovery is mandatory for ROMs to be flashed. it makes it sound like a custom recovery is optional.

"I take my spirit and I smash my mirrors,
And now the whole world is here for me to see,
Now I'm searching for my love to be."
-Jimi Hendrix, Room Full of Mirrors

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

I can answer questions about Android if anyone has any.

 

OP you should add ROM Toolbox, Market Helper, and SoftKeyZ to the apps list. You should also add the Play Store and XDA thread links next to each app.

Regarding recoveries: 4EXT is another good one although it only supports a few devices and is currently being rewritten from the ground up.

 

The Android subreddit made a big ROM comparison database. They also made a rooting guide, an old but useful post-root thread, and this excellent wall of text explains bootloaders really well.

Lastly, every Monday the subreddit has a "Moronic Monday" thread where less knowledgeable users can ask any question regarding Android/Phones/etc. without getting bitched at like XDA so frequently does. These threads are usually huge nice to noobs.

My system | Nexus 4 (16GB) with CyanogenMod 12 | Pebble smartwatch | Dropbox | about.me: Tom Burnes -

Link to comment
Share on other sites

Link to post
Share on other sites

Assassin thought you might want to add in the recovery section that a custom recovery is mandatory for ROMs to be flashed. it makes it sound like a custom recovery is optional.

Because it is. Not all phones need one to install a custom ROM IE Samsung phones via Odin

Link to comment
Share on other sites

Link to post
Share on other sites

I can answer questions about Android if anyone has any.

 

OP you should add ROM Toolbox, Market Helper, and SoftKeyZ to the apps list. You should also add the Play Store and XDA thread links next to each app.

Regarding recoveries: 4EXT is another good one although it only supports a few devices and is currently being rewritten from the ground up.

 

The Android subreddit made a big ROM comparison database. They also made a rooting guide, an old but useful post-root thread, and this excellent wall of text explains bootloaders really well.

Lastly, every Monday the subreddit has a "Moronic Monday" thread where less knowledgeable users can ask any question regarding Android/Phones/etc. without getting bitched at like XDA so frequently does. These threads are usually huge nice to noobs.

that rom comparison database is a massive mess. And it really makes no sense. I just have the recommended ROM's list with all their websites so you can check out what they are doing. Because features change so fast it's really pointless when they have everything on their website.

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks Assassin, this is great! I'm waiting for an ATT S4 (4.4.2) root and a method to unlock the bootloader, I want CM 11!

Delltopia

Case & Mobo: Stock Dell Optiplex 7010, CPU: i5 3470, RAM: 16gb 1333 DDR3 (1x8gb Corsair Vengence, 2x4gb Random), GPU: Diamond Radeon HD 7970,

PSU: EVGA GQ 650W, SSD: Kingston v300 128gb (OS), HDD: 700gb Seagate 7200rpm (Storage)

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks Assassin, this is great! I'm waiting for an ATT S4 (4.4.2) root and a method to unlock the bootloader, I want CM 11!

Thanks! Sorry, but I won't show root methods because they would be a mess to add. I recommend you watch a video from

Zedomax (most trustworthy)

Wwjoshdew

Jaredbusch

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks! Sorry, but I won't show root methods because they would be a mess to add. I recommend you watch a video from

Zedomax (most trustworthy)

Wwjoshdew

Jaredbusch

oh i didn't mean it as a request, i was just generally stating that I'm waiting for the releases. Thanks tho!

Delltopia

Case & Mobo: Stock Dell Optiplex 7010, CPU: i5 3470, RAM: 16gb 1333 DDR3 (1x8gb Corsair Vengence, 2x4gb Random), GPU: Diamond Radeon HD 7970,

PSU: EVGA GQ 650W, SSD: Kingston v300 128gb (OS), HDD: 700gb Seagate 7200rpm (Storage)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×