You are not logged in.
Ever since I had an Android phone, I used to cp some mp3 files onto it.
I just bought a new one by Samsung last week.
Unfortunately, I am unable to copy any file to it.
Here is what I tried:
$ touch testfornewphone.txt
$ cp testfornewphone.txt /run/user/1000/gvfs/mtp\:host\=SAMSUNG_SAMSUNG_Android_RFCAABBAABB/Interner\ Speicher/Download/
cp: reguläre Datei '/run/user/1000/gvfs/mtp:host=SAMSUNG_SAMSUNG_Android_RFCAABBAABB/Interner Speicher/Download/testfornewphone.txt' kann nicht angelegt werden: Die Operation wird nicht unterstützt
$ cp -f testfornewphone.txt /run/user/1000/gvfs/mtp\:host\=SAMSUNG_SAMSUNG_Android_RFCAABBAABB/Interner\ Speicher/Download/
cp: reguläre Datei '/run/user/1000/gvfs/mtp:host=SAMSUNG_SAMSUNG_Android_RFCAABBAABB/Interner Speicher/Download/testfornewphone.txt' kann nicht angelegt werden: Die Operation wird nicht unterstützt
$ sudo cp -f testfornewphone.txt /run/user/1000/gvfs/mtp\:host\=SAMSUNG_SAMSUNG_Android_RFCAABBAABB/Interner\ Speicher/Download/
[sudo] Passwort für john:
cp: der Aufruf von stat für '/run/user/1000/gvfs/mtp:host=SAMSUNG_SAMSUNG_Android_RFCAABBAABB/Interner Speicher/Download/' ist nicht möglich: Keine BerechtigungRegarding the connection:
USB-mode is set to "file transfer/Android Auto"
mode set to either "MIDI" or "Transfer of Pictures" did not help
tried it with USB-Debugging activated and deactivated - no different outcome
Some basic info:
$ uname -r
6.9.6-arch1-1
$ pacman -Q thunar
thunar 4.18.10-2
$ pacman -Q gvfs
gvfs 1.54.2-1
$ pacman -Q gvfs-mtp
gvfs-mtp 1.54.2-1Copying files via CTRC+C/CTRL+V in Xfce's Thunar works great though.
Did I overlook anything?
Can I try something else?
Last edited by jones (2024-08-03 10:42:17)
Offline
stat /run/user/1000/gvfs/mtp:host=SAMSUNG_SAMSUNG_Android_RFCAABBAABB/Interner\ Speicher/Download/Also out of what context do you try this? GUI terminal in the same session where thunar is running?
You're operating on a gvfs pseudo-fs for mtp, if you want to mount mtp devices in a more generic way, try https://aur.archlinux.org/packages/simple-mtpfs
Offline
Thanks, seth.
stat /run/user/1000/gvfs/mtp:host=SAMSUNG_SAMSUNG_Android_RFCAABBAABB/Interner\ Speicher/Download/Also out of what context do you try this? GUI terminal in the same session where thunar is running?
Yes, I am. It's xfce4-terminal in the same login session.
It worked this way with the last 2 phones I had.
You're operating on a gvfs pseudo-fs for mtp, if you want to mount mtp devices in a more generic way, try https://aur.archlinux.org/packages/simple-mtpfs
Although there is a good man file available and the wiki page for MTP features it, cp-ing a file still does not work.
Unfortunately, using that command yields
LIBMTP PANIC: Trying to dump the error stack of a NULL device!Googling for that lead to more details and possible approaches on https://github.com/phatina/simple-mtpfs/issues/48. One workaround for one poster on there was to add his user to the plugdev group which, as I've just read, is considered "bad" practice, see https://wiki.archlinux.org/title/Udev#A … se_devices.
Also, I just discovered on https://wiki.archlinux.org/title/Media_ … l#gvfs-mtp (see very last box):
Note: If you getting limited access to the device and cannot use standard commands from command line such as e.g. cp,ls then look for gvfs own alternatives, ls -1 /usr/bin/gvfs-*.
A (small) related part to this is in the aforementioned thread on github, i.e., gvfs-mount.
I can only say, I do not find any gvfs-* commands.
Hm. Feeling stuck, despite all the googling and reading.
Last edited by jones (2024-06-30 21:12:45)
Offline
Did you mount the phone w/ simple-mtpfs *instead* of gvfs?
mtp sucks, bigly.
gvfs exposes its protocol through another pseudo-filesystem, stacking the two is like juggling razor blades and andecdotally, simple-mtpfs is the only mtpfs implementation I tried that didn't make me yell and curse…
Offline
This does not answer the question, but I have pretty much given up on the native solutions. They are too limited by design.
I find myself using KDE Connect most often. I also like the X-plore file manager application. https://play.google.com/store/apps/deta … n_US&pli=1
it allows me to use sftp to my server. I also often use adb bridge (https://developer.android.com/tools/adb)
Last edited by ewaller (2024-06-30 21:38:56)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Did you mount the phone w/ simple-mtpfs *instead* of gvfs?
Oops no.
For future and general information, it worked when the phone was connected via USB but not yet fully available (for the lack of a better term), so its symbol still greyed out. Then it was pretty simple with the command listed in the wiki entry:
simple-mtpfs --device 1 ~/mntJesus Christ. Using simple-mtpfs took like ages and did not work after all:
23:23 john@mylaptop [~] $ cd mnt
23:23 john@mylaptop [mnt] $ cd Download/
23:24 john@mylaptop [Download] $ cp ~/testfornewphone.txt .
cp: reguläre Datei './testfornewphone.txt' kann nicht angelegt werden: Das Argument ist ungültig
23:25 john@mylaptop [Download] $ sudo cp ~/testfornewphone.txt .
[sudo] Passwort für john:
cp: der Aufruf von stat für './testfornewphone.txt' ist nicht möglich: Keine Berechtigung
23:28 john@mylaptop [Download] $ sudo cp ~/testfornewphone.txt .
cp: der Aufruf von stat für './testfornewphone.txt' ist nicht möglich: Keine Berechtigung
23:28 john@mylaptop [Download] $ The first sudo attempt was with a locked screen. To make sure that the locked phone wasn't the culprit.
@ewaller
I see, thanks.
You linked the X-plore file manager app twice, btw.
Samsung really must have implemented something else. Everything was fine with the Pixel phones. ![]()
Offline
You linked the X-plore file manager app twice, btw.
Fixed. Thanks
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
stat mnt/Download
mount | grep mntReading data from the phone works fine regardless of the mtp implementation?
Offline
What _exactly_ do you mean by reading data? ![]()
Also:
$ stat ~/mnt/Download/
Datei: /home/john/mnt/Download/
Größe: 0 Blöcke: 0 EA Block: 4096 Verzeichnis
Gerät: 0/79 Inode: 7 Verknüpfungen: 2
Zugriff: (0775/drwxrwxr-x) Uid: ( 1000/ john) Gid: ( 985/ users)
Zugriff: 1970-01-01 01:00:00.000000000 +0100
Modifiziert: 2024-06-28 11:27:29.000000000 +0200
Geändert: 1970-01-01 01:00:00.000000000 +0100
Geburt: -
$ mount | grep mnt
simple-mtpfs on /home/john/mnt type fuse.simple-mtpfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=985)Last edited by jones (2024-06-30 22:01:23)
Offline
Copy from the phone to the computer.
The mount looks ok ![]()
Offline
Ok, thanks.
Copying files, will try.
Thunar is practically not working right now. "Slowed down to a halt" is a more apt description...
ls-ing in the terminal also does not work. But I can cd into my folders in home.
Ok it crashed now. Well.
I had to switch USB modes on the phone to get Thunar running again.
With simple-mtpfs: I do not seem to be able to copy anything from it onto my computer and I do not see files in, e.g., Downloads or DCIM/Screenshots on the phone.
With the usual gvfs-mtp-way of accessing the phone (clicking on "Android Phone" in the left panel in Thunar), I can see the files and copy a file from phone to computer.
Last edited by jones (2024-07-01 20:41:29)
Offline
Keep using gvfs-mtp or don't use mtp at all (again: BIGLY) - se ewallers post.
The gfvs-* stuff was replaced w/ the gio binary (try "gio copy" but you'll have to use the protocol URI like in the thunar location bar) around a decade ago, I guess someone needs to update the wiki ![]()
(So please confirm whether that works)
Offline
Oh. It works now (in a way)!
So I accessed the phone via Thunar's panel, then double clicking on "Internal Storage", then I clicked on a random folder and hit F4 to open xfce4-terminal there, then:
$ cd Download/
$ gio copy ~/testfornewphone.txt .
$ ls -l testfornewphone.txt
-rw------- 1 john users 0 1. Jul 22:42 testfornewphone.txtSo gio copy actually works.
There does not seem to be an option like -n for cp so it will overwrite any existing files... but that's ok I guess. Better than no copy progress at all, but still not great.
Offline