android / mtp / bug

Problem:
connecting my android device with Tumbleweed and leap (tested on both).
1st step installing two needed packages:

sudo zypper in mtp-tools
sudo zypper in mtpfs

after that… still no recognition of the android device (android 11)

2nd step, entering:

qdbus-qt5 org.kde.kiod5

just after entering this line (on every…every startup) it is working.
without it, nothing happens…

I can move files from my pc to my phone, but I can’t move files within my phone…
it starts…stalls…and never finishes

any suggestions what could I do

  1. to avoid entering on every startup qdbus-qt5 org.kde.kiod5
  2. to move files within the phone… it may be a bug, I read something but am not sure anymore

Sorry. Forgot to mention,
In both cases kde running.
“moving” files with dolphin.

MTP connections with Android are finnicky at best. The only reliable method I have ever had for transferring between Linux and an Android device is the “Android Transfer For Linux”

https://github.com/whoozle/android-file-transfer-linux

You can just download and run the AppImage, it contains all the libraries and bits that it needs to run.

I just copied a bunch of files from phone to PC with Dolphin. I haven’t tried moving files around the phone itself though. I notice “Cut” was unavailable, so I used Copy instead, which worked. Before going this path I wanted to copy files using terminal, so I copied and pasted the mounted MTP location to terminal and I noticed the mtp:/ protocol which doesn’t work for built-in commands. I found some pages [1] [2] describing how to use MTP but just went with Dolphin instead.

I didn’t installed those packages you mentioned, they are meant for mounting phone storage in the filesystem. They are not needed for Dolphin. Just clicked the notification to browse files, no need to run kio in a terminal. Overall it’s quite straightforward to use (TW).

So moving files around the phone storage could be a kio limitation, you might have better luck with gvfs/simple-mtp/etc.

[1] https://wiki.debian.org/mtp
[2] https://wiki.archlinux.org/title/Media_Transfer_Protocol

@orbvs
Thank for the hint.
Will give it a try.
In its actual state it is not very user friendly…

@averlang
Thank you too for the hint “simple mtp”
Will give it a try.

Nonetheless:
You say you use tw. An were able to mount out of the box…
Newest update in tw on your machine?
I wasn’t able to mount my device without those beforementioned packages.
I could indeed click on “mount” but nothing happens. Maybe this is phone specific…
I read that android did something with it’s privilege system but cannot recall what exactly.
What android version are you using?

I can click now again on “mount” and nothing happens…

I saw some activity on bug 1189687 and linking also the previous forum post about this: Unable to connect by USB to three Android 11 smartphones; ‘file or folder does not exist’ errorAlso tried today on my Tumbleweed install, KDE recognizes the phone and provides “Open in the File Manager”. Then Dolphin happily opens my phone, for instance mtp:/Nokia 6.3/Internal shared storage/DCIM/Camera/ and I can read and write files. The phone is running Android 11 and do not have mtp-tools or mtpfs installed (anymore)

I can move files from my pc to my phone, but I can’t move files within my phone…

Instead of “move” try deleting a file and creating one both in the folders that you are using for the move.

[QUOTE][so I copied and pasted the mounted MTP location to terminal and I noticed the mtp:/ protocol which doesn’t work for built-in commands./QUOTE]

Wondered what could be problem, but it seems Dolphin doesn’t mount locations.

@marel
You got a rooted phone?

No, my phone is not rooted.

in that case
how do you got rid of mtp-tools and mtpfs on your phone?

I got an android 11 as well

how do you got rid of mtp-tools and mtpfs on your phone?

I never had mtp-tools or mtpfs on my phone, I did install it in Tumbleweed.

I did a reinstall of Thumbleweed as I got a NVMe PCIe, 2 TB SSD and “moved” everything to that “disk” so that is how I got rid of it
But you can also remove it using "sudo zypper rm mtp-tools mtpfs "

Yes, I saw this too. For me executing this command as a standard user was enough:

qdbus-qt5 org.kde.kiod5

After this I could succesfully access my phone. So, there was no need to install any additional packages.

That’s great that Android MTP is working, I started using “File Transfer” years ago when it was buggy as all get out, next time I need to move music onto my phone I’ll see what the plug-and-play looks like on Tumbleweed.

Thanks for the update!

This weekend I did update Tumbleweed and now I also need “qdbus-qt5 org.kde.kiod5” to be able to access the file system on the Android 11 phone, that was not the case before the update.
So it looks like something has change in the last 2…3 weeks causing (again) this problem.

I am puzzled by the output of the command…

> qdbus-qt5 org.kde.kiod5
/
/MainApplication
/org
/org/kde
/org/kde/kiod5

Just read the updates to Bug 1189687 and it seems the problem is know and a fix is underway:

That’s a new issue. kio-extras5 in openSUSE:Factory was not rebuilt after the definition of KDE_INSTALL_LIBEXECDIR changed in kf5-filesystem, so the dbus services inside are broken