Connecting to device over WIFI is very convenient, here are the steps to achieve the same –
- Plug in your device to the PC and ensure that adb is able to detect the device –
$adb devices List of devices attached <device-id> device
- Ensure that the device and the PC are connected to the same network domain.
- Find out the IP address of the device. Go to Settings > Status > IP Address
- Start the adb in TCP mode.
$ adb tcip <port-number> restarting in TCP mode port: <port-number>
- Connect to the device on its IP address via the adb command
$ adb connect <ip-address> connected to <ip-address>:<port-number>
- Running adb devices should show that it is connected to the device over USB and IP address
$ adb devices <device-id> device <ip-address>:<port-number> device
- Now remove the USB cable and you should still be connected to the device
$ adb shell device:/ $