Roger Steneteg

IT Contractor, Sysadmin/Developer

May 19, 2013

Mount MTP device on Debian 7 wheezy

Today I needed to transfer some pictures from my phone (a Google Nexus 4) to my computer running Crunchbang (based on Debian 7 wheezy). The required packages for this to work has not yet been added to Debian stable to work around this I manually built the required tools from source.

Install required packages

sudo apt-get install libmtp-dev fuse libmtp9 pkg-config libfuse-dev libglib2.0-dev libmad0-dev libid3tag0-dev dh-make autotools-dev

Download source package of mtpfs

Untar the archive and then use dh_make to convert the source package in a format used by debian packages:

tar zxf mtpfs-1.1.tar.gz
cd mtpfs-1.1
dh_make -s -f ../mtpfs-1.1.tar.gz

Now build the Deb-file using this command:

fakeroot debian/rules binary

The deb-file will be placed in the same directory as the tar-file, to go upp a directory and install the deb-file:

cd ..
sudo dpkg -i mtpfs_1.1-1_amd64.deb

If you want to uninstall mtpfs then run this command:

sudo dpkg --purge mtpfs

Make sure you are a member of the fuse group so that you are allowed mount filesystems in userspace (You will need to relogin or reboot for the group permissions to take effect):

sudo usermod -aG fuse $USER

Create a directory for mounting the device and mount the the device (Plugin the device first)

mkdir myPhone
mtpfs myPhone

When your done you unmount the phone with this command

fusermount -u myPhone

March 31, 2015, 1:01 p.m.


Good instructions, thanks. Did not work on a win 8 phone though, Nokia Lumia 530. Got 'no raw device attached'. A little strange as it should be normal mtp.

July 17, 2015, 11:48 p.m.


Works perfectly with my old TF-101 Transformer Eepad, thanks!

Post a comment

Your email address will not be displayed on the website