[Android-development] Debugging not working on Android 8.0 / Pixel 2

Felix Matouschek felix.matouschek at vipco.de
Tue Dec 5 10:29:55 CET 2017


Hello,

I'm trying to debug a Qt 5.9.3 application on a Google Pixel 2 running Android 8.0 with QtCreator 4.4.1. (Tried it on Windows 8.1 and Ubuntu 16.04.3)

Unfortunately QtCreator and QtActivityDelegate.java on the device cannot establish a connection and so starting a debugging session fails.

This is the output on my device:

I/Qt JAVA: DEBUGGER: extra parameters: Bundle[{debug_ping=true, gdbserver_socket=/data/data/com.my.app/debug-socket, gdbserver_command=/data/data/com.my.app/lib/libgdbserver.so --multi +/data/data/com.my.app/debug-socket, ping_socket=com.my.app.ping_pong_socket}]
I/Qt JAVA: DEBUGGER: removing gdb socket /data/data/com.my.app/debug-socket
I/Qt JAVA: DEBUGGER: starting /data/user/0/com.my.app/lib/libgdbserver.so --multi +/data/data/com.my.app/debug-socket
I/Qt JAVA: DEBUGGER: gdbserver started
I/Qt JAVA: DEBUGGER: waiting for socket at /data/data/com.my.app/debug-socket, attempt 0
I/Qt JAVA: DEBUGGER: waiting for socket at /data/data/com.my.app/debug-socket, attempt 1
I/Qt JAVA: DEBUGGER: socket ok
I/Qt JAVA: DEBUGGER: Waiting for debug socket connect
I/Qt JAVA: DEBUGGER: go to sleep
I/Qt JAVA: DEBUGGER: Waiting for debug socket connect
I/Qt JAVA: DEBUGGER: go to sleep
I/Qt JAVA: DEBUGGER: Waiting for debug socket connect
I/Qt JAVA: DEBUGGER: go to sleep
I/Qt JAVA: DEBUGGER: Waiting for debug socket connect
I/Qt JAVA: DEBUGGER: go to sleep
I/Qt JAVA: DEBUGGER: Debug socket accepted
I/Qt JAVA: DEBUGGER: Waiting for debug socket connect
I/Qt JAVA: DEBUGGER: go to sleep

[...]

I/Qt JAVA: DEBUGGER: Waiting for debug socket connect
I/Qt JAVA: DEBUGGER: go to sleep
I/Qt JAVA: DEBUGGER: Waiting for debug socket connect
I/Qt JAVA: DEBUGGER: go to sleep
I/Qt JAVA: DEBUGGER: time out when waiting for ping socket

The initial ping_pong_socket seems to work, establishing a connection to the debug-socket also seems to work but then the initialization sequence gets stuck.

I suspect it gets stuck between lines 680-686 in QtActivityDelegate.java.

Any suggestions?

Regards,
Felix Matouschek




More information about the Android-development mailing list