I recently got a Galaxy Nexus running Android 4.0 Ice Cream Sandwitch, which by default does not support USB Mass Storage. When connected to the computer via USB cable, we can choose to connect it as a Media device (MTP), or as a Camera (PTP), as you can see in the picture below:
Option 1: PTP
If we choose to mount it as a camera, PTP is integrated nicely into nautilus and you can browse the folders, however only pictures and video filetypes are supported.
Option 2: MTP
If we want to use MTP on Linux, we need to install the package ‘mtpfs’ first, and then mount the device on the desired mountpoint, on Ubuntu you can just type:
$ sudo aptitude install mtpfs $ mkdir ~/android/ $ mount.mtpfs ~/android/
Option 3: adbfs
The third option is adbfs, a fuse filesystem for adb. You can get the source on github. Once compiled, make sure “USB debugging” is enabled in android settings, and you can mount the device as follows:
$ adbfs /media/android/ -o modules=subdir -o subdir=/mnt/sdcard/
This option is slower than MTP, however all contents are accessible as it uses adb pull/push commands in the background to retrieve the file contents.