[Mac OS] Setting the adb path


Writing time : 2015-09-22 01:08:32

Setting the adb path

adb path setting test


If the path is not specified, an error occurs when the adb command is executed.

$adb -version  
-bash: adb: command not found  

How to set adb path


go to home directory

cd ~  

Check if there is a .bash_profile file that stores user's environment settings in the bash shell.

ls -l -a .bash_profile  

Create a new .bash_profile if it doesn't exist

touch -c .bash_profile  

Modify .bash_profile

open -e .bash_profile  

Add export statement to .bash_profile

export PATH=$PATH:/Users/username/Library/Android/sdk/platform-tools/  

In the export statement, you must enter the path where the adb file is located.

reload .bash_profile

source .bash_profile  

Test

$adb -version  
Android Debug Bridge version 1.0.32  

Reference URL


http://stackoverflow.com/questions/5526470/trying-to-add-adb-to-path-variable-osx

Previous post

Next post