usb

How can I read files from usb device on android?

自古美人都是妖i 提交于 2019-12-07 05:19:04
问题 I'm trying to create something like file explorer through connected usb devices(via OTG or usb ports on android TV). All I need for this is a path something like "/storage/sda4" and device identifier, and then I can work with device through simle android class File. Is sounds simple but I can't find any info about this, but all file explorers can do it (for example ESExplorer). Ok, I find a simple way to get all connected usb devices with identifier UsbManager usbManager = (UsbManager)

Which DLL is [DllImport] loading?

谁都会走 提交于 2019-12-07 04:27:44
问题 I'm using the [DllImport] attribute to import a native DLL into my application but the DLL it's loading isn't in the local bin folder. It's being loaded from elsewhere on the system, but I can't work out where. It works on my dev machine but not on a clean one. I've enabled Fusion logging and that only shows me managed assemblies. I've dumped the process using Sysinternals Process Explorer and that's telling me it's in C:\Windows\System32 but I can't see the file there in Windows Explorer. It

Android USB Vendor IDs for unknown brand [closed]

你。 提交于 2019-12-07 04:16:48
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Refer to http://developer.android.com/guide/developing/device.html#VendorIds, I want to buy a unknown brand Android device, such as

Why is my kernel module throwing “broken pipe” errors when I try to write to a device?

自古美人都是妖i 提交于 2019-12-07 04:02:49
问题 I am currently in the process of writing a Linux kernel module in C. The module provides an extremely basic driver for a USB light (the device consists of three colored LEDs). I have managed to get the driver to load and unload without problems and also create the device ( /dev/wn0 , /dev/wn1 , etc.). However, I keep getting errors when attempting to write to the device: $ echo "1" >/dev/wn0 bash: echo: write error: Broken pipe The entire code for the module is here. However, the interesting

USB Port Speed Linux [closed]

心已入冬 提交于 2019-12-07 03:49:39
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . How to programatically determine the usb port speed in embedded devices running the Linux kernel? 回答1: You can read /sys/bus/usb/devices/usb?/speed - it'll give you the bus speed of the root hub(s) in Mbps: either 1.5, 12, 480 or 5000. The first two indicate USB1 (low speed or full speed), the third USB2 and the

send data from android to PC via USB [closed]

☆樱花仙子☆ 提交于 2019-12-07 02:44:45
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . How to send a simple data (with java programming) from android to PC connected via USB? I am using android 2.3.3. Also can someone tell me what APIs should i look for doing this? ..Thanks 回答1: See the android USB-Host documentation: http://developer.android.com/guide/topics/usb/host.html 来源: https:/

Writing USB Drive Portable Applications in C#

a 夏天 提交于 2019-12-07 02:20:10
问题 One of my favorite things about owning a USB flash storage device is hauling around a bunch of useful tools with me. I'd like to write some tools, and make them work well in this kind of environment. I know C# best, and I'm productive in it, so I could get a windows forms application up in no time that way. But what considerations should I account for in making a portable app? A few I can think of, but don't know answers to: 1) Language portability - Ok, I know that any machine I use it on

Android studio on Mac cannot detect connected USB phone

筅森魡賤 提交于 2019-12-07 01:55:25
问题 Constant issue with being able to connect an Android device via USB to Android Studio running on a Mac. Tried numerous things like: Switching USB debugging mode on Android to MTP or PTP Restarting the Android devices and Android Studio and/or Mac trying adb kill-server and then adb devices , which usually resulted in: List of devices attached daemon not running. starting it now on port 5037 adb E 655 23135 usb_osx.cpp:327] Could not open interface: e00002c5 adb E 655 23135 usb_osx.cpp:289]

Error message 'Interface not claimed' from libusb

余生长醉 提交于 2019-12-06 22:32:34
问题 I'm trying to use libusb, but I am get the following error message: usbfs: process 24665 (myprogram) did not claim interface 0 before use I don't really understand why, because as far as I can tell, I'm doing it according to the description found in the library. Here's my code: #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <libusb.h> int main(void) { int result; struct libusb_device_descriptor desc; libusb_device **list; libusb_device *my_device = NULL; result =

linux / libusb get usb device path

懵懂的女人 提交于 2019-12-06 21:10:55
问题 I use libusb to enumerate over a few usb-devices. Now i like to get the "device-path". I think it's not called usb device-path, because i was not successful with google. If i connect a usb-device with linux, i get a message in dmesg , here are a few examples for such a "device-path" with an usb temperature sensor (something like this): Directly to a usb port: [68448.099682] generic-usb 0003:0C45:7401.0056: input,hidraw1: USB HID v1.10 Keyboard [RDing TEMPer1V1.2] on usb-0000:00:12.0-1/input0