Option 1 - Using Homebrew
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 install android-platform-tools -
Start using adb
adb devices
Option 2 - Manually
-
Delete your old installation (optional)
rm -rf ~/.android-sdk-macosx/ -
Download the Mac SDK Tools from the Android developer site under "SDK Tools Only"
-
Go to your Downloads folder
cd ~/Downloads/ -
Unzip the tools you downloaded
unzip android-sdk*.zip -
Move them somewhere you won't accidentally delete them
mv android-sdk-macosx/ ~/.android-sdk-macosx -
Run the SDK Manager
sh ~/.android-sdk-macosx/tools/android -
Uncheck everything but
Android SDK Platform-tools(optional) -
Click
Install Packages, accept licenses, clickInstall. Close the SDK Manager window. -
Add
platform-toolsto your pathecho 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile -
Refresh your bash profile (or restart your terminal app)
source ~/.bash_profile -
Start using adb
adb devices
from :http://stackoverflow.com/questions/31374085/installing-adb-on-mac-os-x
浙公网安备 33010602011771号