usb-mass-storage

How to distinguish USB hard drives and SSDs from USB keys / pen drives on macOS

北城以北 提交于 2021-01-04 05:42:43
问题 How is it possible for code to distinguish between external USB hard drives and solid-state drives on the one hand versus USB sticks on the other hand? I'm not familiar with macOS APIs (or system calls, interrupts, messaging, and other things) but I'm guessing it would be in I/O Kit or Disk Arbitration? On the Terminal command line you can use system_profiler SPUSBDataType and see this information listed under "Removable Media". 回答1: You can get the removable/ejectable information directly

How to distinguish USB hard drives and SSDs from USB keys / pen drives on macOS

萝らか妹 提交于 2021-01-04 05:41:42
问题 How is it possible for code to distinguish between external USB hard drives and solid-state drives on the one hand versus USB sticks on the other hand? I'm not familiar with macOS APIs (or system calls, interrupts, messaging, and other things) but I'm guessing it would be in I/O Kit or Disk Arbitration? On the Terminal command line you can use system_profiler SPUSBDataType and see this information listed under "Removable Media". 回答1: You can get the removable/ejectable information directly

Android:mount unmount and format sdcard

时光毁灭记忆、已成空白 提交于 2020-01-17 00:38:44
问题 Is there any possibility given in Android Icecream-sandwich to programatically format,mount and unmount sdcard ? 回答1: Related API's are in com.androidserver.MountService (it's not new), but this class is hidden and not available for SDK applications. In theory, you can get the MOUNT_FORMAT_FILESYSTEMS permission (it is not a system permission), but you cannot use it since the API's are not public. 来源: https://stackoverflow.com/questions/8630976/androidmount-unmount-and-format-sdcard

Android:mount unmount and format sdcard

帅比萌擦擦* 提交于 2020-01-17 00:38:08
问题 Is there any possibility given in Android Icecream-sandwich to programatically format,mount and unmount sdcard ? 回答1: Related API's are in com.androidserver.MountService (it's not new), but this class is hidden and not available for SDK applications. In theory, you can get the MOUNT_FORMAT_FILESYSTEMS permission (it is not a system permission), but you cannot use it since the API's are not public. 来源: https://stackoverflow.com/questions/8630976/androidmount-unmount-and-format-sdcard

Android 6.0 USB Mass Storage

限于喜欢 提交于 2020-01-03 03:03:17
问题 USB mass storage is now officially supported by Android, exclusively through the Storage Access Framework. It does not seem to mount the storage in a typical sense, as far as I can tell the only way to access the data is through the Document API and ContentResolver . 1) Is there no longer a simple File way to access the storage after going through the SAF? 2) If not, what's the best way to interact with 'files' on USB storage in NDK if we don't have access to paths. 回答1: There are a lot of

How can BeagleBone Black be used as Mass Storage Device?

拟墨画扇 提交于 2019-12-21 02:35:25
问题 Is it possible to use the BB as Mass Storage Device? I want it to be connected to an audio player that can read files from USB connectivity (such as USB flash drive) and act as data storage device containing one specific folder (and its sub-folders) from the file system (if possible, on a flash drive connected to the board.). As the device specs says, it has connectivity of: USB client for power & communications USB host Operating system will probably be Ubuntu but can be changed. What

Can't properly read the boot sector from a FAT32 USB drive on Android device

我只是一个虾纸丫 提交于 2019-12-12 02:35:19
问题 I'm trying to read the boot sector from a FAT32 drive on Android device, but I'm getting totally different data from what I expect. This is the output I'm receiving with bulkTransfer on read endpoint on my Android device. 33C08ED0BC007C8EC08ED8BE007CBF00 06B90002FCF3A450681C06CBFBB90400 BDBE07807E00007C0B0F850E0183C510 ... 656D000000637B9A5BE2B3D70000800F 30000BFEFFF4E0030000205CF8000000 00000000000000000000000000000000 00000000000000000000000000000000 000000000000000000000000000055AA This is

UsbInterface null for except 1 device

萝らか妹 提交于 2019-12-11 04:42:36
问题 This way I found solution to recognize if the connected device is storage device. I am following this thesis to understand how the USB Communication with Storage device is done. But the main problem I faced is that For all the connected device except the last connected device I am not getting the UsbInterface and so the related UsbEndPoints. Now How can I recognize all other connected storage device. When 3 devices are connected the log I got is: found usb device: UsbDevice[ mName=/dev/bus

Android Intent to open “Mass Storage Activity”

百般思念 提交于 2019-12-10 13:30:25
问题 I need to open USB Mass Storage Activity from my application. Is there any Intent to do this? something like startActivity(new Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS)) 回答1: You can try to use following: su -c setprop sys.usb.config <command> Full list of can be found by this one command: cat init.usb.rc Function to be able to run command from app: public void RunAsRoot(String[] cmds){ Process p = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream(p

How can BeagleBone Black be used as Mass Storage Device?

安稳与你 提交于 2019-12-03 09:37:36
Is it possible to use the BB as Mass Storage Device? I want it to be connected to an audio player that can read files from USB connectivity (such as USB flash drive) and act as data storage device containing one specific folder (and its sub-folders) from the file system (if possible, on a flash drive connected to the board.). As the device specs says, it has connectivity of: USB client for power & communications USB host Operating system will probably be Ubuntu but can be changed. What drivers or configurations needs to be done in order to achieve this? The latest images have already the mass