Scrcpy v4.0
370 points
• 6 days ago
• Article
Link
Scrcpy v4.0 正式发布,这是这款流行 Android 屏幕镜像工具的一次重要升级。最显著的变化是从 SDL2 迁移到 SDL3,带来了持续维护与错误修复,并新增了在调整窗口大小时锁定宽高比等功能,这一底层改进为本次发布的多项新特性奠定了基础。
一个重大新增是弹性显示支持,允许虚拟显示随客户端窗口动态调整大小,可通过 --flex-display 或 -x 参数启用。这让在桌面上以可调整尺寸的窗口运行 Android 应用变得更加实用。新版还加入了摄像头控制,支持在会话中用 MOD+t 切换摄像头手电筒、用 MOD+↑/MOD+↓ 调整变焦,也可以通过新的命令行选项在启动时设置。
此次更新在用户体验上也做了若干优化:调整窗口大小时会保留宽高比以避免黑边(如需可通过选项恢复旧行为);新增的 --keep-active 选项可防止设备进入休眠而无需修改系统全局设置;默认背景色由黑色改为深灰色,断开连接时会先显示一个断开图标两秒再关闭窗口,从而更清晰地区分连接丢失与程序崩溃。
在底层修复方面,v4.0 解决了包括 Meta Quest 闪烁问题、已 root 设备的复制粘贴问题、色彩空间转换问题,以及一个奇怪的 bug:由于 OPUS 音频解码中的非规格化数,播放静音时会导致高 CPU 占用。新增了 F11 全屏和 MOD+q 退出等快捷键。该版本还升级了核心依赖(如 FFmpeg 、 SDL 和 platform-tools(adb)),并在整个代码库中做了多处技术修复与改进。
Scrcpy v4.0 has been released, marking a significant update to the popular Android screen mirroring tool. The most notable change is the migration from SDL2 to SDL3, which brings active maintenance, bug fixes, and new capabilities like aspect ratio locking when resizing the window. This foundational upgrade enables several of the release's headline features.
One major addition is flex display support, allowing virtual displays to be resized dynamically alongside the client window using the `--flex-display` or `-x` flag. This makes it much more practical to run Android apps in resizable windows on a desktop. The release also introduces camera controls, letting users toggle the camera torch with `MOD`+`t` and adjust zoom with `MOD`+`↑`/`MOD`+`↓`, either during a session or at startup via new command-line options.
The update improves the user experience in several ways. Window aspect ratio is now preserved during resizing to avoid black bars, though the old behavior can be restored with a flag. A new `--keep-active` option prevents the device from sleeping without changing global settings. The default background color changed from black to dark gray, and a disconnected icon now appears for two seconds before the window closes, making it clearer when a connection is lost versus a crash.
Under the hood, v4.0 fixes a range of issues including Meta Quest flickering, copy-paste on rooted devices, colorspace conversion, and a curious bug where playing silence consumed high CPU due to denormal numbers in OPUS audio decoding. New shortcuts like `F11` for fullscreen and `MOD`+`q` to quit have been added. The release also upgrades core dependencies including FFmpeg, SDL, and platform-tools (adb), along with various technical fixes and improvements throughout the codebase.
60 comments • Comments Link
• scrcpy 广受好评,是一款通过 USB 或 TCP/IP 镜像并控制 Android 设备的利器。它在 Linux 、 Windows 和 macOS 上运行流畅、使用方便,无需 root 权限或在设备上安装额外应用,许多用户形容为"令人惊讶"的体验。
• 在实际场景中,scrcpy 展现了不可替代的价值:访问屏幕损坏的手机、把旧设备当成网络摄像头或麦克风、启用反向网络共享以共享互联网、以及从阻止截图的应用中获取内容 —— 在结合 ADB 和 root 权限时尤为有用。
• 高级功能也备受赞誉,比如通过 --flex-display 动态调整大小、为不支持 DeX 的设备创建虚拟显示器,以及在截图被禁用时仍能录制视频,这些特性既满足日常使用也适用于专业任务。
• 也有一些设备特定的问题被提及,例如在部分 Samsung 设备上手势导航可能会失效,需要重启才能恢复;如果事先未启用 ADB,则在屏幕完全损坏后难以访问设备,这凸显了事前启用 ADB 并信任永久密钥的重要性。
• scrcpy 的开发者还为 VLC media player 做出过贡献,该项目以简洁且可读性高的 C 代码著称,反映出优秀的软件工程实践。
• 实用的应急技巧包括通过调低屏幕亮度进行盲操作或使用 USB 外设,但在图案解锁和某些应用的可访问性方面仍有限制,尤其是银行类应用对屏幕阅读器的支持较差。
• 文中也提到过替代方案如 Droidcam 和 wo-mic,用于把旧手机当摄像头或麦克风,但 scrcpy 以其稳定性和低延迟脱颖而出;部分用户同时指出长时间使用时的电池续航和发热问题。
• 由于受欢迎,不少用户对其在 iOS 上缺失感到失望,甚至有人自行开发类似的解决方案(例如在 Android 上搭建 RDP 服务器)以实现统一控制。
• 一个反复出现的主题是"提前准备",在屏幕损坏前启用 ADB 并设置受信任的密钥,否则事后的访问将非常困难,这也让许多人对现代安全机制在数据恢复方面的限制感到无奈。
• 讨论还涉及更广的生态系统观察(如 ChromeOS 的 Android 集成),但凭借可靠性和社区支持,scrcpy 仍被一致推荐为必备工具。
总体而言,scrcpy 被定位为 Android 用户的常备工具:功能强大、性能无缝、开发者专业,既能解决设备恢复问题,也能实现旧硬件的创意再利用。用户普遍赞赏其"开箱即用"的开源特性,同时也提醒要注意设备兼容性与应急前的准备工作。 • scrcpy is widely praised as an exceptional tool for mirroring and controlling Android devices via USB or TCP/IP, with many users describing it as a "mind-blown" experience due to its smooth performance and ease of use across Linux, Windows, and macOS without requiring root access or installing an app on the device.
• The software proves invaluable in practical scenarios such as accessing phones with broken screens, using old devices as webcams or microphones, enabling reverse tethering for internet sharing, and capturing content from apps that block screenshots, especially when combined with ADB and root access.
• Users highlight advanced features like dynamic resizing with `--flex-display`, virtual displays for unsupported DeX functionality, and the ability to record video even when screenshots are blocked, making it versatile for both everyday use and specialized tasks.
• Despite its strengths, some users report issues like gesture navigation breaking on Samsung devices after use, requiring a reboot, and challenges accessing phones with dead screens if ADB debugging wasn't pre-enabled, underscoring the importance of setting up ADB and permanent key trust before screen failure.
• The developer behind scrcpy also contributed to VLC media player, and the project is noted for its clean, readable C code, reflecting high-quality software engineering practices.
• Practical workarounds using scrcpy include using it for blind navigation by adjusting screen brightness or leveraging USB peripherals, though limitations exist with pattern unlock and app accessibility, particularly with banking apps having poor screen reader support.
• Alternatives like Droidcam and wo-mic are mentioned for using old phones as webcams or mics, but scrcpy stands out for its stability and low latency, though some users note battery life and heat as concerns with prolonged use.
• The tool is so beloved that users express disappointment at its absence on iOS due to regional restrictions, and some have even developed custom solutions like RDP servers for Android to unify device control.
• A common theme is the necessity of preparation, such as enabling ADB and setting up trusted keys before screen damage, as post-failure access is extremely difficult without prior setup, leading to frustration with modern security measures that hinder recovery.
• The discussion also touches on broader ecosystem observations, like ChromeOS integrating Android features, but scrcpy remains a standout for its reliability and community support, with users consistently recommending it as a must-have utility.
The discussion overwhelmingly celebrates scrcpy as a remarkably reliable and versatile tool that solves real-world problems, from device recovery to creative repurposing of old hardware. Users share diverse use cases, emphasizing its seamless performance and the developer's expertise, while also noting minor drawbacks like device-specific bugs and the critical need for proactive setup to handle emergencies. The sentiment reflects a strong community appreciation for open-source software that "just works," with calls for better accessibility and cross-platform availability. Overall, scrcpy is positioned as an essential utility for Android users, blending technical excellence with practical utility.