3

By following Google ADB Documentation i am able to connect to device wireless . But i want to connect more than one device.

For adb wireless to work i have to restart adb in tcpip mode

Once i did that i can connect to a device but to connect to another device i will have to restart adb in usb mode again which will disconnect the first device.

Simple solution would be to connect both device with usb and then restart adb in tcpip. But i don't have any extra set of usb cable right now.

So is there any other way to connect more than one device except for the method i mentioned above.

1 Answer 1

13

adb tcpip <port> doesn't restart the adb daemon in your PC but in Android and binds it to listen to that specific port. You can always connect multiple devices in wireless mode.

Follow these steps:

  1. Plug first device and restart adbd in tcpip mode using adb tcpip <port>.
  2. Connect to first device using adb connect <host>:<port>.
  3. Unplug first device, plug second device and restart adbd in tcpip mode using adb -s <serial> tcpip <port>.
  4. Connect to second device using adb connect <host>:<port>.

You may now unplug the second device. If you execute adb devices you would see both the devices connected in wireless mode. Whenever you intend to do any operation on any of the device, supply identifier using -s.

Example:

IMG

6
  • 1
    Thanks for the 'adb tcpip <port> doesn't restart the adb daemon in your PC' statement. That's the key info that I was missing.
    – user46885
    Commented Jan 11, 2017 at 12:14
  • Thanks for the info. It's kind of annoying that I have to connect the device every time to set it in tcpip mode. This should be a setting in the developer options. Commented Sep 18, 2017 at 14:34
  • @SaifurRahmanMohsin Custom ROMs offer that functionality. Alternatively, root access also makes the restart convenient.
    – Firelord
    Commented Sep 20, 2017 at 4:17
  • True. But given that this is a common issue, Google could have added it to their dev options in the AOSP. Commented Sep 20, 2017 at 18:40
  • 1
    @Newbie: when the device is connected via USB, run adb devices. You would get output akin to this. The alphanumeric string in the output is the device serial number that you need to input that you asked for. E.g. ZX1G525D8Q is the serial number for my device. Remember, you can ask a new question always.
    – Firelord
    Commented Aug 27, 2018 at 15:58

You must log in to answer this question.

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