I recently wanted to transfer some of my pics i did in Poland (PyconPl) from my android galaxy tablet to my Ubuntu 12.04 LTS machine, but the tab was not recognized and a notification didn't show up.
There are many people and computer geeks that have this problem, so I thought to share the solution of this problem in this article. In the future I will write a python script that will automate everything and do the job for you, but at the moment I am very busy with other projects and school.
Note: Everything is tested in Ubuntu 12.04 and Galaxy Tab 2 7.0 which runs Android 4.0.3. Ok linux geeks, open a new terminal in your machine now and run the following command to install the libusb C library which gives applications easy access to USB devices.
sudo apt-get install libusb-dev
After the installation of the libusb-dev library is finished, download the libmtp which is an implementation of the Media Transfer Protocol. The libmtp software library will help us to handle MTP devices on Linux.
If you want more information read this article about transferring files via usb on android devices and understand MTP and PTP.
After the download of the libmtp is finished, run the following command to decompress it.
Extract the archive with the following command.
tar xvf libmtp-1.1.6.tar
Change directory and compile libmtp.
configure –prefix=/usr make sudo make install
Copy the rules from the libmtp-1.1.6 directory to /etc/udev directory.
cp 69-libmtp.rules /etc/udev/rules.d
Install gmtp with the following command.
sudo apt-get install gmtp
Open a new terminal, launch gmtp from there and connect your android device via usb. Tatata, it is working.
Click the Connect button and everything should be ok.