/ 实用教程  

macOS 如何安装ADB

通过Homebrew

1
brew cask install android-platform-tools

通过Android Studio

打开SDK管理器

preferences -> System Settings -> Android SDK

找到

SDK Tools -> Android SDK Platform-Tools

配置环境变量

1
2
3
open ~/.bashrc
# 如果使用zsh
open ~/.zshrc
1
2
#adb
export PATH=$PATH:/Users/username/Library/Android/sdk/platform-tools

使配置生效

1
2
3
source ~/.bashrc
# or
source ~/.zshrc

安装完成

1
2
3
4
adb help
Android Debug Bridge version 1.0.41
Version 29.0.5-5949299
Installed as /Users/username/Library/Android/sdk/platform-tools/adb

unsplash-logoDaniel Korpai