ARTICLE AD BOX
I’m not an expert in this area, I might be misunderstanding some fundamentals.
I’m using Genymotion to emulate Android , while researching some Android kernel CVEs, I need to analyze kernel structures to determine member offsets.
I found a blog post that demonstrates using GDB on a Linux kernel vmlinux image to inspect structure layouts, for example:
gdb> ptype /o struct binder_ref /* offset | size */ type = struct binder_ref { ... /* 88 | 8 */ struct binder_node *node; /* 96 | 8 */ struct binder_ref_death *death;However, I’m confused about how this applies to Android kernels.
In Linux, the debug symbols are typically available via vmlinux, but in Android images I only see things like boot.img or sometimes bzImage, and I don’t fully understand the difference or which one contains the kernel symbols needed for debugging.
My question is:
How can I obtain or extract kernel structure offsets (like the example above for struct binder_ref) in an Android kernel environment? What is the correct workflow for using GDB or another tool in this case?
