Should I root my device?

From F-Droid
Jump to: navigation, search

Gaining superuser access is frequently advertised as easy way to expand Android capabilities and get rid of bloatware, typically distributed by device manufacturers.

These instructions might not be correct for your device!

Read this forum topic for prolonged explanation.

Disclaimer

User-friendly interface of root software hides the fact, that such software can brick you device in no time. Even if you don't launch it. Even if you have already removed it. Rooting Android can potentially improve it's security, but also drastically increases attack surface for malware writers. If malware gets installed on non-rooted device from Google Play, it is highly likely to be automatically remotely removed by Google after a while. If it gets installed on rooted device and obtains root access, you are screwed.

If you don't use root applications, don't root!

Remember, everything is on YOUR OWN RISK! We are not responsible, if your device doesn't work or has some malfunctions.

There are several kind of devices:

  1. Pre-rooted devices... where you don't have to do anything.
  2. Ones with dev builds, due to the goodwill or carelessness of the vendor. Only devices in this category can be rooted via simple adb root method.
  3. Devices with production firmware and custom recovery like ClockworkMod. Devices in this category are easily rooted with udpate.zip files, available on site of the Superuser developer.
  4. Properly encumbered bricks, which require all updates to be signed by device vendor. Require completely device-specific rooting, often involving things like exploits and firmware downgrade.
  5. Over-the-top encumbered bricks with hardware protection etc. Hard or even impossible to root.

Start by finding out what kind of device you have.

Rooting Android devices using packages from F-Droid

There are several ways of rooting Android devices and there is no universal method, but if there are no measures taken by the manufacturer, chances are not that bad to get root by following the instructions below. Following this guideline, only packages from F-Droid will be pushed to your device. Keep in mind that we can't provide assistance for specific devices.

Before starting make sure you have a working ADB installed on your computer and that you can see your device when you run adb devices -l.

Then you need to enable installation from "Unknown Sources" and USB debugging on your device:

  1. Enable "Developer Options" by going to "System settings > About phone" and taping on the "Build number" seven times or until you see a notification saying that the developer options have been enabled.
  2. Enable "Android debugging" by going to the "System settings > Developer options" and check "Android debugging" in the "Debugging" section.
  3. Now enable installation from unknown sources by going to "System settings > Security" and checking the "Unknown sources" check-box. (Please read the warning message and confirm that you accept the risks presented.)

Once you have enabled installation from unknown sources download the Superuser and Terminal Emulator apps from the F-Droid repository.

Depending on your phone OEM USB Drivers or Google USB Driver may work. Often you have to install device specific drivers, provided by the manufacturer of your device.

Extract the su binary for your device from the downloaded Superuser apk file which is just an ordered zip archive file.

 NOTE: You can copy the superuser .apk file to a file with the .zip extension and then extract it as you would with any zip archive with 7-zip or a similar program.

The su binary is located in the /assets/armeabi folder inside the previously extracted archive.

 WARNING: Please check the CPU architecture first, the armeabi folder contains the binaries for ARM CPUs, but there are also other CPU architectures like mips and x86.

Start the adb daemon with root permissions:

 adb kill-server
 adb root
 adb remount
 NOTE: You might need to unlock your bootloader first.

Make sure the /system partition is mounted and copy the su binary to the device.

 adb push su /system/xbin/su

Start a remote shell and reset file ownership and permissions

 adb shell
 chown 0:0 /system/xbin/su
 chmod 6755 /system/xbin/su
 ln -sf /system/xbin/su /system/bin/su
 exit

Reboot your device

 adb reboot

Install the previously downloaded Superuser and Terminal Emulator APK files using adb.

 adb install jackpal.androidterm_*.apk
 adb install com.koushikdutta.superuser_*.apk

Now open "Terminal Emulator" on your Android device and type su. If # sign appears in the beginning of the line, you now have root.