Accessing files on Android phone
from PC or Laptop
using FTP server in ES File Explorer on phone

(FTP = File Transfer Protocol
(DRAFT: Liable to change)

Aaron Sloman
School of Computer Science, University of Birmingham

The problem

Manipulating files (including images, videos, PDF documents, edited text files, etc., on a smartphone can be very tedious without a separate mouse and keyboard.

Likewise transferring files between a smartphone and a computer can be messy and tedious. Some people use an internet site with file hosting services as an intermediary, e.g. Dropbox.

One way to make file manipulation less tedious is to connect a keyboard and mouse to the phone, but you will still face the limitations of using a small screen. And that will not, in itself, solve the problem of transferring files between the phone and another local machine.

A solution

Manipulation of files on the phone, and transfer of files between the phone and another (local) machine are tasks that become much less unpleasant if you can use another machine (e.g. a PC or laptop running Windows or Linux, or a Mac) to access all the files on the mobile phone, using a large screen, with keyboard and mouse or trackpad, instead of having to poke and view everything on the small screen of a phone.

This can be achieved if the phone has a wifi link to a local network to which your PC or laptop is also connected either wirelessly or using a cable connection to the router as shown in the diagram (where "wavy" lines indicate wireless connections). All traffic between machines goes through the router.

This mode of transfer through a local network is both more convenient and more private than transferring files through a "cloud storage" facility such as Dropbox or google's cloud. It can also be much faster than using a broadband internet connection.

The diagram below indicates schematically a small local wifi+cable network with three devices connected to a shared router. In principle there could be several more devices connected via cable or wirelessly. The technology used in this example is FTP which stands for "File Transfer Protocol". The standards were originally set up in the early 1970s and gradually evolved as networks became larger and more complex and additional requirements for reliability, security, efficency and increasing numbers of connected computers connected over increasing distances were added. Such details are not discussed here.

Using a local wifi or wifi+cable network


File transfer facilities using FTP on a local wifi network

A common way to achieve the required connectivity is to install an FTP server program on a phone or other machine whose files are to be accessed remotely, and FTP client programs on the devices with which you wish to interact directly. directly by files are to be accessed remotely, and You can run an program on the phone and access it from another machine with screen, mouse and keyboard (or touchpad), running an FTP client program.

The FTP server runs on a "remote" machine whose files you wish to access. "Remote" here does not refer to distance, merely the fact that you are not interacting directly: the remote machine on which the FTP server program runs could be your smartphone physically adjacent to your PC, for example.

The machine you interact with physically, e.g. via keyboard and mouse or touchpad, is your "client" or "local" machine. So file transfer, and file manipulation using FTP requires two programs, the FTP client program running on the machine you interact with physically, and the FTP server program running on the machine you access through the local machine. (Perhaps the labels "local" and "remote" should be replaced with "direct" and "indirect".)

[Note: In principle, there could be several local clients connected in parallel, e.g. if different users are simultaneously using local machines to access the same phone (or other device running an FTP server). Likewise your local network could have more than one FTP server, e.g. if you have a shared machine used for backup, or for storing shared video and audio files.]

The "client" program on your "local" machine requests information or sends instructions about files on the remote machine by sending messages to the "server" program, which either performs actions (e.g. installing, renaming or deleting files as requested) or sends back information, e.g. about which files are available on the remote machine. The client FTP program can list the available remote files or ask for copies to be downloaded to the local machine, and deleted if required. It can also cause copies of local files to be "uploaded" to the remote machine.

E.g. if the remote machine has a camera (like many smartphones), it may have image or video files produced by the camera. So one common use of FTP is fetching image or video files to a local machine -- and possibly using FTP later on to transfer copies to another location, e.g. on a web site.

For this to work, you will have to set up an FTP Server on your phone, e.g. using the ES File Explorer App as explained below. It works very well, but I wasted a huge amount of time trying to find out how to do it. This is my attempt to help others avoid a similar waste of time.

It is also possible to use FTP to upload, download, or manipulate files on a truly remote machine, such as an external web server accessed via your internet connection, e.g. if you create and manage a web site on some remote host. In that case someone who manages the remote host will normally have to set up the FTP Server.

Summary: Why does your phone need an FTP server?

An FTP server running on the phone makes it easy to use another machine with keyboard, mouse and large screen to explore files on the phone, download them, rename them, delete them, move them to a different part of the file store, and also to upload files to the phone. This works as long as you have an FTP client program on the machine you interact with.

By communicating with the "remote" FTP server, your FTP client program on the local machine (e.g. your PC) allows you also to upload files from the PC to the phone, e.g. photos, videos, pdf documents, etc.

FTP server packages seem to differ as to which files they allow you to access on the phone. E.g. I tried one File server app with glowing reports and found that on my Moto G3 phone running Android 6, with an SD card containing photographs and video recordings I could not access the items on the SD card remotely. (The SD card had been "imported" into Android.)

ES File Explorer does not have that restriction. But after I installed the App on the phone I could not, at first, work out how to start the FTP server (see below). Once it was running, however, all the files I needed, including files on the SD card, were accessible when I was working either at my PC or my laptop machine (both running linux -- Fedora 24), and using Filezilla as my local FTP client.

But I wasted a lot of time finding out how to start the server on the phone. The online documentation I found seemed to refer to an older version of ES File Explorer, with a different interface. My version was installed in November 2016.

Starting the FTP server using ES File Explorer

I kept searching for a button or other item on the App that would obviously allow me to start the FTP server. There were various links/buttons in various places on the app labelled 'ftp' but they all seemed to be there for use of an FTP client to access files on another machine running a server.

Eventually, after wasting a great deal of time, I found that there was a button to start the server, but its label did not mention FTP. It was labelled "View on PC"! This may be useful for someone who has never heard of FTP but it is the wrong label for someone seeking an FTP server.

The problem was made worse by the fact that the relevant button was not immediately visible when the File Explorer App started up, That's because the lower half of the screen was always covered by a (useless?) panel labelled "What is .nomedia file?". Various other things could be accessed via menus on that page, or by swiping right or left, whereas swiping down or up did nothing. So I assumed there was nothing more to find on that page.

After wasting a lot of time without success, I noticed a barely visible "v" just above the "What is .nomedia file?" panel. Tapping on that eventually revealed six more menu items, including the "View on PC" button -- the one needed to start the FTP server! However, the first time I found it I ignored it, as I thought it was intended to allow the phone user to access files on a PC (i.e. starting a ftp client).

Eventually I tried the "View on PC" button. That indicated the Wifi Router and a "Turn on" button at the bottom with some text saying "You can manage your device through your PC after you turn on the service." It should have said: "...after you start the FTP server on this phone".

When you start the server program on the phone it will also ask you to provide a user name and password that a client program will use to connect with the server. (You can decide whether to use a fixed name and password, or whether it should be changed every time you start the FTP server, which is much less convenient.)

The first time you start the FTP server it will show you an address that you will need to type into the ftp client software on the other machine (e.g. your PC). It may be something like this.

The first four numbers (e.g. give the network address that has been assigned to the phone by your router. To ensure that your router always gives your phone the same address you will have to find out how to instruct the router's DHCP subsection to "reserve" an address for your phone. How to do that will depend on which router you have, and will not be explained here.

The number after the colon (in this case 3721) is the "port number" to be used by your FTP client, e.g. the FTP software running on your PC, to communicate with the FTP server running on the phone.

Different types of connections between your phone and other things will use different port numbers. Often the port number for an FTP server is 21, but the ES File Server chooses a different number, ending in 21. When you first start the FTP client on your PC (e.g. Filezilla) it will ask for the port number, so you need to have it ready. (The tutorials listed below may help you work out how to insert it in Filezilla if it's not obvious.)

Make sure you keep a record of the name and password you type in as you will need to insert both of them into the FTP client package when you start up a connection on the PC. (The client program on the PC, e.g. Filezilla, may provide you with the option to remember the user name and password. Whether it is safe to do that will depend on who else might have access to your PC when it is on the same network as the phone.)

I assume you can give the FTP server on the phone different user names and passwords for use in different contexts, e.g. in another house, but I have not tried that.

Further details

There are several more details you will need to learn that depend on which FTP client package you use. If you use Filezilla you may or may not find it all obvious. Here are some tutorials that you may find helpful. I cannot guarantee that they are all accurate and complete. I've merely taken a quick look.

It's a pity there are no good tutorials on how to use the latest version of ES File Explorer to set up an FTP server on the phone. If you find one, let me know and I'll add a link to it.

Installed: 1 Dec 2016
Last updated: 3 Dec 2016
This document is

A partial index of discussion notes is in

Maintained by Aaron Sloman
School of Computer Science
The University of Birmingham