所以我在互联网上搜索了很多,试图找到这个问题的答案,但到目前为止无济于事。我有一个可以在 S4 上完美运行的程序,它可以在某一时刻从 USB 驱动器写入和读取。纠正 USB 驱动器出现的位置因手机而异的事实,相同的程序在我刚购买的摩托罗拉 Moto X 上不起作用。查看 LogCat,尝试写入 USB 时似乎存在权限错误,但我已在 Manifest 文件中指定了读取和写入外部存储的权限。
我注意到,在运行程序后查看我的 S4 的 LogCat 时,三星在 KiesUsbObserver 标签下有一个普通操作系统的特殊实现来处理 USB,我想知道这是否处理了几个额外的功能Moto X 无法自动处理。
有没有人遇到过类似的问题?
S4 的 Logcat
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