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

Controller error "java.io.IOException: android.system.ErrnoException: open failed: EACCES (Permission denied)" #4811

Closed
2 tasks done
Unihedro opened this issue Apr 3, 2024 · 2 comments

Comments

@Unihedro
Copy link

Unihedro commented Apr 3, 2024

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

Environment

  • OS: Windows 11
  • scrcpy version: win64-v2.4
  • installation method: release x64
  • device model: SM_G9550
  • Android version: 9

Describe the bug
Several attempts to initialize the connection to the phone (through different commands) has failed. Phone detection and debug authorization worked properly (hopefully) but some googling on the error says that android may have just refused file access for being a new android version. Searching through other issues there are lots of other issues that includes "stream disabled due to connection error" but none were relevant. Included is the log for posting the recommended command listed in the project homepage:

C:\Users\user\Downloads\scrcpy-win64-v2.4\scrcpy-win64-v2.4>.\scrcpy --video-codec=h265 --max-size=1920 --max-fps=60 --no-audio --keyboard=uhid
scrcpy 2.4 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  9889143043364e3655              device  SM_G9550
C:\Users\user\Downloads\scrcpy-win64-v2.4\scrcpy-win64-v2.... file pushed, 0 skipped. 66.9 MB/s (69007 bytes in 0.001s)
[server] INFO: Device: [samsung] samsung SM-G9550 (Android 8.0.0)
[server] ERROR: Controller error
java.io.IOException: android.system.ErrnoException: open failed: EACCES (Permission denied)
        at com.genymobile.scrcpy.UhidManager.open(UhidManager.java:66)
        at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:208)
        at com.genymobile.scrcpy.Controller.control(Controller.java:97)
        at com.genymobile.scrcpy.Controller.lambda$start$0$com-genymobile-scrcpy-Controller(Controller.java:105)
        at com.genymobile.scrcpy.Controller$$ExternalSyntheticLambda1.run(Unknown Source:4)
        at java.lang.Thread.run(Thread.java:764)
Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
        at libcore.io.Linux.open(Native Method)
        at libcore.io.BlockGuardOs.open(BlockGuardOs.java:207)
        at android.system.Os.open(Os.java:354)
        at com.genymobile.scrcpy.UhidManager.open(UhidManager.java:49)
        ... 5 more
INFO: Renderer: direct3d
ERROR: Demuxer 'video': stream disabled due to connection error
ERROR: Demuxer error

Please do not post screenshots of your terminal, just post the content as text instead.

@rom1v
Copy link
Collaborator

rom1v commented Apr 3, 2024

On old Android versions, --keyboard=uhid cannot work due to permissions errors (like you get).

#4473 (comment)
#4473 (comment)

@Unihedro
Copy link
Author

Unihedro commented Apr 5, 2024

Thanks for the quick response! Removing --keyboard has made it work :)

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