I need to run an adb forward
command before I could use the ezkeyboard application which allows user to type on the phone using browser.
When
If you don't want to edit PATH
variable, go to the platform-tools
directory where the SDK
is installed, and the command is there.
You can use it like this:
Go to the directory where you placed the SDK
:
cd /Users/mansour/Library/Developer/Android/sdk/platform-tools
Type the adb
command with ./
to use it from the current directory.
./adb tcpip 5555
./adb devices
./adb connect 192.168.XXX.XXX
In my case with Android Studio 1.1.0 path was this
/Users/wzbozon/Library/Android/sdk/platform-tools
Add the following to ~/.bash_profile
export PATH=~/Library/Android/sdk/tools:$PATH
export PATH=~/Library/Android/sdk/platform-tools:$PATH
if youd dont have adb in folder android-sdk-macosx/platform-tools/
you should install platform tools first. Run android-sdk-macosx/tools/android
and Install platform tools from Android SDK manager.
Is adb installed? To check, run the following command in Terminal:
~/Library/Android/sdk/platform-tools/adb
If that prints output, skip these following install steps and go straight to the final Terminal command I list:
Run the following command on your Mac and restart your Terminal session:
echo export "PATH=~/Library/Android/sdk/platform-tools:$PATH" >> ~/.bash_profile
Note: If you've switched to zsh, the above command should use .zshenv
rather than .bash_profile
This is the easiest way and will provide automatic updates.
install homebrew
ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install adb
brew cask install android-platform-tools
Start using adb
adb devices
I am using Mac 10.11.1 and using android studio 1.5, I have my adb "/Users/user-name/Library/Android/sdk/platform-tools"
Now edit you bash_profile
emacs ~/.bash_profile
Add this line to your bash_profile, and replace the user-name with your username
export PATH="$PATH:/Users/user-name/Library/Android/sdk/platform-tools"
save and close. Run this command to reload your bash_profile
source ~/.bash_profile