10

My Android Studio (1.3.2) is not recognising my phone "OnePlus Two"

I am having Mac (OS x Yosemite 10.10.5) with latest Android SDK.

Update 1: The file transfer software installed on my mac "Android File Transfer" is able to recognise the phone as soon as I connect phone to mac.

Update 2: While trying to look for all connected device through terminal, I even don't see my device their by executing command adb devices

Update 3: I do tried killing adb and starting again but that too didn't work.

PS: I have enabled USB debugging on the Developer Option

Cœur
  • 37,241
  • 25
  • 195
  • 267
Irfan Raza
  • 2,859
  • 1
  • 22
  • 29

1 Answers1

21

Got answer of my question on OnePlus2 Forum. Sharing the same here to help other users.

To solve this we need to run a script on Mac or Linux based system.

  1. Enable debugging mode on your OP2 (OnePlus2)
  2. Connect to your Mac or linux based PC
  3. You will see a drive on your finder with the name "One Plus Drivers"
  4. There you will see one file with the name "Op2_adb_config_Linux_OSX.sh"
  5. Copy this file to your documents folder
  6. Open terminal and execute the above file (sh Op2_adb_config_Linux_OSX.sh)
  7. It will perform necessary steps on your system and then your OP2 will be recognised by Android Studio.
Moslem Ben Dhaou
  • 6,897
  • 8
  • 62
  • 93
Irfan Raza
  • 2,859
  • 1
  • 22
  • 29
  • 1
    Works like a charm! Thanks! – praxmon Sep 24 '15 at 04:33
  • Please upvote and mark the ans as correct to help this question to be find easily for others – Irfan Raza Sep 27 '15 at 19:16
  • 1
    what this does is adding a line into ~/.android/adb_usb.ini with the vendor id 0x2a70. For me it still does not work, even doing that the device is not found. – Daniele Segato Dec 04 '15 at 08:52
  • @DanieleSegato , I don't see any need changing the line which you are talking about. Just execute that file from your terminal and it would work. Or please explain in detail the steps you followed. – Irfan Raza Jan 12 '16 at 21:55
  • the problem for me was a PEBKAC of course :) I was absolutely sure of having enabled USB debugging on the phone... of course I didn't. Still the adb_usb.ini shouldn't be manually edited according to a comment in that file. But I found no other way. – Daniele Segato Jan 13 '16 at 10:52
  • First thing I am still not clear what you are talking about. So please answer following question to make me understand in detail: 1. Are you on Mac? 2. Are you able to your phone on Mac as a drive? 3. Are you able to see the file named : Op2_adb_config_Linux_OSX.sh or something like this? – Irfan Raza Jan 13 '16 at 22:20
  • @IrfanRaza PEBKAC = Problem Exist Between Keyboard And Chair. Which means it was my fault (forgot to enable USB debugging but was sure I did it, ups). So now it's working fine. In the other part of my previous comment I say that adb_usb.ini shouldn't be manually edited and the script you suggest to execute edit that file even if you are not supposed to. This is the header of that ini file on my system: "ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT. USE 'android update adb' TO GENERATE." -- I couldn't find any documentation on what's the proper way of adding a device to that list. – Daniele Segato Feb 17 '16 at 10:49
  • Now I understood your point about ini file. Anyway I am pleased that its now working for you as well by enabling usb debugging. :) – Irfan Raza Feb 18 '16 at 01:18
  • 1
    Brilliant answer! Works for OP X as well! – sud007 Jun 14 '16 at 09:09
  • 1
    The solution does not seem to work with newer versions of Android on OP devices? The script is not contained in the exported USB device any longer (could only find a Windows exe there). However, adding the serial number to ~/.android/adb_usb.ini on OSX as described in https://forums.oneplus.net/threads/solution-oneplus-2-not-showing-in-adb-but-shows-in-fastboot.380253/ solves the problem: `echo 0x2A70 >> $HOME/.android/adb_usb.ini && adb kill-server && adb start-server` – Gerd Aschemann Jan 05 '17 at 10:12