|ARM Technical Support Knowledge Articles|
Applies to: DS-5
If you are attempting to debug an Android native library, and encountering error message similar to the following errors in DS-5, then this Knowledge Article applies to you.
'Connecting to Target' has encountered a problem.
Failed to communicate with gdbserver at localhost on port 5000. No data received.
run-as: exec failed for lib/gdbserver Error:No such file or directory
Failed to attach gdbserver to <Android application name>. Unable to locate gdbserver in </data/data/<Android application name>/lib/>. Rebuild the application with NDK_DEBUG=1
DS-5 relies on gdbserver being present within an Android application's .apk file. If gdbserver is not present within the .apk file, DS-5 will be unable to launch gdbserver on the target device. You can ensure that the generated .apk has gdbserver by building within the NDK environment with the NDK_DEBUG option set (NDK_DEBUG=1). Furthermore, if you are using TCP over USB, you would need to do some port forwarding to ensure port 5000 is accessible by gdb debugging (please see the following link as an example of port forwarding).
Please make sure you are using the latest version of DS-5.
Did you find this article helpful? Yes No
How can we improve this article?