Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect multiple android devices with ADB over wifi

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>

like image 538
Abdul Wasae Avatar asked May 15 '17 07:05

Abdul Wasae


People also ask

Can you adb over WIFI?

If you are an Android developer, I am 100% sure you might already be frustrated with debugging your App with ADB while being connected through a USB cable. If you didn't know already, you can connect to your Android Device with ADB over Wifi.


2 Answers

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

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. 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
like image 198
Abdul Wasae Avatar answered Oct 03 '22 22:10

Abdul Wasae


A slight change in the Abdul Wasae answer, based on my experience .

devices A (IP: 192.168.1.32)

devices B (IP: 192.168.1.33)

Connect device A with a USB cable to the computer (but not B)

adb -d tcpip 5555

adb connect 192.168.1.32

Disconnect device A, and connect device B with a USB cable to the computer,This time you need to change the port !!

adb -d tcpip 5554

Here you need to specify port as well

adb connect 192.168.1.33:5554

I also have documented this here in more detail Connecting multiple devices over wifi using adb

like image 35
pankaj mishra Avatar answered Oct 03 '22 23:10

pankaj mishra