You are not logged in.
I have a Pixel 6a running the latest GrapheneOS version with an up to date Arch Linux. I want to connect the phone via USB and use the MTP to transfer files back and forth. Since libmtp is already installed, and I want to keep my system clean and minimal, I prefer to stay with this simple CLI solution to pull and push files.
After having plugged the phone, a mtp-detect or mtp-connect works. However, if I try a second time, I got this error and the command hangs:
libmtp version: 1.1.20
Device 0 (VID=18d1 and PID=4ee1) is a Google Inc Nexus/Pixel (MTP).
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset deviceI have to either manually unplug and plug again the USB cable, or deactivate and activate again the File Transfer option on the phone.
Also, I think I already have the appropriate udev rules with the android-udev package since I successfully installed GrapheneOS from Arch.
Simplicity is the ultimate sophistication. — Leonardo da Vinci (1452–1519)
Offline
Sanity check:
- Do you have an issues with ADBoverUSB? Does it always work properly?
- Is the USB cable good?
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
Do you have an issues with ADBoverUSB? Does it always work properly?
I do not wish to enable ADB as it increases the attack surface and kind of defeat the purpose of the GrapheneOS security model.
Is the USB cable good?
It is brand new, and seems to be shielded. I did not have any issue to flash the phone and install the custom OS with this one. Also, I tried all the USB ports of my computer with the same result.
Simplicity is the ultimate sophistication. — Leonardo da Vinci (1452–1519)
Offline
I found a workaround for now: replacing libmtp with android-file-transfer. It provides also a simple CLI.
However, this does not fix the problem with libmtp though.
Simplicity is the ultimate sophistication. — Leonardo da Vinci (1452–1519)
Offline
At some point maaaany years ago I gave up and switched to https://aur.archlinux.org/packages/simple-mtpfs and never looked back.
MTP is a shit protocol and every implementation beyond "connect - transfer data - disconnect" is "broken" (to some extent)
You'll not "solve" the problem w/ libmtp since this problem exists for more that decade (ie. "ever") - this is why all those minimalistic fuse implementations exist.
Online
MTP is a shit protocol and every implementation beyond "connect - transfer data - disconnect" is "broken" (to some extent)
Only on Windows I can rename, move, delete files and folders inside my Android Phone, sadly Linux can't... ![]()
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
"linux" can't because this mess isn't in the kernel.
I'm pretty sure that simple-mtpfs mounts can, because I've never encountered a device where it failed (unlike libmtp, which implements the other MTP nonsense)
Online
At some point maaaany years ago I gave up and switched to https://aur.archlinux.org/packages/simple-mtpfs and never looked back.
MTP is a shit protocol and every implementation beyond "connect - transfer data - disconnect" is "broken" (to some extent)
You'll not "solve" the problem w/ libmtp since this problem exists for more that decade (ie. "ever") - this is why all those minimalistic fuse implementations exist.
Thank you for the insight. Then, it explains why android-file-transfer works seamlessly.
Simplicity is the ultimate sophistication. — Leonardo da Vinci (1452–1519)
Offline
"linux" can't because this mess isn't in the kernel
Oh... All of MTP is via an UserSpace layer then? Damn... I miss old times when Android exposed directly Internal Storage... ![]()
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline