Qt android debugger adb error Address already in use - android

Im trying to debug android application using Qt Creator and getting the following error:
W ActivityThread: Application org.qtproject.example.tid_trains_android10 is waiting for the debugger on port 8100...
adb: error: cannot bind listener: Address already in use
17:47:24: Failed to forward JDB debugging ports.
When I try to see the open ports Im not seeing anything listening at 8100
I searched the net but found nothing.
Thanks in advance. :)

Related

QT android + remote debugging

I've been trying to setup ADB remote debugging for Qt.
Scenario:
Remote development server with QT
Local laptop with connected phone
Solution:
I tunnel all the traffic on port 5037 (default adb port) through a Remote Port Forwarding SSH session. Works Fine.
The commands I execute:
# Kill old adb server.
devhost$ adb kill-server
# Activate adb server on client
laptop$ adb start-server
# Start ssh tunnel. Hide/minimize this window not to close it by accident
laptop$ ssh -XC -R 5037:localhost:5037 <your devhost machine>
QT on dev. server detects the mobile, attempts to the deploy.
The app gets deployed. The result FEELS GOOD. ~~With dev server in another country. It's optic fiber all the way from server right to my desk... But not so fast...
When all of the sudden QT shouts about being unable to connect with localhost:5039
5039? What is it needed for? I tried tunelling 5039 but I'm basically in a blind-spot. The error is gone but the app is stuck at waiting for debugger and no further messages from QT no errors.
Nothing. It just hangs indefinitely.
On the mobile there's the standard waiting for debugger msg at the bottom. (Note: the app got deployed by qt and launched).
Ideas?
The only informative message within log is:
W ActivityThread: Application org.qtproject.APPNAME is waiting for the debugger on port 8100...
8100? now what is that? Is that supposed to be taken care of by ADB/QT or what
I can see all the logcat events on dev-server while the app on mobile 'keeps waiting' ..browser entire logcat log. the only sensible message regarding debugging is that the app keeps waiting on and on.
Local debugging of same app through USB works FINE.
The remote server is able to compile deplay and launch the app on mobile phone, however dubugging is an exercise in futility due to the described behaviour.
I have noticed that during debugging attempts, adb on local laptop keeps opening new ports and listening on these. what the heck is going on here?
On the contrary, when debugging over USB, 5037 is the only port used everything works and adb does not go into the new-port-creation frenzy.

Unable to open debugger port (8600) Android Studio in MAC

Error running 'Android Debugger (8600)': Unable to open debugger port (localhost:8600): java.io.IOException "handshake failed - connection prematurally closed"
This is the error I am getting while trying to attach the debugger. I have tried some of the possible solutions from Stack Overflow and Google nothing is worked for me.
Note: I am using Mac and Android Studio version is 3.4.1

Unable to debug with dual debugger on Nokia 7.1

I'm trying to debug NDK application on my Nokia 7.1 from Android Studio (3.4.1) but I'm getting this error:
Error running 'app': Unable to open debugger port (localhost:8600): java.io.IOException
I can connect to device with ndk, run app without debugging and even debug application using Java debugger (Run/Debug configurations -> Debugger -> Debug type: Java). Also debugging application C code is working on another phone (CAT S60).
First I was thinking about debugger connection timeout, so I increased it to 500000ms. This didn't help.
Attaching to running process is working but only Java or only Native debugger. Dual debugger failed to connect Java part and application is waiting for debugger.
Here is message from debugger console:
Debugger attached to process 29042
Timed out waiting for java debugger to attach
Process finished with exit code 0
Does anybody have experience how to run dual debugger on Nokia 7.1?

Unable to load application in Android Studio emulator

I can't open the application I'm developing in Android Studio emulator, It is showing the following message in the log
Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If it's being used by something else, choose a new port number in the preferences.
Unable to open connection to: localhost/17.253.38.253:5037, due to: java.net.ConnectException: Operation timed out
Following is the port listening by adb
adb 14528 unnikrishnan.b 10u IPv4 0x7e537943f4599ac9 0t0 TCP localhost:5037 (LISTEN)
This happened after I upgraded to android studio 3.1.2. How I can fix this issue?
Thanks,
Unnikrishnan B.
can be caused by an ip address in the file etc / host, sometimes you enter an additional to make tests and it is not deleted, you must check that in your file this
127.0.0.1 localhost
255.255.255.255 broadcasthost
:: 1 localhost
you can also ping the address 127.0.0.1 to check for an answer, $ ping localhost
additional information that can helps you
https://issuetracker.google.com/issues/37126279

Unable to open debugger port (localhost:8603): java.io.IOException "handshake failed - connection prematurally closed"

Error running Android Debugger (8603):
Unable to open debugger port (localhost:8603): java.io.IOException "handshake failed - connection prematurally closed"
use android studio3.0.1 in mac
Tools > Android > Enable ADB Integration
Disable then re-enable.
Good to go! Hope this helps anyone in the future I was doing a full restart until I discovered this temp fix.

Categories

Resources