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.
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.
I made the following changes and One Plus two starts showing up in my adb devices list:
Go to your home directory and using any editor open the adb_usb.ini file. it is present under .android folder I used vim editor:
vim .android/adb_usb.ini
Add 0x2A70 text without any trailing spacees to the file as below:
**
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x2A70
**
Stop and start the server:
adb kill-server
adb start-server
Now check, device should show up: adb devices
Alex Joseph's answer above worked for me BUT I had to also install mtp-tools in order to have the mtp-detect command (otherwise I only got "command not found").
$ sudo apt-get install mtp-tools
After that I could see my OnePlus X, verify the vendor id and product id, and follow the rest of the steps. My Ubuntu system now sees both internal storage and SD card.
Install Android Debug Bridge and Media Transfer Protocol (MTP) library tools by.
sudo apt-get install adb install mtp-tools
Connect your OnePlus device, you should see a new volume with drivers. Run adb
script from there:
$ cd /media/$USER/20160907_1106261
$ bash adb_config_Linux_OSX.sh
android home is exist!
0x2a70
VID 0x2a70 is already configured..
adb should be OK!
Install android-file-transfer
package:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0BB4A1B2FA1A38EB
sudo add-apt-repository "deb http://ppa.launchpad.net/samoilov-lex/aftl-stable/ubuntu artful main"
sudo apt install android-file-transfer
Check your device connectivity by running mtp-detect
.
android-file-transfer
.See also: Device is already used by another process.
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
See: How can I access media on my OnePlus 5 with a Ubuntu OS?
After much tinkering, I found the solution -
You need the latest mtp drivers for OP2 -
Now edit the following file -
adding this line
(The vendor id and product id can be got by using the "sudo mtp-detect" command)
now restart the service
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!