usb-mass-storage

Transfer Files USB Mass Storage OTG

妖精的绣舞 提交于 2019-12-02 09:52:45
问题 I have an external mass storage device connected to an Android device. There are several .BIN files in the root directory that I need to read into my app. I am able to connect to the device and receive usb permission using UsbDeviceConnection. private final BroadcastReceiver mUsbReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String output = outputTV.getText().toString(); String action = intent.getAction(); outputTV.setText(outputTV

Transfer Files USB Mass Storage OTG

雨燕双飞 提交于 2019-12-02 07:01:23
I have an external mass storage device connected to an Android device. There are several .BIN files in the root directory that I need to read into my app. I am able to connect to the device and receive usb permission using UsbDeviceConnection. private final BroadcastReceiver mUsbReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String output = outputTV.getText().toString(); String action = intent.getAction(); outputTV.setText(outputTV.getText() + "\n" + " ACTION: " + action); if (ACTION_USB_PERMISSION.equals(action)) { synchronized (this) {

Find which drive corresponds to which USB mass storage device in Linux

梦想与她 提交于 2019-11-30 20:55:58
I have several USB mass storage flash drives connected to a Ubuntu Linux computer (Ubuntu 10.04.1, kernel 2.6.32-25-386), and I need to tell them apart programatically (from bash if possible, but I'm not afraid of compiling either) - I need to find which block device corresponds to which physical device (e.g. /dev/sdb1 -> device in USB port 1; in my case, one device ~ one volume). In other words, I know that I have three hardware devices plugged into USB ports; each of them shows up in the system as a USB mass storage device (as seen with lsusb), is created as a block device ( /dev/sdb1 ) and

Find which drive corresponds to which USB mass storage device in Linux

落爺英雄遲暮 提交于 2019-11-30 17:13:02
问题 I have several USB mass storage flash drives connected to a Ubuntu Linux computer (Ubuntu 10.04.1, kernel 2.6.32-25-386), and I need to tell them apart programatically (from bash if possible, but I'm not afraid of compiling either) - I need to find which block device corresponds to which physical device (e.g. /dev/sdb1 -> device in USB port 1; in my case, one device ~ one volume). In other words, I know that I have three hardware devices plugged into USB ports; each of them shows up in the

Find which drive corresponds to which USB mass storage device in WinXP

做~自己de王妃 提交于 2019-11-28 06:36:44
I have several USB drives connected to a WinXP SP3 computer, and I need to tell them apart programatically - I need to find which drive letter corresponds to which device (in this case, one device ~ one volume). I can get their Volume IDs and drive letters using mountvol , looking something like this: C:\WINDOWS\> mountvol \\?\Volume{bdb681b2-1ddf-11dd-bf71-806d6172696f}\ C:\ \\?\Volume{6a8784f8-7406-11dd-a8c3-001e8c829b67}\ A:\ Also, using devcon or the Device Manager, I can see the device IDs: C:\WINDOWS\> devcon resources *STOR* STORAGE\REMOVABLEMEDIA\7&190C24E5&0&RM Name: Generic volume

Find which drive corresponds to which USB mass storage device in WinXP

。_饼干妹妹 提交于 2019-11-27 05:41:07
问题 I have several USB drives connected to a WinXP SP3 computer, and I need to tell them apart programatically - I need to find which drive letter corresponds to which device (in this case, one device ~ one volume). I can get their Volume IDs and drive letters using mountvol , looking something like this: C:\WINDOWS\> mountvol \\?\Volume{bdb681b2-1ddf-11dd-bf71-806d6172696f}\ C:\ \\?\Volume{6a8784f8-7406-11dd-a8c3-001e8c829b67}\ A:\ Also, using devcon or the Device Manager, I can see the device

Programmatically Turn Off USB Storage on Android Devices

独自空忆成欢 提交于 2019-11-26 20:57:55
问题 On many android devices, when the device is plugged into the USB port of a computer or even on some USB charging devices, the phone goes into USB Storage mode. When the device is in this mode, android apps cannot access the sdcard. Is there any way (1) to detect when the device is in this mode and (2) to programmatically turn off USB storage, at least temporarily, so my android app can access the sdcard? I've seen other SO questions and the answers are not really sufficient (e.g., Android: