2

I have android studio installed on my Mac book pro. I am running ads devices. But its just not working. I get the error

Enochs-MBP:platform-tools enochfernandez$ adb devices
-bash: adb: command not found

I have installed the platform-tools in my path but still no success.

This is what I get for my echo PATH

Last login: Wed Jan  3 11:00:40 on ttys000
Enochs-MBP:~ enochfernandez$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Enochs-MBP:~ enochfernandez$ 
user3701188
  • 638
  • 3
  • 7
  • 23
  • 1
    `./adb devices` or it is not added to your PATH correctly – 0xDEADC0DE Jan 03 '18 at 10:13
  • your suggestion worked but is there a reason for this. Because I am in the platform folder already. – user3701188 Jan 03 '18 at 10:17
  • It indeed works because you're in the platform folder already. If you're working in a different folder, it doesn't work. Could you add the output of `echo $PATH` to your question. Perhaps that explains why your original attempt doesn't work – 0xDEADC0DE Jan 03 '18 at 10:25
  • I have added it to the question. How do I add it to my path because I have followed a lot of tutorials online but all to no avail – user3701188 Jan 03 '18 at 10:29
  • You could try `export PATH=PathToPlatformTools:$PATH`. This will only work for that terminal and as long as it is open. Please try it for now and let me know if it worked – 0xDEADC0DE Jan 03 '18 at 10:52
  • yeah it worked I am now able to run adb devices from the home page. But is there a way to add dir to paths in a window form just like in windows. I am coming from a windows background – user3701188 Jan 03 '18 at 11:10

1 Answers1

5

Go to your Library folder on your mac.

~/Library/Android/sdk/build-tools/VERSION/

ADB is part of your Android studio installation. It should be located in above path.

Rohan J Mohite
  • 2,283
  • 10
  • 19