我有一个大约两年的手机。刚买这款手机的时候,内部micro SD卡识别没有丝毫问题。我所要做的就是使用 USB 数据线连接手机,然后从提供的列表中选择手机中的大容量存储(其他是网络摄像头和通讯端口)。
今天,我发现,当我连接手机时,根本无法识别。
在中找到以下条目/var/log/syslog
Apr 14 16:07:01 HomeDell kernel: [ 6661.524019] usb 5-2: new full-speed USB device number 11 using uhci_hcd
Apr 14 16:07:01 HomeDell kernel: [ 6661.700045] usb 5-2: New USB device found, idVendor=0e8d, idProduct=0002
Apr 14 16:07:01 HomeDell kernel: [ 6661.700054] usb 5-2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Apr 14 16:07:01 HomeDell kernel: [ 6661.700058] usb 5-2: Product: MT6235
Apr 14 16:07:01 HomeDell kernel: [ 6661.700062] usb 5-2: Manufacturer: MediaTek Inc
Apr 14 16:07:01 HomeDell kernel: [ 6661.700065] usb 5-2: SerialNumber: 53223730122274f
Apr 14 16:07:01 HomeDell kernel: [ 6661.706198] usb-storage 5-2:1.0: USB Mass Storage device detected
Apr 14 16:07:01 HomeDell kernel: [ 6661.706374] scsi host6: usb-storage 5-2:1.0
Apr 14 16:07:01 HomeDell mtp-probe: checking bus 5, device 11: "/sys/devices/pci0000:00/0000:00:1d.3/usb5/5-2"
Apr 14 16:07:01 HomeDell mtp-probe: bus: 5, device: 11 was not an MTP device
Apr 14 16:07:02 HomeDell systemd[1]: Starting USB_ModeSwitch_5-2...
Apr 14 16:07:02 HomeDell usb_modeswitch_dispatcher[8361]: Could not read attribute: No such file or directory
Apr 14 16:07:02 HomeDell kernel: [ 6662.709045] scsi 6:0:0:0: Direct-Access MEDIATEK FLASH DISK 6235 PQ: 0 ANSI: 0 CCS
Apr 14 16:07:02 HomeDell kernel: [ 6662.712064] scsi 6:0:0:1: Direct-Access MEDIATEK FLASH DISK 6235 PQ: 0 ANSI: 0 CCS
Apr 14 16:07:02 HomeDell kernel: [ 6662.712853] sd 6:0:0:0: Attached scsi generic sg1 type 0
Apr 14 16:07:02 HomeDell kernel: [ 6662.713613] sd 6:0:0:1: Attached scsi generic sg2 type 0
Apr 14 16:07:03 HomeDell kernel: [ 6662.721057] sd 6:0:0:0: [sdb] 15628288 512-byte logical blocks: (8.00 GB/7.45 GiB)
Apr 14 16:07:03 HomeDell kernel: [ 6662.726540] sd 6:0:0:1: [sdc] 180000 512-byte logical blocks: (92.1 MB/87.8 MiB)
Apr 14 16:07:03 HomeDell kernel: [ 6662.729063] sd 6:0:0:0: [sdb] Write Protect is off
Apr 14 16:07:03 HomeDell kernel: [ 6662.729076] sd 6:0:0:0: [sdb] Mode Sense: 03 00 00 00
Apr 14 16:07:03 HomeDell kernel: [ 6662.732104] sd 6:0:0:1: [sdc] Write Protect is off
Apr 14 16:07:03 HomeDell kernel: [ 6662.732118] sd 6:0:0:1: [sdc] Mode Sense: 03 00 00 00
Apr 14 16:07:03 HomeDell kernel: [ 6662.735065] sd 6:0:0:0: [sdb] No Caching mode page found
Apr 14 16:07:03 HomeDell kernel: [ 6662.735078] sd 6:0:0:0: [sdb] Assuming drive cache: write through
Apr 14 16:07:03 HomeDell kernel: [ 6662.738053] sd 6:0:0:1: [sdc] No Caching mode page found
Apr 14 16:07:03 HomeDell kernel: [ 6662.738067] sd 6:0:0:1: [sdc] Assuming drive cache: write through
Apr 14 16:07:03 HomeDell kernel: [ 6662.777499] sdb: sdb1
Apr 14 16:07:03 HomeDell kernel: [ 6662.786102] sdc:
Apr 14 16:07:03 HomeDell kernel: [ 6662.821056] sd 6:0:0:0: [sdb] Attached SCSI removable disk
Apr 14 16:07:03 HomeDell kernel: [ 6662.824163] sd 6:0:0:1: [sdc] Attached SCSI removable disk
Apr 14 16:07:02 HomeDell usb_modeswitch_dispatcher[8361]: message repeated 2 times: [ Could not read attribute: No such file or directory]
Apr 14 16:07:03 HomeDell usb_modeswitch: switch device 0e8d:0002 on 005/011
Apr 14 16:07:03 HomeDell systemd-udevd[8373]: inotify_add_watch(9, /dev/sdb, 10) failed: No such file or directory
Apr 14 16:07:03 HomeDell systemd-udevd[8376]: inotify_add_watch(9, /dev/sdc, 10) failed: No such file or directory
Apr 14 16:07:03 HomeDell systemd-udevd[8373]: inotify_add_watch(9, /dev/sdb1, 10) failed: No such file or directory
Apr 14 16:07:04 HomeDell usb_modeswitch[8361]: usb_modeswitch: switched to 0e8d:0002 on 5/11
Apr 14 16:07:05 HomeDell usb_modeswitch_dispatcher[8361]: Unable to open bind list file: No such file or directory
Apr 14 16:07:05 HomeDell usb_modeswitch[8361]: usb_modeswitch: add device ID 0e8d:0002 to driver option
Apr 14 16:07:05 HomeDell usb_modeswitch[8361]: usb_modeswitch: please report the device ID to the Linux USB developers!
Apr 14 16:07:06 HomeDell colord-sane: io/hpmud/pp.c 627: unable to read device-id ret=-1
Apr 14 16:07:12 HomeDell systemd[1]: Started USB_ModeSwitch_5-2.
以下几点可能是相关的。
- 这是一款廉价的品牌手机。
- 这是一部非安卓手机。
- 在 Windows 8 中可以毫无问题地识别手机和内部存储。
- 以前和现在的内部 SD 卡是不同的。我的手机大约一年或更长时间没有任何 SD 卡。今天,我在手机上插入了一张新的 SD 卡(创见 MicroSDHC Class 10 8GB)。
连接手机后,会出现一个菜单,提供从“大容量存储”、“网络摄像头”和“COM 端口”中进行选择的选项。如果选择第二个或第三个,lsusb
发出命令时会出现以下内容。
Bus 005 Device 009: ID 0e8d:0003 联发科MT6227手机
但是,如果选择第一个选项(大容量存储),则 lsusb
输出为,
总线 005 设备 019:ID 0e8d:0002 MediaTek Inc.
更新 1
- Ubuntu 15.10(但我在 Ubuntu 16.04 中测试时同样失败)。
- 内核:4.2.8-040208-通用。
- 手机:Symphony X120(如上所见,
lsusb
称其为联发科MT6227手机。
解决方案的关键是 usb-modeswitch 错误。
usb-modeswitch 被引入作为处理具有不同模式的设备的方法,最流行的例子是 USB surfsticks,它在第一次插入时具有类似驱动器的属性以访问 Windows 驱动程序。安装后,驱动程序将设备模式切换为 UMTS 或 LTE 调制解调器模式。
OP 的手机需要同样的程序来访问存储。
通常 USB 模式切换是相当自动的,但在这种情况下,周围有 USB ID 冲突的设备,阻碍了全自动解决方案。
由于设备的问题是已知的;只需注释掉 中的行
ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="0002", RUN+="usb_modeswitch \'%b/%k\'"
,/lib/udev/rules.d/40-usb_modeswitch.rules
它应该可以工作。您现在已经向您的 PC 说明了您的设备到底是什么。唯一的缺点是,如果您遇到其中一个 ID 冲突的 USB 设备,它们将被视为您的手机,并抛出错误甚至失败。