Android Debug Bridge version 1.0.30
Directs command to the only connected USB device returns an error if more than one USB device is present.
Directs command to the only running emulator. Returns an error if more than one emulator is running.
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'.
- If -p is not specified, the ANDROID_PRODUCT_OUT environment variable is used, which must be an absolute path.
adb -p <product name or path>
List all connected devices
- ('-l' will also list device qualifiers)
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>]]
Copy file/dir to device
adb push <local> <remote>
Copy file/dir from device
adb pull <remote> [<local>]
Copy host->device only if changed
- (-l means list but don't copy)
- (see 'adb help all')
adb sync [ <directory> ]
Run remote shell interactively
Run remote shell command
adb shell <command>
Run emulator console command
adb emu <command>
View device log
adb logcat [ <filter-spec> ]
Forward socket connections forward specs are one of:
- localabstract:<unix domain socket name>
- localreserved:<unix domain socket name>
- localfilesystem:<unix domain socket name>
- dev:<character device name>
- jdwp:<process pid> (remote only)
adb forward <local> <remote>
List PIDs of processes hosting a JDWP transport
Push this package file to the device and install it
- ('-l' means forward-lock the app)
- ('-r' means reinstall the app, keeping its data)
- ('-s' means install on SD card instead of internal storage)
- ('--algo', '--key', and '--iv' mean the file is encrypted already)
adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file>
Remove this app package from the device
- ('-k' means keep the data and cache directories)
adb uninstall [-k] <package>
Return all information from the device that should be included in a bug report.
Write an archive of the device's data to <file>.
- If no -f option is supplied then the data is written to "backup.ab" in the current directory.
- (-apk|-noapk enable/disable backup of the .apks themselves in the archive; The default is noapk.)
- (-shared|-noshared enable/disable backup of the device's shared storage / SD card contents; The default is noshared.)
- (-all means to back up all installed applications)
- (-system|-nosystem toggles whether -all automatically includes system applications; The default is to include system apps)
- (<packages...> is the list of applications to be backed up. If the -all or -shared flags are passed, then the package list is optional. Applications explicitly given on the command line will be included even if -nosystem would ordinarily cause them to be omitted.)
adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
Restore device contents from the <file> backup archive
adb restore <file>
Show this help message
Show version num
Block until device is online
Ensure that there is a server running
Kill the server if it is running
Prints: offline | bootloader | device
Continuously print device status for a specified device
Remounts the /system partition on the device read-write
Reboots the device into the bootloader
Restarts the adbd daemon with root permissions
Restarts the adbd daemon listening on 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.
- <tty>: refers to the tty for PPP stream. Eg. Dev:/dev/omap_csmi_tty1
- [parameters]: Eg. Defaultroute debug dump local notty usepeerdns
adb ppp <tty> [parameters]
Adb sync notes: <localdir> can be interpreted in several ways:
- If <directory> is not specified, /system, /vendor (if present), /oem (if present) and /data partitions will be updated.
- If it is "system", "vendor", "oem" or "data", only the corresponding partition is updated.
adb sync [ <directory> ]
Print debug information. A comma separated list of the following values 1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
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.