213
edits
(Created page with "It is possible to use gdb '''without''' root on Android 2.3+ devices! *Go to your Android NDK directory and enter /build<br> *Run this:<br> <br> mkdir lib<br>adb push prebu...") |
No edit summary |
||
Line 1: | Line 1: | ||
= GDB on Android without Root<br> = | |||
It is possible to use gdb '''without''' root on Android 2.3+ devices! | It is possible to use gdb '''without''' root on Android 2.3+ devices! | ||
Line 16: | Line 18: | ||
*Find your pid with<br> | *Find your pid with<br> | ||
<br> | <br> | ||
adb shell ps | grep fennec<br><br> | adb shell ps | grep fennec<br><br> | ||
*Connect to the process on the devices with<br> | *Connect to the process on the devices with<br> | ||
<br> | <br> | ||
adb shell /data/local/gdbserver :12345 --attach THE_PID_YOU_JUST_FOUND<br> | adb shell /data/local/gdbserver :12345 --attach THE_PID_YOU_JUST_FOUND<br> | ||
<br> | <br> | ||
*Run gdb with<br> | *Run gdb with<br> | ||
<br> | <br> | ||
./prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-gdb ./lib/app_process<br> | ./prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-gdb ./lib/app_process<br> | ||
<br> | <br> | ||
*In gdb, run this or just place it in a .gdbinit (then run just android_attach)<br> | *In gdb, run this or just place it in a .gdbinit (then run just android_attach)<br> | ||
<br>def android_attach<br> set solib-absolute-prefix /builds/android_tools/tegra-gdb-20100902/lib/<br> set solib-search-path<br>/builds/android_tools/tegra-gdb-20100902/lib/:/builds/android_tools/tegra-gdb-20100902/lib/system/lib:/builds/mozilla-central/obj-android/dist/bin/<br> target remote localhost:12345<br>end<br> | <br>def android_attach<br> set solib-absolute-prefix /builds/android_tools/tegra-gdb-20100902/lib/<br> set solib-search-path<br>/builds/android_tools/tegra-gdb-20100902/lib/:/builds/android_tools/tegra-gdb-20100902/lib/system/lib:/builds/mozilla-central/obj-android/dist/bin/<br> target remote localhost:12345<br>end<br> | ||
<br> | <br> |
edits