Mount Android 4 Ice Cream Sandwitch on Linux

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:

Android USB computer connection

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.

This entry was posted in android, linux, minipost, Uncategorized and tagged , , , , , , , . Bookmark the permalink.

2 Responses to Mount Android 4 Ice Cream Sandwitch on Linux

  1. Fernando says:

    Thanks, this works!
    But how I umount, not using sudo.

  2. Greg says:

    Thank you! I searched high and low and this is the only thing that worked.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>