Search

OnePlus One - Enable MTP under Ubuntu 14.04 LTS

Contents[Hide]

dropcap oneplusone ubuntu

If you plug your OnePlus One on a Ubuntu 14.04 LTS workstation while in MTP mode, you'll notice that you won't be able to access your phone filesystem.

But if you connect in PTP mode, no problem, everything works fine.

This comes from the fact that OnePlus One is not known as a MTP device under Ubuntu 14.04 LTS.

This small article explains how to declare your OnePlus One as a MTP device on your Ubuntu 14.04 LTS workstation to get a fully functional MTP access.

1. Main principle

When connected thru USB your OnePlus One is detected as a Qualcomm product :

Terminal
# lsusb
...
Bus 003 Device 032: ID 05c6:6764 Qualcomm, Inc.
...

It has following caracteristics :

  • Vendor ID : 05c6
  • Product ID : 6764 or 6765

To be fully accessible, any MTP device should have 2 rules declared to udev :

  1. First rule should allow Read/Write access to the device to any user belonging to plugdev group
  2. Second rule should force device handling thru libmtp

Once these 2 rules are properly declared, your OnePlus One will be detected as a standard MTP device.

2. Declare Qualcomm Vendor ID

To allow Read/Write access to the device to any user belonging to plugdev group,

Qualcomm USB Vendor ID should be declared under /etc/udev/rules.d/51-android.rules.

As Qualcomm vendor ID is 05c6, we should add the following line :

/etc/udev/rules.d/51-android.rules
...
# Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
...

Easiest way to do it is to retrieve a complete declaration file from my GitHub account.
This file includes Qualcomm among other vendor declarations.

Terminal
# sudo wget --header='Accept-Encoding:none' -O /etc/udev/rules.d/51-android.rules https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/android/51-android.rules
# sudo chmod a+r /etc/udev/rules.d/51-android.rules

3. Declare OnePlus One as a MTP device

As we've seen previously, when you connect your OnePlus One to your computer USB port, it is not detected as a MTP device.

To force detection, we need to add the following lines to /etc/udev/rules.d/69-mtp.rules. If this file doesn't exist, it should be created.

/etc/udev/rules.d/69-mtp.rules
...
# OnePlus One (normal & ADB mode)
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6764|6765", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
...

Easiest way to declare this file is to retrieve it from my GitHub account.
It also includes OnePlus One and some other device declarations.

Terminal
# sudo wget --header='Accept-Encoding:none' -O /etc/udev/rules.d/69-mtp.rules https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/android/69-mtp.rules
# sudo chmod a+r /etc/udev/rules.d/69-mtp.rules

4. Restart Udev & connect your phone

Last step is to restart udev daemon for the new rules to become operational.

Terminal
# sudo service udev restart
udev stop/waiting
udev start/running, process 18281

You can now connect your OnePlus One in MTP mode.

Here is what you should get :

oneplusone nautilus mtp

 

Hope it helps !

Signature Technoblog

This article is published "as is", without any warranty that it will work for your specific need.
If you think this article needs some complement, or simply if you think it saved you lots of time & trouble,
just let me know at This email address is being protected from spambots. You need JavaScript enabled to view it.. Cheers !

icon linux icon debian icon apache icon mysql icon php icon piwik icon googleplus