Ubuntu beginners, fear not, neo's here!!

Having trouble with your Ubuntu???

You've come to the right place. Leave your queries in the comments section, and I will answer them. If the solution works, you can choose to follow my blog.:)

Friday, January 30, 2015

Mount your Android Smartphones on Ubuntu 14.04

First of all, install the MTP packages. Fire your terminal and type in the following commands

sudo apt-get install libmtp-common mtp-tools libmtp-dev libmtp-runtime libmtp9
sudo apt-get dist-upgrade

Next, make changes to the fuse.conf (facilitates in creation of a custom file system) file. More on FUSE
Use any text editor to make changes:

gksu gedit /etc/fuse.conf

The contents in the file would look like this:

#/etc/fuse.conf - Configuration file for Filesystem in Userspace (FUSE)

#Set the maximum number of FUSE mounts allowed to non-root users.
#The default is 1000.
#mount_max = 1000

# Allow non-root users to specify the allow_other or allow_root mount options. 
# user_allow_other

Change the last line of the file from ...
# user_allow_other
... to
user_allow_other

Do not edit the rest of the file. Now save the file contents of fuse.conf.

In terminal, type in:

lsusb

I get the following output:

Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 0cf3:3004 Atheros Communications, Inc. 
Bus 003 Device 004: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 003 Device 003: ID 046d:c245 Logitech, Inc. G400 Optical Mouse
> Bus 003 Device 009: ID 0fce:01aa Sony Ericsson Mobile Communications AB <
Bus 003 Device 007: ID 03f0:2d12 Hewlett-Packard 
Bus 003 Device 006: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 003 Device 002: ID 174f:1474 Syntek 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 003 Device 009: ID 0fce:01aa Sony Ericsson Mobile Communications AB is the one we should be interested in.

Note that 0fce is the Vendor ID and 01aa is the Product ID.

Now that we know the Vendor ID and the Product ID. We can proceed to make changes in the MTP udev rules.

gksu gedit /lib/udev/rules.d/69-mtp.rules

Then add the following lines of code:

#Sony Xperia M2
ATTR{idVendor}=="0fce", ATTR{idProduct}=="01aa", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" 

Note that I have used my device's Vendor ID and Product ID here. Remember to change it your device's Vendor ID and Product ID.

Next, make changes to the 51 android rules. Open the 51-android.rules file

gksu gedit /lib/udev/rules.d/51-android.rules

Now add the below line, and save the file.

ATTR{idVendor}=="0fce", ATTR{idProduct}=="01aa", MODE=”0666"

Note that I have used my device's Vendor ID and Product ID here. Remember to change it your device's Vendor ID and Product ID.

Next, unplug any USB device from your PC, and issue the following command in the terminal.

sudo service udev restart

Now, plug in your smartphone device. You should be able to access the filesystem for transfer and viewing. If you still can't access the filesystem, check if your phone screen is unlocked (by drawing a pattern or by providing a pin number). If you still cannot access the phone filesystem, reboot your PC and try again.