1.效果
- 1.游戏界面
2.安装
- 1.大佬可以尝试从源码安装,源码地址:https://github.com/Genymobile/scrcpy
- 2.使用snap安装需要先装snap(安装之前可先换一下源,见文末)
sudo apt-get install snapd
- 3.使用snap安装scrcpy
sudo snap install scrcpy
- 4.有时会提示缺少core18库,或者提示
error: could not install *smartsocket* listener: Operation not permitted
- 别慌,安装一下core就行
sudo snap install core
- 5.有时运行还是会提示找不到[adb]和其他一些jar文件以及一些依赖的库,这些都可以在/snap中进行查找,然后添加到系统环境变量
- 添加到系统目录或修改环境变量
sudo cp /snap/scrcpy/136/usr/local/share/scrcpy/scrcpy-server.jar /usr/local/bin/
sudo vim /etc/profile- 在文件尾加上:
export PATH=$PATH:/snap/scrcpy/136/usr/bin/ export LD_LIBRARY_PATH=/snap/scrcpy/136/usr/lib/x86_64-linux-gnu/android/:$LD_LIBRARY_PATH
- 保存退出,重启或注销重新登录
- 6.用数据线连接手机和电脑(手机需要打开USB调试开关),在终端输入(其中一个命令)
snap run scrcpy
scrcpy
3.其他问题
- 刚安装好系统安装前记得换一下源,不然下载很慢,比如下面这个(替换
/etc/apt/sources.list
)
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
- 其他问题或许你可以在这里找到答案