4

I have a Google Pixel 4 phone. It used to mount no problem. Plug in the USB and Select File transfer/Android Auto on the phone and it would show up in Dolphin. This no longer happens. Now I plug in the phone and a greyed out Pixel 4 icon appears on the desktop. On the phone I select File transfer/Android Auto and that icon disappears and theb reappears.

I right click on the icon and select Mount Volume and sometimes it will mount but I can't see the filesystem on the phone:

Mount

Sometimes it doesn't mount at all.

Failed

I've tried different USB ports and cable.
lsusb does not show the phone
Developer Options > USB Debugging is on
Android Version 11
I removed and reinstalled Dolphin.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:   focal

How can I fix this?

Edit: term.log
https://paste.ubuntu.com/p/RsKt5hRm7X/

Edit 2: Trying suggestion by @waltinator:

$ device="/dev/pixel4"  
$ sudo adduser $USER $(stat -c "%G" $device)  
stat: cannot stat '/dev/pixel4': No such file or directory  
[sudo] password for allelopath:   
adduser: The user `allelopath' already exists.

Edit 3:

sudo journalctl --follow a

https://paste.ubuntu.com/p/vTFVy6JPW3/

Edit: mtp into

$ mtp-detect
libmtp version: 1.1.17

Listing raw device(s)
Device 0 (VID=18d1 and PID=4ee1) is a Google Inc Nexus/Pixel (MTP). Found 1 device(s):
Google Inc: Nexus/Pixel (MTP) (18d1:4ee1) @ bus 3, dev 25
Attempting to connect device(s)
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
Unable to open raw device 0
OK.

$ mtp-connect
libmtp version: 1.1.17

Device 0 (VID=18d1 and PID=4ee1) is a Google Inc Nexus/Pixel (MTP). error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
No devices.

$ mtp-folders
Attempting to connect device(s)
Device 0 (VID=18d1 and PID=4ee1) is a Google Inc Nexus/Pixel (MTP). mtp-folders: Successfully connected
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
Unable to open raw device 0
OK.

$ jmtpfs
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
fuse: missing mountpoint parameter

  • 1
    can you think of any changes that were made to the system since it last worked? kernel or software updates, new software installed, etc? – Nmath Jul 11 '21 at 02:13
  • Updates were installed. I don't really pay attention to the details. I just click OK and let it do its thing. – Al Lelopath Jul 11 '21 at 02:16
  • 1
    You might consider posting your apt logs. If it is a very large output, you can use https://paste.ubuntu.com – Nmath Jul 11 '21 at 02:22
  • Done, I think. This is a first so I hope it turned out right. – Al Lelopath Jul 11 '21 at 02:25
  • nothing stands out to me in the logs, but keep them up because it could be helpful in case someone else might recognize something that could have affected your ability to mount your device. – Nmath Jul 11 '21 at 02:34
  • 1
    Watch sudo journalctl --follow as you plug in the phone. – waltinator Jul 11 '21 at 02:37
  • Results of the in pastebin – Al Lelopath Jul 11 '21 at 02:52
  • To get the port of your pixel 4 in the /dev directory ("whatever" in @waltinator’s answer) : 1) Unplug your phone, 2) cd /tmp, 3) ls /dev > unplugged, 4) Plug your phone, 5) ls /dev > plugged, 6) diff unplugged plugged. Mine is "libmtp-1-2". – Zatigem Jul 11 '21 at 19:15
  • There is no /tmp/dev. Do I just create this directory at the command line? – Al Lelopath Jul 11 '21 at 20:11

2 Answers2

2

Many device access problems can be resolved through group membership changes.

Specifically, if ls -l shows that the group permissions (the second "rwx" triplet) is "rw" (e.g."-rw-rw----"), then, adding oneself to the group that owns the device will grant rw access.

Here's how:

device="/dev/whatever"
sudo adduser $USER $(stat -c "%G" $device)

This allows you membership in the group that can rw the device, but there is one more step.

To make all your processes members of the new group, logout and login. Group memberships are set up at login time.

To create a single process in the new group (for testing, prior to logout/login):

newgrp $(stat -c "%G" $device)  

or, just type the group name. See man newgrp.

waltinator
  • 36,399
1

https://faquirfoysol.blogspot.com/2020/02/quick-hacks-transferring-file-between.html

Use the commandline tool jmtpfs, that uses file system in userspace (FUSE), is enough to serve my purposes.

After installing the package, as per the package manager of your distro, let’s make a directory into the preferred location --- in my case the /media. Now issue the following commands

$ sudo mkdir -pv /media/android_device  
$ sudo chown $USER:$USER /media/android_device/ -vv

Now check the file owner permission issuing

 $ ls /media/android_device/ -la

Now add the android device using data cable. Unlock the screen and enable transfer files or MTP option. Now issue the command

$ jmtpfs /media/android_device/

Now go to your file manager and check for the mount point. From here you can browse and transfer files between the workstation and the android device using file browser and commandline.