无线投屏手机(安卓)屏幕到 Linux(ubuntu 22.04)桌面

1.安装 scrcpy

安装 scrcpy会自动安装 adb. 这个版本的adb功能不是最全的,需要删掉,然后从链接

https://dl.google.com/android/repository/platform-tools-latest-darwin.zip

下载,解压安装即可。

  1. 在手机上 打开开发者模式和 USB调试模式,并且允许无线调试,会看到下面一个界面:

点击 "pair device with pairing code", 会弹出来一个 IP/端口号和配对数字:

在终端运行:

./adb pair 192.168.1.130:373081

然后 adb连接手机:

./adb connect 192.168.1.130:37345

连接成功后,执行

scrcpy

scrcpy 1.21 <https://github.com/Genymobile/scrcpy\>

/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 261.0 MB/s (39473 bytes in 0.000s)

server\] INFO: Device: samsung SM-A5260 (Android 12) INFO: Renderer: opengl INFO: OpenGL version: 4.6.0 NVIDIA 530.41.03 INFO: Trilinear filtering enabled INFO: Initial texture: 1080x2400 这样,不需要USB连接, 手机界面就投到 ubuntu上去了。 ![](https://file.jishuzhan.net/article/1684005971149459457/475876e2e8bd4d129681dcb8d5a8de82.png) 参考: [How to install ADB on Windows, macOS, and Linux](https://www.xda-developers.com/install-adb-windows-macos-linux/ "How to install ADB on Windows, macOS, and Linux")

相关推荐
百锦再2 小时前
React编程高级主题:测试代码
android·前端·javascript·react.js·前端框架·reactjs
2501_916008893 小时前
全面介绍Fiddler、Wireshark、HttpWatch、SmartSniff和firebug抓包工具功能与使用
android·ios·小程序·https·uni-app·iphone·webview
玉梅小洋3 小时前
Windows 10 Android 构建配置指南
android·windows
Libraeking5 小时前
视觉篇:Canvas 自定义绘图与高级动画的华丽圆舞曲
android·经验分享·android jetpack
Fushize6 小时前
多模块架构下的依赖治理:如何避免 Gradle 依赖地狱
android·架构·kotlin
Jomurphys6 小时前
Kotlin - 类型别名 typealias
android·kotlin
Haha_bj6 小时前
Flutter ——flutter_screenutil 屏幕适配
android·ios
Haha_bj7 小时前
Flutter ——device_info_plus详解
android·flutter·ios
前端小伙计7 小时前
Android/Flutter 项目统一构建配置最佳实践
android·flutter
Mr_sun.8 小时前
Day09——入退管理-入住-2
android·java·开发语言