Mobile/Fennec/Android/Rooting: Difference between revisions

From MozillaWiki
< Mobile‎ | Fennec‎ | Android
Jump to navigation Jump to search
Line 36: Line 36:
Should the previous approach not work:
Should the previous approach not work:


Follow this guide with the following notes. You will require a windows machine:(
Follow this [http://www.iwantadroid.com/2011/07/how-to-root-galaxy-tab-10-1-the-easy-way-galaxy-tab-hacks/ guide] with the following notes. You will require a Windows machine :(
 
http://www.iwantadroid.com/2011/07/how-to-root-galaxy-tab-10-1-the-easy-way-galaxy-tab-hacks/


* Turn off USB debugging while rooting. You'll be moving files over via ODIN
* Turn off USB debugging while rooting. You'll be moving files over via ODIN
* After rooting, every application that requires root access will ask for permission to run, and you will have the option to allow it or not. If you do want it to run, hit 'allow', but be warned, if you do not hit 'allow', then instead of exiting, the application may timeout or hang, or any other unexpected event. If you regret this and do not want it to run, go to the Superuser app you have just installed and remove the permission.
* After rooting, every application that requires root access will ask for permission to run, and you will have the option to allow it or not. If you do want it to run, hit 'allow', but be warned, if you do not hit 'allow', then instead of exiting, the application may timeout or hang, or any other unexpected event. If you regret this and do not want it to run, go to the Superuser app you have just installed and remove the permission.
* Before you go and do whatever fun development you're planning to do, backup your current image with ROM manager (https://market.android.com/details?id=com.koushikdutta.rommanager&hl=en) and remember to copy the image off the tablet and into a safe device! If you wipe your tablet's internal memory, then your backups get wiped too, so to avoid this pitfall, just store a backup now.
* Before you go and do whatever fun development you're planning to do, backup your current image with [https://market.android.com/details?id=com.koushikdutta.rommanager&hl=en ROM manager] and remember to copy the image off the tablet and into a safe device! If you wipe your tablet's internal memory, then your backups get wiped too, so to avoid this pitfall, just store a backup now.
* Another recommended app is Titanium Backup (http://matrixrewriter.com/android/) which will backup your apps.
* Another recommended app is [http://matrixrewriter.com/android/ Titanium Backup] which will backup your apps.


=== LG G2x ===
=== LG G2x ===

Revision as of 21:59, 27 September 2011

Rooting Android Devices

Motivation

"rooting" an Android device is the process by which one gains root access on the device. There's a few reasons why this is desirable for Firefox development:

  • Run gdb more easily
  • Can install additional tools (busybox!) to make development easier
  • Install a variety of custom ROMs to test Firefox under different conditions

It's important to note that these instructions come with no warranty whatsoever. You could easily brick your device or unknowingly install a rootkit. There's lots of legitimate reasons to do this, but be careful!

Guide to rooting individual devices

Galaxy Tab

These are the steps I used to root the galaxy tab 10.1 machine I got at the Mozilla All Hands in September 2011 (running Android 3.1).

This tutorial is based on: http://www.addictivetips.com/mobile/how-to-root-samsung-galaxy-tab-10-1/. I'm putting this here here for a few reasons:

  • Brevity
  • There's a few tricky bits (like how to get to the boot screen) which cry out for more explanation

Conceptually it's quite simple, though it can be tricky. Follow these instructions carefully, and please update this page if you think anything could be described more clearly:

adb push Samsung_Galaxy_Tab_10.1_root.zip /sdcard/Samsung_Galaxy_Tab_10.1_root.zip
  • Reboot the device in bootloader mode (Power off then press volume down + power at the same time. If that doesn't work, try: Power off. Press Power on, wait 1 second, then hold volume down until the "Downloading..." icon appears.)
  • You'll see a misleading icon saying "Downloading...". Ignore it and press the volume button up button, then the power button, to select the other option.
  • Select the option to apply an update from SD card (FIXME: that's inexact-- after having completed this, I can't get to this screen anymore).
  • That's it! You should now be rooted. Reboot. If it didn't work, try doing that again (sometimes it might not take). Basically all the above script does is install a specially crafted program called "su" and give the regular user permission to run it. Yes, it's that simple.


Should the previous approach not work:

Follow this guide with the following notes. You will require a Windows machine :(

  • Turn off USB debugging while rooting. You'll be moving files over via ODIN
  • After rooting, every application that requires root access will ask for permission to run, and you will have the option to allow it or not. If you do want it to run, hit 'allow', but be warned, if you do not hit 'allow', then instead of exiting, the application may timeout or hang, or any other unexpected event. If you regret this and do not want it to run, go to the Superuser app you have just installed and remove the permission.
  • Before you go and do whatever fun development you're planning to do, backup your current image with ROM manager and remember to copy the image off the tablet and into a safe device! If you wipe your tablet's internal memory, then your backups get wiped too, so to avoid this pitfall, just store a backup now.
  • Another recommended app is Titanium Backup which will backup your apps.

LG G2x

See: http://wiki.cyanogenmod.com/wiki/LG_G2x:_Full_Update_Guide (just the jailbreaking part, unless you want to install Cyanogenmod)

What to do after rooting your device

  • Install the ROM Manager app from the Android store (should help manage updating your device in the future)
  • The default shell on Android sucks. Do better by installing busybox (look on the Android store for a busybox installer). I haven't yet managed to get this working, will update this if/when I do.