8

I can get wireless debugging to work in Android Studio. It just doesn't work consistently. It is often a hassle to get it to connect at all, but I can usually get around it using a variety of methods, some of which are:

  • Pair using adb in a command prompt
  • Disconnect adb (AS will reconnect)
  • Restart the phone

When it gets unpaired, pairing in AS seldom works. It just waits a long time and then says it failed, no explantation. However, pairing in a command prompt almost always works, so I can get it paired.

When I do get it to connect, it often keeps dropping out. Sometimes even while running my app and generating logcat output.

Sometimes wireless debugging gets turned off on the phone. Sometimes not, but the notification disappears. Or not.

My wifi works just fine and is pretty reliable. I do not think it is the wifi. However, it is a dual band router. Where I work, it is usually using the 2.5 GHz band. I have not found anything on the Internet mentioning dual band.

The phone is an S22 Ultra and works well most of the time. I also do not think it is the phone.

Dual band is pretty common these days. Do other people have trouble with dual band. Is it supposed to work with dual band? Are there any other suggestions.

Kenneth Evans
  • 2,179
  • 19
  • 26

1 Answers1

1

I fixed that issue using following method:

First I connected my device using wifi debugging.

Just after the device is connected, I open terminal from android studio and cd to somepath/Android/Sdk/platform-tools

After that, I write following commands:

  • ./adb tcpip 5555
  • ./adb connect x.x.x.x:5555

In the above command, replace x.x.x.x with the IP address of your Android device which can be found in the Wireless debugging menu.

Note that initially android studio will have 2 connections, but eventually the first connection will disconnect, and debugging will work only on 5555 port.

You might need to perform this activity each day when you open your android studio.

chirayu joshi
  • 191
  • 3
  • 6