• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [DRAFT] Guide to All Things Root Related

Status
Not open for further replies.

Trident

Android Expert
Jan 20, 2010
3,035
2,307
Virginia Beach, VA

What you need to know first:



Benefits of Rooting

Okay, so you know “how” to Root your phone… but why do it? What exactly can you get out of a Ally that has been rooted?
Well, aside from being cool and geeky, there are a few real benefits. Think of your Ally as a supercar. If you drive it only in subdivision streets, you aren’t really pushing it to its capabilities. However, if you take it to a track or maybe the Autobahn, you can open her up and unleash its power. Obtaining root is like taking your car to the Autobahn, except nerdier!
Enough of the analogies! Show me what I can do.
Most people want to root their phones for one reason: loading custom ROMs. A ROM, when it is applied to smartphone operating systems, is a fully customized image that alters the function and form of the device. For instance, a ROM could be a port of the Gingerbread or HTC Sense found on other Android phones. A person with root could potentially take this port, if made available, and put it on their Ally.
Another benefit of obtaining Root is the use of Root-only applications. Some applications require superuser permissions in order to operate. You can think of “superuser” as a limitless administrative role for the Android OS. It is given full control over what can be done on the software level. Superuser requires root, and thus, so do certain apps. You can download Terminal Emulator which allow you to enter Android OS code to communicate with the system, Drocap2 which can take screengrabs anywhere on the phone, Adfree which disables advertisements on the web and in other apps, etc… There are many very cool apps out there made specifically for root users!
One of the richest abilities given to root users is scripting and customization. Given a mix of apps, the SDK, and scripts, root users can change the way their phone feels and operates. Things like skinning every aspect of the OS, upgrading features that aren't yet released, and creating all new functionality altogether could not be possible without root. There is so much capability - it’s an awesome time to be a part of the root community. There are groundbreaking discoveries and releases that will completely change the way you think about your Ally.
Rooting your phone is a fun, educational, and useful way of getting the most out of your device. But as always, there are risks involved every step of the way. Just be smart and careful, and don’t get ahead of yourself. I created this site as a guide for the average Joe, but even a plain-English guide can seem daunting for the more advanced operations. You need to keep in mind that by rooting your Ally, you are most definitely going against the Verizon TOS and will be breaking your warranty. Though there are ways to revert back to a completely root-free device, I can’t assure you this will not get you into trouble in the future.
Avoid Bricking
If you simply take your time and do things right, you can eliminate much - if not all -of that risk!
Obviously, the goal around here isn’t to pile as many non-working Ally’s into landfills as possible. We want you to successfully enhance the ability of your phone! So here are a few tips to help keep you from the dreaded brick…
Bricking an Ally is actually quite hard to accomplish because almost anything can be recovered with the LG Mobile Updater.

  • Follow directions carefully, making sure to read through them before beginning.
  • Go slow and take your time on every detail.
  • Research the action you are about to perform; if you don’t know much about it, become educated.
  • Trust your instinct. If you are unsure about something, perhaps you shouldn’t try.
  • Follow instructions fully. If you forget a step or quit before you’re done, there may be problems.
So happy rooting! And remember, as always, we are not responsible for your mistakes.

Preliminary Skills:
[Hide]USB Debugging
USB Debugging is a common procedure used in rooting and hacking the Droid. Simply said, it allows the Android Debugging Bridge to work its magic by allowing a seamless handshake between Ally and PC. We use this mode for copying data between the Ally and PC, installing apps, reviewing phone data, and for development purposes. It is very easy to setup, requiring only a system setting to be enabled.
Begin by connecting your Droid to a PC via USB. Go into the Ally Settings application and select Applications.


Select Development.


Ensure “USB debugging” is checked. You will be asked if you want to enable debugging, select yes.


And that is all there is to it. You now have a direct connection with ADB and your PC. We will do this to our phones most every time we need to transfer files via ADB.
Sometimes, people will have incompatible preloaded drivers on their computers. This may result in a “Device Not Found” error when following some guides. To remedy this, please refer to the USB Debugging Drivers guide.

Mounting The SD card to transfer files

Since your MicroSD card is buried underneath your battery, it is silly to remove it and use a card reader every time you want to copy files over to it. Fortunately, the Ally allows you to easily mount the MicroSD card as a mass storage device, similar to a USB Thumbdrive. Though we may also use ADB to copy files from our PC to our MicroSD card, this requires no Command Prompt or code use.

Mounting the MicroSD Card:

Connect your Droid to a PC via USB. You will be notified that there is a USB connection. Drag down the notification shade and select “USB connected.”


You will now see an option to mount your phone; do so at this time by selecting “Mount.”


This will turn your Droid into a mass storage device. Your computer should automatically recognize it and an autorun popup should appear on your desktop.


Browse the files so that you see the contents of your SD card. You are now ready to transfer files onto the MicroSD card.
Turning Off MicroSD Mounting:
Slide down the notification shade and select “Turn off USB storage.”


An option will popup allowing you to “Turn Off”–select this now.


If you haven’t closed the SD Card folder on your computer, the window should close automatically once you turn off USB storage.

ADB, command line bridge between the Android SDK and the Ally

The Ally is a highly hackable device, and much of this is due to the rich developer support directly from Google. As many of you know, the Ally runs the Android operating system which has been developed and pushed by Google. Not only do they provide the end-user OS you use on the phone, but they have created a full-featured SDK for private developers.
An SDK, or Software Developer’s Kit, is a collection of scripts, code, programs, and knowledge bases that assist people in creating Android apps and working inside the OS. It is a completely free package and is absolutely essential for higher level mods. You can read more about the SDK and download it from here:
Android SDK | Android Developers
There is also an in-depth installation guide. It does not matter where on your computer the SDK folder is located and installed to. Follow the install guide before proceeding.
Inside of the SDK is the cornerstone of most Android mods: Android Debug Bridge. It is located within the tools folder (android-sdk-windows/tools) and can be accessed through Windows Command Prompt. This small application is a bridge between your computer and the Android OS on your phone. It allows you to push, pull, copy, and delete files as well as run advanced scripts that perform specific tasks directly on your phone. You can think of it as an interface which extends your computer’s keyboard and files to your Ally.
In most of the upcoming guides, you will see me reference the use of ADB, command prompt, Superuser permissions, and Linux code. This will all center around the SDK and Android Debug Bridge. But before you can use it, it’s important to learn what it is you’re doing.
How to access ADB through your Windows computer:
The first thing to know is how you access ADB to be able to use it. If you notice, double clicking on adb.exe in the tools folder does not open or run anything. In order to run ADB, we must do it through the Command Prompt.
To do this, go to your Start Menu and select “Run…”.


A Run dialogue will pop up; type “cmd” and hit OK.


This will open a new window called Windows Command Prompt.


This program is similar to DOS in that it allows you to input text-based commands in order to perform tasks. From here, we need to navigate to the tools folder inside of the Android SDK folder (where adb.exe is located). To do this, we need to know the exact file path of the tools folder. Open up the tools folder and at the top of the Windows Explorer window is the address, or file path, of the folder.


For instance, my tools folder is on the Desktop of my XP machine. Thus, the full file path of the folder is:
C:/Documents and Settings/user/Desktop/android-sdk-windows/tools
Where “user” is the username of your computer. Copy your file path for use in the Command Prompt.
Back to the Command Prompt, we now need to point to the file path we copied. To do this, we need to type: “cd” for change directory, then add a space. This will preceed the file path of the folder. Right click inside Command Prompt and select Paste. You cannot use a keyboard shortcut to paste into Command Prompt, this will simply type out the keystrokes you used. Once we have typed in “cd ” and then pasted the file path, your Command Prompt should look like this:


Press enter and you will notice that where “c:” use to be is now replaced with the full file path of the tools folder.


If Command Prompt alerts you that “The system cannot find the path specified”, you probably have not pasted the correct or full path of the folder.
Tip: Windows Vista and 7 users may go into their tools folder, highlight the full address and simply replace it with “cmd”. Press enter and Command Prompt will open and will be pointed at the folder.
Once you have pointed Command Prompt to your tools folder, you may test to see if you have everything in order by typing “adb” and hitting enter.
If all went well, Command Prompt should display a long list off available commands and descriptions. Here is an explanation for the most commonly used ADB commands:

  • adb push – Copies a file from the computer onto the Ally.
  • adb pull – Copies a file from the Ally to the computer.
  • adb shell – Emulates Unix terminal so that you may issue Unix Commands from the Command Prompt.
  • adb reboot – Reboots the Ally.
There are many more commands as you can see from the list Command Prompt gave you. These are simply the most common commands used in these guides. The guides will go more in depth as you go along. To use these commands, you must ensure your directory in Command Prompt is pointed to your tools folder.
You must be made aware that when accessing your rooted phone through ADB, that you may be prompted to accept a Superuser Permission. To avoid seeing this in the future, simply select “Always” when this pops up. If you do not accept the permission, it will fail ADB.

Basic commands used within ADB

While working with a rooted Ally and ADB, you will notice that there is an extensive use of code. Much of this code may be unfamiliar to you, but it shouldn’t be scary.
When you see lines such as:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
cat /sdcard/flash_image > /system/bin/flash_image
chmod 755 /system/bin/flash_image
sync
You may feel like you are in over your head. But it’s a lot simpler than it looks!What you see above is called Unix commands. These commands are recognized by the base Linux kernel which controls the Android OS. Linux is an open source computer operating system; Google uses it to create Android. So these Unix commands are similar to the Windows Command Prompt commands we learned about in the Android Debug Bridge guide except they are used for different systems.
When using Unix commands in future guides, it is important to read through them carefully and copy them exactly. Though a mistake will most likely return an error message and cause no harm, it is possible to miss a character and do some damage. Caution and deliberation is key! Here are a few common Unix commands used for Ally modding purposes. These certainly aren’t all of them, and all commands will be described within individual guides.

  • su – (Substitute User) Used to change to “root user” to perform Superuser Permission commands.
  • mount – Readies a file system for use; allows the user to perform commands to a directory.
  • cd – (Change Directory) Changes to the proceeding directory.
  • chmod – (Change Mode) Changes the mode of files and directories; commonly used to change permissions.
  • mkdir – (Make Directory) Makes a new directory for files.
  • mv – (Move) Moves a file or directory from one place to another.
  • sync – Synchronizes all data which has been scheduled for writing.
As I’ve stated, there are many more commands which may be used while sending commands to your phone. Don’t fret; they will be described fully as you go along.
One important consideration to make is that after EACH line of Unix commands, you must hit enter to run the command before going on to the next line. You may not copy and paste multiple lines into Command Prompt at once.
I bet you’d never guessed you would be learning a new programming language while working on your Ally! Though you are far from mastering the Unix system, I hope this has familiarized you with some of the necessary commands needed for advanced root-related functions.

PC Drivers needed for the Ally

Some people are having problems with getting their Ally's to connect to ADB after enabling USB Debugging. The reason for this problem may be incompatible USB drivers. To manually install the correct Ally USB Debugging drivers, please go to this link:
LG USB Drivers
Simply download the Windows drivers that pertain to your system (32 or 64 bit), extract the installer, and install the drivers. Then, reconnect the Droid via USB and enable USB Debugging.
This will solve some of the “Device Not Found” problems people are having.

Installing apps not found in the market

Sometimes we want to install an app that has not been downloaded from the Market. When we download an app from a developer or website directly. Sometimes while hacking, we need to use an app that isn’t in the Market. For this reason, we need to enable the installation from unknown sources.
Begin by connecting your Ally to a PC via USB. Go into the Droid settings and select Applications.

Ensure “Unknown Sources” is checked. You will be asked if you want to enable debugging, select yes.

You have now allowed your Ally to install apps not downloaded from the Market.
[/spoiler]
Now onto the good stuff.....

How to Root Android 2.1

Coming Soon..[/Hide]

How to perform a nandroid backup with Amonra Recovery
[Hide]1.) Boot into recovery by holding the call, menu, and end keys while powering on the phone
2.) Click Backup/Restore
3.) Press Nand backup
4.) Once the nandroid is complete press volume down to get back to the main menu
5.) Reboot

That’s it[/Hide]

How to Flash a custom ROM with Amonra Recovery
[Hide]
1.) Download the ROM
2.) Place the file somewhere on your sdcard
3.) Power off your Ally
4.) Boot into recovery by holding the call, menu, and end keys while while powering on the phone
5.) Perform a Nandroid backup (always sound practice although this is not required)
6.) Wipe ALL userdata (Again, not required all the time but unless you are sure it will work without wiping its smart to do)
8.) Click on Flash zip menu (Note: you can use the d-pad to navigate and the enter button to select)
9.) Press Flash from sdcard and select the file you wish to flash
10.) When the install is complete use the volume down button to go back to the main menu
11.) Reboot[/Hide]

WORK IN PROGRESS - MORE COMING SOON!
 
Status
Not open for further replies.

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones