adb wifi connection debugging application--suitable for mobile phones, tablets, TVs, etc.

The TV box is connected to the computer via WiFi or network cable:

Today I needed adb WiFi to connect to the TV to debug something. I found that after using the online method, I still couldn't connect to adb WiFi successfully. After some exploration, I succeeded. The fundamental reason is that I still need to ensure that the computer, mobile phone or TV are in the same WiFi. What I do is to open a hotspot on my computer, and then there will definitely be no problem if my phone or TV is connected to this hotspot. 

  • First, open a hotspot on the computer, let our mobile phones, TVs and other devices connect to this network, and find the IP addresses of mobile phones, TVs and other devices that require WiFi connection. For example, my TV IP is 192.168.137.169
  • The TV or mobile phone needs to turn on the adjustable function
  • Then adb connect 192.168.137.169 our mobile phone or TV can be successful, without any root, settings, etc.

That’s it. Adb devices looks at the connected devices as follows:

I got the following error when starting the connection process: 

unable to connect to 192.168.0.107:5555: The connection attempt failed because the connecting party did not reply properly after a period of time or the connected host did not respond. (10060)

The reason is that they are no longer in the same network. At first, all my devices were connected to the router. Later, after the above error was reported, I opened a hotspot on my computer, connected my mobile phone, TV, etc. to the computer hotspot, and then performed adb connect. That’s it. I found out that a lot of articles on the Internet were completely wrong, and I was really convinced.

Connect the mobile phone to Android studio for debugging via WiFi:

1. Turn on developer mode on your phone and then turn on USB debugging

2. Use USB data cable to connect your phone and computer

3. Open the cmd command window on the PC and enter adb devices to see the connected devices.

4. Enter adb tcpip 8888 (set the port number to 8888)

5. Disconnect the phone from the computer

6. Enter adb connect 192.168.137.31:8888, the connection is successful

 After the connection is successful, you can see the connected phone in Android studio.

Guess you like

Origin blog.csdn.net/netandghost/article/details/131084190