"adb connect" sometimes adds additionally: suffix 4321

When debugging my ADT-1 module, I often connect via the following command

adb connect 192.168.1.x:4321

      

and this usually works as expected. I noticed that in some cases the connection fails because the command adb connect

adds an additional port suffix to the original address:

unable to connect to 192.168.1.7:4321:4321 // see the extra :4321?

      

Additional Information:

  • Yes, 4321 is mandatory for ADT-1 devices.
  • Restarting the adb service does nothing useful.
  • Restarting the IDE (IDEA / Studio) doesn't seem to do the trick.

Does anyone know why this is happening? Can this be avoided?

+3


source to share


2 answers


It seems that restarting the tcpip server on the device fixes this. Steps for this:



  • Connect your device to your computer via USB
  • Run "adb usb" to connect to your device via USB
  • Run 'adb tcpip 4321' to restart the tcpip server on port 4321
  • Disconnect the device
  • Run 'adb connect 192.168.1.x: 4321' and it should now connect successfully.
+3


source


This problem seems to occur when the IP assigned by ADT-1 changes .



adb connect

cannot bind to this address (because it was changed) hence it throws this erroneous error.

0


source







All Articles