如何通过wifi将多个Android设备与ADB连接

问题描述:

计算机中已安装ADB,并且已在设备上启用了USB调试。我还通过wifi成功连接了一个设备。如何连接更多设备而不必使用 -s 标志为每个其他设备提及设备的序列号,例如: adb -s<序列> tcpip< port>

ADB is installed in the computer, and usb debugging is enabled on devices. Also I have connected one device over wifi successfully. How to connect more devices without having to mention the serial number of the device for every additional device with the -s flag like: adb -s <serial> tcpip <port>

是的,无需输入序列号。

Yes there is a way to do so without having to type the serial number.

假设您要通过wifi连接到ADB的2台设备A(IP:192.168.1.32)和B(IP:192.168.1.33):

Say you have 2 devices A (IP: 192.168.1.32) and B (IP: 192.168.1.33) that you want to connect to ADB over wifi:


  1. 使用USB电缆将设备A连接到计算机(但不连接B)

  2. adb -d tcpip 5555

  3. adb connect 192.168.1.32

  4. 断开设备A的连接,然后使用USB电缆将设备B连接到计算机

  5. adb -d tcpip 5555

  6. adb连接192.168.1.33

  1. Connect device A with a USB cable to the computer (but not B)
  2. adb -d tcpip 5555
  3. adb connect 192.168.1.32
  4. Disconnect device A, and connect device B with a USB cable to the computer
  5. adb -d tcpip 5555
  6. adb connect 192.168.1.33