From Mageia wiki
Jump to: navigation, search
Drakconf multiflag.png
Other languages

Deutsch ; English ;


Contents

Document outline

Scope, target audience

This document intends to help setting up and using file transfer between a Mageia Computer and an Android device.

The target audience are users without in-depth knowledge - users who, essentially, know the names of the files they want to exchange, and whose knowledge of Mageia and Android stops at getting Linux and Mageia installed and personalised, and keep them running. Nevertheless, wherever possible in this context, background information is provided to give the user some technical insight.

Present state of the document

The initial version of this document had been written with a KDE desktop environment, particularly the Dolphin file manager, in mind. In the meantime, compliments on specific aspects of other desktop environments (in particular Mate and Xfce) have been added - further improvements are welcome.

A problem exists for the coverage of specific Android devices - the differences between various hardware and manufacturer-specific software versions may be quite important. The information in this document has only been verified for a small subset of devices.

Information in this document has been collected / verified using Mageia-5 and Android-5 (Lollipop), but there is a permanent effort to keep the document up to date - presently for Android-6.

Overview

The number of approaches in support of communication between a Linux PC and an Android device is amazingly large. The following table tries to group software for file transfer into methods and provides an overview on these methods and their principal - as seen by the user - characteristics.

The columns of the table have the following signification:

(most names of Android and Linux software are links to corresponding playstore items or project home pages).
Method : name under which the method described in that row is commonly known.
Android software : principal software used on the Android device - if applicable.
Linux software : principal software used on the Linux PC - if applicable.
Active side : the side that is active in launching and controlling the transfer - Linux or Android.
Directory operations : "+" if the method is (beyond the transfer of files) capable of doing operations on the directory tree of the Android device (e.g. re-naming files, deleting files, moving files between directories, ...).
File transfer : always "+": all methods listed here are capable of doing file transfer.
WLAN : "+" if the method uses, or can use, a wireless network for the communication between machines.
USB : "+" if the method uses, or can use, a USB cable for the communication between machines.
Bluetooth "+" if the method uses, or can use, Bluetooth for the communication between machines.
Methods for file-transfer: characteristics
Method Android
software
Linux
software
Active
side
Directory
operations
File
transfer
WLAN USB Blue-
tooth
KDEConnect KDE Connect KDEConnect Linux + + + +
USB mount (MTP) Linux + + +
Airdroid Airdroid Browser Linux + + +
Android client FTP AndFTP *) FTP client Android - + +
Android server FTP FTPDroid FTP server Linux - + +
Bluetooth file transfer - - Linux - + +
Syncthing Syncthing syncthing **) - +
*) or corresponding software
**) "de-centralized" architecture, not client-server

Specific methods

KDEConnect

Concept and usage

KDEConnect emulates the behaviour of remote, resp. external, Linux storage on the Android device: the Dolphin file manager is used to launch file-transfers by simple drag-and-drop actions, and to operate on the properties of files and directories on the Android system.

The communication between the Linux system and the Android device can use either Ethernet over a wireless network or a wired USB connection. The Linux PC must be on the same WLAN as the Android device, or on the LAN to which the WLAN is connected.

To use KDEConnect, open a window on the PC that displays the top-level directory of the Android file system ( Dolphin"Places" panel (at the left of the window)left-button click on the target item ):

File-transfer

  • open another Dolphin window on the target directory on the Linux PC,
  • navigate to and select the source file,
  • do a drag-and-drop operation to launch the file-transfer.

Operations on files and directories in the Android file-system

  • use Dolphin the same way you do for local nodes on the file-system of the PC.

Installation & Setup

Android device

  • Make sure that the device's USB is set up for the transfer of files (rather than the transfer of photos).
  • Install the "app" kde connect.
  • To see the available options and possibly adjust them, open the app and go to the settings menu - but normally that is not necessary.

Linux PC

  • Install the package "kdeconnect-kde".
  • Open the personal firewall to allow traffic for KDEConnect to pass: Mageia Control CenterSecuritySet up your personal firewall

Simply check the firewall option "[x] KDEConnect" (Available when kdeconnect-kde has been installed)

Alternatively manually add (use the "Advanced" button) the following 2 items:

1714:1764/udp,
1714:1764/tcp.
  • Register the Android device(s) with KDE:
  1. KDE Control CenterHardware-section ("Overview" page)"KDE Connect" button ;
  2. if, in the left-side panel (list of available devices), the target device is marked by a red "one-way symbol" (see image below), select that device, ;
  3. then:
hit "Request pair",
the target device will emit a notification sound,
on the target device, pull down the notification bar from the top of the display,
select the pairing notification and hit "Accept".
("pairing" serves to make the software on both sides recognize each other as a valid partner and accept communication with that partner.)

The screenshot below shows the control window of KDEconnect (in the "Hardware" tab of the KDE Control Center):

KdeConnect 2.png
Registering an Android device with KDE-connect

Experience with KDEConnect

KDEConnect is a mature tool - it works nicely and is easy to use, it does not have any evident bugs.

There is one small problem: if the Android device disappears, but is kept registered, KDE (Dolphin) does not have a proper reaction.

Support files

The file $HOME/.kde4/share/config/kdeconnectrc contains configuration data: For each available Android device various caracteristics

Disadvantages

The KDE Connect app, on the Android device, requires sensitive permissions, such as device identification, and discovering accounts on the phone.

USB mount (MTP)

Concept and usage

This method mounts the Android device like an ordinary external USB device. The implementation uses the MTP protocol ("Master Transfer Protocol"): the Android device is emulated as an ordinary external storage device, mounted on the PC. Usage is very similar to that of KDEConnect.

This method is the principal support for file transfer on PCs that use the Gnome desktop as documented here.

When an Android device gets connected, this is recognized as a new USB storage device that has become available, and the filemanager of the desktop environment is activated. What happens in detail depends on the desktop environment and the filemanager used - for instance:

KDE / Dolphin filemanager

The standard USB popup window appears and announces the availability of a new USB storage device: it displays the name of the device and a list of available actions. Proceed just as you proceed with any other external USB storage device.

However, there are 2 issues to be kept in mind:

  • The popup window with possible actions contains 2 items that have similar labels - an annoying bug in the user interface of the usb device handler:
  1. one will open a File Manager window set up for exploring directories and files of cameras - not fit for handling plain files and directories; the header in the File Manager window will say Camera;
  2. the other one is the one you need, the header in the File Manager will say: mtp: > name of your device.
  • The present implementation of the MTP protocol does not support the replacing of an existing file: if an old version of a file exists, you need to manually (from your File Manager window) delete the file before a new version can be downloaded.

(These anomalies should disappear as more advanced versions of KDE and of the kernel become available.)

The the following screenshots illustrate two windows of a KDE desktop which are the result of browsing to the target directories on the Android device (upper window) and on the Linux PC (lower window).

Usbmount 2.png
Upload to a Linux PC by drag-and-drop between Dolphin windows (KDE / Plasma)

XFCE / Thunar filemanager

A new item is added to the list of selectable Devices (left tab of Thunar), it is labelled with the name of the new device. The filesystem of the Android device can now be displayed by simply clicking.

Usbmount 3.png
Access to the filesystem of an Android device (XFCE / Thunar)

Installation & Setup

Android device

  • Android Lollipop already contains an implementation of MTP out of the box, no particular action is necessary.
  • But make sure that the device's USB is set up for the transfer of files (rather than photos).

Linux PC

In some cases Mageia-5 will install the package(s) that implement the MTP protocol at system generation, in that case no particular action is necessary. If the necessary package(s) are not installed automatically, then install the package "gvfs-mtp" from the Mageia repository. Necessary for the Mate and XFCE desktop environments.

Experience with USB mounted devices

For common usage, USB mounting can be considered as the method to recommend:

MTP software is, today, largely used and is "standard" software both on Mageia-5 and on Android-Lollipop: the software runs smoothly and without bugs (unless the excess item in the USB notification popup is considered a bug). This is progress with respect to earlier Android releases, where complaints on imperfections in the implementation of MTP had been published.

On the Linux side, the user interface is that used for access to external USB storage: easy to use, and no need to invest in learning yet another tool.

Mageia 6:

Whereas, with Mageia-5, a file can be transferred to Android either by drag-and-drop or by copy/paste between Dolphin windows opened on Mageia and on Android, drag-and-drop does not work for Mageia-6 - at least the pre-release snapshots: you need to use copy/paste.

Disadvantages

Depending on which applications are used in the Android device (for example "file manager", "text editor") and on how this software handles and saves files, after connecting to a PC, all the latest files and folders might not be displayed on the PC's file manager. Although they are displayed on the Android device, properly. Restarting the Android device is said to temporarily fix this issue. Using different Android applications might help also. Anyway, in such a case, it is more time saving for the user to try any of the other methods of transferring data between Android and the PC.

Airdroid

Airdroid allows having a desktop-ish view of your smartphone in your browser. It works by connecting either via their website or locally to the app running on your smartphone.

Install airdroid via the playstore on your smartphone and run it. You can easily authenticate using your google account, or register a separate account. Then go to their website http://web.airdroid.com/ and login there in the same way.

You will have access to your smartphone as a desktop representation in your browser, including the usage of all apps and phone calls and notifications, completely under control from your browser. Additionally there is a toolbox and file manager for easy file transfer via drag & drop.

Airdroid is free, but a premium version is also offered with even more features: https://www.airdroid.com/en/pay/

Android client FTP

Concept

This method uses an FTP client on the Android device which accesses a server on the PC. There is a long list of such clients available on Android playstore, many of them offering various flavours of FTP - for instance, secure FTP, but not all of flawless quality. The leading 2 clients are presently probably the most popular servers - and both do not display publicity:

this client offers useful and important functions that go way beyond simple file transfer, such as file management and the capability for access to cloud storage; in spite of a large number of options, the user interface remains quite intuitive; nevertheless, a new user of ES File Explorer should initially set aside some time for getting familiar with managing this client,

- and probably many more. Note that many display annoying publicity information; the purchase of a "professional" or "advanced" upgrade may help. Here are some references that provide overviews on various clients:

An article that illustrates some clients
A forum thread with short comments on several clients

Usage

On the Android device, launch the FTP-client app - for instance AndFTP. Practically all FTP clients require the following parameters to be set which determine what will be transferred and where:

  • the target file or directory in local storage of the Android device (most clients offer a gui interface for navigating to that target, whereas the following 3 parameters normally need to be keyed in),
  • the IP address of the server,
  • the name of the user owning the target directory or file on the server,
  • the password of that user.

The client may support optional parameters, for instance to use Secure FTP (SFTP) instead of FTP - they need to be selected.

The specific way of handling parameters varies between different client implementations. Some clients require all parameters to be newly selected each time a transfer is launched, other clients save parameter settings in variables - for instance, to remember IP address of the servers used and allow to choose between the servers already known.

Once the parameters are defined, launch the transfer - no action is required on server.

The following Nexus-7 screenshot illustrates the last step of the upload of a file to the Linux PC - it does not illustrate that it takes 5 clicks / screens plus keying in of the user-id and password to arrive at this step:

ClientFtp 2.png
Launching a client-FTP upload (AndFTP client)

Installation & Setup

Android device

Linux PC

  1. Make sure that the personal firewall on your Mageia PC allows FTP traffic, as illustrated here.
  2. Make sure that an FTP-server is installed and running on the PC.

Experience with Android FTP clients

This method is powerful - the user can determine many details, and there is no need for installing particular software on the Linux PC.

A drawback of this method is that most Android FTP clients require the specification of parameters (IP address, user, password) to be keyed in. The default for key-in is the virtual keyboard on the device, which can be cumbersome - the use of an external keyboard (for instance connected over Bluetooth makes this much easier).

The ES File Explorer illustrates another small problem: the availability of a large number of options is a challenge to the intuitiveness of the Graphical User Interface, which is not always fully met. Referring to an article that illustrates how to use the client may be helpful.

File transfer to cloud-based storage

Several Android ftp clients support - in addition to "traditional" host-to-host file transfer - the option of communication with cloud storage. An example is the ES File Manager, see this article as an illustration. In addition, there exist Android ftp clients that are specifically designed for communication with cloud storage. This domain is in rapid evolution - use Google to obtain an up-to-date list of software and documentation.

The operation of clients that do cloud access is quite simple: they offer functions for registering with a cloud provider and for specifying files that will be synchronised by the cloud. Once that synchronisation has been put in place, no explicitly requested file transfer actions will be necessary. The communication between the Android device and a Linux PC can be established by setting up a corresponding synchronisation from the Linux PC to the cloud.

The installation of such clients goes along the lines outlined in the preceding Section.

Android server FTP

Concept and usage

This method runs an FTP server on the Android device that can be called by FTP clients that run on the PC. Again, playstore offers the choice between serveral FTP servers (and again, the display of publicity may be an argument not to select some software):

  • FTP Server (Free) - or "swiftp", an open source ftp server (available, also, through F-Droid)

Once the server is installed and configured, it can run more or less unattended. The user may need to determine at what time he wants the server to run and accept requests for an FTP transfer, and when the server should be stopped.

The clients on the PC will emit transfer requests - for instance, the Firefox browser could send a request to a URL that will look like "ftp://<server IP address or name>:<port number>".

Also, on the Mageia PC, an application like Filezilla can be used, or a web browser extension like FireFTP.

Installation & Setup

Android device

Once installed, the server will display the IP address and port number it is using - this is important to note for use on the client at the PC. Furthermore, the server needs to be configured with users, their passwords and home directories. The home directory determines the part of the directory on the PC which the user can see as "his" directory, the password is used to verify that transfer requests are legitimate

Linux PC

No particular action is needed - except housekeeping of IP addresses for use by the client.

Advantages

A simple and reliable method of transferring files. Even if the user chooses another, as the main method, it is recommended to keep this option as a secondary, fallback alternative.

Disadvantages

The user must keep in mind that the data transferred over the network is not encrypted, unless stated otherwise.

Bluetooth file transfer

Concept and usage

Bluetooth is a short-range (typically 10 meters), low-power wireless technology used for the communication between portable computing and communication devices and peripherals.

Although Bluetooth has been conceived to provide a simple and easy-to-use infrastructure for this context, the quality of the implementation and the integration into the desktop is somewhat poor.

The following discussion assumes that pairing and initialisation of the partners has been correctly accomplished. In case a file transfer fails (normally there are no error messages), the safest way go back to a well defined situation is to switch Bluetooth off on both devices and than on again, and to re-connect ( System-trayBluetooth iconPulldown menu of the target device"Connect" button ).

The concept of the current user interface is that transfers must be triggered by the sending device; the receiving device then asks the user to confirm that it is OK to receive the file.

Linux PC ⇒ Android device

  • System-trayBluetooth iconPulldown menu of the target device"Send files" button .
  • Browse to the file you want to transmit and hit "Send files".
  • Reply to the query on the target device.
  • The file will be copied to the "Download" directory, one level below the root of the visible directory tree of the device.

Android device ⇒ Linux PC

  • On the Android device, open the file you want to transmit.
  • In the "Settings" menu (three-dot icon) of the opened file, activate the Bluetooth item to transmit the file.
  • The file will be stored in the directory selected for the storage of files received via Bluetooth (see below).

If the "Settings" menu does not have a "Bluetooth" item, you need to install an "app" for the transmission via Bluetooth - for instance Bluetooth File Transfer.

There exists a confusing multitude of ways to launch Bluetooth file-transfer actions - the described procedures have been tested to work and should not lead into dead-end situations.

Installation & Setup

Except - possibly - the app for transmitting files from the Android device, no particular software needs to be installed for the communication via Bluetooth.

The principal setup action consists in "pairing" the Linux PC with each individual Bluetooth device: the Bluetooth interface in Linux associates and memorizes for each device a name and a pre-shared key, and vice versa. Pairing can be initialised from either side:

  • the active side starts with a scanning operation, detecting all available nearby Bluetooth devices - which requires the passive side to be in "discoverable" state during the scan;
  • the user than selects a target device from the list of names of available devices and requires it to be paired;
  • a passkey is then proposed for the mutual authentication at device initialisation and for encryption during the exchange of data;
  • pairing is completed for each device by the user acknowledging the key on both sides.

It may also be necessary to configure a target directory in the file system of the PC where files received from the Android device will be stored:

  • System-trayBluetooth icon"Configure Bluetooth" button"File Transfers" tab ;
  • activate the "Receive files:" checkbutton;
  • browse to the target directory ("Save files in:" ...);

KDE-specific setup

KDE offers an easy-to-use alternative for doing these operations:

  • launch the KDE Bluetooth manager in the KDE Control Center, resp. its "Network and Connectivity" tab;
  • check the "Enable KDE Bluetooth integration" checkbutton;
  • to discover and pair new Bluetooth devices, hit the "Add Device..." button (right bottom of the device list) and pursue the pairing of new devices;
  • to control the settings of a specific device, double-click the device in the list of known devices; in the window that then pops up, select the desired option.

Experience with Bluetooth file transfer

As already mentioned, Bluetooth file transfer has some inconvenients: (1) its integration into the desktop environment is somewhat clumsy and lacks intuitivity (the style of the user interface is different from what the user of the desktop environment expects), (2) it is easy to "get lost" and end up in a situation where the file transfer has failed and the Bluetooth interface needs to be re-initialised, (3) the other methods offer better functionality, (4) in case of failure, error messages are missing or do not provide diagnostic information.

The strength of Bluetooth is its simplicity - it can be launched out of an Android application that has opened a file, respectively directly from the taskbar of a Linux desktop: good for doing occasional one-off transfers.

Syncthing

Concept and usage

Syncthing is a relatively new file synchronization application, available on many platforms - including Linux and Android.

Syncthing is implemented as a de-centralized infrastructure that works like a cloud service (whereas the other tools described in this wiki are based on the client / server model). The basic idea is that the user installs and runs Syncthing daemons, both on the Android device and the Linux PC. To achieve this, Syncthing:

  • opens the firewall ports on the Linux PC for Syncthing traffic,
  • configures the devices to be handled by exchanging identification keys,
  • maintains a list of the directories (folders) to be synchronised.

A discussion of this tool might be considered somewhat beyond the scope of an article on file transfer. The principal purpose of nevertheless including this Section is to facilitate the choice between Syncthing and other methods mentioned in this wiki page, and to help installing a simple Syncthing configuration on a Mageia Linux platform. The Syncthing project provides excellent and up-to-date documentation at https://docs.syncthing.net/ for questions that are not sufficiently covered in the present document.

Please note that, at present, Syncthing does not support writing to an external SD card of the Android device, see.

Alternative Android client

The a-sync-browser works a bit differently and do not have the problem with external SD card.

Implementation & Setup

The Syncthing project consists of several distinct components. Two of them are essential for implementing simple communication between the Android device and the Linux PC:

Android device

"Syncthing" app

From Google Play, fetch and install the application Syncthing.

Once the installation is finished, you will find the Syncthing icon on one of the home pages of your Android device - hit this icon to start Syncthing. When you do this the first time, Syncthing will ask a couple of questions / suggest to apply some settings:

  • you will be presented with a list of permissions required by the Syncthing app (i.e allow Syncthing to access photos, media and files on the device) - you practically have no alternative to hitting "Allow" if you want to proceed;
  • Syncthing suggests to turn off "Battery-optimisation" in order to avoid Android to inadvertently stop doing synchronization; you need not follow this advice - this is not a critical issue when transferring single files rather than running a synchronisation infrastructure;
  • a corresponding suggestion is to include Syncthing into a "white list" of applications not to be stopped by task-killing tools - the same consideration as above applies.

To stop the application on the Android device:

  1. open the control tab (hit the Ξ symbol at top-left corner),
  2. the "Exit" button is at the bottom of the control tab (you probably will want to terminate the Syncthing application on the Android device once you have finished your transfer - Syncthing consumes power if you leave it running).

"Barcode Scanner" app

From Google Play, fetch and install the Barcode Scanner application. This application allows using the camera of the Android device for reading a QR-code value from the screen of your Linux PC. The application will be automatically launched when a new device is configured and when a device ID must be transmitted from the Linux PC to the Android device.

Syncthing on an iOS device

In case you have consulted this wiki page, but what you really need is help to run Syncthing on an iOS device, have a look at fsync (which is not free). https://forum.syncthing.net/t/on-syncthing-ios-port-again/8964/24 might be helpful.

Linux PC

  1. Install the Mageia package syncthing-gtk and its dependencies; these packages are available on the mageia repositories (syncthing-gtk incorporates a GUI - this is the most commonly used variant of Syncthing; in case you do not need the GUI, just install the syncthing package).
  2. Make sure that the personal firewall on your Mageia PC is open for the ports 21027/udp and 22000/tcp - you can proceed, for instance, as illustrated here. The Syncthing project provides extensive information on firewall setup here.

Once the installation is completed, you must launch Syncthing by issuing the command (no need to be root)

syncthing

either by submitting this as command-line with a terminal emulator or, having created a desktop file with a correponding icon, clicking that icon; this command supports a long list options. To shut down Syncthing , use the "Action" pull-down button in the Syncthing GUI).

Articles about Syncthing frequently allude to this as "the syncthing server", but this is misleading: the syncthing command creates a simple user process - that launches all the synchronisation activities, but has nothing in common with the notion of a server in a context of distributed applications, or with a service as defined in Linux.

As an alternative to launching syncthing manually, you can set up your desktop environment or system to do the launching automatically when it starts.

Syncthing GUI

Configuration setup and action control is the task of the Syncthing program on the Linux PC, respectively of a graphical user interface that is part of this program. This GUI is implemented as a web page, displayed by your default browser. It is launched when the program is initialised; as an alternative, you can start it manually by opening the URL of the GUI on a browser at http://localhost:8384.

Please note: this web interface uses cookies - make sure that your browser has cookies enabled when the GUI is displayed!

The following illustration shows this GUI as it comes up initially:

Syncthing control page.png
Graphical User Interface
Folders : this table lists the folders that are configured for control by Syncthing (initially, only the "Default folder");
This Device : information and statistics on Syncthing;
Remote Device : the list of remote devices configured for handling by Syncthing (initially void).

For details on how to configure devices handled by Syncthing, and on how to select files and folders, please refer to the documentation provided by the Syncthing project.

Support files

When Syncthing starts the first time, the directory $HOME/.config/syncthing/ will be created. This directory will contain files with data used by Syncthing.

Only the contents of the file $HOME/.config/config.xml are of particular interest to the user: the contents determine various parameters and options for Syncthing.

For instance, there is a "gui" section that specifies the port address of the GUI web interface that displays the Syncthing GUI - which is hard-wired to the port address 127.0.0.1:8384.

This file may be manually edited, but that only makes sense while Syncthing is not running on the Linux PC - and be sure that you know what you are doing!

Documentation and articles on Syncthing

  1. The "official" documentation at https://docs.syncthing.net, respectively https://docs.syncthing.net/intro/getting-started.html is, probably, the best place to get information to help installing and start using Syncthing; it also provides links for obtaining advanced information.
  2. The article http://www.techrepublic.com/article/let-syncthing-turn-your-desktop-into-a-local-cloud-for-your-mobile-device provides an extensive description on how to install and use Syncthing.
  3. https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-syncthing-to-synchronize-directories-on-ubuntu-14-04 is oriented towards Ubuntu but provides a lot of information also valid for other platforms.

Synchronisation vs. File Transfer

Not yet drafted

Advantages

Once the user sets up the daemons, on the phone and the PC, and has them running, the user needs only to handle the files and folders, like always would, and Syncthing will manage the rest (transfer, synchronisation, etc).

Only transfer select files

You may not want to synchronise the complete folders on all devices; because of lack of space, bandwidth cost or time you may not want everything on your phone that you share between two computers, but you may want to grab or upload just what you need without the hassle of configuring a share of that subset.

Solution: There exist syncthing clients that enable you to browse the shares and only download and upload the individual files you need.

They can co-exist with other syncthing clients, so you can still have other folders syncing fully.

For more information see https://forum.syncthing.net/t/new-android-app-syncthing-lite/11086, https://forum.syncthing.net/t/new-alternative-android-app/8808

Disadvantages

Common issues

Setting up Android USB for file-transfer

Android distinguishes between several modes for USB communication with a PC :

  • for versions up to and including Android 5
"Media device (MTP)"
"Camera (PTP)"
  • for Android versions as off version 6
"Charging only"
"Transfer files (MTP)"
"Transfer photos (PTP)"
"MIDI".

Take the following steps to verify that the mode is correctly set, respectively to select the mode to be used for file-transfer:

  1. pull down and open the right zone of the control-bar (at the top of the display),
  2. in the resulting display, hit the field that shows the currently valid USB mode,
  3. select the option marked as using the MTP protocol.

With the devices and Android versions available for testing, this did not present any problem - many devices are already hard-wired for the file-transfer mode. However, Android version 6 brought the annoying drawback that devices always boot into the "charging-only" mode, requiring "file-transfer" mode to be newly selected each time.

For older versions and some devices more complex steps may be required, it may be necessary to make the device "rooted" (set to "developer mode") as described in this article. This is a modification that is not recommended unless you can fully assess the consequences of this action.

Adapt the "personal firewall" of the Mageia PC

The personal firewall defines a filter for Ethernet traffic that the Mageia PC will accept. The contents of this filter can be defined at system initialisation or - when the system is already operational - with the "Security" tab (i.e. its "Personal Firewall" tab) of the Mageia Control Center.

In both cases, the user interface for the control of the firewall is the same:

  • for some kinds of Ethernet traffic (for instance file transfer), there are checkbuttons in the main panel of the control window - just check the desired button,
  • for all other traffic, hit the "Advanced" button to open a window where you can type a textual representation of the protocol you want to be accepted:

either <port-number>/<protocol>
or <port-number>:<port-number>/<protocol>

with <protocol> = ftp or udp, <port-number> specifies the port-number of the server, resp. a range of port-numbers if a colon-separated couple is specified.

Troubleshooting

It is difficult to make generally valid recommendation on how to proceed if "things don't work". There are two general issues that should be verified to start with if the PC and the Android device refuse to communicate:

  • Check your end-to-end connectivity (wiring, software)

Try - independantly from the software used to do file-transfer - to verify that the PC and your Android device "see each other" and are able to communicate via the media you want to use. Android has several options that need to be selected to allow correct communication:

  • is the WLAN access enabled?
  • are your device and your PC on the same local area subnet?
  • is your USB cable capable of transmitting data? (some cables are simple "charger cables" and are not wired for the transmission of data; to recognize such a cable, try using it between 2 devices where you know that USB transmission is OK)
  • is the USB interface correctly set?
  • Check the firewall

If you use the WLAN for communication, verify that the firewall allows packages for your file-transfer software to pass. The easiest way is probably to - just for the time you need for checking - to disable the firewall (allow all traffic to pass).

Discussion

Considerations for selecting a specific method

Here is a very personal assessment from a user who only occasionally has the need for doing file-transfer between a PC and an Android device (and who is familiar with working on a PC):

  • The user interface of a PC desktop environment - plus the large screen and the availability of a hardware keyboard - are strong arguments for keeping the user control of file-transfers on the PC, even if gesturing constitutes a strong point for using the Android device.
  • Using an FTP client on the Android device should primarily be considered if the implementation of the client offers advanced features (such as the choice between the transfer protocols or the access to cloud services) that are not available on the PC-controlled tools.
  • USB-mounting uses only standard and well-debugged software, the user interface is that of the desktops file manager - familiar to the user. Therefore: preference to USB-mounting.
  • The tools that communicate via WLAN are preferable if the plugging in of a USB cable is undesired or not possible. (It is a pity that the Bluetooth on Linux PCs is not sufficiently advanced to be a real alternative - Bluetooth is aimed precisely at applications where a nearby device occasionally needs to communicate with a PC).

The consequence is to maintain a 2-tool environment:

use USB-mounting for production transfer,
install an Android client (ES File Explorer for instance) for tasks that require its extra functionality.

If - beyond simple the transfer of files - there is a need for the automatic synchronisation of files, only cloud-based transfer will presently do the job. But note that there is a privacy issue: the kind of information exchanged between a PC and an Android telephone may be quite private (personal addresses, calendar data, private pictures) and might need to be kept as far away as possible from hackers.

Also, note that automatic synchronisation of user files imported and exported on Android may not be sufficient: the calendar or contacts handler in Android may require specific actions for the integration of these files (they use standardised text format) into the handler.

Android devices considered in this document

At the time this document was drafted, only the following Android devices had been available for testing:

Nexus-7, Samsung-Galaxy-S5 and A5.

Hopefully, that will improve when the wiki page becomes publicly available: please help and provide feedback on devices to be added.