The standard ADB configuration involves a USB connection to a physical device.
If you prefer, you can switch over to TCP/IP mode, and connect ADB via WiFi instead.
adb
to device over network:While your device is connected to adb
via USB, do the following command to listen for a TCP/IP connection on a port (default 5555):
adb tcpip <port>
(switch to TCP/IP mode).adb connect <ip address>:<port>
(port is optional; default 5555).For example:
adb tcpip 5555
adb connect 192.168.0.101:5555
If you don’t know your device’s IP you can:
1. Connect the device to the computer via USB
2. In a command line, type `adb shell ifconfig` and copy your device's IP address
To revert back to debugging via USB use the following command:
adb usb
You can also connect ADB via WiFi by installing a plugin to Android Studio. In order to do so, go to Settings > Plugins and Browse repositories, search for ADB WiFi, install it, and reopen Android Studio. You will see a new icon in your toolbar as shown in the following image. Connect the device to the host computer via USB and click on this AndroidWiFiADB icon. It will display a message whether your device is connected or not. Once it gets connected you can unplug your USB.