I have two devices connected to my workstation simultaneously, one by usb, the other over wifi.

C:\>adb devices
List of devices attached
Cxxxxxxxxxx2            device      device

I'm not sure how to shell into the wifi connected device while the usb one is present.

I've tried the following

C:\>adb shell
error: more than one device and emulator

C:\>adb -s shell
error: device not found

C:\>adb -s 0xxxxxxxxxxxxxx1 shell
error: device not found

where 0xxxxxxxxxxxxxx1 is hardware id of wifi connected device

Only way that works is to disconnect the usb connected device. However, I'm going to eventually have multiple wifi connected devices, I still don't know how to distinguish between them when trying to shell in?

Edit (6/13/2014)

I see why I was omitting the port, b/c the connect command returns the following error when trying to connect and cannot (say for instance the devices wifi was accidentally turned off)

C:\>adb connect
unable to connect to

This made me think that adb would append port based on ip. However this is not the case, since after wifi was enabled on the target device, the above command did work

C:\>adb connect
connected to

I needed to mention something to show that I atleast know tcp/ip connect fundamentals (ip and port). Kinda embarrassing...

2 Answers 2


You need to include the port number.

adb -s shell

If you're using a sensible shell with configurable tab-completion (i.e. not Windows), then you can type adb -sTab to get a list of devices.


When multiple device are connected with adb specify device with -s before command to get result. Suppose you have three device connected with and device id is x,y,z. Now you want to know IP address for device y, then scenario will be

adb -s y shell netcfg

(-s is used to specify device for adb command)

note: always mention port number after IP address to specify a device connected through Wi-Fi.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .