[Android Software/Hacking General [Developers Only]] pandafloski:
ROOTING

Rooting is a very popular thing to do with your android phone these days. It allows you to do a number of things you wouldn't normally be able to do, such as use apps that require root permissions (wifi tethering, real backups, etc), flash custom/cooked ROM's, flash kernels, remove bloatware. and overclocking. Before you attempt rooting however, there are several things you should know first:

"Rooting" is, in vernacular terms, the Android OS equivalent of say, jailbreaking an iPhone.

To be exact, it means several things:

Name for an administrator on Android or any other Linux system.

The lowest level in a file system (for example: the root of your SD card would be the screen that comes up when you first open it, no other sub-folders.)

It also means having administrative powers over your phone.

It also voids your warranty if your phone company finds out.

So basically, by extension, rooting a phone means giving yourself rooting privileges. Think of it like this: Say you have an HTC Evo. Android is open-source, but you're only allowed to do on the phone what Sprint allows you to. Sprint wants to charge people $30 or $40 per month to do wifi tethering. A rooted phone could do wifi tethering for free, as you would be the administrator, and override the block.

PROS and CONS

1. Pros

Superuser permissions (full control over your phone, down to terminal commands).

Use root-requiring apps (wifi tether, backups, etc).

Over/underclocking

Ability to use a custom recovery.img (for flashing).

Flash custom ROMs and kernels

Flash other .zip files

Removing bloatware (apps that you don't want or need but can't normally delete)

Upgrading your firmware to later versions (such as phones that won't get the Froyo update)

2. Cons

Voided warranty

Possibility of bricking device

Possibility of damaging hardware

The cons are easy to avoid, as long as you do everything correctly and do your research first. As for your warranty, it's often just easier to say your phone was lost. If it's still covered by warranty, then you could be covered for it.

ROOTING METHOD

For how to root your phone, the internet is your best friend. However, if you are not comfortable, then look to see if you can get someone experienced to do it! All rooting will require you to put your phone in USB Debugging mode as well, which is turned on by going to Menu-->Settings-->Applications-->Check the USB Debugging box. My personal favorite resources are:

Software/apps:

Unrevoked

OneClick

SuperOneClick

z4root

Written Instructions:

Cyanogenmod Wiki

My Blog! (Still growing)

XDA Developers

Video Instructions:

Youtube

(See my youtube vids)

The Unlockr

For having someone do it for you: See craigslist. Someone may be offering the service or you can ask for it.

ALWAYS DO YOUR RESEARCH FIRST!

GROUND BASICS OF OPERATING A ROOTED PHONE:

A rooted phone acts the same as a non-rooted phone. The difference is usually under the hood.

You will need an application called "Superuser", downloadable from the app market. Most rooting methods install this automatically. It will have one of these two icons:

​

Any time something requires root permissions, it will ask for them. The first time around, you'll get a popup screen like this.

​

Just checkmark next to "remember" and you won't be prompted in the future.

Some popular apps that require superuser permissions:

Wifi Tethering - Self explanatory.

Titanium Backup - A powerful app for backing up your apps and data and restoring them (very useful if switching phones or if you wipe yours).

Autokiller - A powerful memory optimizer, helps with battery.

Overclock Widget - A widget that lets you overclock or underclock your processor. This requires a compatible kernel, which we'll get to in a second.

ROMs

ROM technically means "Read Only Memory", or your flash memory. In Android context though, it means porting a different firmware onto the phone. This is really where the magic of open-source comes into play:

ROMs usually come in ".zip" file format. DO NOT upzip them

ROMs are customized firmwares for your phone. "Customized" and "Cooked" are synonymous in Android context, and developers are the chefs. A ROM can be:

A minimalistic, fast firmware, and have certain features unlocked.

Upgrade your phone to 2.2 or 2.3 if you're stuck on an older firmware.

A completely new look and feel for people who don't like how their phone UI currently is (prevalent with many HTC Sense users).

An overclocking monster.

An undervolted battery saver.

Some combination of the above.

A quick way to brick your phone.

Bricking means your phone is an expensive paperweight, a "brick". Dead.

Notice the last bit about bricking. This is the biggest underlying risk in the rooting business. Many phones have corresponding software that will root the phone for you (Unrevoked, OneClick, SuperOneClick, z4root), but flashing is done manually, and someone who doesn't know what they're doing can brick their phone. Here is a basic guide to flashing:

Download a ROM

Good places to look are XDA or Cyanogenmod.

ROM Labels:

Vanilla - The stock ROM that comes standard on a phone.

CM - Cyanogenmod (or based on)

BACK UP YOUR INFORMATION.

This includes apps, contacts, texts (optional), and call logs (also optional).

You need to install a custom recovery, such as Amon Ra or Clockworkmod. They are both usually as easy to flash, and work generally the same.

Many softwares for rooting, such as Unrevoked, flash a new recovery image automatically.

If your method didn't, you can download an app called ROM Manager from the market. After installation, open it, and click "Flash Clockworkmod Recovery".

If the first two steps didn't work, then you'll have to research a way how.

Go to recovery mode, either from ROM Manager or manually.

Look up how to boot into recovery. For most phones, you'll navigate to it from the bootloader. which is started by turning on your phone while holding some combination of volume/camera buttons and the power button. Bootloader looks like this on most phones, though some vary (particularly Galaxy phones):

​

Your recovery will look like this:

​

Now there are a couple of important rules of thumb with flashing:

Always make a NANDROID backup. Navigate to it from the "nandroid" option in recovery. This is a little different than just backing up your contacts and pictures. It backs up your phone system as-is, like a sort of picture (metaphorically of course) of that moment. This gives you something stable to come restore to if something goes wrong.

When flashing a new ROM, if it's not just an update of the one you currently have, you SHOULD "wipe data/factory reset" and "wipe cache partition". Your information we backed up earlier is on your SD card, which remains untouched.

Now, ready to continue?

Select "install zip from sdcard", then "choose zip from sdcard".

Navigate to your ROM zip(s).

Select it, then scroll down to "YES".

LET IT FINISH. DO NOT TOUCH ANY BUTTONS.

Steps 1-4 of this section are what "FLASHING" means.

When it's done, repeat steps 1-4 of this section for any other zip files associated with it (themes, kernels, tweaks, etc)

When you're done, navigate back to the initial screen of your recovery mode using the "***go back***" options at the bottom of each list. From here, select "reboot phone now".

It will install any remaining packages now. Again, LET IT DO ITS WORK.

Your phone will reboot. If it locks up on boot, try reflashing, or if it just won't work, restore from a NAND backup.

There you have it. A new ROM is a big plus to many with androids. Those who are stuck with 2.1, or even 1.6 and 1.5 now can get a 2.2 ROM and upgrade their firmware, etc. You will no longer receive updates from your provider though, so it is your responsibility to keep your phone up to date by checking the developer's ROM updates, or if you like it as is and don't mind, just keep it like it is for all time.

​

KERNELS

Kernels are the lowest part of a system's software. It controls memory related things as well as processor things. It manages the communication between the hardware and the software, and caution should be exercised.

Kernels are flashed the same way ROMs are.

Many developers will recommend or develop a kernel to go along with their ROM.

Custom kernels are often needed to do overclocking, or undervolting (for battery optimization), etc.

Also downloaded from XDA and such.

Make sure you do your research and that it's compatible with your phone and/or ROM!

RADIOS, WIMAX, AND OTHERS

Often time you can flash updated versions of your phone's radio and wimax. Download and flash these like you would a ROM.