4

I am using Git Bash on Windows 8. Whenever I type
$ adb devices
I get
bash: adb: command not found
I have already added the path to the PATH variable.

curieuse
  • 61
  • 1
  • 1
  • 5

4 Answers4

3

if you haven't solved the problem yet, try adding an alias to your adb.exe place yourself in the git $home folder

cd $home

if you haven't created the .bashrc file yet Execute

touch .bahsrc

thereupon

vi .bashrc

add the following line to the file

alias adb='/c/adb/platform-tools/adb.exe'

*note: this path is relative, it depends on where you unzipped the .zip from adb and save the changes made in vi with ESC then :wq!

Alexx19
  • 31
  • 2
  • For a standard AndroidStudio install on Windows: `alias adb='C:\\Users\\[username]\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe'` – Pedro Gonzalez Oct 25 '19 at 11:25
1

GitBash is a Terminal-Emulation software using CYGWIN. The ADB command is a Windows binary that is availabe in a Windows Command Prompt via PATH-variable.

Check this question: Git Bash doesn't see my PATH

Community
  • 1
  • 1
Erdinc Ay
  • 2,850
  • 4
  • 24
  • 39
0

It's works my windows machine. Run the following command on your windows bash profile terminal

echo export "PATH=~/AppData/Local/Android/Sdk/platform-tools:$PATH" >> ~/.bash_profile

Restart your Terminal session

source ~/.bash_profile
Shuva saha
  • 93
  • 1
  • 5
-1

Go to My Computer-> Right click -> properties

C:\Users\PCNAME\AppData\Local\Android\Sdk\build-tools

Chanaka Weerasinghe
  • 4,797
  • 2
  • 23
  • 35