Monday, 21 June 2021

Phone-to-PC screen mirroring tool ‘scrcpy’ now supports devices running Android 12

The Android Debug Bridge, or ADB for short, is an immensely useful tool for developers that want to read system logs, change settings, or automate actions on their device. Google intended to only provide a command line interface when they made ADB, but in early March of 2018, a developer built a tool on top of ADB that lets you not only mirror the screen of your Android phone but also remotely control it from your PC. That tool is called scrcpy, and its latest update adds support for devices running Android 12.

For those of you who aren’t familiar, scrcpy (short for “screen copy“) consists of two components: a server app that’s pushed to the Android device and a client on the PC that communicates with the server via a socket over an ADB tunnel. Your phone’s screen is encoded as an h.264 video which is decoded and displayed on your PC by the scrcpy client. Keyboard and mouse inputs are sent to the server and translated to appropriate inputs on the device. While scrcpy isn’t the only remote control/screen mirroring tool out there, it’s one of the best because it’s free, open source, customizable, and fast.

Before the Android 12 update, scrcpy defaulted to creating a “secure display” in order to support mirroring content that was otherwise blocked. However, Android 12 no longer allows a process with shell permissions to create a secure display, causing scrcpy to immediately crash if the user attempted to launch it on a device running Android 12. The fix is simple: Rebuild the Android server so that it creates a non-secure display.

Another major addition to scrcpy is the ability to use the video stream as a webcam on Linux. The tool has added v4l2loopback (Video 4 Linux loopback) support, enabling the video stream to be opened by V4L2-capable software like OBS. The video stream can be exposed as a webcam and/or displayed in a window.

Other features added in scrcpy’s v1.18 update include the ability to lock the video orientation to the device’s initial orientation, power off the device when scrcpy is closed, new shortcuts for the 4th and 5th buttons, automatically resize the window to remove black borders, and saving files in /sdcard/Download instead of /sdcard.

The changelog for the v1.18 update is embedded below. You can download the latest version of scrcpy from GitHub.

scrcpy v1.18 changelog

Changes since v1.17:

  • Add support for Android 12 (#2129#2402)
  • Add support for V4L2 (device screen capture as a webcam) (#2232#2233#2268)
  • Add an option to lock the initial video orientation
  • Add an option to power off the device on close (#824)
  • Bind 4th mouse button to APP_SWITCH (#2258)
  • Bind 5th mouse button to expand notification panel (#2258)
  • Expand settings panel on double-expand notification panel (#2260#2264)
  • Push to /sdcard/Download by default (#2384)
  • Center the window on resize-to-fit (#2387)
  • Increase possible display id range (#2009)
  • Log input events in verbose mode (#2371)
  • Fix touch events parameters (#2125)
  • Fix left click on Samsung Browser (#2169)
  • Remove option –render-expired-frames (#2268)
  • Pass scrcpy-noconsole arguments through to scrcpy on Windows (#2052)
  • Upgrade platform-tools to 31.0.2 (adb) in Windows releases
  • Various technical fixes

The post Phone-to-PC screen mirroring tool ‘scrcpy’ now supports devices running Android 12 appeared first on xda-developers.



from xda-developers https://ift.tt/3iXBpw6
via IFTTT

No comments:

Post a Comment