1

I have all the code of nexus 7 on my machine and a rooted device.

I can debug a user space application using gdbclient and gdbserver, but how can I exploit the gdbclient and gdbserver to debug the Kernel?

I saw this post but it explian how to do it QEMU, How can I debug the real board.

0x90
  • 39,472
  • 36
  • 165
  • 245

1 Answers1

0

You do it either way, through gdbclient or through gdbserver

I prefer using gdbclient, its simpler and it requires less commands.

First making sure you adbd is running as root

    adb root

Second, shell into your device to find out the app name you want to debug with

    adb shell
    ps // list all process running in the device

Third, exit the shell connect

    exit

last, connect to the app using gdbclient, ex connecting to "mediaserver"

    gdbclient mediaserver :5039 mediaserver

by default, remote gdb listen to port 5039, don't get confused with ddms, that's running at 5037 by default. Hope this helps!

mopodafordeya
  • 635
  • 1
  • 9
  • 26