Ubuntu下使用scrcpy进行手机投屏(亲测有效)
scrcpy
Display and control your Android device
项目地址:https://gitcode.com/gh_mirrors/sc/scrcpy
·
Ubuntu下使用scrcpy进行手机投屏
安卓设备:
usb线连接
设置:usb偏好为“文件传输”
设置:开启开发者模式,开启usb调试,开启usb安全调试(很重要)
电脑:
安装并配置adb服务
# 安装scrcpy
snap install scrcpy
# adb服务安装
sudo apt-get install android-tools-adb
# 查看手机的USB识别号(方法:先不连接手机的前提下lsusb,然后连接手机再使用lsusb,多出来的识别号就是自己手机的识别号)
lsusb
创建设备文件(90-android为自定义的)
echo 0x12d1 > ~/.android/adb_usb.ini
sudo touch /etc/udev/rules.d/90-android.rules
# 更改文件权限
sudo chmod 666 /etc/udev/rules.d/70-android.rules
gedit /etc/udev/rules.d/90-android.rules
将以下内容写入刚刚创建的文件:
SUBSYSTEM=="usb", ATTRS{idVendor}=="手机识别号前一个号,比如我的2271", ATTRS{idProduct}=="手机识别号后一个号,比如我的7777", MODE="0666"
重启adb服务
service udev restart
adb kill-server
adb start-server
执行以下命令,如有设备,则说明adb配置成功了:
adb devices
之后再开启adb服务
adb devices
adb start-server
adb devices
使用投屏(息屏下使用)
scrcpy -S
Display and control your Android device
最近提交(Master分支:3 个月前 )
b08093d1
The installed icon was listed as `icon.png`, but the actual
filename is `scrcpy.png`.
PR #6490 <https://github.com/Genymobile/scrcpy/pull/6490>
Signed-off-by: Romain Vimont <rom@rom1v.com>
22 天前
e5e58b1b - 2 个月前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)