Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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...

share|improve this question
up vote 7 down vote accepted

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.

share|improve this answer
That is a slick trick. Thanks. – Samus Arin Jun 12 '14 at 16:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.