1.1 Monter la carte SD sous Linux

De UnixWiki
Aller à : navigation, rechercher

Pour Ice Cream Sandwich Android 4.0 ou >

Connecter le téléphone à l'ordi, puis installer les packets:

 #aptitude install mtp-tools mtpfs

Sur le téléphone l'option MTP (Media device) doit être activé dans l'outil de gestion USB.

Lancer les commandes:

   #mtp-detect | grep idVendor
   Device 0 (VID=18d1 and PID=d109) is UNKNOWN.
   Please report this VID/PID and the device model to the libmtp development team
   #mtp-detect | grep idProduct
   Device 0 (VID=18d1 and PID=d109) is UNKNOWN.
   Please report this VID/PID and the device model to the libmtp development team

Puis dans le fichier /etc/udev/rules.d/51-android.rules ajouter les lignes:

 SUBSYSTEM==”usb”, 
 ATTR{idVendor}==”VENDORID”, 
 ATTR{idProduct}==”PRODUCTID”, 
 MODE=”0666″

Remplacer VENDORID par le VID plus haut et le PRODUCTID plus haut.

 invoke-rc udev restart
 adduser YOURUSERNAME fuse (Si besoin)
 mkdir /mnt/Android
 chmod a+rwx /mnt/Android

Et décommenter la ligne user_allow_other dans /etc/fuse.conf et rebooté.

Taper les commandes sous votre propre compte:

   echo “alias android-connect=\”mtpfs -o allow_other /mnt/Android\”" >> ~/.bashrc  
   echo “alias android-disconnect=\”fusermount -u /mnt/Android\”" >> ~/.bashrc    
   source ~/.bashrc

Ensuite, reconnecter le téléphone et taper la commande

 #android-connect

Ou

 #android-disconnect