← Back to team overview

ubuntu-phone team mailing list archive

Re: QtCreator doesn't connect to emulator

 

Hi Benjamin,

Le 25/06/2015 11:32, Benjamin Zeller a écrit :
Hey,

ok, so that means it hangs in the
/usr/share/qtcreator/ubuntu/scripts/local_wait_for_emulator script.
For some reason that script does not detect if the emulator is started.

Would be awesome if you can have a quick look to see what is happening.
Maybe just put in some
prints and run it manually with the emulator name you have started.



Here are my results :
it's a port problem :


the script local_wait_for_emulator is blocked on line :
adb -s emulator-${port} wait-for-device

value of port is "5555" while the emulator  is "5554" :
$ adb devices
List of devices attached
emulator-5554	device


In the script, the port is defined by :
port=$(netstat -anp 2>&1|grep tcp|grep ${pid}|head -1|awk '{print $4}'|sed -n 's/.*\:\([0-9]*$\)/\1/p'|egrep -v "^$")


In my configuration the begining of that formula outputs :
(with pid = 8861)

$ netstat -anp 2>&1 | grep tcp | grep 8861
tcp 0 0 127.0.0.1:5555 0.0.0.0:* LISTEN 8861/emulator-x86 tcp 0 0 127.0.0.1:5554 0.0.0.0:* LISTEN 8861/emulator-x86 tcp 0 0 192.168.0.20:45619 91.189.88.30:443 ESTABLISHED 8861/emulator-x86 tcp 0 0 192.168.0.20:48280 91.189.92.125:443 CLOSE_WAIT 8861/emulator-x86 tcp 0 0 127.0.0.1:5555 127.0.0.1:54399 ESTABLISHED 8861/emulator-x86



As a workaround, I just forced the port to "5554" in the script and I can work again with QtCreator :-)


Hope this helps,
tell me if you need that I look for other informations.

Cheers,
Michel



References