11

I am trying to make my new phone (Oneplus One) work with Ubuntu 14.04, Dell Vostro 2520. Here is the output from /var/log/syslog..

 [  489.186871] usb 1-1.1: USB disconnect, device number 10
 [  498.708981] usb 2-1.2: new high-speed USB device number 4 using ehci-pci
 [  498.803568] usb 2-1.2: New USB device found, idVendor=05c6, idProduct=6764
 [  498.803575] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 [  498.803579] usb 2-1.2: Product: One
 [  498.803582] usb 2-1.2: Manufacturer: OnePlus
 [  498.803585] usb 2-1.2: SerialNumber: 482a54b2
 mtp-probe: checking bus 2, device 4: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2"
 mtp-probe: bus: 2, device: 4 was not an MTP device
1

5 Answers 5

13

Adding the following entries to /lib/udev/rules.d/69-libmtp.rules did the trick

ATTR{idVendor}=="05c6", ATTR{idProduct}=="6764", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6765", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"

I got this solution when I asked the same question in OnePlus forum

5
  • 2
    That OnePlus forum link only works if you're a registered user.
    – scruss
    Oct 20, 2014 at 15:05
  • Thist doesn't work for me, Ubuntu 14.10 Sony Xperia Z1 compact. Connection lost after update to 14.10
    – ramusus
    Nov 20, 2014 at 14:24
  • @ramusus: you would of course need the USB vendor and device IDs for your device. Run lsusb with your phone plugged in to find them out.
    – user149408
    Jun 1, 2015 at 13:23
  • Worked for me (OnePlus One). Strangely, I don't remember needing to do that on my other computer (both running Ubuntu MATE 14.10) – iirc it worked out of the box there.
    – user149408
    Jun 1, 2015 at 13:24
  • This is already included in Ubuntu 15.04, but I still have problems. I either see an empty directory; or endless MTP error messages and numerous opening Files instances.
    – user643722
    Jul 30, 2015 at 15:27
5

A good howto is available at the Ubuntu Wiki

In short this worked for me:

Connect your device per USB.

sudo apt-get install mtpfs mtp-tools 
sudo mtp-detect 

Cancel the last Command with CTRL+C if you got something like this:

Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.6

Listing raw device(s)
Device 0 (VID=1234 and PID=5678) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
   Found 1 device(s):
   1234:5678 @ bus 3, dev 10
Attempting to connect device(s)
Android device detected, assigning default bug flags

Look for the VID = idVendor and PID = idProduct and replace the numbers "1234" and "5678" in the following line:

sudo echo 'ATTR{idVendor}=="1234", ATTR{idProduct}=="5678", SYMLINK+="libmtp-%k", MODE="660", GROUP="disk", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"' >> /etc/udev/rules.d/69-libmtp.rules

Now disconnect and reconnect your device per USB and see if it works. Wish it would be easier.

1
  • This worked for me as well, on my Droid Turbo and Ubuntu 16.04. For some reason, when my Droid was upgraded to Marshmellow, MTP connections to my laptop stopped working. This fixed it.
    – romandas
    Jan 9, 2017 at 23:24
2

You might want to try to install the following

sudo apt-get install mtp-tools mtpfs

Also I have read that plugging it into a usb 3.0 (blue) port is better.

2
  • 1
    I tried all that before posting this.
    – Jayadevan
    Aug 3, 2014 at 6:45
  • While I had already installed the mtp libraries, plugging the oneplus into a 3.0 USB port worked, while 2.0 don't work!
    – chech
    Feb 27, 2015 at 22:33
0

Found that the blue usb 3.0 definitely works with my oneplus one on ubuntu 14.10 without installing anything extra. Didn't need mtp-tools.

0

I just add rules to skip my device by mtp-probe.
/lib/udev/rules.d/69-libmtp.rules

At the top of this file you can find:

# Some sensitive devices we surely don't wanna probe
ATTR{idVendor}=="0670", GOTO="libmtp_rules_end"
ATTR{idVendor}=="0471", ATTR{idProduct}=="083f", GOTO="libmtp_rules_end"

So I find my USB ID:

$ lsusb
Bus 002 Device 003: ID 05e3:0723 Genesys Logic, Inc. GL827L SD/MMC/MS Flash Card Reader
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 028: ID 093a:2516 Pixart Imaging, Inc. 
Bus 001 Device 003: ID 047f:c010 Plantronics, Inc. 
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

That is 093a:2516

and add next line into /lib/udev/rules.d/69-libmtp.rules file:

ATTR{idVendor}=="093a", ATTR{idProduct}=="2516", GOTO="libmtp_rules_end"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .