Reputation: 7168
I've been working with AS 1.4 for quite a while and new native debugging feature is especially useful.
However native debugging does not work on my Samsung Galaxy Note 10.1 2014 (Android 4.4). When I try to start the native debugging session I see the following message:
Starting LLDB server: run-as com.example.hellojni /data/data/com.example.hellojni/lldb/bin/start_lldb_server.sh /data/data/com.example.hellojni/lldb /data/data/com.example.hellojni/lldb/tmp/platform.port1445003703353 "lldb process:gdb-remote packets"
Error while launching debug server on device: com.android.tools.ndk.run.DebuggerContext$StartServerException: java.lang.IllegalStateException:
Failed to read platform port /data/data/com.example.hellojni/lldb/tmp/platform.port1445003703353
I also found an open issue: https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=185061
Is there a way to solve this?
Upvotes: 3
Views: 5105
Reputation: 16361
I encounter Android Studio 3.5 similar issue with LLDB debugger - where "Starting LLDB server" process hangs forever, no debugging process is started and after solving this I encounter another issue. The issues with workarounds are explained in bug reports I submitted:
mkdir -p .../bin
Upvotes: 1
Reputation: 57173
See https://code.google.com/p/android/issues/detail?id=187003
You need root access on your device, but then chmod 4750 /system/bin/run-as
may solve the problem.
If you don't have root access, you can modify your app, and start LLDB server with your package's identity, using Runtime.exec()
.
Upvotes: 3