Page semi-protected

Rooting (Android)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Screenshot of the "Root Verifier" app on a rooted Samsung Galaxy S10e

Rooting is the process of allowing users of smartphones, tablets and other devices running the Android mobile operating system to attain privileged control (known as root access) over various Android subsystems. As Android uses the Linux kernel, rooting an Android device gives similar access to administrative (superuser) permissions as on Linux or any other Unix-like operating system such as FreeBSD or macOS.

Rooting is often performed with the goal of overcoming limitations that carriers and hardware manufacturers put on some devices. Thus, rooting gives the ability (or permission) to alter or replace system applications and settings, run specialized applications ("apps") that require administrator-level permissions, or perform other operations that are otherwise inaccessible to a normal Android user. On Android, rooting can also facilitate the complete removal and replacement of the device's operating system, usually with a more recent release of its current operating system.

Root access is sometimes compared to jailbreaking devices running the Apple iOS operating system. However, these are different concepts: Jailbreaking is the bypass of several types of Apple prohibitions for the end user, including modifying the operating system (enforced by a "locked bootloader"), installing non-officially approved (not available on the App Store) applications via sideloading, and granting the user elevated administration-level privileges (rooting). Many vendors such as HTC, Sony, LG, Asus and Google explicitly provide the ability to unlock devices, and even replace the operating system entirely.[1][2][3][4] Similarly, the ability to sideload applications is typically permissible on Android devices without root permissions. Thus, it is primarily the third aspect of iOS jailbreaking (giving users administrative privileges) that most directly correlates to Android rooting.

Rooting is distinct from SIM unlocking and bootloader unlocking. The former allows removing the SIM lock on a phone, while the latter allows rewriting the phone's boot partition (for example, to install or replace the operating system).[5]

Overview

Rooting lets all user-installed applications run privileged commands typically unavailable to the devices in the stock configuration. Rooting is required for more advanced and potentially dangerous operations including modifying or deleting system files, removing pre-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 by requesting approval from the user before granting said permissions. 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 called 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 US carriers, including AT&T, prevented the installation of applications not on the Play Store in firmware,[6] although several devices are not subject to this rule, including the Samsung Infuse 4G;[7] AT&T lifted the restriction on most devices by the middle of 2011.[8]

As of 2011, 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,[9] and the "easy installer" application on the Amazon Appstore makes this easy. Other vendors of Android devices may look to other sources in the future. Access to alternate apps may require rooting but rooting is not always necessary.

Rooting an Android phone lets the owner add, edit or delete system files, which in turn lets them perform various tweaks and use apps that require root access.[10]

Advantages

Advantages of rooting include the possibility for complete control over the look and feel of the device. As a superuser has access to the device's system files, all aspects of the operating system can be customized with the only real limitation being the level of coding expertise.[11] Immediately expectable advantages of rooted devices include the following:[12][13]

  • Support for themes, allowing everything to be visually changed from the color of the battery icon, to the boot animation that appears while the device is booting, and more.
  • Full control of the kernel, which, for example, allows overclocking and underclocking the CPU and GPU.
  • Full application control, including the ability to fully backup, restore, or batch-edit applications, or to remove bloatware that comes pre-installed on some phones.
  • Custom automated system-level processes through the use of third-party applications.[14]
  • Ability to install a custom firmware (also known as a custom ROM) or software (such as Xposed, Magisk, BusyBox, etc.) that allows additional levels of control on a rooted device.

Related Concepts

Rooting allows the user to obtain privileged access to a phone. It does not allow a user to install a new OS or recovery image, and it doesn't allow a phone that locked to a certain carrier to be used on another one. Related operations allow these.

Bootloader Unlock

Bootloader unlocking is sometimes a first step used to root the phone; however, it is not the same as rooting the phone.[15] Most devices come with a locked bootloader, which prevents users from installing a new bootloader[16]. The bootloader run on device start-up and is in charge of loading the operating system on the phone.[17] It is generally in charge of verifying that phone system information hasn't been tampered with and is genuine. Nonetheless, people still perform this operation, as unlocking the bootloader allows users to install custom ROMs.[18]

The first step to do this is to generally to set up OEM unlocking,[19] and then to follow manufacturer specific instructions.[20] Not all phones can be bootloader unlocked.

SIM Unlock

SIM unlocking allows a phone that is locked to a certain carrier to be used on a different carrier. The instructions vary per device and carrier, but this might be done by first requesting the carrier to unlock the phone or purchasing an unlock code online.[21]

Methods

Some rooting methods involve the use of a command prompt and a development interface called the Android Debug Bridge (also known as ADB), while other methods may use existing vulnerabilities in devices. Due to similarly modeled devices often having a multitude of changes; rooting methods for one device when used for a different variant can result in bricking the device.[22]

"Systemless root" is a variant of rooting in which the underlying device filesystem is not modified. Systemless root uses various techniques to gain root access without modifying the system partition of a device. Some root applications may include a "hiding" function, which makes attempts to mask the effects and results of rooting, often by whitelisting certain applications for root, or blocking access to affected files.[22][23]

The distinction between "soft rooting" through a security vulnerability and "hard-rooting" by flashing a su binary executable varies from exploit to exploit, and manufacturer to manufacturer. Soft-rooting requires that a device be vulnerable to privilege escalation, or replacing executable binaries. Hard-rooting is supported by the manufacturer, and it generally only exposed for devices the manufacturer allows.[24] If a phone can be soft-rooted, it is also inherently vulnerable to malware.[24]

Rooting through exploits

The process of rooting varies widely by device, but usually includes exploiting one or more security bugs in the firmware of (i.e., in the version of the Android OS installed on) the device.[24] Once an exploit is discovered, a custom recovery image that will skip the digital signature check of firmware updates can be flashed. Then a modified firmware update that typically includes the utilities needed to run apps as root can be installed. For example, the su binary (such as an open-source one paired with the Superuser[25] or SuperSU application[26]) can be copied to a location in the current process' PATH (e.g., /system/xbin/) and granted executable permissions with the chmod command. A third-party supervisor application, like Superuser or SuperSU, can then 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.

The process of rooting a device may be simple or complex, and it even may depend upon serendipity. For example, shortly after the release of the HTC Dream (HTC G1), it was 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.

Rooting through manufacturer

Some manufacturers, including LG, HTC, and Motorola, provide official support for unlocking the bootloader, allowing for rooting without exploiting a vulnerability.[27] However, the support may be limited only to certain phones – for example, LG released its bootloader unlock tool only for certain models of its phones.[28]

The Google Nexus line of devices can have their bootloader unlocked by simply connecting the device to a computer while in bootloader mode and running the Fastboot protocol with the command fastboot oem unlock.[29] After a warning is accepted, the bootloader is unlocked, so a new system image can be written directly to flash without the need for an exploit.

Difficulties

In the past, many manufacturers have tried to make non-rootable phones with more elaborate protections (like the Droid X), but exploits are usually still found eventually. There may be no root exploit available for new, or outdated phones.[30]

Industry reaction

Until 2010, tablet and smartphone manufacturers, as well as mobile carriers, were mainly unsupportive of third-party firmware development. Manufacturers had expressed concern about improper functioning of devices running unofficial software[31] and related support costs. Moreover, firmware such as OmniROM and CyanogenMod sometimes offer features for which carriers would otherwise charge a premium, such as tethering. Due to that, 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-air firmware updates, 1.4.1 to Nook Tablets and 6.2.1 to Kindle Fires, that removed one method 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).[32][33]

However, as community-developed software began to grow popular in the late 2009 to early 2010,[34][35] and following a statement by the Copyright Office and Librarian of Congress (US) allowing the use of "jailbroken" mobile devices,[36][37] manufacturers and carriers have softened their position regarding CyanogenMod and other unofficial firmware distributions. Some manufacturers, including HTC,[38] Samsung,[39] Motorola[40] and Sony Mobile Communications,[41] actively provide support and encourage 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 will support aftermarket software developers by making the bootloaders of all new devices unlockable.[31] However, carriers, such as Verizon Wireless and more recently AT&T, have continuously blocked OEMs from releasing retail devices with unlocked bootloaders, opting instead for "developer edition" devices that are only sold unsubsidized and off-contract. These are similar in practice to Nexus devices, but for a premium and with no contract discounts.

In 2014, Samsung released a security service called Knox, which is a tool that prevents all modifying of system and boot files, and any attempts set an e-fuse to 0x1, permanently voiding the warranty.[42]

Legality

International treaties have influenced the development of laws affecting rooting. The 1996 World Intellectual Property Organization (WIPO) Copyright Treaty requires nations party to the treaties to enact laws against digital rights management (DRM) circumvention. The American implementation is the Digital Millennium Copyright Act (DMCA), which includes a process for establishing exemptions for non-copyright-infringing purposes such as rooting. The 2001 European Copyright Directive implemented the treaty in Europe, requiring member states of the European Union to implement legal protections for technological protection measures. The Copyright Directive includes exceptions to allow breaking those measures for non-copyright-infringing purposes, such as to run alternative software,[43] but member states vary on the implementation of the directive.

Australia

In 2010, Electronic Frontiers Australia said that it is unclear whether rooting is legal in Australia, and that anti-circumvention laws may apply.[44] These laws were strengthened by the Copyright Amendment Act 2006.

Canada

In November 2012, Canada amended its Copyright Act with new provisions prohibiting tampering with digital locks, with exceptions including software interoperability.[45] Rooting a device to run alternative software is a form of circumventing digital locks for the purpose of software interoperability.

There had been several efforts from 2008 to 2011 to amend the Copyright Act (Bill C-60, Bill C-61, and Bill C-32) to prohibit tampering with digital locks, along with initial proposals for C-11 that were more restrictive,[46] but those bills were set aside. In 2011, Michael Geist, a Canadian copyright scholar, cited iPhone jailbreaking as a non-copyright-related activity that overly broad Copyright Act amendments could prohibit.[47]

European Union

The Free Software Foundation Europe argues that it is legal to root or flash any device. According to the European Directive 1999/44/EC, 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.[48]

United Kingdom

The law Copyright and Related Rights Regulations 2003 makes circumventing DRM protection measures legal for the purpose of interoperability but not copyright infringement. Rooting may be a form of circumvention covered by that law, but this has not been tested in court.[43][49] Competition laws may also be relevant.[50]

India

India's copyright law permits circumventing DRM for non-copyright-infringing purposes.[51][52] Indian Parliament introduced a bill including this DRM provision in 2010 and passed it in 2012 as Copyright (Amendment) Bill 2012.[53] India is not a signatory to the WIPO Copyright Treaty that requires laws against DRM circumvention, but being listed on the US Special 301 Report "Priority Watch List" applied pressure to develop stricter copyright laws in line with the WIPO treaty.[51][52]

New Zealand

New Zealand's copyright law allows the circumvention of technological protection measure (TPM) as long as the use is for legal, non-copyright-infringing purposes.[54][55] This law was added to the Copyright Act 1994 as part of the Copyright (New Technologies) Amendment Act 2008.

Singapore

Rooting might be legal in Singapore if done to provide interoperability and not circumvent copyright, but that has not been tested in court.[56]

United States

The Unlocking Consumer Choice and Wireless Competition Act guarantees that consumers can unlock or let others unlock their phones. Under the Digital Millennium Copyright Act (DMCA) rooting was illegal in the United States except by exemption. The U.S. Copyright Office granted an exemption to this law "at least through 2015".[57]

In 2010, in response to a request by the Electronic Frontier Foundation, the U.S. Copyright Office explicitly recognized an exemption to the DMCA to permit rooting.[58][59] In their ruling, the Library of Congress affirmed on July 26, 2010, that rooting is exempt from DMCA rules with respect to circumventing digital locks. DMCA exemptions must be reviewed and renewed every three years or else they expire.

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 refused 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.[60][61][62] The Copyright Office also renewed the 2010 exemption for unofficially unlocking phones to use them on unapproved carriers, but restricted this exemption to phones purchased before January 26, 2013.[61]

Tim Wu, a professor at Columbia Law School, argued in 2007 that jailbreaking is "legal, ethical, and just plain fun".[63] Wu cited an explicit exemption issued by the Library of Congress in 2006 for personal unlocking, which notes that locks "are used by wireless carriers to limit the ability of subscribers to switch to other carriers, a business decision that has nothing whatsoever to do with the interests protected by copyright" and thus do not implicate the DMCA.[64] Wu did not claim that this exemption applies to those who help others unlock a device or "traffic" in software to do so.[63] In 2010 and 2012, the U.S. Copyright Office approved exemptions to the DMCA that allow users to root their devices legally.[65] It is still possible to employ technical countermeasures to prevent rooting or prevent rooted phones from functioning.[66] It is also unclear whether it is legal to traffic in the tools used to make rooting easy.[66]

See also

References

  1. ^ "HTC Bootloader Unlock Instructions". htcdev.com. Retrieved 26 October 2014.
  2. ^ "Official Bootloader Unlock instructions". sonymobile.com.
  3. ^ "LG Developer". developer.lge.com. Retrieved 2020-05-31.
  4. ^ "#unlocking-the-bootloader Google instructions on bootloader unlocking". source.android.co.m. Retrieved 26 October 2014.
  5. ^ "Difference between Rooting, SIM Unlocking & Bootloader Unlocking". www.c-sharpcorner.com. Retrieved 2020-10-01.
  6. ^ "The Official AT&T FAQs". Wireless.att.com. Retrieved December 18, 2011.
  7. ^ "Samsung INFUSE 4G capable of side-loading apps, accessing Amazon Appstore". MobileBurn. May 7, 2011. Archived from the original on May 18, 2013. Retrieved December 18, 2011.
  8. ^ Mike Luttrell (May 19, 2011). "AT&T customers can finally use Amazon's Appstore". TG Daily. Retrieved July 27, 2012.
  9. ^ Austin Krause (December 8, 2011). "How to Enable Sideloading on the Kindle Fire". groovyPost. Retrieved July 27, 2012.
  10. ^ Gaurav Gahlyan (November 3, 2012). "What you can do after rooting your Android device". Droidiser. Retrieved November 20, 2012.
  11. ^ "What Is Rooting Android Phone? Advantages And Disadvantages". Root Mygalaxy. Retrieved 22 November 2014.
  12. ^ "Five Reasons Why Everyone Should "Root" Their Android". Review Lagoon. 30 August 2012. Retrieved 6 January 2015.
  13. ^ Whitson Gordon. "Top 10 Reasons to Root Your Android Phone". Lifehacker. Gawker Media. Retrieved 6 January 2015.
  14. ^ "Advantages of Rooting Your Android Device". spyappsmobile.com. Retrieved 3 October 2014.
  15. ^ Twitter; LinkedIn. "Easily Unlock Your Android Bootloader With Fastboot". Lifewire. Retrieved 2020-10-01.
  16. ^ "Locking/Unlocking the Bootloader". Android Open Source Project. Retrieved 2020-10-01.
  17. ^ "Overview". Android Open Source Project. Retrieved 2020-10-01.
  18. ^ "What is the bootloader?". Android Central. 2012-01-03. Retrieved 2020-10-01.
  19. ^ "How to Enable OEM Unlocking on Android [OEM Unlock]". The Custom Droid. 2018-03-12. Retrieved 2020-10-01.
  20. ^ Twitter; LinkedIn. "Easily Unlock Your Android Bootloader With Fastboot". Lifewire. Retrieved 2020-10-01.
  21. ^ "How Does Unlocking SIM Cards Work?". Small Business - Chron.com. Retrieved 2020-10-01.
  22. ^ a b "How to root Android phone". Androidical. Retrieved 11 May 2020.
  23. ^ "How to play Pokémon GO (0.37+) on a rooted Android with Magisk". Android Police. Retrieved 19 May 2017.
  24. ^ a b c Zhang, Hang; She, Dongdong; Qian, Zhiyun (2015-01-01). "Android Root and Its Providers: A Double-Edged Sword". Proceedings of the 22Nd ACM SIGSAC Conference on Computer and Communications Security. CCS '15. New York, NY, USA: ACM: 1093–1104. doi:10.1145/2810103.2813714. ISBN 9781450338325.
  25. ^ "ChainsDD/su-binary". GitHub. Retrieved 2016-10-08.
  26. ^ "How to Root Your Android Phone with SuperSU and TWRP". Retrieved 2016-10-08.
  27. ^ "Everything you need to know about rooting your Android". Android Central. 2016-06-06. Retrieved 2016-10-08.
  28. ^ "LG Releases Its Long Promised Bootloader Unlock Tool, But It Currently Only Supports The G4 For The EU Open Market (H815)". Android Police. 2015-06-02. Retrieved 2016-10-08.
  29. ^ "Building for devices". Google Git. Google Inc. Retrieved 9 December 2015.
  30. ^ "Everything You Need to Know About Rooting Your Android Phone". Lifehacker.com. Retrieved 2014-02-26.
  31. ^ a b "Unlock Bootloader". Retrieved October 30, 2011.
  32. ^ Smith, Peter (December 21, 2011). "Kindle Fire and Nook Tablet both get 'upgraded' with reduced functionality". ITworld. Retrieved January 10, 2012.
  33. ^ Verry, Tim (December 21, 2011). "Kindle Fire and Nook Tablet Receive Root Access Killing Software Updates". PC Perspective. Retrieved January 10, 2012.
  34. ^ Jason Perlow (January 18, 2011). "CyanogenMod CM7: Teach your old Droid New Tricks". ZDNet. Retrieved January 4, 2012.
  35. ^ "MIUI firmware is "popular"". AndroidAndMe. August 16, 2011. Retrieved January 4, 2012.
  36. ^ Sadun, Erica (July 26, 2010). "LoC rules in favor of jailbreaking". Tuaw.com. Archived from the original on October 30, 2012. Retrieved January 4, 2012.
  37. ^ "Statement of the Librarian of Congress Relating to Section 1201 Rulemaking". Library of Congress. December 1, 2012. Retrieved November 7, 2018.
  38. ^ "HTC's bootloader unlock page". Htcdev.com. Retrieved January 4, 2012.
  39. ^ "CyanogenMod supported by Samsung, gives away Galaxy S2 to devs". ITMag. Archived from the original on January 5, 2015. Retrieved 9 December 2015.
  40. ^ "Motorola Offers Unlocked Bootloader Tool". Techcrunch.com. October 24, 2011. Retrieved January 4, 2012.
  41. ^ Dahlström, Karl-Johan. "Sony Ericsson supports independent developers". Sony Mobile Communications. Retrieved 9 December 2015.
  42. ^ "All you wanted to know about KNOX Void Warranty 0x1". web.archive.org. 2018-12-30. Retrieved 2020-08-27.
  43. ^ a b Duncan Geere (July 28, 2010). "Investigation: Is it legal to jailbreak a UK iPhone?". Wired UK. Retrieved October 26, 2012.
  44. ^ Rosalyn Page (August 5, 2010). "Could jailbreaking your iPhone land you in jail?". PC & Tech Authority. Retrieved January 21, 2013.
  45. ^ Michael Geist (November 7, 2012). "Canadian Copyright Reform In Force: Expanded User Rights Now the Law". michaelgeist.ca. Retrieved November 13, 2012.
  46. ^ "Canada's C-11 Bill and the Hazards of Digital Locks Provisions". Electronic Frontier Foundation. February 10, 2012. Retrieved October 17, 2012.
  47. ^ The Canadian Press (October 13, 2011). "Phone 'jailbreaking' allows users to hack their phone". CTV News. Retrieved October 17, 2012.
  48. ^ Matija Šuklje. "Does rooting your device (e.g. an Android phone) and replacing its operating system with something else void your statutory warranty, if you are a consumer?". Retrieved 26 October 2014.
  49. ^ Jim Martin (March 14, 2012). "How to jailbreak your iPhone: Unleash the full potential of your iPhone". PC Advisor. Retrieved January 21, 2013.
  50. ^ Warwick Ashford (July 30, 2010). "iPhone jailbreaking is 'okay under EU law'". Computer Weekly. Electronics Weekly. Retrieved January 21, 2013.
  51. ^ Pranesh Prakash (May 23, 2012). "Analysis of the Copyright (Amendment) Bill 2012". Centre for Internet and Society. Retrieved November 10, 2012.
  52. ^ Michael Geist (April 10, 2008). "New Zealand's Digital Copyright Law Demonstrates Anti-Circumvention Flexibility". Michael Geist. Retrieved October 26, 2012.
  53. ^ Stephen Bell (September 30, 2011). "Law changes required before NZ ratifies ACTA". ComputerWorld New Zealand. Archived from the original on September 30, 2011. Retrieved October 26, 2012.
  54. ^ Kenny Chee (August 12, 2010). "iPhone jailbreak may be legal here, but... But there will be certain legal provisions". DigitalOne. AsiaOne. Archived from the original on August 15, 2010. Retrieved November 10, 2012.
  55. ^ "Is It Illegal To Unlock a Phone? The Situation is Better - and Worse - Than You Think | Electronic Frontier Foundation". Eff.org. 2013-01-28. Retrieved 2014-02-26.
  56. ^ "Copyright office provides exemption to DMCA". United States Copyright Office. February 12, 2009. Retrieved July 17, 2009.
  57. ^ Declan McCullagh (July 26, 2010). "Feds say mobile-phone jailbreaking is OK". Politics and Law. CNET. Retrieved October 26, 2011.
  58. ^ a b Timothy B. Lee (October 25, 2012). "Jailbreaking now legal under DMCA for smartphones, but not tablets". Ars Technica. Retrieved October 26, 2012.
  59. ^ "New DMCA Exemptions Allow Rooting Phones (But Not Tablets), Unapproved Phone Unlocks Will Be A Thing Of The Past". Android Police. Retrieved October 31, 2012.
  60. ^ a b Tim Wu (October 4, 2007). "The iPhone Freedom Fighters". Technology. Slate. Retrieved October 26, 2011.
  61. ^ "Federal Register: Exemption to Prohibition on Circumvention of Copyright Protection Systems for" (PDF). Retrieved September 11, 2010.
  62. ^ David Goldman (July 26, 2010). "Jailbreaking iPhone apps is now legal". CNN Money. Retrieved September 11, 2010.
  63. ^ a b "Transcript of "Jailbreak?" (July 30, 2010)". On The Media. July 30, 2010. Archived from the original on July 31, 2010. Retrieved September 11, 2010.