开发者

Android Linux kernel information/inspection tool

Is there a tool that can examine compiled kernels images for basic information about version/platform/device etc..

$<inspect-tool> zImage 
    Kernel version <X.XX.XX>, platform:<XXXX>, architecture<XXXX> etc..开发者_JAVA百科

Thanks


The file utility gives you some of that info:

# file /boot/gentoo-3.0.3 
/boot/gentoo-3.0.3: Linux kernel x86 boot executable bzImage, version 3.0.3-gentoo (root@mybox) #3 SMP Sat Aug 20 11:45:06 CEST 2011, RO-rootFS, root_dev 0x806, swap_dev 0x2, Normal VGA

Note that the arch is not correct (should be x86_64, but I guess the boot image for x86_64 is indeed a 32bit to start with).


This might help:

http://www.linuxquestions.org/questions/slackware-14/anyway-to-extract-a-version-string-from-a-non-running-vmlinuz-506993/

but it is based on naive kernel image grepping, though it might solve your problem.

So in order to extract kernel version try something similar to:

grep -e "2\.[46]\.[0-9]*" ./vmlinuz

Note however, that it might be necessary to uncompress/decode the image first (I don't really know how android kernel image differ from regular Linux kernel).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜