1

It has been a few years since I last needed to debug any native applications on Android. After poking around a bit I found this Google reference referring to gdbserver and gdbclient.py.

I found the former in the NDK

$NDK/prebuilt/android-arm[64]/gdbserver/gdbserver

And the latter in the SDK

$SDK/development/scripts/gdbclient.py

When I went to run the python script I am met with:

$ python gdbclient.py
Traceback (most recent call last):
  File "gdbclient.py", line 27, in <module>
    import gdbrunner
ImportError: No module named gdbrunner

For the life of me I cannot find any information on what gdbrunner is. Nor have I found any other reference to it in the [S/N]DKs.

Any idea? Is there another method to debug native components of Android not reliant upon this script?

2 Answers 2

1

I fear I overlooked it in the NDK. I must have been using an older version. The gdbrunner package is located at

$NDK/python-packages/gdbrunner

Along with other useful things.

Sign up to request clarification or add additional context in comments.

Comments

0

you can try this:

1.in app/build.gradle:

at dependencies label:

releaseCompile project(path: ':youModuleName', configuration: 'release')
debugCompile project(path: ':youModuleName', configuration: 'debug')

2.in youModule/build.gradle:

at android label:

publishNonDefault true

demo:

https://github.com/sunalong/JNIDemo

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.