Skip to content

Instantly share code, notes, and snippets.

@alghanmi
Last active December 15, 2015 14:49
Show Gist options
  • Select an option

  • Save alghanmi/5277614 to your computer and use it in GitHub Desktop.

Select an option

Save alghanmi/5277614 to your computer and use it in GitHub Desktop.
Setup to mount Android devices on Linux box given the vendor. Listed devices are: + Nexus 7 + Galaxy Nexus (GSM)
#Install MTP Packages
sudo apt-get install mtp-tools mtpfs
#UDev entry for Nexus 7
echo 'SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"' | sudo tee -a /etc/udev/rules.d/99-android.rules
#UDev entry for Galaxy Nexus
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="685c", MODE="0666"' | sudo tee -a /etc/udev/rules.d/99-android.rules
#Restart UDev
sudo chmod +x /etc/udev/rules.d/99-android.rules
sudo service udev restart
#Setup mount point
sudo mkdir /media/android
sudo chmod 755 /media/android
#Mount Command
#sudo mtpfs -o allow_other /media/android
#Remember to unmount
#sudo umount /media/android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment