前言
常用的ADB命令可以參考我的另一篇文章
最常用的ADB命令和最詳細(xì)解析都在這里
流程
1.打開終端 Terminal;
2.查看HOME目錄,在終端輸入命令,“echo $HOME”;
WebbLindeMBP:~ webblin
HOME
/Users/webblin
3.創(chuàng)建 .bash_profile文件,在終端輸入命令,“touch .bash_profile”;
WebbLindeMBP:~ webblin$ touch .bash_profile
4.打開 .bash_profile文件,在終端輸入命令,“open - e .bash_profile”
WebbLindeMBP:~ webblin$ open -e .bash_profile
5.在打開的 .bash_profile文件添加下面內(nèi)容:
export PATH=${PATH}:/Users/你自己的用戶名/Library/Android/sdk/platform-tools

6.保存、推出;
7.在終端輸入命令,“source .bash_profile”
WebbLindeMBP:~ webblin$ source .bash_profile
8.在終端輸入命令“adb”提示 Android Debug Bridge version x.x.xx即可
WebbLindeMBP:~ webblin$ adb
Android Debug Bridge version 1.0.40
Version 4986621
Installed as /Users/webblin/Library/Android/sdk/platform-tools/adb