Debugging processes via some GDB-like tool is what most memory corruption, buffer overflow, and malware analysis jockeys do every day. Inspecting memory and performing dynamic analysis of an application process is something fundamental to any reverse engineer no matter what platform you're focused on; this, of course, includes Android. The following recipe shows you how to debug a process running on an Android device using GDB.
In order to pull off this recipe, you'll need to grab the following:
The Android NDK package available at http://developer.android.com/tools/sdk/ndk/index.html
The Android SDK package
To debug a live Android process using gdbserver
, you will need to perform the following steps: