我想分析设备外的USB通信:SGS4. 我到处都看到需要配置usbmon并将其编译到内核中. Afaik,此模块不是在android linux系统中构建的.
I want to analyze usb communication out of my device: SGS4. I see everywhere that the usbmon is needed to be configured and compiled into the kernel. Afaik, this module is not built in the android linux system.
我在编译内核方面经验不足,但是如果有必要,我会做.
I don't have much experience in compiling a kernel but if this is necessary I would do it.
您能告诉我这样做的步骤吗?即如何为Android编译Linux内核,使其包含usbmon模块.
Can you tell what are the steps of doing so? i.e. how to compile the linux kernel for android such that it would include the usbmon module.
推荐答案我想您可以访问:
- 设备上当前正在运行的 Linux版本的来源.可以在三星存储库如果您尚未更改ROM.或者,如果您使用其他ROM(CyanogenMod,Clockwork等),则可以使用一些自定义内核.
- 一个 ARM工具链,事实证明适合编译该内核. 当前在设备上运行的
- AOSP版本(例如4.1.2).您需要它来从新编译的内核映像zImage中构建新的boot.img.
- the sources of the version of Linux currently running on your device. It could be available on Samsung repository if you haven't changed the ROM. Or some custom kernels if you use an alternative ROM (CyanogenMod, Clockwork, ...).
- an ARM toolchain that is proven suited to compile this kernel.
- the version of AOSP currently running on your device (e.g. 4.1.2). You need it to build the new boot.img out of the newly compiled kernel image zImage.
您需要在linux中启用CONFIG_USB_MON:
You need to enable CONFIG_USB_MON in linux:
$ make CROSS_COMPILE=your/armeabi/toolchain/path menuconfig键入/进行搜索,然后输入USB_MON.该标志位于:
type / to search then enter USB_MON. The flag is located in:
-> Device Drivers -> USB support (USB_SUPPORT [=n]) -> Support for Host-side USB (USB [=n])然后重建:
$ make CROSS_COMPILE=your/armeabi/toolchain/path zImage然后请直接从内核源代码中阅读 Documentation/usb/usbmon.txt. 它应该教您所有您需要知道的内容.
Then please read Documentation/usb/usbmon.txt directly from your kernel sources. It should teach you everything you need to know.
更多推荐
适用于Android的usbmon
发布评论