从Android手机写入USB驱动器

时间:2013-09-17 16:07:13

标签: android storage external

所以我在试图找到答案的同时在互联网上搜索了很多,但到目前为止无济于事。我有一个在S4上完美运行的程序,它在一个点上从USB驱动器写入和读取。纠正USB驱动器出现的位置与手机不同的事实,相同的程序不能在我刚买的摩托罗拉Moto X上运行。查看LogCat,尝试写入USB时似乎存在权限错误,但我已在Manifest文件中指定了读取和写入外部存储的权限。

我注意到在运行程序后查看我的S4的LogCat时,三星有一个特殊的实现正常操作系统来处理标签KiesUsbObserver下的USB,我想知道是否处理了一对Moto X无法自动处理的额外功能。

有没有人遇到过类似的问题?

Logcat for S4

09-17 11:24:37.506: W/KiesUsbObserver(777): getUsbMode() -> sys.usb.config :       mass_storage,adb
09-17 11:24:37.506: W/KiesUsbObserver(777): getUsbMode() -> bCDFS: true
09-17 11:24:37.546: E/MTPRx(27958): In MtpReceiverandroid.hardware.usb.action.USB_STATE
09-17 11:24:37.546: E/MTPRx(27958): check value of boot_completed is1
09-17 11:24:37.546: E/MTPRx(27958): check booting is completed_sys.boot_completed
09-17 11:24:37.546: E/MTPRx(27958): Sd-Card path/storage/extSdCard
09-17 11:24:37.546: E/MTPRx(27958): Status for mount/Unmount :mounted
09-17 11:24:37.546: E/MTPRx(27958): SDcard is  available
09-17 11:24:37.546: E/MTPRx(27958): The value of first_boot is  1
09-17 11:24:37.546: E/MTPRx(27958): [ 662] The value of first_boot is  1NORMAL SEQUENCE 
09-17 11:24:37.546: W/MTPRx(27958): value of connected istrue
09-17 11:24:37.546: W/MTPRx(27958): value of configured isfalse
09-17 11:24:37.546: W/MTPRx(27958): value of mtpEnabled isfalse
09-17 11:24:37.546: W/MTPRx(27958): value of ptpEnabled isfalse
09-17 11:24:37.546: E/MTPRx(27958): Received USB_STATE with sdCardLaunch = 0
09-17 11:24:37.546: E/MTPRx(27958): tethering is started and mtp is not running so  returning

Moto X的Logcat

09-17 11:34:19.053: W/MountService(842): getVolumeState(/storage/usbdisk_1.1.1): Unknown volume
09-17 11:34:19.053: E/VoldConnector(842): Error handling '605 Volume usbdisk_1.1.1 /storage/usbdisk_1.1.1 state changed from 0 (No-Media) to 2 (Pending)': java.lang.IllegalArgumentException
09-17 11:34:19.053: W/MountService(842): getVolumeState(/storage/usbdisk_1.1.1): Unknown volume
09-17 11:34:19.054: E/VoldConnector(842): Error handling '605 Volume usbdisk_1.1.1 /storage/usbdisk_1.1.1 state changed from 2 (Pending) to 1 (Idle-Unmounted)': java.lang.IllegalArgumentException
09-17 11:34:19.061: W/MountService(842): getVolumeState(/storage/usbdisk_1.1.1): Unknown volume
09-17 11:34:19.061: E/VoldConnector(842): Error handling '605 Volume usbdisk_1.1.1  /storage/usbdisk_1.1.1 state changed from 1 (Idle-Unmounted) to 3 (Checking)': java.lang.IllegalArgumentException
09-17 11:34:19.404: E/Trace(6489): error opening trace file: Permission denied (13)
09-17 11:34:19.731: E/(6489): netstack: LIB_MGR - Error loading lib spl_proc_plugin.so
09-17 11:34:19.731: E/(6489): netstack: STAT_HUB - Failed to load plugin:  spl_proc_plugin.so
09-17 11:34:19.732: E/(6489): netstack:  STAT_HUB - App com.metago.astro isn't supported

0 个答案:

没有答案