Monday, 15 July 2013

Transfer files to and from Android phone wirelessly with Samba

I regard as very noughties the use a cable to transfer files to and from your phone. Wireless is now definitely the way. Most of the time, you probably already do this by virtue of tools like Winamp's music syncing or Dropbox's automatic photo upload but sometimes a guy just wants to, you know, copy some files. Fortunately, for Android, there's a great means to this end: Samba Filesharing for Android. In short, it turns your phone into a Windows-compatible file server. But, since Samba is an open platform and implemented on many other operating systems, it's easily accessible on Linux too.

All you need to do is download the app, set up the basic requirements (e.g. username and password) and start the service. Your phone should then appear as a network drive. In Windows, this involves selecting ANDROID (or whatever you named the device) from the Network tree in a file manager. On selecting the phone, you'll be prompted for the credentials you set up. You're then free to transfer files to your heart's content!

In Ubuntu, you'll find the network drive in the file manager under Browse network > Workgroup. On opening the device, you'll be prompted for the login credentials. Then you should be good to go. If you get an error message like "Failed to retried share list from server" (as I did), you probably need to install Samba. You can do so through your favourite package manager. The package name is (surprisingly enough) samba so sudo apt-get install samba will do.

In theory, it's also possible to mount the Samba device on the Linux filesystem but I haven't gotten that to work. There's a utility called smbfs, which is designed to do just this, and you can find some information here but I only ever get a "permission denied" error. I'd be interested to hear from anyone who has used this system successfully.

No comments:

Post a Comment