Provide an easy way to transfer files to the phone with MTP
We just had a discussion about this in the Matrix room but we though it would be good to write it down.
Currently if you want to transfer files to your pmOS device, you have to use either scp, sftp, or sshfs. This works well enough but isn't really easy to use for the less technical users. On Android (and other distros like Ubuntu Touch) MTP is used instead which is integrated into basically everything nowadays. The benefits are that it requires no setup to use and your device will automatically appear in your file manager (on all OS's, including Windows) when you plug it into your PC.
We should probably at some point use MTP too, but we should make sure it happens in a secure way. Since MTP requires no authentication of any kind, we should make sure it's disabled by default (like Android has it disabled by default and requires the user to explicitly enable it) and doesn't expose everything in
$HOME which might contain sensitive data like private SSH keys. The XDG Basedir specification has
$XDG_PUBLICSHARE_DIR which defaults to
~/Public and seems like the perfect directory for this. People can then move files using the file manager on their device to the location where they want it.
There is a MTP server implementation available which is used by at least Ubuntu Touch here, and Plasma Mobile has a (broken right now) fork here. SailfishOS seems to use this. @MartijnBraam also found uMTP-Responder which seems promising.