For those who don’t know MTP stands for “Media Transfer Protocol”, having support for it has become really important because since Android 4.0 it is a requirement in order to manage files in any Android device, even though MTP has been here for years and other products offer support for it lilke the Nokia N9.
In order to have MTP support we needed a “kio-slave”, which has been developed by Philipp Schmidt, and then modify some parts of our workspaces (dolphin, kdelibs and notifier) to integrate the MTP devices as if they were just regular massive storage (pen drives).
As usual, small screencast showing how well it works:
How to install?
To have basic support for MTP you have to install “kio-mtp”, executing the following:
git clone http://anongit.kde.org/kio-mtp
mkdir kio-mtp/build
cd kio-mtp/build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debugfull #(THIS MAY BE DIFFERENT)
make install
Or simply ask your distribution to package it
As for the Workspaces integration, I expect to get the patches in for 4.9.2 and 4.10
Cheers !
Great but won’t this be a regular part of 4.10? (As we should ask distributors for packaging)
We will try to get the slave into 4.10 as well, if it is stable. So please test!
Tested with a Sony Xperia S (Android 4.0.4).
Works almost well, but is very very slow: a simple text document of 2 KB takes like 8 seconds to open; reading a folder with 41 files, aproximately 10 seconds; opening a 2 MB mp3 from that same folder, 7 sec.
Besides that there’s another issue I don’t know who Zto blame» I can’t open any image file with Gwanview. I can copy (and them open it correctly with Gwenview), see its preview on Dolphin’s info panel and open it with Okular, Krita or Gimp, but can’t open them in Gwenview, GW complains about not being able to read the file’s metadata; it literally says “Ha fallado la carga de metainformación” (my KDE is in spanish, I don’t know how can be that warning in english, sorry).
Anyway, even if my problem with Gwenview is due to some problem on my instalation, this slave it’s very slow but works rather well (apart from the GW issue).
Thanks a lot for your great work, and regards.
Excuse my bad english and my even worse typing dexterity (lack of).
I meant that I can open image files directly from the phone via this great KIO slave with every graphics program I have tried except Gwenview; if I want to open it with GW I need to copy the file to some drive on my computer and then, open it with GW.
kio slave kamera manages ptp and mtp.
there will be some conflict, no ?
Conflict: No, but they will both tell you that you can open the device with them. In my experience however the camera:/ slave doesn’t work with MTP, at leas not for my Nexus, that’s why I started kio-mtp. Additionally, a seperate MTP implementation can make use of higher level API calls than a pure P2P one.
I have a creative Zen Mosaic. As in Phillip’s case, camera:/ picks it up as an MTP device, and then fails to open it.
an idea : mtp over bluetooth
since i discover bluetooth i don’t want to use a cable anymore
and mtp is more handy to get all multimedia files (in my case video and photos) in a window according to copy them to my pc.
today with bluetooth i must run through directory tree of my nokia 5800 to get photos then run through directory tree again to get videos
Parabéns, esse é um recurso muito importante para a maioria dos usuários do KDE.
Para tornar o ambiente perfeito para conectividade entre dispositivos resta apenas melhorias na parte de bluetooth.
Congratulations, this is a very important feature for most users of KDE.
To make the perfect environment for connectivity between devices remains only part of improvements in bluetooth.
Thanks a lot, that is great news! Thanks a lot, that is great news! Thanks a lot, that is great news!
Great news. And I was just thinking why my Xperia S worked once and since some time it wasn’t recognized by KDE at all (I don’t really know if it started after the upgrade from Android 2.3.3 to 4.0.4).
Thank you so much for working on this! Poor MTP support has been a real pain for me as my wife has an MTP based MP3 player and Android tablet and gets very annoyed when they don’t “just work” for her in KDE.
Nice we could help you there
. If you would be so kind and test with the MP3-Player very thoroughly as I only have an Android Device. Feel free to email me to the address noted in the source code if you find anything.
In the mean time also kudos to Aurelien Gateau, the picture importer in Gwenview saved me quite some headaches when getting my pictures and videos off my Nexus to the computer
A bit off topic, but, is there something resembling a “N9 Suite” for KDE?
What exactly N9 suite does?
Thanks a lot for this KIO slave, the amount of devices the the Plasma Desktop is comptabile just skyrocketed!
Off-topic, but how did you get the file transfer progress bar in the Dolphin icon on the task manager? Is that yet-to-be-released official code? I haven’t been paying attention lately.
It is a feature of the Icon Tasks manager. http://kde-apps.org/content/show.php/?content=144808
This manager should be, normally, packaged by your distrib.
After that, you might have to look for the option in the configuration dialog.
Thanks!
That’s awesome. I have just bought a Samsung Galaxy Tab P7300 with Honeycomb installed (Android 3.1) just to find out that the USB port does not export the partition using USB mass Storage (UMS). I read on the Internet that the reason is because there is only one partition on the internal flash drive and when the OS use UMS it exports the entire partition, which makes it unaccessible by the OS (in this case by Android). To make things a little worse I had to upgrade to the git version of libmtp to access my tablet’s data through USB. The libmtp-1.1.4 does not work with my tablet. Strange enough I could not use Amarok to list my tablet’s songs even though it work (most of the time) through command line tools.
You are quite right with your analysis of why the UMS Support was dropped. Additionally exporting a partition using UMS exposes the underlying filesystem to the client, which is problematic for windows if the host (Android) is a Linux based system and therefore uses ext4 or something similar. So the sdcard partition alway had to be formatted with fat32, with all its downsides (4GB maximum filesize etc.).
It would probably be possible to add a layer that exposes the files using a generic filesystem, but MTP is probably less problematic if client support is there (which now, it is
).
And the Amarok implementation is, well, broken and in dire need of a rewrite.
Unfortunately, I have faced some issues with my MP3 player. I can send a bit extended review how the KIO slave works with my Walkman.
You should report a bugs at http://bugs.kde.org and we can help you to track down the issue.
good news indeed and not a moment too soon!
CMake Error at /usr/share/cmake-2.8/Modules/FindKDE4.cmake:98 (MESSAGE):
ERROR: cmake/modules/FindKDE4Internal.cmake not found in
/home/amason/.kde/share/apps;/usr/share/kubuntu-default-settings/kde4-profile/default/share/apps;/usr/share/kde4/apps
Call Stack (most recent call first):
CMakeLists.txt:7 (find_package)
Any idea which package i need to install to be able to compile this ?
i confirm since kde4.8.4 (i asked this feature to kio camera dev for several years) camera kio can access to ptp and mtp
but for mtp it is buggy
see https://bugs.kde.org/show_bug.cgi?id=307830
[...] The restart your desktop and see if dolphin offers you the'mtp:/' option Some reading for you: Workspaces gain MTP support As you can see, it won't be long before the KDE desktop can cope with these devices [...]
Functions well -altough rather slow- with my Sony Xperia S. I now can say ciao to Airdroid. Thanks!
Thank you! Worked perfect on a fresh Suse 12.2 install with Samsung Galaxy Nexus.
[...] Philipp Schmidt y Àlex Fiestas han añadido soporte para dispositivos MTP (como en los teléfonos) para el Panel de Lugares, haciendo uso de MTP Philipp Schmidt kioslave. Con ello podremos transferir archivos fácilmente desde y hacia el teléfono fácilmente en KDE: Más información Blog de AFiestas [...]
This is such a huge improvement. Thank you so much for your work.
I compiled from source – looking forward to hopefully seeing this in the Fedora repos very soon.
It looks like this will be part of what rolls out with KDE 4.10 From what I can tell that will be finished early next month maybe. Then there will be a little time before it makes it to Fedora.
If I install this now, per the instructions above, (I had installed it before but did a new install on my machine to Fedora 18) what would I need to do to uninstall it when it becomes supported through my updates? Or do I even need to worry about that?
thanks so much
Never mind – just went into apper to make sure I had everything I need and see that kio_mtp is there now.
Thanks,
it works great with my LG P970 with CM10.
To have it by default in 4.10 is fantastic.
Thank you for the great screencast and sharing with the public. Looking forward to going stable! In the meantime I have a question for you. I’ve installed the kio-mtp from the latest version but now when I connect my phone, the pop-up dialog for the usb device shows the Open with dolphin twice. In your screencast I noticed that it didn’t do that… it only showed open with dolphin once and once you clicked there it took you straight to mtp:/ is there any way to remove the old entry ?
as in old entry I mean the second open with dolphin going to camera:/ instead of mtp:/
Is there any way to diagnose and debug kio-mtp?
openSUSE 12.2 (x86_64)
KDE 4.9.98
kio-mtp 0.0.1 from KDE:Distro:Factory repo.
Connecting Nexus 7 and nothing happening. No errors, no messages, nothing at all.
Problem solved. Reinstalled libmtp from oss repo and everything works fine now. There was permission problem with new libmtp from unofficial repo.
Works like a charm on Ubuntu 12.10 and KDE 4.10 in which it was not included (used the backports ppa).
Transferring files to my Nexus7 right now!
Juergen, how did you get it working ?
I’m on Kubuntu 12.10 KDE 4.10, but nothing happens when I try to connect my nexus 10 through MTP. Works like a charm for transfering photo from camera through PTP, though.
Is there a package called kio-mtp ? I can not find it on my system.
My test report:
Device: Samsung Galaxy S3 (Android 4.1.2), stock ROM
System: Debian wheezy, KDE 4.8.4, libmtp9 1.1.5 (Debian sid)
+ Files can be opend directly from the device (internal SD & external SD), except images with Gwenview “Loading meta information failed.”
+ Copying of files onto the device works reliable and fast
- Can’t copy files >4GB (external SD is exFat and i can copy files >4GB over wifi), when trying to copy files >4GB with mtp-sendfile (mtp-tools package) the file size limit is 2,6GB. wtf?
- Can’t create directories on the device (internal SD & external SD)
- Can’t copy directories onto the device (empty or otherwise)
Thank you! Keep up the great work!