On KDE Desktop edition of Tumbleweed here and I’m struggling with a very obnoxious issue with Dolphin. It seems that if a directory already exists on an Android device I am copying files to, it refuses to do anything. Just errors out! Instead, is there a way to get it to offer me a “merge” or “overwrite” option? Never had such a cripple file manager in my life. Maybe there is a better file manager to install?
The post is not very clear (keep in mind, no one can watch )
Let’s say the destination directory on Android is “bills”.
And “bills” is inside a directory named “documents”.
- Are you selecting /copying the “bills” directory on your TW machine, and then pasting “bills” into the “documents” directory (the parent dir)?
…
Or on the TW machine, are you inside the the bills directory, and you select all the files (then select copy), then paste into the “bills” directory on Android? - This one is important … “what” is the error text?? (verbatim please).
- One extra question … are the file systems comparable? And are the file and directory ownership(s) the same?
The “error message” should provide some clue as to the baseline issue.
Let’s say that I am copying files into /sdcard/Documents on the Android device (MTP). If I have the contents of the previous android device backup already on the TW machine and I go to copy it to the new Android device and a subdirectory already exists on the new android device (let’s say /sdcard/Documents/bills). If the /bills subdirectory already exists on the new andoid device I get a “Could not make folder” error and the entire file copy operation is aborted.
As far as the android file system goes, I am working entirely in the “user space” which does not require root access and I’m also working purely from my /home directory on the TW machine. Regardless of file system type on either device (TW Machine is BTRFS and Android I believe runs EXT4 by default) this should just work . Most certainly not a permissions issue.
We love to see evidence instead of conclusions.
So please show
ls -l
of the involved directories/files.
What the others already indicate: we don’t “believe”, we look at facts.
A thing to try would be to not copy the “bills” folder, but only its content, then paste that inside /sdcard/Documents/bills
.
Appreciate the detailed explanation - details help.
Too bad the error message is rather terse. But it’s understandable. If you were to execute an strace with Dolphin, you’d see what’s up. But we’re not gonna go there
Some of this is about understanding the MTP protocol and how it’s implemented on various Android devices (and other OSes).
Okay, personally, we never have an issue copying files back-n-forth between our Samsung S-series smartphones and our openSUSE laptop and desktop systems (we primarily use Leap, but TW is included).
We do the occasional copy via Discover (although rare) … but mostly use rsync for backing up (phone to laptop /etc).
Okay, here’s what to do.
- On your Android phone, go to the Play Store. Search for the “KDE Connect” app … install it.
- Be sure you have “kdeconnect” (might be “kdeconnect-cli”) on the Linux machine- if not installed, install it.
- On the Android, execute KDE Connect and it should see all your Linux machines enabled with kdeconnect. Select to PAIR
- On the Linux machine, respond to the Notification to Allow
Now Discover will work as you expect (as it does here).
.
EDIT: if you’re doing (which I doubt) a hard-core mount of the phone to Linux, that’s a different story.
Nothing in packages “might be”
knurpht@Lenovo-P16:~/bin> LANG=C zypper se kdeconnect
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
---+-------------------------------+--------------------------------------------+--------
i+ | kdeconnect-kde | Integration of Android with Linux desktops | package
i | kdeconnect-kde-lang | Translations for package kdeconnect-kde | package
i | kdeconnect-kde-zsh-completion | ZSH completion for kdeconnect-kde | package
knurpht@Lenovo-P16:~/bin>
Also, one needs to open the kdeconnect ports in the firewall
I’ve already got KDEConnect, but even with root access on a Pixel 7 Pro running A13 or A15 I cannot expose /Android/Data to make those transfers possible. A direct cable makes this easy and quick when connected to a USB port. I’ve also got Syncthing and Localsend but again those cannot access the files under /Android/Data even with “All Files Access”
Sadly Android tries to protect me from myself and each application has a user ID of its own and I do fight with that. However I’m experienced in those workarounds for the most part. As far as doing a hardcore mount to the phone I’d be curious how to do that. It seems it would work better if I could just mount it as a generic USB mass storage device since it is ext4 anyway.
Why are you not using adb?
adb pull … to retrieve files from the android device
adb push … to send files to the android device (this will overwrite existing data!)
adb --help … will give you more details
Beware you have to enable “USB debugging” on the android device.
(sidenote: sorry for the wordy response, but it’s best to over-explain sometimes )
Well, on my Android phone (Samsung S-Ultra, running Android), the directory path, “/Android/Data” does not exist. However, “/Android/data” does exist. Android (our version) uses ext4 filesystem, and so directory names and filenames are case-sensitive. (I’d be shocked if Samsung decided to change “Data” to “data”).
Anyway, personally, I (retired software engineer 40+ years) would never copy random files back-n-forth in the “/Android/data” path. That is an Android “operating system controlled” path, mostly containing low-level and high-level applications and settings. See my partial screenshot below … there are many more directories, but as you can see with the partial list, they are OS-based. The Android OS is the owner and controller of the content of that path.
Verified at an Android-tech resource:
Security and Privacy:
Starting with Android 11, access to the Android/data
folder has been restricted for security and privacy reasons. This means that apps, including file managers, are generally prevented from directly accessing the data of other applications stored within this folder. This measure aims to prevent unauthorized access to sensitive app data.
.
Our Android phone’s internal base path (partial) list of “/Android/data”, as seen using Dolphin: