Mac电脑如何安装adb (安卓调试工具)

问题描述:

开发Android端的程序,需要在adb上调试运行,但是adb模拟器上运行的太慢(多人公用一台开发服务器,其上安装的adb 不稳定)。想在本地mac电脑上安装adb,然后用自己的手机作为调试工具,直接将开发的程序通过adb助手push到自己的手机上,然后在手机上调试运行,可以大大提高调试速度。

(1)mac上安装adb的方法:(通过终端安装)https://blog.csdn.net/soindy/article/details/71700745

#安装homebrew
ruby -e “$(curl –insecure -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”.
#使用homebrew安装adb
brew install Caskroom/cask/android-platform-tools

(2)如果brew install 安装软件太慢,需要更换homebrew为国内源:

homebrew换国内源:

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

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

brew update

(3)可能遇到的问题:RPC failed; curl 18 transfer closed with outstanding read data remain

解决方法:    git config --global http.postBuffer 524288000

 

之后手机以USB调试模式连接电脑(选择`传输文件`方式连接),在终端中输入adb devices就可以搜到这个手机设备

PS:小米手机的usb调试模式的进入方法:设置---我的设备----全部参数----多次连续点击MIUI版本这一项

你可能感兴趣的:(PaddlePaddle开发)