I have a Google Pixel 5 that recently updated to Android 12.
Since then, it has not been able to connect to my Debian 11 Linux desktop to transfer files in the usual way.
The "usual way" is, I have USB debugging enabled, connect the device to the computer by USB, select "Use USB for" -> "File Transfer" in the USB Preferences dialog that's available from the notifications. Then on the linux desktop, I do jmtpfs
and transfer files. (This is a command-line operation.)
This is no longer working. The jmtpfs
invocation reports:
$ jmptfs /mnt/android
Device 0 (VID=18d1 and PID=4ee2) is a Google Inc Nexus/Pixel (MTP+ADB).
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
terminate called after throwing an instance of 'MtpErrorCantOpenDevice'
what(): Can't open device
Aborted
If I change the selection away from "File Transfer / Android Auto" in the USB prefs, I just get No mtp devices found
.
I also have an mtp-detect
tool, which reports the same error:
$ mtp-detect
libmtp version: 1.1.17
Listing raw device(s)
Device 0 (VID=18d1 and PID=4ee2) is a Google Inc Nexus/Pixel (MTP+ADB).
Found 1 device(s):
Google Inc: Nexus/Pixel (MTP+ADB) (18d1:4ee2) @ bus 2, dev 92
Attempting to connect device(s)
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
Unable to open raw device 0
I can use the adb
tool. adb devices
reports the device ID and "device", and adb pull /path/to/file destination
works, so it is still possible to do the file operations I want to do, but I'm mystified by the change in behavior.
This activity is kind of irregular, so I can't prove it was the Android 12 update that caused it, there have also been routine package updates on the desktop, but the Android update seems like the logical suspect, given that Debian package updates rarely cause breakage.
The fact that adb works suggests the fundamentals (hardware, cables, device detection, Linux drivers) are probably OK.
Maybe some kind of extra layer of MTP permissions in Android 12? A change in the MTP protocol that's gotten ahead of the Linux command-line tools?
Any help greatly appreciated.
Android build is #SP2A.220505.002.
jmtpfs
is the Debian-11 packaged version, and reports:
$ jmtpfs --version
jmtpfs version: 0.5
FUSE library version: 2.9.9
fusermount3 version: 3.10.3
using FUSE kernel interface version 7.19
mtp-detect
is from the Debian-11 mtp-tools
package, version 1.1.17-3.
adb pull
andadb push
is working for you I'm confident so will adbfs. (if that is a suitable solution for you just let me know and I expand it to an answer – or wait, I already did that here and here)./usr/libexec/gvfs-mtp-volume-monitor
process, and sure enough, when you turn on file-transfer on the phone, a directory appears under/run/user/<my-uid>/gvfs/mtp:host=Google_Pixel_5_<phone_id>
. This is also new-to-me behavior, but good to find!