Thursday, January 26, 2012

GalaxyNexus on Linux

Update: The much simpler solution is to change the USB settings on the GN to PTP, not MTP.

Apparently, newer Android devices don't just magically mount as USB drives on Linux (or at least, Ubuntu). Fortunately, someone else has figured it out already. They go through a couple extra steps for setting up a mount command alias, but in brief, you need to use the MTP (Media Transfer Protocol) tools.

sudo apt-get install mtp-tools mtpfs
mtp-detect | grep idVendor
mtp-detect | grep idProduct
# Create a udev rule (Galaxy Nexus is 04e8/685c):
# SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="685c", MODE="0666", GROUP="plugdev"
sudo vi /etc/udev/rules.d/51-android.rules
sudo /etc/init.d/udev restart
sudo mkdir /media/GalaxyNexus
sudo mtpfs -o allow_other /media/GalaxyNexus/
# To unmount
sudo umount /media/GalaxyNexus

No comments:

Post a Comment