From Mageia wiki
Jump to: navigation, search

Scope of the document

This document is intended to help setting up and use file transfer between a Mageia Computer and an Android device.

Googling helps to find large amounts of useful information on this topic , but mostly on specific items with limited scope, and possibly not always very reliable. Few documents offer a view that covers more than one method - obtaining an overview of all tools and methods available, Deciding which method is most adequate for a given situation remains difficult. This wiki page intends to, from the viewpoint of a Mageia user, help finding the "right" file transfer tool and to provide information on how to put it in place and keep it running.

Target audience

The target audience for this document are users without in-depth knowledge - users who, essentially, know the names of the files they wants to exchange, and whose knowledge on 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 help getting more insight also at the technical level.

Present state of the document

Drafting this kind of document requires a range of knowledge and experience which a single author does not have. Therefore, the document has many more or less empty sections that wait for knowledgeable contributors.

If you like the concept of this wiki page, but need to invest on putting in place a method that is not documented, please help improving the page: this is a wiki, do some editing to describe what you have done - or, at least, put non-formatted information in the Discussion tab of the page.

A corresponding problem exists for the coverage of specific Android devices - the differences between various hardware and types of hardware 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 (Lolipop).

Overview

The number of approaches and methods in support of communication between a Linux PC and an Android device is amazingly high. The following table provides an overview on the available 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 link to, respectively, corresponding playstore items or project home pages).
Method : name under which the method for file-transfer is commonly known.
Android software : principal software used on the Android device.
Linux software : principal software used on the Linux PC.
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 wirleless network for the communication between machines.
USB : "+" if the method uses / can use a USB cable for the communication between machines.
Bluetooth "+" if the method uses / 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 *) Browser Android - + +
*) or corresponding software

Specific methods

KDEConnect

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.

Using KDEConnect

  1. Open a Dolphin file-manager window,
  2. the "places" panel (at the left of the window) will contain items with the names of available Android devices,
  3. do a left-button click on the item you want,
  4. in consequence, a window is opened that displays the top-level directory of your Android file-system.

File-transfer

  • open another Dolphin window on you target directory on the Linux PC,
  • in these two windows, 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 photos).
  • Download and 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

Add (use the "Advanced" button) the following 2 items

1714:1764/udp
1714:1764/tcp
  • Register the Android device(s) with KDE:
  1. Open the KDE Control Center,
  2. in the hardware-section of its "Overview" page, select "KDE Connect",
  3. if, in the left-side panel (list of available devices), your target device is marked by a red "one-way symbol", select that device,
  4. than:
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"
Register an Android device with Kde


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

USB mount (MTP)

Here, the Android device is mounted like an ordinary external USB device. The implementation uses the MTP protocol ("Master Transfer Protocol") which, on the Linux side, emulates the behaviour of ordinary external storage. This method is probably the most simple and easy one to implement among all the alternatives mentioned here. 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.

Using USB-mounted Android devices

When the USB device gets connected, 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.

There is one issue that hopefully will be clarified with future versions of MTP software on Linux: in the list of available actions there are 2 actions with the label "Open with File Manager". When you launch the actions attached to these labels, both display the directory tree of the device, but with the root of this display placed at different levels of the tree.

Installation & Setup

Android device

  • Android Lolipop 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

Mageia-5 automatically installs the packages that implement the MTP protocol at system generation, no particular action is necessary.

Experience with USB mounted devices

MTP software is, today, largely used standard software - both on Mageia-5 and on Android-Lolipop. As to be expected in this case, the software runs smoothly and without bugs (unless the excess item in the USB notification popup is considered a bug). This appears to be progress in Android-Lolipop, there had been complaints on imperfections in earlier releases of Android.

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

Airdroid

Airdroid allows to have 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 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 your smartphone as a desktop representation in your browser, including the usage of all apps and phone calls and notifications
completely controlled 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

This method is based on the use of an FTP client on the Android device. There is a long list of such clients available on Android playstore, many of them offering various flavours of FTP - for instance secure FTP, and not all of flawless quality:

AndFTP (probably the most popular one), ES File Manager (which also offers nice file management functions), WM FTP Client, FtpCafe FTP Client, NRFTP, AntTek FTP/FTPs/SFTP Client, Mobile FTP, File Expert, Fsync and probably many more - not all of them of flawless operational quality.

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

Using an Android FTP client

This method is powerfull - 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)

Installation & Setup

Android device

Linux PC

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

More text presently being drafted

...

Common issues

Setting up Android USB for file-transfer

Android distinguishes between two modes when the device communicates with a PC:

  • Transfer of files: the device needs to be connected as a "Media device" (MTP protocol)
  • Transfer of photos: the device needs to be connected as a "Camera" (PTP protocol)

Take the following steps to verify that the mode is correctly set, respectively to set it as required:

  1. on the home screen of the Android device, hit the "Settings" icon,
  2. navigate to the "Device" Section,
  3. hit the "Storage" option,
  4. you will obtain a display that illustrates storage utilisation,
  5. at its top-right corner, hit the "Setup" icon (3 vertical dots),
  6. a "USB computer connection" button will pop up - hit that button,
  7. of the two checkboxes that appear now, make sure that the one saying "Media device (MTP)" is checked.

Adapt the "personal firewall" of you 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

  • Check end-to-end connection
  • Check firewall

Discussion

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.

Considerations for selection a specific method

  • Advantage of control on Linux PC (no cumbersome playing with the virtual keypad)


Helpful references