Get your OnePlus 5 to work with your Linux Mint laptop

Ensure you have the coorect software installed

sudo apt-get install libmtp-dev mtpfs

Before plugging in your device list your usb devices

lsusb

You should get output something like:-

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 174f:14e8 Syntek
Bus 001 Device 005: ID 045e:00db Microsoft Corp. Natural Ergonomic Keyboard 4000 V1.0
Bus 001 Device 004: ID 046d:c24e Logitech, Inc. G500s Laser Gaming Mouse
Bus 001 Device 003: ID 8087:0a2b Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Plug in your device and do it again

lsusb

Now find the extra line (device 10 in this example)

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 174f:14e8 Syntek
Bus 001 Device 005: ID 045e:00db Microsoft Corp. Natural Ergonomic Keyboard 4000 V1.0
Bus 001 Device 004: ID 046d:c24e Logitech, Inc. G500s Laser Gaming Mouse
Bus 001 Device 003: ID 8087:0a2b Intel Corp.
Bus 001 Device 010: ID 2a70:f003
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Use this data to update the definitions file

Bus 001 Device 010: ID 2a70:f003

Edit the file

sudo vi /lib/udev/rules.d/69-libmtp.rules

Add a line like

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

So in this example

# OnePlus 5
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"

Restart the usb device service

sudo service udev restart

Disconnect and reconnect your device and you are away.

Author: Andrew

1 thought on “Get your OnePlus 5 to work with your Linux Mint laptop

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.