

If you do not specify a port, then the default port, 5555, is used. adb run-as package_name Networking commandsĬonnect to a device over TCP/IP. This might be necessary when using adb on a non-rooted device or an emulator with a Play Store image. This lets you run commands in adb as if the app you specify is running the command (that is, you have the same device access that the app has), without requiring root access. Run commands on a device as an app (specified using package_name). Print a list of supported adb commands and their descriptions. Use the -l option to include the device descriptions. Listen on the provided adb server socket. Overrides the serial number value stored in the $ANDROID_SERIAL environment variable. adb -eĭirect an adb command to a specific device, referred to by its adb-assigned serial number (such as emulator-5556).

Returns an error when more than one emulator is running.

adb -dĭirect an adb command to the only running emulator. Returns an error when more than one USB device is attached. adb -aĭirect an adb command to the only attached USB device. Listen on all network interfaces instead of only on localhost. The table below lists all of the supported adb commands and explains their meaning and usage. If multiple emulators are running and/or multiple devices are attached, you need to use the -d, -e, or -s option to specify the target device to which the command should be directed. If there\'s only one emulator running or only one device connected, the adb command is sent to that device by default. You can issue adb commands from a command line on your development machine or from a script.
