尝试过apowermirror,虽然注册会员后享受的功能还是比较齐全(算是良心软件),但是启动速度比较慢,而且android客户端需要安装app,比较不爽。youtube上找到一个脚本方案,采用的是scrcpy,测试下来速度很快,而且界面操作速度也比apowermirror要快很多。

Github地址:https://github.com/NylonDiamond/Android-Display

摘自作者安装方案:

?

I wrote this bash script to make it easier to mirror and control 1 or more android phones on your mac. I also made a video (https://youtu.be/bUe-wovw_1w) showing how to use the script.

Mac Steps:


  1. Run the install script ./Install-Requirements.sh in your terminal. If you already have Homebrew installed on your machine, Do NOT run the install-requirements script. Run brew install scrcpy and brew install android-platform-tools to install the dependencies. You can check if you have Homebrew installed by typing brew --version into the terminal. If you get a version back, you have it installed.
  2. Run ./show-phone.sh --setup and follow the setup process for up to 3 phones.
  3. Run ./show-phone.sh --wififor wireless mirroring or ./show-phone.sh --usb for wired mirroring.
  4. Enjoy

两个备注点:

备注1:安装brew

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

备注2:按照作者的方案中先安装依赖,scrcpy和adb platform-tools(如果已经安装了adb就可以不要安装这个)。安装依赖完成后,需要手动现在作者的source.zip文件,解压获得三个文件,其中一个是install-Requirements.sh,一个是show-phone.sh,后面的安装和使用都是利用这个show-iphone.sh脚本。

备注3:利用alfred的workflow可以建一个tp之类的快捷,后续添加一个terminal command。命令就是上面这个 show-phone.sh –usb,然后在命令回车添加一行,输入1(这个1是终端执行的时候需要选择连接的usb设备,因为只连接了一台设备所以就只输入了1)保存后就可以利用alfred来快速进入投屏。

备注4:wifi投屏可能需要预设置一些参数,首先在手机开发者选项中打开无线usb调试功能,获取无线调试的ip地址和端口号,然后打开show-iphone.sh文件,将这个地址:端口号复制到phoneip1=”192.168.1.2:33546″(ip地址端口为举例),保存。

然后终端输入 show-iphone –wifi就可以连接了。

备注5:在Scrcpy连接后发现鼠标键盘无法使用,可在手机的开发者选项中,把“USB调试(安全设置)允许通过USB调试修改权限或模拟点击”选项打开即可解决。?

?