Bug 497140

Summary: USB detecting Android phone as Portable Media Player and not mounting it
Product: [Frameworks and Libraries] frameworks-solid Reporter: epp
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dev.worsening067, ilikefoss, kdelibs-bugs-null, kevin.legouguec, lukas, nate, PVince81, rafael.linux.user
Priority: NOR    
Version First Reported In: 6.9.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.4.1
Sentry Crash Report:
Attachments: KDE Removable Devices applet incorrectly detecting Android as Portable Media Player.

Description epp 2024-12-06 19:45:52 UTC
Created attachment 176400 [details]
KDE Removable Devices applet incorrectly detecting Android as Portable Media Player.

SUMMARY

USB is detecting an Android phone as a 'Portable Media Player' and as a result, the phone can't be mounted and is not accessible. Phone is a Samsung Galaxy A11 (Android 10).

STEPS TO REPRODUCE
1. Plug Android phone into a USB port.
2. Removable Devices applet appears.
3. Phone is erroneously detected as a Portable Media Player.

OBSERVED RESULT
Phone is detected as a Portable Media Player.

EXPECTED RESULT
Phone should have been detected as an Android device and made mountable/accessible.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0 
Qt Version: 6.8.0

ADDITIONAL INFORMATION
Under previous Plasma version, phone was correctly detected as an Android.
Comment 1 Nate Graham 2024-12-13 21:09:56 UTC
That's how appears to Solid, unfortunately. Android devices by default use MTP for file transfer, which was historically used for portable media players. The system doesn't have a way to know the exact device form factor, AFAIK.

I suppose we could genericize the terminology to "Mobile device" but I'm not sure if that would really be better.

Or maybe I'm wrong and Solid has a way to distinguish. Moving to Solid.
Comment 2 Vincent Petry 2025-02-16 10:52:52 UTC
Just to clarify, this issue is more than just terminology, maybe the bug title should be adjusted ?

The underlying system (solid?) doesn't mount it at all when clicking on mount or open in Dolphin. 

My system:
openSUSE Tumbleweed 20250124
Plasma 6.2.5

The phone is a Samsung A52s and is correctly configured with USB file transfer mode, not camera.
Comment 3 epp 2025-02-16 18:52:13 UTC
(In reply to Vincent Petry from comment #2)

> The underlying system (solid?) doesn't mount it at all when clicking on
> mount or open in Dolphin. 

This is exactly what's occurring. 

openSUSE is now on Frameworks 6.10, with no change in this behavior.
Comment 4 epp 2025-02-17 20:25:06 UTC
openSUSE updated KDE Frameworks to 6.11 on Tumbleweed.

As is, the Removable Devices applet still displayed the Android as a Portable Media Device and did not mount it. Although it opened a Dolphin window.

I was able to find and access the phone by selecting (in Dolphin):

* Network
* MTP Devices
* (my phone)
Comment 5 John 2025-02-24 17:28:07 UTC
I cannot reproduce this with a  Samsung Galaxy S10 (Android 12)
On Debian 13 (Trixie) - unstable repository, with:

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.11.0
Qt Version: 6.7.2
Kernel Version: 6.12.16-amd64 (64-bit)
Mesa  Version: 25.0.0-1
Graphics Platform: Wayland


HARDWARE SPECIFICATIONS
Hardware: Laptop Dell Inspiron 5770 (17" 1080p@60Hz screen)
CPU: Intel® Core™ i5-8250U CPU @ 1.60GHz
GPU 1: Mesa Intel® UHD Graphics 620 (main, Vulkan capable)
GPU 2: AMD Radeon R5 M465 Series
RAM: 8 GiB (7.7 GiB usable)

The only weird thing is that when I click on the "Allow" button for the computer to access its files, through scrcpy's mirroring window, it makes scrcpy crash, interrupting the mirroring.
And the fact that the phone is shown in Dolphin as:
SAMSUNG_Android
Instead of:
My-phone
That I've put in Settings -> About phone
Maybe that cannot be accessed over USB.
But a Samsung_Android would be more accurate to how the brands are normally called.
Or better: Samsung with Android or even Samsung-Android.

Searching a bit of solid and its commands I found that you can list devices and then filter the list with grep for only USB connected ones like:
solid-hardware6 list | grep usb
Then I tried each one with the 'solid-hardware6 details' command until I reached the one that I wanted, like:
solid-hardware6 details /org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
Which gave me this output:

udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3'
  parent = '/org/kde/solid/udev' (string)
  vendor = 'SAMSUNG' (string)
  product = 'SAMSUNG_Android' (string)
  description = 'SAMSUNG_Android' (string)
  icon = 'multimedia-player' (string)
  Block.major = 189  (0xbd)  (int)
  Block.minor = 13  (0xd)  (int)
  Block.device = '/dev/bus/usb/001/014' (string)
  Camera.supportedProtocols = {'ptp'} (string list)
  Camera.supportedDrivers = {'gphoto'} (string list)
  PortableMediaPlayer.supportedProtocols = {'mtp'} (string list)
  PortableMediaPlayer.supportedDrivers = {'usb'} (string list)

So I guess from here Dolphin it taking that label information.
But now I wonder where Solid is getting that information from and if there isn't more information available.
Comment 6 John 2025-02-24 17:49:31 UTC
I think I figured out just a bit from where it might be getting it from by looking at:
sudo ls -l /dev/serial/by-id/
And got deepter until I saw:
<my device> -> ../../ttyACM1
And then ran:
sudo udevadm info -q all -a -n /dev/ttyACM1
That I got from here:
https://unix.stackexchange.com/a/647244

I could see from where Solid has probably gotten that information about the label, but not from where it got the supported protocols.
Maybe someone else can figure that par and what is wrong fro the bug reporter.

As for me, except the strange label and disconnecting scrcpy if I press "Allow" over it, everything works.
Comment 7 Rafael Linux User 2025-02-25 10:09:03 UTC
In my case (samsung Galaxy S20FE) appear to solid command like:
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9'
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.1/tty/ttyACM0'

And the command
 solid-hardware6 details /org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9

output is:

udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb1/1-9'
  parent = '/org/kde/solid/udev' (string)
  vendor = 'SAMSUNG' (string)
  product = 'SAMSUNG_Android' (string)
  description = 'Reproductor multimedia portátil' (string)
  icon = 'multimedia-player' (string)
  Block.major = 189  (0xbd)  (int)
  Block.minor = 8  (0x8)  (int)
  Block.device = '/dev/bus/usb/001/009' (string)
  Camera.supportedProtocols = {'ptp'} (string list)
  Camera.supportedDrivers = {'gphoto'} (string list)
  PortableMediaPlayer.supportedProtocols = {'storage'} (string list)
  PortableMediaPlayer.supportedDrivers = {'usb'} (string list)

If you think is usefull, here you have it.
Comment 8 John 2025-02-25 14:14:33 UTC
(In reply to Rafael Linux User from comment #7)
> In my case (samsung Galaxy S20FE) appear to solid command like:
> ................................................
> If you think is usefull, here you have it.
I don't know if it's useful or not or how useful it is, as I'm not a developer.
But in my opinion, it cannot harm to have as much details as possible.
And since on some distros and some devices it works and on others it doesn't, we can only get to the source of problems by comparing the differences that we see.

Only things that I find strange from your output are:

  description = 'Reproductor multimedia portátil' (string)
Compared to:
  description = 'SAMSUNG_Android' (string)

  PortableMediaPlayer.supportedProtocols = {'storage'} (string list)
Compared to:
  PortableMediaPlayer.supportedProtocols = {'mtp'} (string list)

For the first difference, I would try to switch the OS back to English (US or UK) and reboot.
I find it weird that is not saying SAMSUNG_Android too. Maybe there's some name matching somewhere in the code that fails with seeing a translated string, even though that should not be translated, but who knows, translators can make mistakes too if they translate or delete placeholders.

For the second difference, I don't think there's anything you can try, outside from enabling the "Developer options" and check if the " DefaultUSB configuration" is set to "Transferring files".
It's strange that it says storage, which I assume it was how very old phones (like 10 years or so, maybe more) did it before the MTP protocol appeared.

AFAIK, with MTP the phone does the mounting of its internal storage or microSD disk and intermediates all connections form the computer so the devices can be disconnect at any time with being "safely removed"
Before, it was a big problem as you had to close the connection (safely remove) the storage mounting from the phone before disconnecting and maybe that "storage" is hinting.

S20 is pretty new, so I don't see why it's not shown as MTP.
If you don't have any banking app or other app that requires the most secure and most untouched OS, then maybe you can enable the developer options and check what it's the default USB configuration. 

Bit since this worked before, it's probably not the phone the culprit, but someting in KDE software or in the distro changes or building of packages.

Sorry I cannot help with this!
Comment 9 Rafael Linux User 2025-02-25 21:42:51 UTC
Considering that - as is usually the case with KDE - there are things that have been working for years and suddenly stop working, I am clear that it is not our mobile phones (in which nothing has changed in that interval of time). Furthermore, I already have (bad) experiences with KIO, the most recent (and unresolved) related to the use of ".pac" files (javascript instructions for access in networks that use proxy). As always, PCMan (among others) does work perfectly in cases where applications that use KIO stop working, as is the case with Dolphin and Krusader. It's a shame, because Krusader is very good and I can't use it every time months go by without the problems with KIO being resolved.
Comment 10 Kévin Le Gouguec 2025-03-01 09:02:32 UTC
> I was able to find and access the phone by selecting (in Dolphin):
> 
> * Network
> * MTP Devices
> * (my phone)

Thanks a lot, that worked for me too - another Tumbleweed user, who happens to try & grab photos from his phone once every six months, and finds himself this morning staring at

> org.kde.applets.devicenotifier: DeviceServiceAction::execute:  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:02.1/0000:16:00.0/usb1/1-3"  is not a StorageAccess device

when hitting "Open in File Manager", mumbling "pretty sure this used to work", and second-guessing every fuse/kio/mtp-adjacent package & service on his system.

(Apologies if this is a low-signal comment; meant to thank the OP for the workaround, and figured it would not hurt to post that journalctl line: it was the only smoking gun I could see debugging this)
Comment 11 Aether 2025-03-02 18:43:23 UTC
I am facing the same issue. In My case I'm using 3 different devices (Samsung S10 and S24, and Xiaomi A1) the Xiaomi works correctly, i.e. I plug it to the USB and the system tray correctly shows the name (Mi A1) whereas the samsung devices show just as Portable Media Player.

I'd like to point out that in KDE Dolphin, when I connect the xiaomi device, it shows up in the Devices section, whereas the samsung devices do not show up. 

With the Xiaomi device connected, if I click on it in the Devices section in Dolphin, and then I edit the address bar, the url looks like:
mtp:udi=/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4/

With any of the Samsung devices connected, they don't show up in the Devices section and If I try to access it from the System Tray Disk & Devices applet, journalctl logs show this:
plasmashell[3233]: org.kde.applets.devicenotifier: DeviceServiceAction::execute:  "/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4"  is not a StorageAccess device
systemd[2756]: Started Dolphin - File Manager.
systemd[2756]: Started Dolphin - File Manager.
This line above is duplicated in the log, not my mistake and I can see dolphin starting up 2 times and closing one instance.

Having said all that, found a workaround.
With the Samsung device connected:
Open Dolphin and manually edit the address bar and type mtp:///
it will list all mtp connected devices
from then on you can browse the android device as normal.


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250226
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.4-1-default (64-bit)
Graphics Platform: X11
Comment 12 Rafael Linux User 2025-03-02 19:32:03 UTC
Thank you very much for your input!! Your experience sheds light on the problem. From what it seems, it only affects Samsung devices, because I think all of us who have commented here that it has stopped working for us, use Samsung devices. For all of us - although in your case you have not confirmed it - it worked perfectly until a few months ago. I doubt your S10 even updates anymore, so the problem still seems to be related to some change in KDE that only affects Samsung smartphones.
Comment 13 Aether 2025-03-02 21:14:41 UTC
(In reply to Rafael Linux User from comment #12)
> Thank you very much for your input!! Your experience sheds light on the
> problem. From what it seems, it only affects Samsung devices, because I
> think all of us who have commented here that it has stopped working for us,
> use Samsung devices. For all of us - although in your case you have not
> confirmed it - it worked perfectly until a few months ago. I doubt your S10
> even updates anymore, so the problem still seems to be related to some
> change in KDE that only affects Samsung smartphones.

I cannot confirm about it working before, because tbh I don't remember the last time I had to connect my phone to my linux box. Yes, my S10 hasn't received any new update in the last year and a half, also the Xiaomi A1 phone has stopped receiving updates since 2020 more or less, and it still works.
Comment 14 Nate Graham 2025-03-04 15:57:56 UTC
Should be fixed by https://invent.kde.org/plasma/plasma-workspace/-/commit/4099d86f2b6e292684192b4f5649ca8dd4898709 in Plasma 6.3.3, authored by Kai Uwe Broulik.
Comment 15 epp 2025-03-14 13:36:44 UTC
openSUSE Tumbleweed updated Plasma to 6.3.3 and it still recognizes the Samsung as a Portable Media Player. Although 'Open in File Manager' will open Dolphin. 

Should this bug be reopened?
Comment 16 Rafael Linux User 2025-03-16 19:49:32 UTC
I can confirm still not fixed:
Operating System: openSUSE Tumbleweed 20241226
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.13.6-1-default (64-bit)
Graphics Platform: Wayland
Comment 17 Aether 2025-03-20 06:08:22 UTC
I can confirm the issue remains the same just tested again. Version 6.3.3 did not fix the issue.

Operating System: openSUSE Tumbleweed 20250317
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.6-1-default (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
Memory: 15.5 GiB of RAM
Graphics Processor 1: NVIDIA GeForce GTX 1060
Graphics Processor 2: Intel® UHD Graphics 6304
Comment 18 Rafael Linux User 2025-03-20 09:17:42 UTC
Latest update (just yesterday) and no changes about:
Operating System: openSUSE Tumbleweed 20250317
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.6-1-default (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-9700K CPU @ 3.60GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 2060/PCIe/SSE2
Manufacturer: HP

Dolphin simply doesn't show my Samsung S20 device as it did months before this issue
Comment 19 Aether 2025-06-30 20:10:32 UTC
I can confirm this bug has been fixed for me using following system: I think it can be closed?

Operating System: openSUSE Tumbleweed 20250627
KDE Plasma Version: 6.4.1
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.3-2-default (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor 1: NVIDIA GeForce GTX 1060
Graphics Processor 2: Intel® UHD Graphics 630
Manufacturer: Acer
Product Name: Predator PH315-51
System Version: V1.24
Comment 20 epp 2025-06-30 21:58:34 UTC
It's now working as expected. Thank you for fixing this bug. It can be closed.
Comment 21 Rafael Linux User 2025-07-02 08:09:29 UTC
Confirming bug fixed too. Again working as it should.
(In reply to epp from comment #20)
> It's now working as expected. Thank you for fixing this bug. It can be
> closed.

It's marked yet as "RESOLVED-FIXED", so don't worry about it more.