如何克隆 USB(MTP)设备

如何克隆 USB(MTP)设备

我有两个相同的 USB/MP3 播放器。其中一个已损坏(未卸载就移除)。我想通过克隆正常工作的设备来修复损坏的设备。

损坏的设备在 /var/log/messages 中报告此情况

Jun 13 11:17:17 underwood kernel: [1131377.098026] usb 2-3.4.2: new high-speed USB device number 25 using xhci_hcd
Jun 13 11:17:17 underwood kernel: [1131377.198955] usb 2-3.4.2: New USB device found, idVendor=054c, idProduct=0385
Jun 13 11:17:17 underwood kernel: [1131377.198957] usb 2-3.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Jun 13 11:17:17 underwood kernel: [1131377.198958] usb 2-3.4.2: Product: WALKMAN
Jun 13 11:17:17 underwood kernel: [1131377.198959] usb 2-3.4.2: Manufacturer: Sony
Jun 13 11:17:17 underwood kernel: [1131377.198960] usb 2-3.4.2: SerialNumber: 31FF0001A2C8D6460002D9C8C29D1000
Jun 13 11:17:17 underwood kernel: [1131377.199686] usb-storage 2-3.4.2:1.0: USB Mass Storage device detected
Jun 13 11:17:17 underwood kernel: [1131377.199784] scsi host5: usb-storage 2-3.4.2:1.0
Jun 13 11:17:17 underwood gvfs-gphoto2-vo[5349]: device (null) has no BUSNUM property, ignoring
Jun 13 11:17:34 underwood gvfsd[5197]: dbus_mount_reply: Error from org.gtk.vfs.Mountable.mount(): Unable to open MTP device '[usb:002,025]'
Jun 13 11:17:34 underwood gnome-shell[5194]: JS LOG: Unable to mount volume WALKMAN: Gio.IOErrorEnum: Unable to open MTP device '[usb:002,025]'

工作设备报告如下:

Jun 13 10:50:14 underwood kernel: [1129754.410405] usb 2-3.4.2: reset high-speed USB device number 23 using xhci_hcd
Jun 13 10:50:31 underwood kernel: [1129770.958652] usb 2-3.4.2: USB disconnect, device number 23
Jun 13 10:51:24 underwood kernel: [1129824.175352] usb 2-3.4.2: new high-speed USB device number 24 using xhci_hcd
Jun 13 10:51:24 underwood kernel: [1129824.275818] usb 2-3.4.2: New USB device found, idVendor=054c, idProduct=0385
Jun 13 10:51:24 underwood kernel: [1129824.275820] usb 2-3.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Jun 13 10:51:24 underwood kernel: [1129824.275821] usb 2-3.4.2: Product: WALKMAN
Jun 13 10:51:24 underwood kernel: [1129824.275821] usb 2-3.4.2: Manufacturer: Sony
Jun 13 10:51:24 underwood kernel: [1129824.275822] usb 2-3.4.2: SerialNumber: 10FA1306649000
Jun 13 10:51:24 underwood kernel: [1129824.276483] usb-storage 2-3.4.2:1.0: USB Mass Storage device detected
Jun 13 10:51:24 underwood kernel: [1129824.276567] scsi host5: usb-storage 2-3.4.2:1.0
Jun 13 10:51:25 underwood gvfs-gphoto2-vo[5349]: device (null) has no BUSNUM property, ignoring

工作设备正确安装在:/run/user/1000/gvfs/mtp:host=%5Busb%3A002%2C026%5D/

腐败者当然不会这么做。

我原本打算使用进行逐位复制,但无法弄清楚如何在 /dev/ 中找到设备编号,就像传统硬盘或 USB 一样。

有人可以建议一些步骤吗?

更新:尝试 2(使用较旧的 Linux 内核作为 USB 存储安装):

读完本文后关于作为 MMS 而不是 MTP 安装的文章,当我插入设备时,出现了以下信息:

工作装置:

kernel: usb 1-1.1: new high speed USB device using fsl-ehci and address 3
kernel: usb 1-1.1: configuration #1 chosen from 1 choice
kernel: scsi4 : SCSI emulation for USB Mass Storage devices
kernel: scsi 4:0:0:0: Direct-Access     SONY     WALKMAN          1.00 PQ: 0 ANSI: 4
kernel: sd 4:0:0:0: Attached scsi generic sg1 type 0
kernel: sd 4:0:0:0: [sdb] 1919232 2048-byte logical blocks: (3.93 GB/3.66 GiB)
kernel: sd 4:0:0:0: [sdb] Write Protect is off
kernel: sd 4:0:0:0: [sdb] 1919232 2048-byte logical blocks: (3.93 GB/3.66 GiB)
kernel: sdb: sdb1
kernel: sd 4:0:0:0: [sdb] 1919232 2048-byte logical blocks: (3.93 GB/3.66 GiB)
kernel: sd 4:0:0:0: [sdb] Attached SCSI removable disk

我使用 dd if=/dev/sdb of=/tmp/walkman.clone 来克隆驱动器

当我连接损坏的设备时,出现了以下情况:

kernel: usb 1-1.1: new high speed USB device using fsl-ehci and address 4
kernel: usb 1-1.1: configuration #1 chosen from 1 choice
kernel: scsi5 : SCSI emulation for USB Mass Storage devices
kernel: scsi 5:0:0:0: Direct-Access     SONY     WALKMAN          1.00 PQ: 0 ANSI: 4
kernel: sd 5:0:0:0: Attached scsi generic sg1 type 0
kernel: sd 5:0:0:0: [sdb] Attached SCSI removable disk

不幸的是: dd if=/tmp/walkman.clone of=/dev/sdb 导致

dd: opening `/dev/sdb': No medium found

cfdisk /dev/sbd 也声称未找到媒体

相关内容