You are not logged in.

#1 2017-12-21 19:19:28

Szarik
Member
Registered: 2017-12-21
Posts: 5

[SOLVED] Smartphone wont connect via MTP

Hey everyone, I am troubleshooting an android smartphone (6.0) that will not show up in Thunar as USB mass storage.

When I run the output of

apt-cache policy gvfs-backends

I get:

  Installed: 1.22.2-1
  Candidate: 1.22.2-1
  Version table:
 *** 1.22.2-1 0
        500 http://cdn-fastly.deb.debian.org/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status

The problem seems to be that I cannot install libmtp-runtime, which I figured out checking this thread: [SOLVED]New phone wont connect as USB media device MTP

However, when I run:

sudo apt-get install libmtp-runtime

I get:

~$ sudo apt-get install libmtp-runtime 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libmtp-runtime : Depends: libmtp9 (= 1.1.8-1+b1) but 1.1.12-1~bpo8+1 is to be installed
E: Unable to correct problems, you have held broken packages.
user@debian:~$ sudo apt-get install libmtp-runtime 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libmtp-runtime : Depends: libmtp9 (= 1.1.8-1+b1) but 1.1.12-1~bpo8+1 is to be installed
E: Unable to correct problems, you have held broken packages.

At which point I am stuck, any ideas?

-Thanks!

Last edited by Head_on_a_Stick (2017-12-22 19:11:36)

Offline

#2 2017-12-21 19:24:52

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Smartphone wont connect via MTP

Can we please see the full output of

apt-cache policy

Thanks!

EDIT: actually, I think this should do it:

sudo apt install libmtp-runtime/jessie-backports

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#3 2017-12-21 19:39:59

Szarik
Member
Registered: 2017-12-21
Posts: 5

Re: [SOLVED] Smartphone wont connect via MTP

The output of apt-cache policy:

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://cdn-fastly.deb.debian.org/debian/ jessie-backports/non-free Translation-en
 500 http://cdn-fastly.deb.debian.org/debian/ jessie-backports/main Translation-en
 500 http://cdn-fastly.deb.debian.org/debian/ jessie-backports/contrib Translation-en
 100 http://cdn-fastly.deb.debian.org/debian/ jessie-backports/non-free amd64 Packages
     release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports,c=non-free
     origin cdn-fastly.deb.debian.org
 100 http://cdn-fastly.deb.debian.org/debian/ jessie-backports/contrib amd64 Packages
     release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports,c=contrib
     origin cdn-fastly.deb.debian.org
 100 http://cdn-fastly.deb.debian.org/debian/ jessie-backports/main amd64 Packages
     release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports,c=main
     origin cdn-fastly.deb.debian.org
 100 http://pkg.bunsenlabs.org/debian/ jessie-backports/main amd64 Packages
     release o=bunsenlabs,n=jessie-backports,l=bunsenlabs,c=main
     origin pkg.bunsenlabs.org
 500 http://pkg.bunsenlabs.org/debian/ bunsen-hydrogen/main amd64 Packages
     release o=bunsenlabs,n=bunsen-hydrogen,l=bunsenlabs,c=main
     origin pkg.bunsenlabs.org
 500 http://cdn-fastly.deb.debian.org/debian/ jessie-updates/non-free Translation-en
 500 http://cdn-fastly.deb.debian.org/debian/ jessie-updates/main Translation-en
 500 http://cdn-fastly.deb.debian.org/debian/ jessie-updates/contrib Translation-en
 500 http://cdn-fastly.deb.debian.org/debian/ jessie-updates/non-free amd64 Packages
     release o=Debian,a=oldstable-updates,n=jessie-updates,l=Debian,c=non-free
     origin cdn-fastly.deb.debian.org
 500 http://cdn-fastly.deb.debian.org/debian/ jessie-updates/contrib amd64 Packages
     release o=Debian,a=oldstable-updates,n=jessie-updates,l=Debian,c=contrib
     origin cdn-fastly.deb.debian.org
 500 http://cdn-fastly.deb.debian.org/debian/ jessie-updates/main amd64 Packages
     release o=Debian,a=oldstable-updates,n=jessie-updates,l=Debian,c=main
     origin cdn-fastly.deb.debian.org
 500 http://cdn-fastly.deb.debian.org/debian-security/ jessie/updates/non-free Translation-en
 500 http://cdn-fastly.deb.debian.org/debian-security/ jessie/updates/main Translation-en
 500 http://cdn-fastly.deb.debian.org/debian-security/ jessie/updates/contrib Translation-en
 500 http://cdn-fastly.deb.debian.org/debian-security/ jessie/updates/non-free amd64 Packages
     release v=8,o=Debian,a=oldstable,n=jessie,l=Debian-Security,c=non-free
     origin cdn-fastly.deb.debian.org
 500 http://cdn-fastly.deb.debian.org/debian-security/ jessie/updates/contrib amd64 Packages
     release v=8,o=Debian,a=oldstable,n=jessie,l=Debian-Security,c=contrib
     origin cdn-fastly.deb.debian.org
 500 http://cdn-fastly.deb.debian.org/debian-security/ jessie/updates/main amd64 Packages
     release v=8,o=Debian,a=oldstable,n=jessie,l=Debian-Security,c=main
     origin cdn-fastly.deb.debian.org
 500 http://cdn-fastly.deb.debian.org/debian/ jessie/non-free Translation-en
 500 http://cdn-fastly.deb.debian.org/debian/ jessie/main Translation-en
 500 http://cdn-fastly.deb.debian.org/debian/ jessie/contrib Translation-en
 500 http://cdn-fastly.deb.debian.org/debian/ jessie/non-free amd64 Packages
     release v=8.10,o=Debian,a=oldstable,n=jessie,l=Debian,c=non-free
     origin cdn-fastly.deb.debian.org
 500 http://cdn-fastly.deb.debian.org/debian/ jessie/contrib amd64 Packages
     release v=8.10,o=Debian,a=oldstable,n=jessie,l=Debian,c=contrib
     origin cdn-fastly.deb.debian.org
 500 http://cdn-fastly.deb.debian.org/debian/ jessie/main amd64 Packages
     release v=8.10,o=Debian,a=oldstable,n=jessie,l=Debian,c=main
     origin cdn-fastly.deb.debian.org
Pinned packages:

Running:

sudo apt install libmtp-runtime/jessie-backports

Did install the package, but after a reboot, the phone is still not showing up.

Offline

#4 2017-12-21 19:46:04

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Smartphone wont connect via MTP

Have you tried

sudo apt install -t jessie-backports mtp-tools libmtp-runtime

See also https://wiki.debian.org/mtp


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#5 2017-12-21 19:57:43

Szarik
Member
Registered: 2017-12-21
Posts: 5

Re: [SOLVED] Smartphone wont connect via MTP

After running the command it looks like both packages are installed, however still nothing from the phone after reboot.

Offline

#6 2017-12-21 20:15:16

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Smartphone wont connect via MTP

Perhaps relevant:

https://forums.bunsenlabs.org/viewtopic.php?id=4450

Something else I'm looking at for my new Android 8 phone:

https://github.com/whoozle/android-file-transfer-linux

If it works I'll package it up for Debian, Arch & Alpine but it may take a while.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#7 2017-12-21 20:24:27

Szarik
Member
Registered: 2017-12-21
Posts: 5

Re: [SOLVED] Smartphone wont connect via MTP

I got around the issue by using bluetooth to send the files to the phone. Will update if I find anything new. Thanks for the help!

Offline

#8 2017-12-22 03:03:03

garnet&gold
Member
Registered: 2017-12-22
Posts: 10

Re: [SOLVED] Smartphone wont connect via MTP

Maybe I am missing the issue, but I'm on a fresh install of BL and my android 8.1 connects without issue over usb.  I can transfer files, etc. through thunar.  You may need to toggle usb debugging on the phone.  Additionally, make sure you select file transfer from the notification drop down on the phone after connecting to usb.  The default selection is to charge the phone.  When you click on where it says "Android System -USB charging this device" it will give you a variety of options, select "transfer files" then go to your file manager of choice and proceed accordingly.

Last edited by garnet&gold (2017-12-22 03:35:21)

Offline

#9 2017-12-22 04:20:30

BLizgreat!
Resident Babbler - vll!
Registered: 2015-10-03
Posts: 1,217

Re: [SOLVED] Smartphone wont connect via MTP

If you have all the necessary packages installed on your gnu/Linux operating system, then may be time to look at the phones settings. Am no Android expert by any stretch but have had and played with enough of the suckers to know there are settings related to what to do when plugged in via usb. One such is charge only, another mtp etc.

Offline

#10 2017-12-22 11:05:59

D219
Member
Registered: 2017-02-23
Posts: 29

Re: [SOLVED] Smartphone wont connect via MTP

I had the same issue with my phone and BL Hydrogen, the problem for me was that the id of the device wasn't registered, what you can try is:

lsusb

You should see your device, for a Xperia XZ:

Bus 001 Device 006: ID 0fce:01e7 Sony Ericsson Mobile Communications AB 

0fce is the vendor id, and 01e7 is the model id, which you need to enter in the file /lib/udev/rules.d/69-libmtp.rules

Copy paste one of the lines, and fill in the vendor and model id:

ATTR{idVendor}=="0fce", ATTR{idProduct}=="01e7", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

Then restart the usb service:

sudo service udev restart

Now reactivate file sharing on your phone, and it should appear in Thunar smile

Did it after my last reinstallation, didn't had to install anything more than the base system. I don't remeber where I got that technique from, spent a week searching for it the first time. The principe was that the file you need to modify list the "known working device", and that the updated list containing mine was stuck in Testing, adding it manually was the path of least resistance, and I didn't had any issue in the few month I ve been using it.

Last edited by D219 (2017-12-22 11:09:11)

Offline

#11 2017-12-22 12:48:17

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Smartphone wont connect via MTP

@garnet&gold, that method does not work for me with Android 8.0 and BunsenLabs Helium-dev hmm

@D219, that works for me™ in BL-He-dev, thank you very much!

Scrot or it didn't happen:

2017-12-22-124502_1920x1080_scrot.th.png

Thanks again, I honestly didn't think this would be possible with such a new device smile

EDIT: to restart udev I called systemd directly:

sudo systemctl restart udev

But the old `service udev restart` syntax should also work.

Last edited by Head_on_a_Stick (2017-12-22 12:56:19)


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#12 2017-12-22 17:25:00

Szarik
Member
Registered: 2017-12-21
Posts: 5

Re: [SOLVED] Smartphone wont connect via MTP

Hey all,

Thanks for all the help.

Plugged the phone in today to charge it and it was detected by Thunar.

Not sure if it just needed a reset, or if it was the USB cord I was using yesterday, but it looks like Head_on_a_Stick's instructions worked.

Thanks again!

Offline

#13 2017-12-22 19:11:08

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Smartphone wont connect via MTP

Excellent news, thanks for reporting back.

I have added [SOLVED] to the thread title.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

Board footer

Powered by FluxBB