Android to Linux File Transfer with MTP
After a number of years of working around the fact that my Android phone no longer mounts as a basic storage device when connected via USB, I’ve finally figured out how to use MTP on linux.
I have a windows PC at home, and I’ve shamefully just been using it to do my basic file transfer tasks with my phone. However, that isn’t perfect as there are other times when USB file transfer would come in handy.
In the past I’ve even gone as far as starting up a basic FTP or SSH server and then using the ES File Explorer app on the phone to log in and transfer files wirelessly. This is slow and fiddley though.
I looked into how to use MTP today though and it turned out to be much simpler than I was expecting. I’m not sure why I never thought of it myself but there is an MTP fuse module that allows linux systems to mount MTP devices and interact with them like normal block devices.
These are the steps I took on my Fedora 21 system. Your mileage may vary:
- "sudo dnf install fuse fuse-libs libmtp simple-mtpfs"
- Plug in phone.
- "mkdir /tmp/phone; simple-mtpfs /tmp/phone"
- Transfer files to and from "/tmp/phone".
- "fusermount -u /tmp/phone"
Piece of cake.