Sunday, October 20, 2013

Linux Tip: How to Transfer Files from Ubuntu to Android

img credit:
File transfers have been notoriously painful between Linux and Android. While it works seamlessly on Windows, and on Mac you can use the Android File Transfer App, let me show you how to get his done on Linux. There are many ways to achieve it, but I'll use gMTP, which gives you a nifty little UI to manage file transfers. Later on, I'll also list other alternatives, in case this fails. So let's begin.

1. Fire your terminal using ctrl + alt + T, and

> sudo apt-get update

> sudo apt-get -y install mtp-tools mtpfs gmtp 

2. Connect your Android device to your PC, and launch gmtp

3. If you have only 1 android device attached to your pc, just click on Connect. It should automatically detect the device and show you the directory listings. I have noticed there is 30s-1min delay for the connection to happen, so do give it some time.

4. Once connected, you can drag drop files to and from your device.


gMTP is slow, unreliable and buggy.  Partially, the blame falls on mtpfs and Android's implementation of MTP. So if the above method fails, below are some alternatives

1. Transfer over your local network:  Ubuntu and most linux variants support network sharing using samba. Just right click on the folder you wish to share, and select sharing and security. On your Android device, download a file manager like ES File Explorer, which can easily access your network shares. For step by step how to, see this CNET article

2. Use Dropbox/Google Drive: Works well for small files and documents

3. Try go-mtpfs:  There is a detailed video below on mounting your device. I have limited success using this but I'll keep trying.

Hope this helps. Do drop me a comment on how the above methods worked for you. And if you have found other alternatives.

No comments: