PLEASE DO NOT DO THIS IF YOU DON'T KNOW OR UNDERSTAND ABOUT IT.IF EVEN A SMALL MISTAKE HAPPENS,YOU CAN NEVER GET BACK YOUR ANDROID DEVICE.I AM NOT RESPONSIBLE FOR ANYTHING HAPPENING TO YOUR DEVICE.
What is Rooting?
By default most Android devices do not give you “root access.” Root access is basically full control over your phone and all its workings. Manufacturers disable this by default. They do this for good reason—and it’s not just to control or limit you. If someone had this access and didn’t know what they were doing, they could do some real damage to their smartphone. So manufacturers keep devices locked by default to prevent you from turning your phone into an expensive paperweight.
A good way to understand rooting is to think of your Android like your brain. You have to actively remember what’s on your to-do list today, how to play a game, how to drive a car, and any other skills you were required to learn in life. Those functions are ones you can change in your brain. Now, as a comparison, if you were to root your brain (that is, gain access to all the workings of it), you could control aspects of your body that you couldn’t before—like breathing, heart rate, and adrenaline levels. As you can imagine, there are good reasons why your body doesn’t want you to change some basic functions. If you were to say, voluntarily increase your heart rate to 300 beats per minute, your heart might explode! But think how powerful it would be if you could tweak a few of those things in your brain whenever you wanted! Well that’s exactly the same power you can have over your Android device.
Reasons For Rooting
Rooting is often performed with the goal of overcoming limitations that carriers and hardware manufacturers put on some devices, resulting in the ability to alter or replace system applications and settings, run specialized apps that require administrator-level permissions, or perform other operations that are otherwise inaccessible to a normal Android user.
"Rooting vs. Jailbreaking"
Gaining root access is sometimes compared to
jailbreaking devices running the Apple
iOS operating system. However, these are distinct concepts. In the heavily secured iOS world, restrictions prevent (1) installing or booting into a modified or new operating system (a "locked bootloader" prevents this), (2)
sideloading unsigned applications onto the device is prevented and user-installed apps are (3) prevented from root permission and run in a secure sandbox. Bypassing all these restrictions together constitute the expansive term "jailbreaking" of Apple devices, overcoming several types of iOS security features.
By contrast, while many Android devices have locked bootloaders, the ability to sideload apps is common and usually permissible without root permissions. Thus, it is primarily the third aspect of iOS jailbreaking relating to superuser privileges that correlates to Android rooting.
Description
Rooting enables all the user-installed applications to run privileged commands that are typically unavailable to the devices in their stock configuration. Rooting is required for more advanced and potentially dangerous operations including modifying or deleting system files, removing carrier- or manufacturer-installed applications, and low-level access to the hardware itself (rebooting, controlling status lights, or recalibrating touch inputs.) A typical rooting installation also installs the Superuser application, which supervises applications that are granted root or superuser rights.
A secondary operation, unlocking the device's bootloader verification, is required to remove or replace the installed operating system.
In contrast to iOS jailbreaking, rooting is not needed to run applications distributed outside of the Google Play Store, sometimes referred to as "sideloading". The Android OS supports this feature natively in two ways: through the "Unknown sources" option in the Settings menu and through the Android Debug Bridge. However some carriers, like AT&T, prevent the installation of applications not on the Store in firmware, although several devices (including the Samsung Infuse 4G) are not subject to this rule, and AT&T has since lifted the restriction on several older devices.
As of 2012 the Amazon Kindle Fire defaults to the Amazon Appstore instead of Google Play, though like most other Android devices, Kindle Fire allows sideloading of applications from unknown sources, and the "easy installer" application on the Amazon Appstore makes this easy. Other vendors of Android devices may lock to other sources in the future. Access to alternate apps may require rooting but rooting is not always necessary.
Rooting an Android phone allows one to modify or delete the system files which in turn can allow them to perform various tweaks, and use apps which require root access.
Process
The process of rooting varies widely by device, but usually includes exploiting a security weakness in the firmware of the device, and then copying the su binary to a location in the current process's PATH (e.g. /system/xbin/su
) and granting it executable permissions with the chmod command. A supervisor application like SuperUser or SuperSU can regulate and log elevated permission requests from other applications. Many guides, tutorials, and automatic processes exist for popular Android devices facilitating a fast and easy rooting process.
For example, shortly after the HTC Dream was released, it was quickly discovered that anything typed using the keyboard was being interpreted as a command in a privileged (root) shell. Although Google quickly released a patch to fix this, a signed image of the old firmware leaked, which gave users the ability to downgrade and use the original exploit to gain root access. Once an exploit is discovered, a custom recovery image that skips the digital signature check of a firmware update package can be flashed. In turn, using the custom recovery, a modified firmware update can be installed that typically includes the utilities (for example the Superuser app) needed to run apps as root.
The Google-branded Android phones, the Nexus One, Nexus S, Galaxy Nexus and Nexus 4, as well as their tablet counter parts, the Nexus 7 and Nexus 10, can be boot-loader unlocked by simply connecting the device to a computer while in boot-loader mode and running the Fastboot program with the command "fastboot oem unlock".[7] After accepting a warning the boot-loader will be unlocked so that a new system image can be written directly to flash without the need for an exploit.
Recently, Motorola, LG Electronics and HTC have added security features to their devices at the hardware level in an attempt to prevent retail Android devices from being rooted. For instance, the Motorola Droid X has a security boot-loader that will put the phone in "recovery mode" if unsigned firmware is loaded onto the device, and the Samsung Galaxy S II will display a yellow triangle indicator if the device firmware has been modified.
Industry Reaction
Until the early 2010s, the response of tablet and smartphone manufacturers and mobile carriers had typically been unsupportive of third-party firmware development. Manufacturers had expressed concern about improper functioning of devices running unofficial software and related support costs. Moreover, firmware such as CyanogenMod sometimes offers features for which carriers would otherwise charge a premium (e.g., tethering). As a result, technical obstacles such as locked bootloaders and restricted access to root permissions have commonly been introduced in many devices. For example, in late December 2011, Barnes & Noble and Amazon.com, Inc. began pushing automatic, over-the-airfirmware updates, 1.4.1 to Nook Tablets and 6.2.1 to Kindle Fires, that removed users' ability to gain root access to the devices. The Nook Tablet 1.4.1 update also removed users' ability to sideload apps from sources other than the official Barnes & Noble app store (without modding).
However, as community-developed software began to grow popular in the late 2000s to early 2010s, and following a statement by the Copyright Office and Librarian of Congress (US) allowing the use of "jailbreaking" mobile devices, manufacturers and carriers have softened their position regarding CyanogenMod and other unofficial firmware distributions, with some, including HTC, Samsung, Motorola and Sony Ericsson, even actively providing support and encouraging development.
In 2011, the need to circumvent hardware restrictions to install unofficial firmware lessened as an increasing number of devices shipped with unlocked or unlockable bootloaders, similar to the Nexus series of phones. Device manufacturer HTC has announced that it would support aftermarket software developers by making the bootloaders of all new devices unlockable.
Legality
Europe
The Free Software Foundation Europe argues that it is legal to root or flash any device. According to the European Directive 1999/44/CE, replacing the original operating system with another does not void the statutory warranty that covers the hardware of the device for two years unless the seller can prove that the modification caused the defect.
United States
On July 26, 2010, the United States Copyright Office announced a new exemption making it officially legal to root a device and run unauthorized third-party applications, as well as the ability to unlock any cell phone for use on multiple carriers.
On October 28, 2012, the US Copyright Office updated their exemption policies. The rooting of smartphones continues to be legal "where circumvention is accomplished for the sole purpose of enabling interoperability of [lawfully obtained software] applications with computer programs on the telephone handset." However, the U.S. Copyright office declined to extend this exemption to tablets, arguing that the term "tablets" is broad and ill-defined, and an exemption to this class of devices could have unintended side effects.
taken from
http://en.wikipedia.org/wiki/Android_rooting.