Android Debug Bridge version 1.0.32

Global options

Directs adb to listen on all interfaces for a connection

adb -a

Directs command to the only connected USB device returns an error if more than one USB device is present.

adb -d

Directs command to the only running emulator. Returns an error if more than one emulator is running.

adb -e

Directs command to the device or emulator with the given serial number or qualifier. Overrides ANDROID_SERIAL environment variable.

adb -s <specific device>

Simple product name like 'sooner', or a relative/absolute path to a product out directory like 'out/target/product/sooner'.

adb -p <product name or path>

Name of adb server host (default: localhost)

adb -H

Port of adb server (default: 5037)

adb -P

List all connected devices

adb devices [-l]

Connect to a device via TCP/IP Port 5555 is used by default if no port number is specified.

adb connect <host>[:<port>]

Disconnect from a TCP/IP device. Port 5555 is used by default if no port number is specified. Using this command with no additional arguments will disconnect from all connected TCP/IP devices.

adb disconnect [<host>[:<port>]]

Device commands

Copy file/dir to device

adb push [-p] <local> <remote>

Copy file/dir from device

adb pull [-p] [-a] <remote> [<local>]

Copy host->device only if changed

adb sync [ <directory> ]

Run remote shell interactively

adb shell

Run remote shell command

adb shell <command>

Run emulator console command

adb emu <command>

View device log

adb logcat [ <filter-spec> ]

List all forward socket connections. The format is a list of lines with the following format:

adb forward --list

Forward socket connections forward specs are one of:

adb forward <local> <remote>

Same as 'adb forward <local> <remote>' but fails if <local> is already forwarded

adb forward --no-rebind <local> <remote>

Remove a specific forward socket connection

adb forward --remove <local>

Remove all forward socket connections

adb forward --remove-all

List all reverse socket connections from device

adb reverse --list

Reverse socket connections reverse specs are one of:

adb reverse <remote> <local>

Same as 'adb reverse <remote> <local>' but fails if <remote> is already reversed.

adb reverse --norebind <remote> <local>

Remove a specific reversed socket connection

adb reverse --remove <remote>

Remove all reversed socket connections from device

adb reverse --remove-all

List PIDs of processes hosting a JDWP transport

adb jdwp

Push this package file to the device and install it

adb install [-lrtsd] <file>
adb install-multiple [-lrtsdp] <file...>

Remove this app package from the device

adb uninstall [-k] <package>

Return all information from the device that should be included in a bug report.

adb bugreport

Write an archive of the device's data to <file>.

adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]

Restore device contents from the <file> backup archive

adb restore <file>

Disable dm-verity checking on USERDEBUG builds

adb disable-verity

Re-enable dm-verity checking on USERDEBUG builds

adb enable-verity

Generate adb public/private key. The private key is stored in <file>, and the public key is stored in <file>.pub. Any existing files are overwritten.

adb keygen <file>

Show this help message

adb help

Show version num

adb version


Block until device is online

adb wait-for-device

Ensure that there is a server running

adb start-server

Kill the server if it is running

adb kill-server

Prints: offline | bootloader | device

adb get-state

Prints: <serial-number>

adb get-serialno

Prints: <device-path>

adb get-devpath

Remounts the /system, /vendor (if present) and /oem (if present) partitions on the device read-write

adb remount

Reboots the device, optionally into the bootloader or recovery program.

adb reboot [bootloader|recovery]

Reboots the device into the sideload mode in recovery program (adb root required).

adb reboot sideload

Reboots into the sideload mode, then reboots automatically after the sideload regardless of the result.

adb reboot sideload-auto-reboot

Sideloads the given package

adb sideload <file>

Restarts the adbd daemon with root permissions

adb root

Restarts the adbd daemon without root permissions

adb unroot

Restarts the adbd daemon listening on USB

adb usb

Restarts the adbd daemon listening on TCP on the specified port

adb tcpip <port>


Run PPP over USB. Note: you should not automatically start a PPP connection.

adb ppp <tty> [parameters]

Adb sync notes: <localdir> can be interpreted in several ways:

adb sync [ <directory> ]

Environment variables

Print debug information. A comma separated list of the following values:


The serial number to connect to. -s takes priority over this if given.


When used with the logcat option, only these debug tags are printed.