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?
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.