How to connect a OnePlus Two device to Ubuntu via MTP?

advertisements

When I connect it to my ubuntu 14.04, I am only able to see the USB drivers for installing ADB.

There are a few solutions available for OnePlus One (See here) but I was not able to find one for OnePlus two.


After much tinkering, I found the solution -

You need the latest mtp drivers for OP2 -

$ sudo apt-get install libmtp-dev mtpfs

Now edit the following file -

$ sudo gedit /lib/udev/rules.d/69-libmtp.rules

adding this line

ATTR{idVendor}=="2a70", ATTR{idProduct}=="f003", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"

(The vendor id and product id can be got by using the "sudo mtp-detect" command)

now restart the service

sudo service udev restart

Your OP2 should be able to transfer files to your ubuntu PC now!

P.S - You will need to change the {idProduct} to whatever is specified by mtp-detect if you are not on the stock ROM/Kernel!