New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gdb debug couldn't be connected on targetSdkVersion 24. #224
Comments
Does this mean you're not using |
I was using ndk-gdb like this: ndk-gdb --launch --verbose --nowait |
Sorry for repro step 2: |
Can you post the full output from ndk-gdb.py? |
Looks like this is a permissions issue, the default permission for You can work around this with |
Reproduction Output: ***targetSdkVersion 24 (unable to connect to device) ***targetSdkVersion 23 (able to connect to device) I will try to the workaround you suggested. Thanks. |
It works to me after tried to do the workaround jmgao suggested. |
Applications with a minSdkVersion of 24 or greater have their data directory permissions set to rwx------ (compared to rwxr-x--- for previous versions). This prevents adbd from forwarding connections to gdbserver. Resolve this by running `run-as <pkg> chmod a+x` on devices running 24 or greater. Bug: http://b/32292522 Bug: android/ndk#224 Change-Id: I697a040e8b069dfda9169441c100520ba5e6c686 Test: chmod 700 /data/data/<pkgname>, ndk-gdb.py starts working
I find that gdb debug could not be connected on targetSdkVersion 24.
It works on targetSdkVersion 23.
Used sample: https://github.com/googlesamples/android-ndk >> hello-gl2
Is there any workaround?
[Reproduction]
[result]
Error: unable to connect to device.
Remote connection closed.
[My environment]
Android SDK (targetSdkVersion=24)
Android NDK r12b, r13
ant 1.9.4
Nexus 6P ( Android 7.0 )
The text was updated successfully, but these errors were encountered: