欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

2021年3月2日更新:让Mac安装homebrew和adb变得轻松快捷,告别漫长等待时间

最编程 2024-07-27 17:18:55
...

给电脑安装adb,参考了一些网络文章,发现大多使用了国外资源下载,速度慢的受不鸟。总结下快速安装的方法。

下文引用部分,是在Mac-终端中运行的命令。

1、安装Homebrew,使用中科大镜像。(已安装的可忽略)

/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)"

该脚本内置中科大镜像,速度较快;

2、替换 brew 程序本身的源,使用清华的源;

git-C"$(brew--repo)"remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

更换上游后需重新设置 git 仓库 HEAD:

brew update-reset

3、安装adb

brew install android-platform-tools

运行adb

adb devices


参考文档:

https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/

https://blog.****.net/m0_46197393/article/details/106752367