56

Both my Ubuntu and Android phone are using the same Wi-Fi. How can I transfer files between the phone and the PC? Is there any way to mount the Android file system? I don't want to use the USB cable. Bluetooth doesn't work. So WiFi is the only other option.

The Android version is Jelly Bean and Ubuntu is 12.04 LTS.

  • 2
    This isn't necessarily an Ubuntu question, more a case of "How do I set up my Android device to have a server to handle file transfers to devices on my wifi". – Thomas Ward May 22 '15 at 12:15
  • 1
    @ThomasW. how you access via wifi is quite different in ubuntu (e.g. samba ect) – Tim May 22 '15 at 12:36
  • @Tim but that's not what I see being asked here. "Both my Ubuntu and Android use the same wifi." OK, they're on the same network. "How can I transfer files between the phone and the pc?" Implied over the wifi. Solution: Install something on the android that gives ftp/sftp access, but that's an Android question, not Ubuntu. Regardless of how it's interpreted, the solution is an Android-side setup of some software to provide the function, and that's not Ubuntu. – Thomas Ward May 22 '15 at 14:14
  • 2
    Vote to reopen. Even though the solution is not Ubuntu specific, that is install a ftp or a specialized web server in the android, the problem is somewhat Linux specific. If you google "how to share files between android and PC (or Mac)" you see some solutions that involve installing PC (or Mac) software as well as their Android counterparts. These solutions don't have a Linux client and thus don't work for Ubuntu. For Ubuntu one needs a server that uses standard protocol for which Ubuntu client exist. The solution is simple who are familiar with servers, but not so for home desktop users. – user68186 Sep 02 '15 at 17:27
  • You can download some apps that work with samba. – Dr_Bunsen Sep 19 '17 at 12:11

12 Answers12

49

There is a free application on the Google Play store called Software Data Cable:

Once you've installed it, turn on your WiFi connection and launch the app.

Tap on the "start service" button.

It creates a FTP server on the android device that lets you connect from any computer by opening the resource:

ftp://192.168.1.xxx:8888

where 192.168.1.xxx is the IP address of your device.

You can now copy/paste files over WiFi from/to your android device.

PS - on ubuntu 18.04 get into nautilus and hit + Other Locations then at bottom enter ftp URL above into Connect to Server

jeremielc
  • 615
29

SSHelper is a free, well-documented SSH server you can access using sftp. You mount the filesystem using Nautilus.

Disclaimer: SSHelper does not support Android 10+ and is no longer actively maintained.

Jean-Marie
  • 1,958
  • 1
  • 14
  • 11
  • 1
    Could you include a link? – Tim May 22 '15 at 12:36
  • 4
    Why is this downvoted? - just curious. – Shagun Sodhani May 27 '15 at 13:47
  • Nice... Lovely ssh shell. Although you could use file manager (like nemo) to access like usual files. And it's more secure then ftp. – Anton Protopopov Jan 28 '17 at 20:54
  • That is what I do. I mount it using sftp not ftp – Jean-Marie Jan 29 '17 at 00:51
  • 1
    This is a great suggestion, the sshelper app is even gpl licenced. I created a guide using sshfs here: http://askubuntu.com/questions/893090/how-do-i-mount-my-androids-filesystem-over-the-network-with-sshfs – Frederik Baetens Mar 14 '17 at 23:40
  • ~/SDCard is a symlink. GNOME Files (formerly Nautilus) 3.26.4 will not be able to see it. Open SSHelper Terminal tab and type 'ls -l' Enter. ~/SDCard is a symlink to /storage/emulated/0 on my device. The Nautilus URL is thus: sftp://{SSHelperIP:SSHelperPort}/storage/emulated/0 – rcpa0 Jan 12 '20 at 19:35
9

To make it more interesting; You may indeed use AirDroid, which is an android App allows you to connect to your phone interface using a web UI.

Airdroid Supported Instances

  1. Connecting via network (you have to be on the same network)
  2. Connecting via hotspot (device will create a network which is going to be the same network)
  3. Over the internet (you will need an airdoid account)

Usage (using either same network or via device's hotspot)

  • Download the AirDroid app from Google play & Open the app
  • When it is connected over WiFi or on hotspot, it will display a URL to connect to;

enter image description here

  • Connect the given URL from your browser which will ask to allow with a prompt on your device

enter image description here

enter image description here

  • once connected your device will displayed with a below message

enter image description here

  • and the PC will give you the rest of the information

enter image description here

What can I do with Airdroid

There's a lot you can do with Airdroid (even accessing your folder directories, not sure you need root or not)

  1. Transfer file between phone to PC or vise verca
  2. Find phone
  3. Read notification
  4. Operate phone calls, SMS... & many more

Hope that helps and clears your question!

AzkerM
  • 10,270
  • 6
  • 32
  • 51
  • When typing the url it displays : ERROR The requested URL could not be retrieved – abhishah901 Jan 03 '16 at 08:09
  • 1
    @abhishah901 - Make sure both your phone and the device that you're trying to access your phone is on the same network.. Also check the URL properly which displays on Airdroid. To troubleshoot further, please create a new post accordingly. – AzkerM Jan 03 '16 at 08:13
  • it seems you have to create an account to use this app. I see this as an unnecessary step for transferring files so this option is not for me. – Alex Aug 30 '22 at 18:47
  • Hi @Alex - This answer is still valid and refer to Airdroid Supported Instances heading on the types of connection you can make. The first two doesn't require to create and account but the last one does. I've been using this for years and I have never created any accounts unless over internet. Question is more of how to over WiFi. Hope this clears. – AzkerM Sep 01 '22 at 04:17
6

Another alternative would be using KDEConnect. You will also need to install the KDE Connect application from the Playstore (or F-Droid). If you are not using KDE on Ubuntu, you should also install the KDE Connect indicator.

You will also get the benefit of receiving your phone notifications on the desktop. You can connect multiple android phones and linux desktops. The connection is encrypted and all involved software is open source.

You can get an idea of the available options in the screenshot below:

enter image description here

Bruni
  • 10,542
5

There is an Android application named AirDroid . You can download it from the play store. By using it you can view your android's files in ubuntu using a web browser. Here is the link : Airdroid.

  • 1
    Thanks. I will give it a try. But I was wondering if there is a way to mount the file system over the network or something like that? I mean, by using an USB I get complete access to my phone's files. I want to do the same using Wifi – Pavan Nihal May 22 '15 at 11:40
  • Meaning I give web access to the files on my phone??? – Guido Kanschat Sep 14 '16 at 17:32
  • No you don't give online web access to the files. The server is locally hosted on the local area network the devices is connected or mobile hotspot the app created. – Snake Eyes Sep 16 '16 at 08:42
3

I think the simplest solution would be to allow your android to access a directory on your PC. You could make a samba share on Ubuntu by following e.g. this guide and then use Amaze (Opensource), ES File explorer (Proprietary) or Ghost commander (Opensource) on android.

Bruni
  • 10,542
3
  1. Open Xender in your Android:

    open xender in your android

  2. Go to Settings > Connect to PC:

    go to setting > connect to pc

  3. Follow the instructions:

    dialog

  4. Add address in Firefox browser:

    add address in firefox browser

  5. Go share your file wirelessly:

    go share your file wirelessly

Zanna
  • 70,465
2

Another opensource alternative, supporting Linux, Android, Mac OS and Windows is nitroshare:

It is included in the Ubuntu repositories since Ubuntu 16.04:

sudo apt-get install nitroshare

For more up-to-date packages (highly recommended):

sudo apt-add-repository ppa:george-edison55/nitroshare
sudo apt-get update
sudo apt-get install nitroshare

The android app can be found in F-Droid and the playstore.

However, if compatibility with Windows or MacOS is not important, Kdeconnect is the way to go as it is more stable.

Bruni
  • 10,542
  • 1
    The current version from Ubuntu 16.04 doesn't work. I need to use the george-edison55 repository. After installing the package from this repository it worked fine. I am using the Android version from F-Droid. – acassis Nov 25 '18 at 11:32
1

In Android Play Store search for an FTP server, the one from The Olive Tree is great... in app just hit the middle red button to start ftp server on your phone which will display a URL like ftp://192.168.1.103:2221 then over on your computer connect to that URL

On Ubuntu 18.04 in nautilus hit + Other Locations

then enter ftp address in field Connect to Server ftp://192.168.1.103:2221

this also works fine on Ubuntu 20.04

1

I use Amaze file manager on Android and FileZilla on Ubuntu. Using Amaze you can set up an FTP server on Android and send and receive files using FileZilla.

Dante
  • 2,329
  • 5
  • 27
  • 35
0

GSConnect

If you liked the KDEConnect solution mentioned in another answer, but got scared by the KDE part, there is a JavaScript port of KDE connect without any Qt dependencies. It has the same features, but as a GNOME Shell extension requires the GNOME desktop to work

On your Android phone, you will have to install the KDE Connect app from F-Droid or the playstore.

Bruni
  • 10,542
0

I use ES File Manager. Just install it on your Android phone and from the menu, click Network > Remote Manager > Turn on, which gives you a link (like ftp://192.168.1.54:8754). In your browser, type the link. Done.

Zanna
  • 70,465