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

Cant control the device ( samsung s23 ultra) #4677

Closed
Masterwe opened this issue Feb 18, 2024 · 6 comments
Closed

Cant control the device ( samsung s23 ultra) #4677

Masterwe opened this issue Feb 18, 2024 · 6 comments

Comments

@Masterwe
Copy link

Masterwe commented Feb 18, 2024

  • OS: [Windows 10]
  • scrcpy version: [2.3.1]
  • installation method: [Windows release]
  • device model: sm_s948b samsung s23 ultra
  • Android version: [14]

Describe the bug
Cant control the device (samsung s23 ultra), mouse and keyboard not work, only see the screen, other device (Note 8, s7, works perfectly)

This is the cmd code:

D:\Program Files\scrcpy-win64-v2.3.1>"D:\Program Files\scrcpy-win64\scrcpy.exe" -S --turn-screen-off --stay-awake --show-touches --serial ********

D:\Program Files\scrcpy-win64-v1....75.6 MB/s (42151 bytes in 0.001s)
[server] INFO: Device: samsung SM-S918B (Android 14)
[server] ERROR: Could not invoke method
java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener [interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, class java.lang.String, int]
        at java.lang.Class.getMethod(Class.java:2937)
        at java.lang.Class.getMethod(Class.java:2449)
        at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:128)
        at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:138)
        at com.genymobile.scrcpy.Device.<init>(Device.java:100)
        at com.genymobile.scrcpy.Server.scrcpy(Server.java:64)
        at com.genymobile.scrcpy.Server.main(Server.java:334)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:415)
[server] ERROR: Exception on thread Thread[Thread-2,5,main]
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
        at com.genymobile.scrcpy.wrappers.ServiceManager.getInputManager(ServiceManager.java:75)
        at com.genymobile.scrcpy.Device.injectEvent(Device.java:192)
        at com.genymobile.scrcpy.Device.injectKeyEvent(Device.java:203)
        at com.genymobile.scrcpy.Device.pressReleaseKeycode(Device.java:211)
        at com.genymobile.scrcpy.Device.pressReleaseKeycode(Device.java:216)
        at com.genymobile.scrcpy.Controller.control(Controller.java:66)
        at com.genymobile.scrcpy.Server$3.run(Server.java:132)
        at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at com.genymobile.scrcpy.wrappers.ServiceManager.getInputManager(ServiceManager.java:72)
        ... 7 more
Caused by: java.lang.NullPointerException
        at java.util.Objects.requireNonNull(Objects.java:207)
        at android.hardware.input.InputManager.getInstance(InputManager.java:401)
        ... 9 more
INFO: Renderer: direct3d
INFO: Initial texture: 1080x2312
@rom1v
Copy link
Collaborator

rom1v commented Feb 18, 2024

Thank you for your report.

Please post your framework.jar:

adb pull /system/framework/framework.jar

@Masterwe
Copy link
Author

D:\Program Files\scrcpy-win64-v2.3.1>adb pull /system/framework/framework.jar
/system/framework/framework.jar: ...3 MB/s (51074415 bytes in 1.305s)

D:\Program Files\scrcpy-win64-v2.3.1>

@rom1v
Copy link
Collaborator

rom1v commented Feb 18, 2024

Yes, now the file framework.jar is on your computer. Please send it here so that I can investigate 😉

@Masterwe
Copy link
Author

Masterwe commented Feb 18, 2024

framework.zip
i compress the jar file, more than 50mb file size

@rom1v
Copy link
Collaborator

rom1v commented Feb 18, 2024

I am very confused by your issue.

The console output is not complete. For example the first line with the version does not appear. Your folder name suggests that it is 2.3.1, but:

  • the stacktrace does not match v2.3.1
  • this exact error should never happen in v2.3.1
  • the method in your framework.jar is already handled in v2.3.1

So my hypothesis is that you did not run the latest version.

@Masterwe
Copy link
Author

Thanks for the support, I read your comment and decided to delete all scrcpy files and folders and then install the latest version again in a different directory, and not use the --turn-screen-off command (which I use with note 8 and s7) and it already works correctly with the s23..
Thanks for everything

@rom1v rom1v closed this as completed Feb 18, 2024
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

2 participants