scrcpy screen sharing not working for Murena 2
Murena Two
e/OS version: 1.19.1-t-20240109372021-stable two
android version: 13
Screen Share problem: It is not possible to share Murena 2 Screen with desktop on Linux (Kubuntu 22.04) using scrcpy. The resulting share on desktop shows a fuzzy black screen for the android.
Using scrcpy produced the following error
scrcpy 1.25 https://github.com/Genymobile/scrcpy
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 1.4 MB/s (42151 bytes in 0.028s)
[server] INFO: Device: Murena Murena Two (Android 13)
INFO: Renderer: opengl
INFO: OpenGL version: 3.1 Mesa 20.0.8
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2400
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
[server] INFO: Retrying with -m1920…
INFO: New texture: 864x1920
after updating scrcpy to latest version
Restarted computer showed device with black screen for Murena2
: ~ $ scrcpy scrcpy 2.3.1 https://github.com/Genymobile/scrcpy INFO: ADB device found:
INFO: --> (usb) B1202312000626 device Murena_Two
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 4.5 MB/s (66007 bytes in 0.014s)
[server] INFO: Device: [Murena] Murena Murena Two (Android 13)
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
[server] INFO: Retrying with -m1920...
[server] INFO: Retrying...
INFO: Renderer: opengl
INFO: OpenGL version: 4.5 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1
INFO: Trilinear filtering enabled
INFO: Texture: 1080x2400
INFO: Texture: 864x1920
The above log shows correct connection, and there is mouse and keyboard input from desktop. Screen is black all through no matter what app is opened. The problem is from Murena 2.
scrcpy 1.25 & 2.3.1 on the same desktop correctly shares android display for Galaxy J3 running android 5.1.1
https://en.wikipedia.org/wiki/Scrcpy
"Looks like there is a capture/encoding issue on the Murena 2 e/OS device system". Please look at https://github.com/Genymobile/scrcpy/issues/3940 entries half way down on the page about Murena 2 black screen.
The native recorder adb shell screenrecord /sdcard/file.mp4 does not work, and a similar problem occurs with scrcpy on the device.
Workaround
scrcpy --video-codec=h264 --video-encoder='c2.android.avc.encoder'