File transfer from android to linux

Android File transfer basically got two method or format which are Media device (MTP) and also for camera (PTP). However , the MTP is only suitable for windows or Mac computer, it was not compatible with the Linux. The PTP only allow you to transfer photos only but not others files.

However you can let your ubuntu to support mtp by using the "mtpfs" or "jmtpfs". Below I will show step by step how to configure the MTP service in Ubuntu 14.04 LTS.

First of all you need to install the mtp tools in linux, you can install by using the commands below. Open the terminal and type in the following 2 line. (ps:without the quote, and it may required you to key in your password)

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

2nd Step you have to edit the fuse.conf file. Fuse provide a secure method for non privileged users to create and mount their own file system implementation. =| You can use any editor to edit the /etc/fuse.conf file in my example is gedit which is easier for beginners.

"sudo gedit /etc/fuse.conf"

After open the file, you have to look for the #user_allow_other, and remove/delete the "#".


#/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 

Then you can save the file by pressing Ctrl + x.

The 3rd step is set some rules for the devices ,but first of all you have to find out the vendor id and also the product id of the device you connect to the computer. Now if you havent connect your device or phone please connect it via usb port and open the terminal and key in the the command below. (PS: Agains without quote. )

"lsusb"

After you press enter, it will show the output like below.

Bus 002 Device 003: ID 0fce:01b1 Sony Ericsson Mobile Communications AB
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 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 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 0461:4d65 Primax Electronics, Ltd
Bus 001 Device 005: ID 0846:9020 NetGear, Inc. WNA3100(v1) Wireless-N 300 [Broadcom BCM43231]

So from the output, we can see all the devices that is connect to you computer usb port. In this case , we are using the phone from sonic Ericson then is the first lines since don't have any others brands of mobile phone. Your device is differ from mine here, so look at the description and your brand name.
So the vendor id is 0fce and the product id is 01b1 in my example. Write down/ remember your device vendor id and product id. =D

Step 4 is to change the mtp rules at the terminal.
"sudo gedit /lib/udev/rules.d/69-mtp.rules"

After that add the following line at the bottom of the file.
First line: change the content with your device name
idVendor == xxx ,replace "xxx"with your device vendor id just now
idProduct == yyy ,replace "yyy" with your device product id just now

=D this time with quote.

# "Please change this line to Your Device Name so that you can refer it easily next time ".

ATTR{idVendor}=="0fce", ATTR{idProduct}=="01b1", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

After that , save it.

Step 5

It also need to edit a file called 51 android rules.

"sudo gedit /etc/udev/rules.d/51-android.rules"

Then add the following line at the bottom of file or inside a empty file. =|
replace the "ofce" with your device vendor id and "01b1" with your product id. Remainder :This time also is with quote.

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

Step 6

Once is done then you can remove all the usb device and restart the udev service.

"sudo service udev restart"

Then reboot.

"sudo reboot now"

After reboot , you plug in your android device and it should be able to transfer file from android to your computer through MTP.

STEP 777

Please like this page at the bottom of the webpage. 3:) Thank you , hope this tutorial help you.



Comments

Popular posts from this blog

Reading and Writing Operation of SRAM

Reading & Writing Operation of DRAM

Method to Convert from Stream to Json C#