ADB(1)
๐ ADB(1) โ your bestie's guide to the Android Debug Bridge ๐
๐ฆ VERSION ๐ฆ
1.0.41 โจ
๐ธ NAME ๐ธ
adb โ CLI Client for ADB (Android Debug Bridge) Server ๐
๐ง SYNOPSIS ๐ง
adb [GLOBAL_OPTIONS] command [COMMAND_OPTIONS]
๐ DESCRIPTION ๐
okay so adb is the command-line client that talks to the ADB Server through its smart socket interface. You send it requests, it gets the responses back, and it also manages the whole lifecycle of the adb server. iconic behavior honestly ๐ฅ
Everything gets done through commands ๐ Some commands are handled directly by the server, and others get forwarded over to the adbd(ADB daemon) running on the device ๐ฑโจ
๐ GLOBAL OPTIONS ๐
-aโ listen on all network interfaces, not just localhost ๐-dโ use a USB device (it'll error if multiple devices are connected, so be careful bestie ๐ญ)-eโ use a TCP/IP device (also errors if multiple TCP/IP devices are available)-s SERIALโ use the device with the given SERIAL. This one overrides$ANDROID_SERIAL๐ซถ-t IDโ use the device with the given transport ID-Hโ name of the adb server host [default=localhost]-P PORTโ smart socket PORT of the adb server [default=5037]-L SOCKETโ listen on the given socket for the adb server [default=tcp:localhost:5037]--one-device SERIAL|USBโ the server will only connect to one USB device, picked by a SERIAL number or a USB device address. This only works withstart-serverorserver nodaemon๐ฆ--exit-on-write-errorโ exit if stdout is closed ๐
๐ GENERAL COMMANDS ๐
devices [-l]โ list connected devices ๐-lโ use long output
track-devices [-l][โproto-text][โproto-binary]โ same vibe as the `device' command, but it never returns. Instead it sends updates whenever the list of devices changes ๐-lโ use legacy long output-proto-textโ use protobuf output-proto-binaryโ use binary protobuf output
helpโ show the help message ๐versionโ show the version number ๐ข
๐ NETWORKING ๐
connect HOST[:PORT]โ connect to a device over TCP/IP [default PORT=5555] ๐disconnect [HOST[:PORT]]โ disconnect from the given TCP/IP device [default PORT=5555], or from all of them if you don't specify one ๐ โโ๏ธpair HOST[:PORT] [PAIRING_CODE]โ pair with a device for secure TCP/IP communication ๐forward --list | [โno-rebind] LOCAL_REMOTE | --remove LOCAL | --remove-all--listโ list all forward socket connections[โno-rebind] LOCAL_REMOTEโ forward a socket connection using one of these formats:tcp:PORT(local can betcp:0to grab any open port)localreserved:UNIX_DOMAIN_SOCKET_NAMElocalfilesystem:UNIX_DOMAIN_SOCKET_NAMEjdwp:PROCESS PID(remote only)vsock:CID:PORT(remote only)acceptfd:FD(listen only)dev:DEVICE_NAMEdev-raw:DEVICE_NAME(opens the device in raw mode)
--remove LOCALโ remove one specific forward socket connection--remove-allโ remove all forward socket connections
reverse --list | [--no-rebind] REMOTE LOCAL | --remove REMOTE | --remove-all--listโ list all reverse socket connections from the device[--no-rebind] REMOTE LOCALโ reverse a socket connection using one of these formats:tcp:PORT(REMOTE can betcp:0to pick any open port)localabstract:UNIX_DOMAIN_SOCKET_NAMElocalreserved:UNIX_DOMAIN_SOCKET_NAMElocalfilesystem:UNIX_DOMAIN_SOCKET_NAME
--remove REMOTEโ remove one specific reverse socket connection--remove-allโ remove all reverse socket connections from the device
mdns check | servicesโ mDNS subcommands ๐ฐ๏ธcheckโ check if mdns discovery is availableservicesโ list all discovered services
track-servicesโ stream discovered services as they show up. Supports the flags โโproto-textโ and โโproto-binaryโ โจlist-known-hostsโ show ADB Wifi paired devices. Supports the flags โโproto-textโ and โโproto-binaryโ ๐
๐ FILE TRANSFER ๐
push [โsync] [-z ALGORITHM] [-Z] LOCAL... REMOTEโ copy local files and directories onto the device ๐คโsyncโ only push files that are newer on the host than on the device-nโ dry run! pushes files to the device without storing them to the filesystem ๐งช-zโ enable compression with a specified algorithm (any/none/brotli/lz4/zstd)-Zโ disable compression
pull [-a] [-z ALGORITHM] [-Z] REMOTE... LOCALโ copy files and directories from the device ๐ฅ-aโ preserve file timestamp and mode ๐ฐ๏ธ-zโ enable compression with a specified algorithm (any/none/brotli/lz4/zstd)-Zโ disable compression
sync [-l] [-z ALGORITHM] [-Z] [all|data|odm|oem|product|system|system_ext|vendor]โ sync a local build from$ANDROID_PRODUCT_OUTto the device (default all) ๐๏ธ-nโ dry run. Pushes files to the device without storing them to the filesystem-lโ list the files that would be copied, but don't actually copy them-zโ enable compression with a specified algorithm (any/none/brotli/lz4/zstd)-Zโ disable compression
๐ SHELL ๐
shell [-e ESCAPE] [-n] [-Tt] [-x] [COMMAND...]โ run a remote shell command. If you don't give a command, you get an interactive shell ๐ป-eโ choose the escape character, ornone. Default is~-nโ don't read from stdin-Tโ disable pty allocation-tโ allocate a pty if you're on a tty (-tt: force pty allocation)-xโ disable remote exit codes and stdout/stderr separation
emu COMMANDโ run emulator console COMMAND ๐ฎ
โจ AUTHORS โจ
okay bestie, the credits are short and sweet ๐ซถ for who wrote ADB, check the OWNERS file in the ADB AOSP repo ๐ that's where the whole crew is listed ๐
The page wraps up with a lonely () as its footer ๐ There's no source, version, or date on it, so there's nothing else to hunt down. Stay iconic and keep those devices connected ๐ฆ๐
โจ
๐ฆ where this page comes from
- arch rolling: android-tools 37.0.0.p1-1 ยท Apache-2.0 AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND libselinux-1.0
- fedora 43: android-tools 1:37.0.0-4.fc43
- fedora 43: android-tools 1:37.0.0p1-1.fc43 ยท Apache-2.0 AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND LicenseRef-Fedora-Public-Domain
- fedora 44: android-tools 1:37.0.0-4.fc44
- fedora 44: android-tools 1:37.0.0p1-1.fc44 ยท Apache-2.0 AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND LicenseRef-Fedora-Public-Domain
- nixpkgs unstable: android-tools 37.0.0p1
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms