Introduction
Dearest readers,
I wanted to roll up my sleeves as well as roll all the knowledge I know into a nice article that attempts to explain the procedures which go into running custom roms. This article will not be brief, but neither will it be comprehensive. The truth still remains that each phone model is different when it comes to the basics of rooting, which is a huge step within the process of installing a custom ROM. I wanted to touch also upon the root procedures here, simply because each phone company roots differently and finding this information can be difficult. Where possible, I have provided links, though the rule of thumb here is that I will not provide specific instructions for each manufacturer’s model, only giving you a rundown of steps based on the company at hand. These include Samsung, Motorola, HTC, and Google’s own Nexus line-up. Even within various manufacturers, there might be slight variations. For this reason…
Google is your best friend!!!
I cannot stress this enough. As in, I could go up to your ear right now with a huge megaphone and yell loudly: PLEASE GOOGLE INFORMATION YOU DO NOT KNOW! Google it! Google it! When it comes to ROM flashing, each phone will be different, and definitely each has it’s own benefits with the ROM you choose. I am not here to provide you with the information of which ROM is better or worse, only to get you started on the path of how to flash it and get your device ready.
Similarly, if you have technical difficulties, I am not responsible for any of them. If your phone blows up, is bricked, does not work, you must take the steps yourself to get it working. Almost every phone is restorable to the factory software it came with, usually by means of a program that you run on your computer which does the job. Very few if any phones have no recovery software; The only time this might be the case is if your phone is made by a company which is not well put together or does not have heavy support for their phones.
Let’s take a step back. What is rom Flashing?
Some of you might have made it this far without understanding a clue of what I was talking about. This I congratulate you for! You read a bunch of nonsense and survived!
Every phone has ram (random-access) memory and ROM (Read-only memory). Ram is temporary, meaning it gets erased with each power cycle, and it is in a forever state of flux. ROM, on the other hand, is the opposite. It is burnt into the phone’s chip, and contains the essential software and firmware that powers a phone. Without a rom, a phone would not even be able to display something on the screen or initialize its ram.
Typically, phones come with a ROM that was created by the manufacturer. This sometimes has downsides: Bloatware, extraneous features such as fancy caller ID, and perhaps even space limitations. On older phones which are nearing the end of their life cycle, this can be problematic. These phones will become slower, when in reality an entirely new life can be breathed into them through the procedure of flashing a new ROM.
Advantages to flashing a rom include:
- Better stability in some cases. This is more of a result for older phones which have a well-established ROM. It does not, however, always hold true. Sometimes developers will abandon working on customizing a rom, just don’t have time, or have other, more real things to attend to. Choose a ROM that is stable and well-established, such as Cyanogenmod.
- Customization with themes, different widgets. This is a no-brainer, but having a different rom can open up your device even beyond the scope of what Android allows. For some, this is the prime reason they flash ROMs.
- Better battery life, also dependent on ROM and situation: A good ROM will also provide you with top-the-notch battery life. In theory, it will be a great performer with no compromises. Similar to my first point, this does not always hold true. A developer will have perfected the focus for battery on the device they are working with. Usually, a ROM developer will not take on more than a few devices at once, and focus on the hardware features of them.
- Root access, usually by default: 99.9% of Custom ROMs will also come with what is called Root Access. Root allows you to gain access to the nitty-gritty core of your Android phone, such as changing the size of the storage where data resides, utilizing advanced management tools, and sometimes even running a server for a game just off your phone. What does and does not require this level of access is subjective. Typically, if a product, software, or tool that you wish to use needs access to the /system part of your phone’s ROM, it will need this level. Themes which replace the sounds and animations of your phone will fall in this category, as they have to change core files on your phone which are not easily attainable without root. Root access is an essential aspect to ROM flashing as a result.
- Latest software: This also is a big drive for some, but if you wish to run newer components of the operating system (in our case, Android) for your phone, flashing a ROM is the only way to do it. Companies will typically leave phones in the dust after 12-18 months, if not less sometimes. By flashing, you can usually squeeze another year or two out of even the oldest of phones. For the blind, this is significant, as each Android release brings some form of improvement to accessibility. Even still, it can also lead to better installable applications, as a custom ROM will give you access to the latest possible Android version for your device. As of this writing, this is Android 5.0, lollypop. Cyanogenmod, a highly common and popular ROM, already has near to stable releases of Lollypop for many phones.
The disadvantages to ROM Flashing
It is worth noting these here also. What does ROM flashing do and what can it cause physically, mentally, and psychologically?
- Stress. By far, this is a big part of it. ROM Flashing is not as easy as making pancakes. You will fail. Chances are, your phone will be bricked once or twice in its life, which is where it does not turn on. You are likely to need coffee and lots of it. There will be times where you will throw your phone against the wall, if you’re that type. In short, if you are stressed easily, do not flash these. It’s not worth it.
- Warranty. Some manufacturers particularly Samsung have what is called a warranty flag. Once this is “tripped”, that flag can never be reset. When using your phone, beware of this. Google, for example, allows you to re-lock your bootloader (The first portion of your ROM that the phone uses to initialize itself), so no Nexus device can have the warranty void so as long as you restore everything back to normal. Some, such as Motorola, even sell “developer edition” of phones just for the purpose of flashing. Others, such as HTC, will even require that you enter your phone’s serial number into a website, thereby placing it in a database. In short, each company will have ways that cause your warranty to go away. People will even consider buying a phone on this basis — if you can restore and not trigger this, it alone can be a make-or-break deal.
- Battery life, stability decreases. Just as this was in the advantage section, it’s also being stated here. You will never know what you get out of a ROM without reading up on the forum posts associated with it. Some kill battery life more than the stock ROM that came with your phone do. Some will make your phone crawl, will cause apps to crash, will create a fire, will burn up your puppies and children. In short, you don’t know what to expect without really researching. Remember the thing I loudly blasted into your ear? Keep it in mind.
Now that I’ve scared you to death
It’s time that we begin with the essentials. I will start this writing with the rooting process and those tools that you will need in order to make everything work. Ready?
Requirements
Your computer needs many pieces of software in order to communicate with your phone. This usually includes ADB drivers, drivers designed specifically for your phone, and when installing roms, the piece of program that will communicate and program your phone. This may seem overwhelming, but in reality, this is probably the easiest to all of this.
ADB Drivers, and ADB Tools
Let us begin with the the least difficult of them all, ADB tools and drivers. Previously, it was a good idea for one to grab the entire Android Development Kit and have access to this functionality. ADB, which stands for Android Debug Bridge, allows your computer and phone to exchange advanced commands with each other. These could include special command-line commands, or in the case of Nexus devices, ROM flashing tools. In this sense, Nexus devices come with a huge advantage: Since they are supported by and collaborated through Google, they are the easiest to modify.
Recently, ADB tools have become available. Here is a link to an installer which will allow you to not only have the ADB drivers installed, but also have access to many of the commands you need to flash a ROM system-wide.
Click here to grab the ADB Setup.
This tool will bring you to a command-line window, where you can choose whether to install the drivers or just the ADB aspect.
Enable development options and ADB on your phone
This step is important and without it, you cannot even root or flash ROMs. On your phone, head to the settings application, then scroll to about phone. On Touch-Wiz phones, this is hard to find; Sometimes you have to access the “more” tab on the top right of the screen and scroll down from there to “about device” or “about phone”. Once here, find the bottom line that says “build number”. You must tap this no more than 7 times, after which you will receive a prompt telling you that “development mode has been enabled.” Next, head back, and there, in the main settings pannel, you will see an item for “developer options.” Enter this, and choose “Enable Android Debug Bridge.”
Finding drivers for your phone
This is an essential yet challenging part of this guide. Now that we have ADB, you still need to install additional drivers which will give you the ability to use your phone in specific modes, such as bootloader mode. Bootloader mode is what you enter when flashing. Here’s a list of links I compiled for each phone brand. These drivers, in most cases, encompass a wide range of models within that brand. Not always, though, so if you are experiencing troubles, finding the right driver for your phone is the best way to go. Here’s how you do so.
You go and visit this awesome search engine called
Google. On the top of that Google page is a box. In here, you type in something like: Motorola Atrix USB drivers.
Provided you have the Motorola Atrix, I’m just using that phone as an example. Usually the first or second link will lead you directly to the company’s site, where you can download the right driver.
Samsung USB drivers
Motorola Drivers
HTC
LG
Sony Xperia
There. These links are not always the official company’s site, simply because I wanted to cover a wide range of devices. Do your research, and come back here once you have drivers installed.
Rooting: Let the fun begin!
This is the part of the article that you’ve been looking forward to ever since I started. I will go from simplest to most complicated when it comes to rooting. First, we will tackle the Nexus line, as it has specific root tools invented to cover every single Nexus device. Then, we will move on to Samsung, and the Odin tool, which allows us to root most if not all Samsung phones. Then, we have Motorola and their weird scripting files.
Why do I have to root in order for me to use a custom rom?
If companies allowed you to install custom ROMs without rooting, this world would be a strange place. In short, there are locking mechanisms on every phone that protect it from this specific procedure. Rooting allows us to install or over-ride the “recovery” portion of our phones. This is the bit that is a safeguard for when your phone does not turn on properly — from recovery, you can do such tasks as factory reset or re-initialize the file system on your phone. By modifying this, we have access to do virtually anything we wish!
Rooting typically has two components. The rooting process itself, and the process which unlocks the bootloader that allows us to install custom roms. The first portion here is useful if you don’t want to install anything custom. You would be rooted, but without any abilities to override the ROM (read-only memory) on your phone entirely. Where’s the fun in that!
Which Custom Recovery should I use?
As a blind person, TWRP will allow us to flash roms with ease through the command line, on any device. While there exist other recoveries, none compares to TWRP. Clockwork Mod is another popular one, but as of late it has become sparce and not as heavily supported by many.
The Nexus Root Toolkit, for Nexus phones
Nexus phones are simple and efficient. If you have one, you can probably stop reading this guide after you’ve grabbed the
Simply install it, and once launched, there will be a root button after you have picked your phone’s model and version of Android. You will then be able to flash roms installed of the tool-kit, so no need for many of the other advanced things I present in this guide.
A universal option: Entering into the bootloader through ADB, for ALL phones
Getting the various phones I am discussing here to enter into their special ROM flashing mode, called the bootloader, is quite tricky. Each phone is entered into this hypnosis very differently. It does not have to be so, however! Simply connect your phone to the computer. Provided you have the proper drivers installed, your phone will pop up a screen (so be sure to have it on and unlocked when connecting it to your PC), telling you that you must allow the computer to connect. If this does not happen, go into your start menu or start screen, and type in the word CMD. Press enter on the first option. In the archaic-looking window, type in the word adb shell and wait a moment.
The dialog should definitely pop up now on your phone. Check the “always allow” box and hit OK. Next, type the word exit on your keyboard and press enter to quit the shell.
To enter your phone into the bootloader trans, type adb reboot bootloader. This will work on any and every phone, allowing you to bypass the extra steps required for each phone. Quite useful, right?
Samsung
Samsung phones are also fairly simple to root. Power off your Samsung phone and hold down volume down + the home key and power, for about 5 seconds. Release all three and press the volume up once more to enter the bootloader mode. Your computer will begin to install drivers once the phone has entered the bootloader.
Next, find the model name of your phone. For Galaxy S4 devices, this will be JFLTE (plus another three letters for your carrier, such as vzw, spr, tmo, usr, glte for google play…). S5 phones use numbers starting with klte (Kltetmo, kltevzw, kltespr). In short, each phone has its own model number. Finding this is simple: Go to this wonderful search engine,
Google,
And type in: Galaxy s4 phone model t-mobile.
Substituting “Galaxy s4″ with your phone’s name.
Now,
this site
and find your phone’s model from that list of 68 different phones.
Inside the zip, you will find a file called Odin v3-3.xx.exe. This is Odin, the essential tool that flashes roms on your Samsung device. It is the backbone to rom flashing on Samsungs.
Open up Odin. Press the PDA button, and browse to the .tar file which was also inside the zip you downloaded. It will be called something of the “cf-auto-root” sort.
Press start, and wait about 15 seconds. Your phone will reboot. Congratulations, you are now rooted!
Samsung devices: Custom Recovery
Next, we need to install a Custom recovery. Again, knowing the model number of your phone is important!
TWRP has a huge list of devices.
It’s worth to note that this is a good list of knowing what your phone’s model is, as they give you user-riendly names that assist you in choosing the right one. Bookmark it, because it is one of the greatest tools to any ROM flasher. You’re now initiated.
You will arrive at the download page for your site. For Samsung phones, you will need to grab the .tar version of TWRP. Scroll down through the various releases to the latest one (2.8.4 at the time of this writing) and grab the .tar file. You will use Odin, similar to how you rooted. Place your phone into bootloader mode by pulling the battery (or holding down the power key for 15 seconds), then once more press home + volume down. Wait 5 seconds and press volume up to enter the bootloader.
Samsung: Clear those triangles!
Samsung phones, in addition to being able to void the warranty quite easily, also come with another protective measure: Triangles. Each rom flash will place a small triangle upon your boot screen, which it is a counter of sorts. Before flashing your custom rom, be sure to clear the counter through a $1.99 app called Triangle Away.
It can be downloaded through the Play Store. When you run the app, you will be asked for a “superuser” request. Click Allow or grant, and press continue after confirming your phone’s model. Now, simply hit the “reset flash counter” button. Next, you will be prompted to power on your phone after 10 seconds. Once powered on, press the volume up key to initiate the triangle reset process. It takes a good minute or two, so be patient!
Motorola phones
Motorola tends to be one of the companies that require the unlocking of the bootloader through their
Keep in mind that it is actually written to be quite user-friendly, and they even give you instructions on how to unlock the bootloader after you have entered in the required information. Please return to this guide after reading those, it will help you and I out both tremendously!
Also note how that website includes links to the factory restore process for many of their phones, allowing you to restore in case something goes wrong.
To unlock, you use the adb reboot bootloader command I told you about a few paragraphs ago. Again, open your start menu or start screen, and type in CMD
Next, type in the following command. fastboot oem get_unlock_data. This will display a series of numbers and letters. If you are using a screen reader which has a virtualize window function, please use it. Copying text from the command prompt is super difficult, but is needed in this step. In NVDA, use the NVDA + F9 keys to “mark” the block of text beginning with [bootloader], and the NVDA+F10 key to copy it to the clipboard. Note that with NVDA, use Flat review to navigate the command prompt window. If you do not know how to use flat review, consult the NVDA documentation.
You will need these numbers and strings of text. Copy them to a notepad window, and remove all of the [bootloader] lines, combining them into one long chain of weird code. The final result should look like this, but with different numbers:
3A95720615784488#5441383833304C47325600585431303332000000#361D7293361E178D7D591294131B57789CA86EC4#C39412020F0000000000000000000000
This is the thing you paste into the Motorola website! Head over there now and do so, you won’t regret it!
Motorola will e-mail you with a unique key that unlocks your phone. To finish the process, wait for this e-mail (leaving your phone connected) and type in to the same archaic terminal window: fastboot oem unlock xxxxxxxxxxxxxxxxx (where x’s are your 20 digits) Whew. You are done!
Motorola: Rooting
Here is where my knowledge is not helpful to the extent I wish it could be. Every phone has its own root script for Motorola devices, which makes them one of the hardest ones to root.
This is just one forum thread for the Motorola X (2014) device, but many others exist.
My only other suggestion for you is to go and google something in the following format:
Site:xda-developers.com (enter your term of search here). For example, if I typed into google:
“Site:xda-developers.com Motorola Droid 4 root”, I would get all the results on rooting the Droid 4 phone. Usually, these scripts will also install the proper recovery environment you need to flash roms. If this is not the case, head to the
TWRP page and find your model there.
HTC: The hardest of them all!
Back before 2009 and the beginning of Android’s journey, HTC was well renound for their resounding support of custom roms and flashing. They took a complete 180-degree shift since then, and now are one of the most difficult companies to work with. Similar to Motorola, you need to
Register as a developer
And go through their website for the unlocking process. To do this, head to
the bootloader unlock page and proceed from there. Just as with Motorola, HTC will keep track of your bootloader-unlocking escapades.
The instructions for the Motorola section also apply, with the entire fastboot oem get_identifier_token process. Unlike with Motorola, you do not need to modify the digits and jumbled text that this command results in. Simply paste it into Step 4 of the HTC unlocking site.
HTC will e-mail you a unique .bin file, which you will then use to unlock your bootloader. Download the file, and head back to your command window. Be sure to save (or move) the downloaded file to your desktop. Next, type:
fastboot flash unlocktoken Unlock_token.bin
To successfully unlock the bootloader.
HTC: Rooting your phone
HTC phones are kind of backwards when it comes to rooting. You install the recovery .img file first, and then you root the device. In order to do this, use that
Handy TWRP downloads page
And find your HTC device. The download page will list a .img file, such as “openrecovery-2.8.3-xxxxxxx.img.” Download it and save it to your desktop.
Next, go back to the cmd window you had open (in case you closed it). If your phone is still in bootloader mode, you are good! Simply type in fastboot flash openrecovery, then press the tab key to complete the filename without you needing to type every portion of it in. Press enter, and after a few seconds, your phone will have flashed TWRP.
Afterwards, hold down the power button on your phone to completely restart it. Once back up, we need to transfer the root .zip file to your phone’s internal SD card.
Download Chainfire’s super su zip file Access your “computer” or “this PC” screen by pressing the Windows key and the letter E at the same time. Find your phone, which will appear in the devices section by it’s name (or your name perhaps). In there, locate the “internal storage” option and paste the downloaded update-superSu-v2.40.zip file which you just downloaded.
Switch back and proceed by typing in to the command window: ADB reboot recovery. This will result in some device connect / disconnect sounds, but ultimately your phone will auto-boot into the recovery mode.
Type in the words adb shell. If your drivers are properly installed, you will be brought to a line of text that says “[6n]”. If not, please check your device manager and see if any devices are listed in the “other devices” section. If so, go back to the beginning of this guide and install your HTC drivers.
When you have reached the prompt with weird letters, you are good to go. type in the following commands in order to flash the root package:
cd sdcard
twrp install UPDATE-SuperSU-v2.40.zip
Note capital letters! Capital letters matter in the world of Android, so be sure to capitalize the entire word update, the S in su… Double-check that you capitalized everything right!
You will know if it works, as the text will tell you that it succeeded. Once that is done, simply type in reboot to reboot your phone. You are now rooted with a custom recovery!
Flashing an actual rom: The easiest part?
I only provided instructions for 3-4 different devices, and yet managed to span over 5-pages of writing with just an overview of how difficult the process is for each company. I haven’t even begun to discuss LG or Sony yet, but their procedures are also different than the ones I outlined above. Flashing a rom is simple, because TWRP is universally the same across all of the devices we use.
Grab the ROM you wish. Download the files you need from the desktop. Chances are, you’ll also need GAPPS, or Google Apps. Without a proper GAPPS package, you will get nowhere — no Play Store, nothing.
Cyanogenmod has Gapps downloads usable with Android versions ranging from 2.3 to 5.0.
You will need to have both the file of your rom and this gapps file. Once downloaded, open your “this PC” or “computer” window by pressing Windows Key +E. Navigate to your device’s internal storage and paste them there.
Now we will use ADB again to flash the rom: Type in CMD into the start screen or menu. In the resulting window, simply enter: ADB reboot recovery. This will bring you to the same prompt, but your phone will quietly disconnect and restart.
You should be able to type in ADB shell once your phone is recognized again, to be brought to a weird [6N] prompt. If this is not the case, check the drivers and their installed state for your phone.
Next, type in the following, followed by the enter key each time:
cd sdcard
twrp install name-of-my-rom.zip
TWRP install gapps-xx-xxxxxxxx.zip
wipe cache
wipe data
Replace the names of files here with your own! Each time, you will be told of what’s happening. Note that this is simple, but also probably the most dangerous operation, the one where your phone might become bricked. That is why you should double check a million times that the ROM you have is right for your phone and carrier! If not, you will have to revert back to the stock ROM, which also needs quite the time to be tracked down.
Having Troubles?
One common mistake people make is using the ADB drivers provided by clockwork mod. For some reason, these do not seem to expose the ADB interface for TWRP (presumably unpurpose), so always make sure the proper ADB driver for your phone’s manufacturer is installed. To check, open device manager by typing in “device manager” into the search box of your start screen and menu. Find your phone (it will be under the category of “android phone” in the tree view, and in there press enter on the first listed device. Press Control + Tab to go to the “details” page, and ensure that the “driver provider” is NOT clockwork mod. If this is the case, you will have to manually “update driver” and choose from the list of possibilities the one called “Android ADB composite interface.” This will be the google -provided driver, which should give you the ability to have access to the shell within TWRP’s recovery. Try ADB shell again to ensure it works.
Conclusions
I have no other words for you but to wish “safe flashing!” I barely scratched the surface of this art, and have now written an in-depth article on the basics. Yes, blind people can be successful phone flashers, thanks to the scriptable nature of TWRP. The biggest challenge is getting up close and personal with your phone, as it will be different from all the other phones you have. Feel free to comment on this article with discussions, perhaps you could help others by providing your personal experience here. If you have read this entire article, congratulations, and may the flash gods be with you.
Comments
comments from Tomi on eyes-free list
From Tomi:
Just wanted to let everyone know that as of the January 24th nightly,
Cyanogenmod has re-introduced some of their older core features into
the Android 5.0.2 lollypop lrx22G CM12 builds. These include the
cyanogenmod account, the text secure functionality, as well as other
customizations found in CM11.
For those who are blind, this means that accessibility with the
2-finger gesture at first boot is broken once more. Unfortunately,
they have removed the older setup wizard, calling functions from the
Google frameworks within their own to re-implement the custom wizard
they use.
As a work-around, if following my Rom flashing guide on
http://eurpod.net, you can do the following:
Once flashing is complete, download this modified settings.db:
http://eurpod.net/settings.db
place this in a folder where you can access ADB (hopefully you can
access ADB system-wide if using the installer I linked to in my
guide!)
Next, write this:
adb push settings.db /data/data/com.android.providers/databases/
This will push a modified settings file which has talkback already
enabled and "ready to rumble" in Cyanogenmod's own words.
As people who are blind or visually impaired, we should not be
accepting this kind of behavior. Keep in mind that once CM11 runs out
of life support, those builds will forever be stuck with the older
setup wizard with broken accessibility. As a consequence, those who
have devices which will not make the CM12 cut will face severe
challenges enabling accessibility.
I would urge everyone to consider submitting tickets and requests at
CM for this to not be an issue. Why do we accept sub-par work from
others in this community? My question for the day.
Congratulations
Waw, great article.
now I can try to learn to do roting.
I already downloaded the files
thanks friend.
cheers.
i need help please
greetings. i am abdullah from palestine and i am fairly new to the android world. i am thinking of rooting my device of samsung galaxy A8, but i am scared of screwing up. can anybody help me through skype or something like that? i would be thankful for anyhelp i get