Connect an Android Wear Emulator to a Real Phone via Wifi

Hà Mã Tím
2 min readJan 20, 2020

Target

Based on this article, you will be able to connect a real Android device to Adb on PC via Wifi.
This device will communicate with an Android Wear Emulator (Watch AVD) running on that PC.

Connect an Android Wear Emulator to a Real Phone via Wifi

Let do it!

1. You must connect your phone to the PC via a USB cable and check on the Adb:
$adb devices

Connect your phone to the PC with a USB cable

2. Switch the phone connection to Wifi by turning on TCP at port 5555, this operation needs to be repeated every time the device has to be restarted like turning back on after the battery runs out, restarting … generally anytime it boot:
$adb tcpip 5555

Turn on TCP at port 5555

3. Now unplug the USB cable, find your device’s IP and connect via Wifi. In my case, the phone has IP: 192.168.1.3:
$adb connect 192.168.1.3:5555

Connect via Wifi with IP

4. Now check the number of connected devices and you will see your device appear.
Since I run Watch AVD, there will be 2 devices:
$adb devices

Because I run Watch AVD, there will be 2 devices

5. To connect to the Watch AVD, the phone needs to have Wear OS installed. You have to perform port 5601 mapping from the phone to the PC. This action needs to be repeated every time the phone is connected to Adb:
$adb -s 192.168.1.3:5555 -d forward tcp:5601 tcp:5601

Map port 5601 from phone to PC

6. Open Wear OS and select “Pair with simulator” and done

Hopefully this article will help someone save a lot of hours of research.
Wish everyone success!
Bản tiếng việt

--

--

Hà Mã Tím

Một lập trình viên yêu thương động vật và thích hà mã