Basic ADB Knowlege

ADB stands for Android Development Bridge and it's an official tool provided by Google. The rooting community has adopted it as the primary method of running linux commands on the Droid. It allows you to tunnel into your phone via USB and run command line stuff on the Droid. These instructions apply only to the Mac, however an identical set of tools for Windows is available from Google as well.

First Time ADB Setup

  1. Make sure your Droid is rooted.
    Read my rooting guide if your Droid isn't already rooted.
  2. Download the tools package to your computer and extract the tools folder to your home folder (~/).

Typical hacking Scenario

  • Open a Terminal Window on your Mac by clicking the Spotlight icon in the corner, typing Ter and pressing enter on Terminal. Move the terminal icon to somewhere in your dock so it will stay.
  • Now every time you start up a new Terminal window, you'll always want to start like this (remember to press return after each line):
    export PATH=~/tools
    adb shell
    su
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
  • Now this is where you run your awesome file editing commands.
  • And when you're done messing around, you end the ADB session by closing the filesystem back up, syncing, and rebooting the Droid, which is done like so:
    mount -o ro,remount -t yaffs2 /dev/block/mtdblock4 /system
    sync
    reboot
Congrats, you now know basic ADB!