Chapter 3: The Right Tool for the Job

In this chapter:

• Hardware and prerequisites for hacking

• Android Debug Bridge basic commands

• Fastboot commands

• The ADB shell

Most root procedures rely on similar tools. The processes, exploits, and level of access may differ, but the toolkit you use to get a device to run with S-OFF or root file system access will always be fairly small. A solid understanding of the tools and how they are used will help you with your comfort level when rooting a new device.

Ready, Set, . . . Wait I Have to Have What?

Before starting most hacking jobs, or even an Android exploratory mission, you need to be able to connect your phone to your computer and you need access to hacking tools.

Connecting a Phone to a Computer

You need to make sure that you have an appropriate cable for the physical connection to a PC and drivers to enable your computer to make sense of the connection. Many devices ship without drivers—they depend on native drivers included with the operating system installed on your computer.

Depending on the modes your device has when connected to a computer, the computer may recognize it as a mass-storage device and connect to it as if it were an external hard drive or memory card.

You need to install some form of debug or developer driver on your computer and make sure that USB Debugging (debug mode) is enabled for any interactions between the computer and the phone. Debug mode opens the connection with your computer and allows signals ...

Get XDA Developers' Android Hacker's Toolkit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.