前提:已經安裝 brew
1. 設定 HOMEBREW_BOTTLE_DOMAIN(不設定的時候 ,會遇到報錯 Bottle missing, falling back to the default domain..)
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile source ~/.bash_profile
2. 設定中科大鏡像源
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
3.更新brew
brew update -verbose
4.安裝
brew install scrcpy
5.安裝android相關
brew install android-platform-tools
6.手機開啟開發者模式,USB調試,連接電腦
7.運行
scrcpy
就可以看到手機的頁面在電腦上顯示了
推薦閱讀相關地址:
https://github.com/Genymobile/scrcpy
https://github.com/Genymobile/scrcpy#translations
https://github.com/Genymobile/scrcpy/issues/2247
http://mirrors.ustc.edu.cn/help/homebrew-bottles.html