A couple of weeks ago, Han-Wen Nienhuys, the author of go-mtpfs, pointed out to me that Android’s MTP implementation includes a set of methods that allow you to do normal read and write operations on files without having to do the whole download/upload dance. With these extensions, you can expose files in the way that most people expect – you can just open a text file, picture, video etc, make changes and save it back. As a bonus, this functionality also allows you to do very useful operations like copy or move a file on the device.
I’ve now had a chance to put together an initial implementation of support for these extensions, and my PPA is in the process of rebuilding packages, so people can try them out easily. I’ve not started the upstreaming process on the GVFS changes as I still need to get the libmtp changes approved and upstreamed, but the libmtp maintainer has been AWOL for a few weeks now.
Obviously, it’s important to remember that these extensions are Android specific and won’t help you if you have a non-Android device, nor if your Android device doesn’t use Google’s MTP implementation (which, unfortunately, includes most Samsung devices).
You can grab Ubuntu packages from my ppa and the source is available on my github page.
{ 5 } Comments
Any idea when this functionality will be available for Samsung devices? I am running your gvfs mtp backend on 12.04 and it works great with my GS3 running 4.1.2, but I would like the ability to open/edit/save directly from my devices micro SD card.
Thanks for all your help.
That’s largely up to Samsung. They don’t use Google’s MTP implementation, and as a result, are missing these extensions. That means there’s no way to do direct writes to files. On the read side, they do implement the older GetPartialObject call, which is limited to operating on files up to 4GB in size (Google’s extensions include a 64bit version of this call). I will add support for GetPartialObject but I need to get a change into libmtp first to allow me to check if it’s supported or not.
You’d need to switch to CyanogenMod or another AOSP based ROM to get the Google MTP stack.
Hi Philip,
Yesterday I bought a new Samsung S3 and was very happy to read, that You have closed that “gap” for automatically mounting a Andriod device on Ubuntu-systems. But by adding Your repository and the additional update I got the error-message:
W: Fehlschlag beim Holen von http://ppa.launchpad.net/langdalepl/gvfs-mtp/ubuntu/dists/lucid/main/binary-amd64/Packages.gz 404 Not Found
What is my fault? Could You please help?
Kind regards
Hans-Joerg
Hans-Joerg,
You’re running Ubuntu 10.04 which I didn’t create packages for; it’s just too old. At the very least, I’d recommend upgrading to 12.04 (the new LTS release) or preferably a newer release.
Hi Philip,
thanks for fast and helpfull answer!
Than I will do so.
Kind Regards
Hans-Joerg
Post a Comment