Gdbserver strange error while debugging native application

I am trying to debug my own application on my Android device. I followed this guide: http://blog.thecobraden.com/2012/02/debugging-apps-with-native-code-part-1_09.html And everything went well, I built the application and installed it as soon as I wanted to debug its using ndk-gdb. I got this error: Unable to open remote device: Invalid argument.

I searched for this error and found this answer: Android NDK debugging: the device cannot be opened This is very similar to my problem, I tried this method and now I get this error: cannot open socket: permission is allowed.

My phone is rooted, so I do not understand why gdbserver cannot open the socket. I tried to grant binary rights to gdbserver, but it still won’t work. Any solutions?

+1
source share
1 answer

Does the ndk gdb command run as root? Make adb root to get root access to the device, and then run debugging. Hope this helps.

0
source

All Articles