Skip to content
Tenshi Hinanawi edited this page Dec 21, 2012 · 1 revision

All Google Nexus devices after the Galaxy Nexus use a long abandoned file transfer format called MTP instead of USB Mass Storage. While this makes it possible for Windows users to write to the faster ext4, Linux and Mac need to be set up to use this once irrelevant system.

Mac OS X

Linux

Install Packages (Linux)

Find the system you are using and run these commands in a terminal.

Ubuntu/Debian:

# apt-get install mtp-tools mtpfs		# As root user

Arch/Chakra:

# pacman -S libmtp		# From official repositories
$ packer -S mtpfs		# From the AUR (for Chakra, use the `ccr` command)

Configure udev rules

  1. Edit the following file (or create it if it doesn't exist) and add these rules:

    /etc/udev/rules.d/51-android.rules

    LG - Nexus 4

    SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"

    ASUS Nexus 7 and Samsung Nexus 10

    SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"

  2. Make the file executable:

    sudo chmod +x /etc/udev/rules.d/51-android.rules

  3. Restart udev

    sudo service udev restart

  4. Create mount point and permissions. If you use multiple Nexus devices, you might want to add a number to the end so that they don't conflict.

    sudo mkdir /media/nexus sudo chmod 755 /media/nexus

  5. Plug in the Nexus 4 and make sure MTP is enabled.

  6. Mount with the following command:

    sudo mtpfs -o allow_other /media/nexus

  7. When you have completed your work you must unmount:

    sudo umount /media/nexus

Bashrc Alias

To make things more convenient, you can add these aliases to your .bashrc file rather than using steps six and seven.

{{Note|If you named the mount point something different, make sure to edit the folder names in these aliases.}}

alias mountnex="sudo mtpfs -o allow_other /media/nexus"
alias umountnex="sudo umount /media/nexus"

Now you can just run mountnex to mount the device, and umountnex to unmount the device.

Sources

BA Logo

Bibliotheca Anonoma

Android Development Codex

Note: All non-Android projects have moved to the BASLQC Wiki.

Introduction

  • Introduction - A quick intro to the rationale and ideals of this guide, and smartphone modding in general.
  • General Setup - Learn how to install and run the tools you need to succeed.
  • Device Guides - Customized, fully decked out guides for rooting each and every device we could find.
  • General OS Customizations - General customizations that work on all devices of a specific OS.

Content Guidelines

  • General Guidelines - The ideals that you should uphold while working with and editing this guide.
  • Device Guide Templates - Templates and general guidelines for creating customized guides for a device.
  • Linux - Run a full desktop OS on your little mobile device; research is being made to make it comfortable to use in the mobile space.

Reference

  • Glossary - Contains all the crazy acronyms and word soup that you'll need to wade through when using this guide.
  • Android Buying Guide for Modders - While modding can fix up an outdated device, it will make your life easier to buy the right device from the start.
Clone this wiki locally