2

I am testing some code for an Android device, emulated with Android studio. I would like to debug the c code ("POC") with gdb (which is not included in the binaries of the device) to find where it is breaking.

While debugging I will be connected through adb to emu device. My question may sound trivial: Is it possible to install gdb and how without packages like build-essential etc? What needs to be done? Just copying my gdb binary will definitely not work.

I have found something similar, when you are building another rootfs in system, concrete Debian https://github.com/corbinlc/GNURootDebian

  • https://developer.android.com/studio/debug/index may provide some assistance. Installation of debuggers on android has nothing to do with security, so I vote to close. –  Nov 12 '19 at 16:50
  • I mean debugging from command line and debugging C code built by android NDK –  Nov 12 '19 at 16:56
  • Andorid NDK should contain gdbserver for your Android architecture which runs on-device and allows you to connect a gdb instance from your host system. https://source.android.com/devices/tech/debug/gdb – Robert Nov 13 '19 at 08:41

0 Answers0