English 中文(简体)
连接U 装置至安乐器?
原标题:Connect USB device to Android Emulator?

我们先看见Ath 3.1+,并看看它是否有能力读/做与OTG/Host港连接的UB装置。

我发现了一些密码例子,使我能够发现和阅读/参加“USHID”装置,但目前我根本不具备部署和遥控的物理3.1+兼容装置。

是否有任何人知道我如何通过PC/Eclipse将我的HID装置带给代人,以便照相器能够检测和阅读/使用该装置?

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

任何想法?

卡车

问题回答

The Android emulator is based on QEMU. Even if the emulator version is so ancient, there appears to be support for passing USB devices from the host. It does not seem to be available for ARM devices though, the emulated ARM machine does not have a USB controller. (I have already tried enabling all USB host controllers for the goldfish_armv7 kernel based on Linux 3.4, without luck. The default emulator goldfish_armv7 kernel does not even have Host USB enabled.)

如果你不局限于异常低价竞标,并且可以使用x86,那么我建议检查,其图像可使用标准 i386 (or x86_64)。 这也通过在上使用KVERS延伸,提高了性能。

To passthrough a USB device with of vendor ID 1234 and device ID abcd, you can run the emulator command:

emulator -avd x86-machine -qemu -usb -usbdevice host:1234:abcd

或者,在使用QEMU时:

qemu-system-i386 -m 1G -cdrom android-x86.iso -usb -usbdevice host:1234:abcd

您需要读/批准<代码>/dev/bus/usb/XXX/YYYYY,因为您可以制定一种例如:

SUBSYSTEM!="usb", GOTO="end_skip_usb"
ATTRS{idVendor}=="1234", ATTRS{idProduct}=="abcd", TAG+="uaccess"
LABEL="end_skip_usb"

现在,在插入USB装置后,贵方应承认一个USB装置。 测试的是在一个有安乐S864.3图像的含水层安装。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...