适用于Android的usbmon

编程入门 行业动态 更新时间:2024-10-24 02:02:37
本文介绍了适用于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

本文发布于:2023-11-23 14:10:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1621722.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:适用于   Android   usbmon

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!