See the previous article about Ubuntu 10.04 and Galaxy Nexus. In one of the links listed there there are some explanations on why do we need this new MTP (Media Transfer Protocol) stuff instead of our good-old USB mass storage style.
In order to have the Galaxy Nexus recognized by Ubuntu 10.04 we have to rebuild libmtp and mtpfs from newer sources and this is how I did it. While those are not exactly copy-paste instructions they are good enough for an experienced user:
- download the latest libmtp from sourceforge.
- remove old mtp stuff
sudo dpkg --purge mtp-tools mtpfs libmtp8
- install some build prequisites
apt-get install libusb-dev
- build and install, i’m using checkinstall tool instead of the the simple make install in order to have a dpkg package:
./configure --prefix=/usr; make; sudo checkinstall
If all went ok, you may nou use the mtp-detect command to see if you device is recognized when connected. And proceed with mtpfs:
- get the sources
svn checkout http://mtpfs.googlecode.com/svn/trunk/ mtpfs-read-only
- install some build prerequisites
sudo apt-get install libid3tag0-dev libmad0-dev libglib2.0-dev libfuse-dev sudo apt-get install automake autoconf
- build and install it:
aclocal; autoconf; automake -a ./configure; make; sudo checkinstall
Then, check the file /etc/fuse.conf for a single line containing:
user_allow_other
Now, for the final trick:
- disable USB debugging on your phone
- connect the cable
- and run
mtpfs -o allow_other SOME-EXISTING-EMPTY-DIRECTORY
If everything is ok, you’ll see under that directory the content of the phone and you can manipulate the files there (hint: rsync backup). To umount the directory, use this command:
fusermount -u THAT-DIRECTORY
Yeah, I know it’s ugly like hell and the previous USB mass storage was so nice and easy but hopefully the next versions of Ubuntu will make this article obsoleted and the things will work again by default.