admin管理员组

文章数量:1548500

We've been looking into Android 3.1+ and its ability to read/write to USB devices connected to the OTG/Host port.

I've found some code examples that allow me to detect and read/write to a USB HID device, but at the moment, I simply don't have a physical 3.1+ compatible device to deploy and remotely debug on.

Does anyone know how I can attach my HID device to the emulator, via the PC/Eclipse so the app can detect and read/write to/from the device?

I've tried listing the currently connected USB Devices but it shows none, as you'd no doubt guess.

Any ideas?

Cheers

解决方案

AFAIK this isn't possible. Android emulators do not emulate many things that exist in real devices... but this reminds me of an attempt to run ADB over Bluetooth.

This isn't a direct positive answer to your question but perhaps it can help you find a workaround the way I did: Install an "emulator" on a physical x86 netbook (dual-boot) and use the links referred to in my posts to accomplish what you are trying to do via WiFi or Bluetooth.

Hope this helps.

本文标签: 模拟器连接到设备OTGandroid