Score:2

Can't connect Pixel 4

ru flag

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

Nmath avatar
ng flag
can you think of any changes that were made to the system since it last worked? kernel or software updates, new software installed, etc?
ru flag
Updates were installed. I don't really pay attention to the details. I just click OK and let it do its thing.
Nmath avatar
ng flag
You might consider posting your [apt logs](https://askubuntu.com/questions/425809/where-are-the-logs-for-apt-get). If it is a very large output, you can use https://paste.ubuntu.com
ru flag
Done, I think. This is a first so I hope it turned out right.
Nmath avatar
ng flag
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.
waltinator avatar
it flag
Watch `sudo journalctl --follow` as you plug in the phone.
ru flag
Results of the in pastebin
Zatigem avatar
ru flag
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".
ru flag
There is no `/tmp/dev`. Do I just create this directory at the command line?
Score:2
it flag

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.

ru flag
Thanks for your response. Trying your suggestion. See edit in question.
it flag
I had same problem with Fedora 35. It turns out my user was not in `users` group. This answer helped me to solve the problem.
Score:0
ru flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.