1. Home
  2. Docs
  4. Android general features
  5. Connect a device over network

Connect a device over network

If you want to connect your device over wifi adb and access the shell, use below mentioned commands:

1. Check the IP address of the device, for this, make sure you have your device connected to the network, then go to Settings -> Network & Internet -> click on the connected network interface (Wifi/Ethernet) -> The device IP address will be displayed.

Or you can connect the device over USB cable and type,

 $ adb shell 
 $ ifconfig 

Write down the IP address and then exit from adb and remove the USB cable.


2. Now, connect over the network using IP address,

$ adb connect connected to
$ adb shell 

Sometimes, you may see an error as below,

$adb connect unable to connect to

For this, we need to restart the TCP port. Connect the device over USB cable and type:

 $ adb tcpip 5555
restarting in TCP mode port: 5555


3. Now, you will be able to connect over the network

$ adb connect
connected to 

If you have not removed the USB cable, you might see the same device as two devices:

$ adb devices
List of devices attached
B2NGAA8831702707	device	device
$ adb -s shell
B2N_sprout:/ $