Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working #4042

Open
2 tasks done
anhnhoktvn opened this issue May 29, 2023 · 5 comments
Open
2 tasks done

Not working #4042

anhnhoktvn opened this issue May 29, 2023 · 5 comments

Comments

@anhnhoktvn
Copy link

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: Ubuntu
  • scrcpy version: 2.0
  • installation method: git clone
  • device model: Device: Sony SO-04J (Android 9)
  • Android version: 9

Describe the bug

It's not working

scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 324.1 MB/s (52867 bytes in 0.000s)
[server] INFO: Device: Sony SO-04J (Android 9)
[server] WARN: Audio disabled: it is not supported before Android 11
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 22.2.5
INFO: Trilinear filtering enabled
WARN: Demuxer 'audio': stream explicitly disabled by the device
INFO: Initial texture: 1080x1920
WARN: Device disconnected
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
	at com.genymobile.scrcpy.wrappers.SurfaceControl.destroyDisplay(SurfaceControl.java:174)
	at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:115)
	at com.genymobile.scrcpy.Server.scrcpy(Server.java:133)
	at com.genymobile.scrcpy.Server.main(Server.java:381)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:340)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(Native Method)
	at com.genymobile.scrcpy.wrappers.SurfaceControl.destroyDisplay(SurfaceControl.java:172)
	... 5 more
Caused by: java.lang.IllegalArgumentException: displayToken must not be null
	at android.view.SurfaceControl.destroyDisplay(SurfaceControl.java:1185)
	... 7 more

@rom1v
Copy link
Collaborator

rom1v commented May 29, 2023

So it seems your device does not have SurfaceControl.destroyDisplay() with the expected signature. Please post your framework.jar:

adb pull /system/framework/framework.jar

But this only explains why you have a stacktrace at the end, this does not explain why it does not work.

Does it work with scrcpy --no-audio?

Does screenrecord work?

adb shell screenrecord /sdcard/file.mp4
adb pull /sdcard/file.mp4

?

@anhnhoktvn
Copy link
Author

framework.jar.zip

Does it work with scrcpy --no-audio?

No, it doesn't

Does screenrecord work?

No, I just got an empty file

@rom1v
Copy link
Collaborator

rom1v commented May 29, 2023

OK, so it's a problem on your device/rom.

@hienyimba
Copy link

Try the Duplica (scrcpy ui) app.

You might lose some features as it's a bit old but it works.

@umanda
Copy link

umanda commented Jun 5, 2024

I have run scrcpy -b2M -m800

Works for me

I use Ubuntu too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants