Showing posts with label mount. Show all posts
Showing posts with label mount. Show all posts

Friday, March 07, 2014

Mount MTP Android Device on Linux Crunchbang 11 Waldorf and Debian 7 Wheezy

بسم الله الرحمن الرحيم





I found this post on this blog http://roger.steneteg.org/299/mount-mtp-device-on-debian-7-wheezy/ 

Fully tested on Crunchbang 11 Waldorf 64-bit using Google Nexus 4.

The rest is the post from the said blog :

Today I needed to transfer som 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

*Update*
Thanks to sdio for pointing out how to use the Debian package tools to create a deb file to install and uninstall instead of doing the traditional ./configure; make; make install.

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