Xiaomi MI3 mal detecté par Debian Jessie

Bonjour
Mon smartphone Xiaomi MI3 est mal detecté par Debian jessie
Dans lsusb il est vu mais pas identifié

@desktop:~$ lsusb Bus 001 Device 024: ID 2717:0360
L’outil mtp-detect ne sait pas le traiter

[code]@desktop:~$ mtp-detect
Unable to open ~/.mtpz-data for reading, MTPZ disabled.
libmtp version: 1.1.8

Listing raw device(s)
Device 0 (VID=2717 and PID=0360) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Found 1 device(s):
2717:0360 @ bus 1, dev 24
Attempting to connect device(s)
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
ignoring libusb_claim_interface() = -6LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.[/code]

Dans Thunar j’ai bien un répertoire XIAOMI mais il ne voit que çà

@desktop:/XIAOMI$ ls AndroidFileTransfer.dmg Autorun.inf Readme_files Readme.htm Setup.exe

Et en fait je n’ai pas accés aux données (photos, musique,vidéos)
Comment avoir une libmtp plus à jour?

j’ai téléchargé la version 1.9 depuis Debian instable et installé avec gdebi:

root@desktop:~# dpkg -l libmtp* Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder | État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements |/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais) ||/ Nom Version Architecture Description +++-=============================-===================-===================-=============================================================== ii libmtp-common 1.1.9-3 all Media Transfer Protocol (MTP) common files ii libmtp-runtime 1.1.9-3 i386 Media Transfer Protocol (MTP) runtime tools un libmtp8 <aucune> <aucune> (aucune description n'est disponible) ii libmtp9:i386 1.1.9-3 i386 Media Transfer Protocol (MTP) library root@desktop:~#
en insistant avec gmtp je peux me connecter sur le Xiami MI3 mais toujours pas me déplacer dans les répertoires qui ne sont pas listés

Ayant le Xiaomi Redmi, mais “utilisé” sous Mint, donc *Buntu …

Est-ce que tu as crée un fichier ~/.android/adb_usb.ini, tel que :

# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x2717

Est-ce que tu as configuré quelques règles udev, pour la reconnaissance de ton smartphone, tels que :

# Xiaomi Hongmi WCDMA - MTP Mode
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", ATTR{idProduct}=="1240", MODE="0666", OWNER="you"
# Xiaomi Hongmi WCDMA - MTP Mode with USB Debug
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", ATTR{idProduct}=="1248", MODE="0666", OWNER="you"

# Xiaomi Hongmi WCDMA - PTP Mode
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", ATTR{idProduct}=="1210", MODE="0666", OWNER="you"
# Xiaomi Hongmi WCDMA - PTP Mode with USB Debug
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", ATTR{idProduct}=="1218", MODE="0666", OWNER="you"

# Xiaomi Hongmi WCDMA - USB Mode == Built-in CD-ROM Mode!
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", ATTR{idProduct}=="1220", MODE="0666", OWNER="you"
# Xiaomi Hongmi WCDMA - USB Mode with USB Debug
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", ATTR{idProduct}=="1228", MODE="0666", OWNER="you"

Attention, les règles changeront certainement, surtout concernant les idProducts, selon ton propre smartphones … de même, pense à changer ton id OWNER selon ton identifiant user…
Là, elles sont pour le Hongmi/Redmi…

Dernier point, une fois fait, relances udev …

Salut
j’ai créé cette règle

[code]root@desktop:/etc/udev/rules.d# cat 10-persistent-local.rules

Xiaomi MI3 WCDMA - MTP Mode

SUBSYSTEM==“usb”, ATTR{idVendor}==“2717”, ATTR{idProduct}==“0360”, MODE=“0666”, OWNER=“guy”

Xiaomi MI3 WCDMA - MTP Mode with USB Debug

SUBSYSTEM==“usb”, ATTR{idVendor}==“2717”, ATTR{idProduct}==“0368”, MODE=“0666”, OWNER=“guy”
[/code]

Verifié

[code]root@desktop:/etc/udev/rules.d# udevadm info -a -n /dev/sdg

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device ‘/devices/pci0000:00/0000:00:1c.3/usb1/1-6/1-6:1.1/host12/target12:0:0/12:0:0:0/block/sdg’:
KERNEL=="sdg"
SUBSYSTEM==“block"
DRIVER==”"
ATTR{ro}=="1"
ATTR{size}==“22344"
ATTR{stat}==” 94 162 2044 164 0 0 0 0 0 120 164"
ATTR{range}=="16"
ATTR{discard_alignment}=="0"
ATTR{events}=="media_change"
ATTR{ext_range}=="256"
ATTR{events_poll_msecs}=="2000"
ATTR{alignment_offset}==“0"
ATTR{inflight}==” 0 0"
ATTR{removable}==“1"
ATTR{capability}==“51"
ATTR{events_async}==””

looking at parent device ‘/devices/pci0000:00/0000:00:1c.3/usb1/1-6/1-6:1.1/host12/target12:0:0/12:0:0:0’:
KERNELS=="12:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{rev}=="0000"
ATTRS{type}=="0"
ATTRS{scsi_level}=="3"
ATTRS{model}=="File-Stor Gadget"
ATTRS{state}=="running"
ATTRS{queue_type}=="none"
ATTRS{iodone_cnt}=="0x160"
ATTRS{iorequest_cnt}=="0x160"
ATTRS{device_busy}=="0"
ATTRS{evt_capacity_change_reported}=="0"
ATTRS{timeout}=="30"
ATTRS{evt_media_change}=="0"
ATTRS{max_sectors}=="240"
ATTRS{ioerr_cnt}=="0x1"
ATTRS{queue_depth}=="1"
ATTRS{vendor}=="Linux "
ATTRS{evt_soft_threshold_reached}=="0"
ATTRS{device_blocked}=="0"
ATTRS{evt_mode_parameter_change_reported}=="0"
ATTRS{evt_lun_change_reported}=="0"
ATTRS{evt_inquiry_change_reported}=="0"
ATTRS{iocounterbits}=="32"
ATTRS{eh_timeout}==“10”

looking at parent device ‘/devices/pci0000:00/0000:00:1c.3/usb1/1-6/1-6:1.1/host12/target12:0:0’:
KERNELS==“target12:0:0"
SUBSYSTEMS==“scsi"
DRIVERS==””

looking at parent device ‘/devices/pci0000:00/0000:00:1c.3/usb1/1-6/1-6:1.1/host12’:
KERNELS==“host12"
SUBSYSTEMS==“scsi"
DRIVERS==””

looking at parent device ‘/devices/pci0000:00/0000:00:1c.3/usb1/1-6/1-6:1.1’:
KERNELS=="1-6:1.1"
SUBSYSTEMS=="usb"
DRIVERS=="usb-storage"
ATTRS{bInterfaceClass}=="08"
ATTRS{bInterfaceSubClass}=="06"
ATTRS{bInterfaceProtocol}=="50"
ATTRS{bNumEndpoints}=="02"
ATTRS{supports_autosuspend}==“1"
ATTRS{bAlternateSetting}==” 0"
ATTRS{bInterfaceNumber}=="01"
ATTRS{interface}==“Mass Storage”

looking at parent device ‘/devices/pci0000:00/0000:00:1c.3/usb1/1-6’:
KERNELS=="1-6"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="6"
ATTRS{idVendor}=="2717"
ATTRS{speed}==“480"
ATTRS{bNumInterfaces}==” 4"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="1"
ATTRS{devnum}==“10"
ATTRS{configuration}==”"
ATTRS{bMaxPower}=="500mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="80"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0232"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}==“1d19f70"
ATTRS{version}==” 2.10"
ATTRS{urbnum}=="847"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Xiaomi"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="0368"
ATTRS{bDeviceClass}=="00"
ATTRS{product}==“MI 3W”

looking at parent device ‘/devices/pci0000:00/0000:00:1c.3/usb1’:
KERNELS=="usb1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="0"
ATTRS{idVendor}=="1d6b"
ATTRS{speed}==“480"
ATTRS{bNumInterfaces}==” 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{authorized_default}=="1"
ATTRS{busnum}=="1"
ATTRS{devnum}==“1"
ATTRS{configuration}==”"
ATTRS{bMaxPower}=="0mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="8"
ATTRS{bcdDevice}=="0316"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}==“0000:00:1c.3"
ATTRS{version}==” 2.00"
ATTRS{urbnum}=="278"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Linux 3.16.0-4-686-pae ehci_hcd"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="0002"
ATTRS{bDeviceClass}=="09"
ATTRS{product}==“EHCI Host Controller”

looking at parent device ‘/devices/pci0000:00/0000:00:1c.3’:
KERNELS=="0000:00:1c.3"
SUBSYSTEMS=="pci"
DRIVERS=="ehci-pci"
ATTRS{irq}=="23"
ATTRS{subsystem_vendor}=="0x1025"
ATTRS{broken_parity_status}=="0"
ATTRS{class}==“0x0c0320"
ATTRS{companion}==”“
ATTRS{driver_override}==”(null)"
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{dma_mask_bits}=="32"
ATTRS{local_cpus}=="ffffffff"
ATTRS{device}=="0x5239"
ATTRS{uframe_periodic_max}=="100"
ATTRS{enable}==“1"
ATTRS{msi_bus}==”"
ATTRS{local_cpulist}=="0-31"
ATTRS{vendor}=="0x10b9"
ATTRS{subsystem_device}=="0x0085"
ATTRS{d3cold_allowed}==“1”

looking at parent device ‘/devices/pci0000:00’:
KERNELS==“pci0000:00"
SUBSYSTEMS==”“
DRIVERS==”"[/code]
Mais rien de changé toujours pas accès aux données je ne vois que ces infos dans le montage de /dev/sdg

pourtant il est bien reconnu

[code]root@desktop:~# mtp-detect
libmtp version: 1.1.9

Listing raw device(s)
Device 0 (VID=2717 and PID=0368) is a Xiaomi Mi-3 (MTP).
Found 1 device(s):
Xiaomi: Mi-3 (MTP) (2717:0368) @ bus 1, dev 6
Attempting to connect device(s)
Android device detected, assigning default bug flags
[/code]

ça se comporte comme si il y avait plusieurs partitions dans le Xiaomi mais une seule est vue???

En fait la regle existe deja dans
/lib/udev/rules.d/69-libmtp.rules

[code]# Xiaomi Mi-3w (MTP)
ATTR{idVendor}==“2717”, ATTR{idProduct}==“0360”, SYMLINK+=“libmtp-%k”, MODE=“660”, GROUP=“audio”, ENV{ID_MTP_DEVICE}=“1”, ENV{ID_MEDIA_PLAYER}=“1”

Xiaomi Mi-3 (MTP)

ATTR{idVendor}==“2717”, ATTR{idProduct}==“0368”, SYMLINK+=“libmtp-%k”, MODE=“660”, GROUP=“audio”, ENV{ID_MTP_DEVICE}=“1”, ENV{ID_MEDIA_PLAYER}=“1”
[/code]

Dans dmesg je vois ça

[code]
[ 9300.070893] systemd-udevd[3186]: starting version 215
[ 9315.924066] usb 1-6: new high-speed USB device number 15 using ehci-pci
[ 9316.058182] usb 1-6: New USB device found, idVendor=2717, idProduct=0360
[ 9316.058188] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 9316.058192] usb 1-6: Product: MI 3W
[ 9316.058196] usb 1-6: Manufacturer: Xiaomi
[ 9316.058199] usb 1-6: SerialNumber: 1d19f70
[ 9316.060181] usb-storage 1-6:1.1: USB Mass Storage device detected
[ 9316.062227] scsi17 : usb-storage 1-6:1.1

[ 9317.061483] scsi 17:0:0:0: Direct-Access Linux File-Stor Gadget 0000 PQ: 0 ANSI: 2
[ 9317.062352] sd 17:0:0:0: Attached scsi generic sg7 type 0
[ 9317.070352] sd 17:0:0:0: [sdg] 22344 512-byte logical blocks: (11.4 MB/10.9 MiB)
[ 9317.071099] sd 17:0:0:0: [sdg] Write Protect is on
[ 9317.071109] sd 17:0:0:0: [sdg] Mode Sense: 0f 00 80 00
[ 9317.071841] sd 17:0:0:0: [sdg] Write cache: enabled, read cache: enabled, doesn’t support DPO or FUA
[ 9317.078697] sdg: unknown partition table
[ 9317.082214] sd 17:0:0:0: [sdg] Attached SCSI removable disk
[ 9317.273453] ISO 9660 Extensions: Microsoft Joliet Level 3
[ 9317.274572] ISO 9660 Extensions: RRIP_1991A[/code]
sdg: unknown partition table ??? manque quelque chose pour savoir la lire

Finalement en ayant installé
gvfs-backends (1.22.2-1)
gvfs-bin (1.22.2-1)
libbluetooth3 (5.23-2+b1)
libsmbclient (2:4.2.10+dfsg-0+deb8u2)

j’accède au données du Xiaomi MI3 vue comme mtp://[usb:001,010]/ par Thunar

kern.log:

Apr 25 21:58:10 desktop kernel: [  450.492132] usb 1-5: new high-speed USB device number 10 using ehci-pci
Apr 25 21:58:10 desktop kernel: [  450.626342] usb 1-5: New USB device found, idVendor=2717, idProduct=0360
Apr 25 21:58:10 desktop kernel: [  450.626355] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 25 21:58:10 desktop kernel: [  450.626360] usb 1-5: Product: MI 3W
Apr 25 21:58:10 desktop kernel: [  450.626365] usb 1-5: Manufacturer: Xiaomi
Apr 25 21:58:10 desktop kernel: [  450.626370] usb 1-5: SerialNumber: 1d19f70
Apr 25 21:58:10 desktop kernel: [  450.631646] usb-storage 1-5:1.1: USB Mass Storage device detected
Apr 25 21:58:10 desktop kernel: [  450.632124] scsi11 : usb-storage 1-5:1.1

@desktop:~$ lsusb
Bus 001 Device 010: ID 2717:0360

si je le mets en appareil photo (PTP)

gphoto2://[usb:001,011]/

Salut,
Ayant upgradé la rom sur le Xiaomi MI3 , prise ici http://en.miui.com/download-101.html

le PTP est identifié en:

Bus 002 Device 006: ID 2717:0318

Alors dans /lib/udev/rules.d/69-libmtp.rules j’ai ajouté cette règle

ATTR{idVendor}=="2717", ATTR{idProduct}=="0318", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

Et hop nickel pour transférer mes photos