NDK gdbserver /system/bin/sh: run-as: can't execute: Permission denied ...

839 views
Skip to first unread message

maner ernar

unread,
Jun 10, 2014, 2:24:20 PM6/10/14
to andro...@googlegroups.com

Hi,

I'am learning android (under linux)...

I install under debian dev : ADT 22.6.2, i install AndroidX86 on samsung ATIV pad on the same network (ethernet for dev & target).

I write a same program with a window OpenGLES 2 NDK (C++11 + STL, target : armeabi\armeabi-v7a\mips\x86), and a 3d cube (it's work on x86 device and arm device).

I try to debug app using ADT and GDB, to continue my dev.

I try to activate on AndroidManifest.xml : "Debuggable" to "true"  (i try also without it as said on doc).

Under properties > C\C++ Build > Build command : "ndk-build NDK_DEBUG=1"      * Only for native debug.

I put "breakpoints" on java and c++.

I get target IP : 192.168.1.75

I launch under debian : sudo /opt/adt-bundle-linux/sdk/platform-tools/adb connect 192.168.1.75

I set device under ADT.

I have log under debian on Logcat tab.

If i launch debug with : Debug As > "Android Application" ( without NDK_DEBUG=1 )

It break on java.
 

If i launch debug with Debug As > "Android Native Application" ( with NDK_DEBUG=1 )

I have on ADT console :

[2014-06-09 20:13:13 - VideoPlayerEGL] gdbserver output:
[2014-06-09 20:13:13 - VideoPlayerEGL] /system/bin/sh: run-as: can't execute: Permission denied
[2014-06-09 20:13:13 - VideoPlayerEGL] Verify if the application was built with NDK_DEBUG=1

=> Application start on device but debugger failed to start, and i don't known why or how solve this issue ?

If someone have an idea, your welcome...

Thanks for your help,

Justin Webb

unread,
Jul 5, 2014, 7:23:59 PM7/5/14
to andro...@googlegroups.com
Are you running on an Android 4.3 device? Native debugging is broken in the fashion you've described on that release:


Can you update or use another non-4.3 device and retry?

---
Justin Webb
Reply all
Reply to author
Forward
0 new messages