Skip to content

Instantly share code, notes, and snippets.

@sephiroth74
Created August 25, 2015 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sephiroth74/cfed0b50d46582473850 to your computer and use it in GitHub Desktop.
Save sephiroth74/cfed0b50d46582473850 to your computer and use it in GitHub Desktop.
Debug native C/C++ android code in Mac OSX
cp {project}/src/main/libs/armeabi-v7a/gdbserver {project}/build/intermediates/bundles/{flavor}/debug/jni/armeabi-v7a/
adb shell
su
ps | grep '{packagename}'
/data/app/{packagename}/lib/arm/gdbserver :8888 --attach 8150
* new terminal tab *
adb forward tcp:8888 tcp:8888
arm-linux-androideabi-gdb
target remote :8888
* copy contents of gdb.setup into terminal *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment