我如何编辑device driver
文件(.sys)
并且我想更新Report Descriptor
文件。我想转置 USB HID 设备驱动程序的 X 和 Y 值。请帮我在 HID 设备中转置 X 和 Y 值。
2 回答
use a binary editor, or if you are really careful, vi
. note that whatever you do, leave strings exactly the same length or you will almost definitely crash your operating system.
assuming you are using Windows, good old debug.exe will work fine as a binary editor. the interface is a bit obscure though.
C:\Users\jc>echo bleah > test.sys
C:\Users\jc>debug test.sys
-e100
17DD:0100 62.31 6C.32 65.33 61.34 68.35
-w
Writing 00008 bytes
-q
C:\Users\jc>type test.sys
12345
on the line following -e100, I was typing the new values and hitting the spacebar; when done I hit <enter>.
您可以为 Win32/Win64 使用任何静态反汇编程序。这样,您将更好地查看代码说明、函数名称,并能够轻松找到您的目标(否则直接读取机器代码,这是有特权的头脑)。
一个例子可以是“PEBrowse Professional”(免费),但还有很多其他的。我引用的那个经过验证可以打开Win10的64-sys。