适用于Android的usbmon [英] usbmon for Android

查看:359
本文介绍了适用于Android的usbmon的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想分析设备外的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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆