android gdb ndk so lib
16lz
2022-04-22
1. adb root 手机需要rooted,并且开发者选项中设置adb可以获得root权限; root access is disabled by system setting - enable in settings -> development options2. ndk-build 设置 ndk-build NDK_DEBUG=1 V=1 Android.mk : LOCAL_CFLAGS := -g(there should be gdb.setup gdbserver files under the libs/armeabi after ndk-build)..3. adb shellsu#am start -n com.xxx.xxx/.MainActivity#ps |grep -i xxx#gdbserver :5039 --attach your_process_id4.$adb forward tcp:5039 tcp:5039$/Users/xxx/android-ndk-r8d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/arm-linux-androideabi-gdb5.(from the libs/armeabi/gdb.setup file, get the following path)(gdb)set solib-search-path /Users/xxxx/obj/local/armeabi-v7a(gdb)directory /path/to/your/project's all source/directory(gdb)target remote :5039(gdb) bt full(gdb) set logging on
references:
1. http://www.bobbog.com/archives/24
2. http://wiki.debian.org/HowToGetABacktrace
3. http://www.kandroid.org/online-pdk/guide/debugging_gdb.html
更多相关文章
- Android调用系统 Set As Intent
- android6.0 netd设置dns
- Android(安卓)开发常用代码片段
- Ubuntu 下开发 Android(安卓)环境变量设置
- 设置默认来电铃声 android
- android与h5简单交互(js调取android的拨打电话功能)
- Gps简单更新
- android之Notification的使用
- Android(安卓)自定义AlertDialog 并且4个角为圆角