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.
4 Answers
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!

- 51
- 1
- 2
-
1For 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
-
typo in touch .bahsrc – Carson Holzheimer May 26 '23 at 04:15
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
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
Go to My Computer-> Right click -> properties
C:\Users\PCNAME\AppData\Local\Android\Sdk\build-tools

- 5,404
- 2
- 26
- 39