Android Debug Bridge Commands


Build your own Android App Dev Empire

Get Instant Access

The following commands are gsm commands. You access them by connecting to the Emulator's terminal console. If you do not know the port terminal console, it is one less than the debug port. Execute adb devices to get a list of active devices and the related port numbers.

adb Command


adb Bugreport

Prints dumpsys, dumpstate, and logcat data to the screen, for the purposes of bug reporting

adb call <phonenumber>

Simulates an inbound phone call from <phonenumber>

adb cancel <phonenumber>

Cancels an inbound phone call from <phonenumber>

adb -d {<ID>|<serialNumber>}

Lets you direct an adb command to a specific Emulator/device instance, referred to by its adb-assigned ID or serial number

adb data <state>

Changes the state of the GPRS data connection to <state>

adb Devices

Prints a list of all attached Emulator/device instances

adb forward <local> <remote>

Forwards socket connections from a specified local port to a specified remote port on the Emulator/device instance

adb get-serialno

Prints the adb instance identifier string

adb get-state

Prints the adb state of an Emulator/device instance

adb Command


adb help

Prints a list of supported adb commands

adb install <path-to-apk>

Pushes an Android application (specified as a full path to an .apk file) to the data file of an Emulator/device

adb jdwp

Prints a list of available JDWP processes on a given device

adb kill-server

Terminates the adb server process

adb logcat [<option>] [<filter-specs>]

Prints log data to the screen

adb ppp <tty> [parm]...

Runs PPP over USB:

• <tty> The tty for PPP stream; for example, dev:/dev/omap csmi ttyl

• [parm]... Zero or more PPP/PPPD options, such as defaultroute, local, notty, etc.

Note that you should not automatically start a PDP connection.

adb pull <remote> <local>

Copies a specified file from an Emulator/device instance to your development computer

adb push <local> <remote>

Copies a specified file from your development computer to an Emulator/device instance

adb Shell

Starts a remote shell in the target Emulator/device instance

adb start-server

Checks whether the adb server process is running and, if not, starts it

adb Status

Reports the current GSM voice/data state

adb unregistered

Indicates no network is available

adb Version

Prints the adb version number

adb voice <state>

Changes the state of the GPRS voice connection to <state>

adb wait-for-bootloader

Blocks execution until the bootloader is online—that is, until the instance state is bootloader

adb wait-for-device

Blocks execution until the device is online—that is, until the instance state is device

This page intentionally left blank


Was this article helpful?

0 0

Post a comment