Mac os环境配置安卓虚拟机.
安装:brew adb android-virtualBox等.
Homebrew是一款Mac OS上的软件包管理工具,自己电脑上有的话不需要重复安装
中国使用切换源的方式安装:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
.
国外正常按照官网的cmd安装:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
.
使用brew工具安装:
brew install --cask android-platform-tools
.
自然如果是卸载就是用uninstall
命令.
查看安装位置:
brew info --cask android-sdk
.
这里根据个人喜好下载安装安卓模拟器即可,例如夜神模拟器安装后可以默认安装VitualBox.
pip3 install --upgrade --pre uiautomator2
.
pip3 install pillow
.
python3 -m uiautomator2 init
.
pip3 install -U weditor
.
cd /Applications/LocalSetup/Nox\ App\ Player.app
.
adb connect 127.0.0.1:62001
显示connected就是ok.
如果报错显示:adb server version (32) doesn't match this client (41);killing ...
表示adb 5037端口被占用了.
macos: lsof -i:5037
查看占用5037进程的pid.
杀进程: kill -9 <pid num>