起初网上的资料是
sudo apt-get instll scrcpy
在ubuntu上安装完成后,连接手机,运行scrcpy,一直显示
$ scrcpy -m 400
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 fil...ed. 102.4 MB/s (24773 bytes in 0.000s)
INFO: Initial texture: 224x400
WARN: Device disconnected
后在一文章中说,ANDROID 12版需得scrcpy的版本在1.18以上,而查看当前版本却是1.12
当sudo apt-get remove scrcpy
sudo apt-get install scrcpy=1.18
指定各版本号都没能正常安装,后用snap安装成功
$ snap install scrcpy
scrcpy v1.24 from sisco311 installed
成功安装最新版本
执行scrcpy时,找不到程序,查看
$ scrcpy
bash: /usr/bin/scrcpy: No such file or directory
$ whereis scrcpy
scrcpy: /usr/share/scrcpy /snap/bin/scrcpy.adb /snap/bin/scrcpy
$/snap/bin/scrcpy
成功运行