How do I reverse engineer the Android kernel currently running on an Android phone? I'm most interested in seeing/manipulating the call stack. Basically, gdb or something like Ollydgb would be great. I am not looking to build the kernel from source.
1 Answer
Probably the easiest way to go about it is to find out what firmware image your phone is running and download it, extract the kernel blob (zImage), then fire that up in the android emulator/QEMU and remote kgdb into it.
You could unpack the kernel using unmkbootimg: https://github.com/osm0sis/mkbootimg
There are plenty of tutorials on xda for unpacking the kernel.
Here's a link of some dude debugging an android kernel in the emulator: http://www.informit.com/articles/article.aspx?p=2431417&seqNum=3
strace
be of help in any way?