Gdbserver strange error while debugging native app

帅比萌擦擦* 提交于 2019-12-13 00:41:12

问题


I'm trying to debug an native app on my android device. I followed this tutorial: http://blog.thecobraden.com/2012/02/debugging-apps-with-native-code-part-1_09.html And everything went good, I built the app and installed it, once I wanted to debug it with ndk-gdb I got this error: Could not open remote device: Invalid argument.

I searched this error and found this answer: Android NDK debugging: device can't be opened It's very similar to my problem, I tried this method and now I get this error: Can't open socket: Permission denied.

My phone is rooted so I don't understand why gdbserver can't open the socket.. I tried to give the gdbserver binary different permissions but it still won't work. Any solutions?


回答1:


Are you running the ndk gdb command as root? Do adb root to get the root access of the device and then start the debugging. Hopefully this should help.



来源:https://stackoverflow.com/questions/26317509/gdbserver-strange-error-while-debugging-native-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!