scrcpy: SCRCPY Broken for Android 14 QPR3 Beta
Environment
- OS: Windows
- scrcpy version: v2.3.1
- installation method: Windows Release
- Google Pixel 7 pro
- Android version: Android 14 QPR3 Beta 1
Describe the bug After installing Android 14 QPR3 Beta 1 scrcpy doesnt work. I think they changed the method.
[server] INFO: Device: [Google] google Pixel 7 Pro (Android 14)
[server] ERROR: Exception on thread Thread[video,5,main]
java.lang.AssertionError: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:85)
at com.genymobile.scrcpy.ScreenCapture.createDisplay(ScreenCapture.java:77)
at com.genymobile.scrcpy.ScreenCapture.start(ScreenCapture.java:38)
at com.genymobile.scrcpy.SurfaceEncoder.streamScreen(SurfaceEncoder.java:72)
at com.genymobile.scrcpy.SurfaceEncoder.lambda$start$0$com-genymobile-scrcpy-SurfaceEncoder(SurfaceEncoder.java:253)
at com.genymobile.scrcpy.SurfaceEncoder$$ExternalSyntheticLambda0.run(Unknown Source:4)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.NoSuchMethodException: android.view.SurfaceControl.createDisplay [class java.lang.String, boolean]
at java.lang.Class.getMethod(Class.java:2937)
at java.lang.Class.getMethod(Class.java:2449)
at com.genymobile.scrcpy.wrappers.SurfaceControl.createDisplay(SurfaceControl.java:83)
... 6 more
INFO: Renderer: direct3d
ERROR: Demuxer 'audio': stream disabled due to connection error
INFO: Texture: 1440x3120
WARN: Device disconnected
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Reactions: 8
- Comments: 20
Links to this issue
Commits related to this issue
- Adapt to display API changes The method SurfaceControl.createDisplay() has been removed in AOSP. Use DisplayManager to create a VirtualDisplay object instead. Fixes #4646 <https://github.com/Genymo... — committed to Genymobile/scrcpy by DerekWuYD 5 months ago
- Adapt to display API changes The method SurfaceControl.createDisplay() has been removed in AOSP. Use DisplayManager to create a VirtualDisplay object instead. Fixes #4646 <https://github.com/Genymo... — committed to Genymobile/scrcpy by DerekWuYD 5 months ago
- Adapt to display API changes The method SurfaceControl.createDisplay() has been removed in AOSP. Use DisplayManager to create a VirtualDisplay object instead. Fixes #4646 <https://github.com/Genymo... — committed to Genymobile/scrcpy by DerekWuYD 5 months ago
sweet I thought my Pixel 7 with a dead screen was not working \ USB debugging issue with my PC, I just looked and saw it was a different error (same as above) so I came to look in here and found you guys digging into it.
flawlessly worked after replacing scrpy-server with the updated one. thanks!
@rom1v Can confirm it works
Please test this fix (the link to
scrcpy-server
in the comment): https://github.com/Genymobile/scrcpy/pull/4657#issuecomment-1935845644I’ll add that scrcpy does manage to turn my Pixel 7’s screen off before it crashes
Edit: @rom1v works for me, too!
Thank you for your
framework.jar
.Indeed, they removed the method. There was a lot of refactor in Android regarding the display starting in Android 14 (#3927, #4011), it seems they are continuing the work, which causes a lot of changes.
This will require investigations to adapt the code (but the AOSP sources where the method is removed are not available yet).
Refs #4646.
@rom1v
frameworrk.jar
sorry for the late reply.
framework.zip