I am connecting wireless over TCP to a rooted samsung android device via ADB. By following instructions in this.
Everything seems just fine but it seems that sometimes Android Studio cannot connect by the port 5555
so it changes it to 5037
.
Which causes the connection to get refused, so when I try to connect using adb connect 192.168.2.109:5555
, I get:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
unable to connect to 192.168.2.109:5555: Connection refused
Solution of this problem: I have changed TCP port in my android device to be 5037 and it works perfectly
My Question is: why is the TCP port in Android Studio changing?
Information: OS: Ubuntu 18.04.1 LTS, Android Studio: 3.1.4