如何调试/验证USB CDC设备的无代码kext?

时间:2014-09-02 13:03:20

标签: macos usb kernel kernel-extension

我为USB CDC设备创建了一个无代码kext,以防止它被列在网络设置中。

根据kextutil,kext是有效的(除了它是自签名的警告)。

当我用kextutil加载它时,日志文件会显示有关kext无效签名的警告。

现在我要验证,无论何时插入设备,都会正确加载和使用。为此,我将IOKitDebug设置为最大值(65535)。我在控制台中看到的唯一输出是:

02/09/14 14:57:59,000 kernel[0]: AppleUSBCDCACMData: Version number - 4.2.1b5, Input buffers 8, Output buffers 16
02/09/14 14:57:59,000 kernel[0]: AppleUSBCDC: Version number - 4.2.1b5

没有引用我的kext(com.foo.my-device.kext)。

下面的Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleIdentifier</key>
    <string>com.foo.my-device.kext</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>SerialHelper</string>
    <key>CFBundlePackageType</key>
    <string>KEXT</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>IOKitPersonalities</key>
    <dict>
        <key>MSP Tools Driver</key>
        <dict>
            <key>IOKitDebug</key>
            <integer>65535</integer>
            <key>CFBundleIdentifier</key>
            <string>com.apple.driver.AppleUSBCDC</string>
            <key>IOClass</key>
            <string>AppleUSBCDC</string>
            <key>IOProviderClass</key>
            <string>IOUSBDevice</string>
            <key>IOProviderMergeProperties</key>
            <dict>
                <key>HiddenPort</key>
                <string>1</string>
            </dict>
            <key>idProduct</key>
            <integer>YYYYY</integer>
            <key>idVendor</key>
            <integer>XXXXX</integer>
        </dict>
    </dict>
    <key>OSBundleRequired</key>
    <string>Root</string>
</dict>
</plist>

0 个答案:

没有答案