Bug 472468 - Characters illegal for FAT32 and NTFS break transfer and connection to Android device
Summary: Characters illegal for FAT32 and NTFS break transfer and connection to Androi...
Status: RESOLVED UPSTREAM
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: MTP (show other bugs)
Version: 23.04.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-21 15:48 UTC by retired
Modified: 2023-08-01 00:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description retired 2023-07-21 15:48:57 UTC
As you all are aware FAT32 and NTFS doesn't allow certain characters in filenames. Unfortunately in recent versions of Android Google decided to go with compatibility over what makes sense to "powerusers". There's a custom FUSE layer over EXT4 on Android, and recently a change was made to disallow extra characters in filenames, probably to make Windows users happy.

So in short:
1. Try to copy a file over MTP to an Android 13 device. Say, filename contains ":" or "colon" if you will.
2. Copy job times out when encountering offending file.
3. After about 30 seconds I get a dialog asking to retry, but MTP breaks.
4. "Skip" option is not doing anything, it times out like on step 2, only "Cancel" option does its job. Browsing of MTP device is broken and it needs to be reconnected to recover.


Can we fail without breaking connection? Ideally KIO would detect what the problem is and propose a filename change.

21/07/2023 16:40	kernel	usb 6-2: new SuperSpeed USB device number 9 using xhci_hcd
21/07/2023 16:40	kernel	usb 6-2: New USB device found, idVendor=18d1, idProduct=4ee1, bcdDevice= 4.40
21/07/2023 16:40	kernel	usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
21/07/2023 16:40	kernel	usb 6-2: Product: Pixel 4a
21/07/2023 16:40	kernel	usb 6-2: Manufacturer: Google
21/07/2023 16:40	kernel	usb 6-2: SerialNumber: Redacted
21/07/2023 16:40	dolphin	16:40:04.878 INFO  DeviceManager:449                Device added: "mtp://Google_Pixel_4a_12021JEC201128/" QList("mtp://Google_Pixel_4a_12021JEC201128/")

Snippet from logs:
21/07/2023 16:41	org.kde.kmtpd5	Error 2: PTP Layer error 02ff: LIBMTP_Send_File_From_File_Descriptor(): Could not send object.
21/07/2023 16:41	org.kde.kmtpd5	Error 2: Error 02ff: PTP I/O Error


It's part a bug report because of MTP connection breaking, and a wishlist item for filename correction logic.
Comment 1 Harald Sitter 2023-08-01 00:16:18 UTC
https://github.com/libmtp/libmtp/issues/71