Using adb

What is adb?

adb stands for Android Debug Bridge. In short, it’s a tool that provides you the ability to manage your android device through a console on your computer. With adb, you can execute shell commands on your device & copy files to/from it.

Installing adb

adb is part of the Android SDK. Rather than rehash the install steps, I’m going to refer you to my rooting guide, which outlines the SDK install.

Using adb

Open a CMD Prompt (or terminal on linux/mac), and cd into your sdk directory/tools. Type adb, and it will output a list of available commands. There are a lot of options/commands, but I’ll outline a few of the most common here. Since android is linux, most of the commands you would expect are there when using the shell (ls, cd, cp, mv, rm, etc).

  • adb devices – Use this command to verify that your device is connected. If it does not show up
  • adb push FILENAME – This will copy a file or directory from your computer to your device.
  • adb pull FILENAME – This will copy a file or directory from your device to your computer.
  • adb shell – This opens an interactive shell on your device.
  • adb shell COMMAND – This will execute a command.
  • adb install SOMEPACKAGE.apk – This will remotely install an android package on your device.
  • adb uninstall SOMEPACKAGE.apk – This will remove a package from your device.
  • adb reboot recovery – This will reboot the device into recovery.
  • adb reboot bootloader – This will reboot the device into HBOOT.
  • adb logcat – This will view the logfiles on the device. You can feed this several filtering options.