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

OTG over tcpip mode #3453

Open
1 task done
oyekanwahab opened this issue Aug 19, 2022 · 14 comments
Open
1 task done

OTG over tcpip mode #3453

oyekanwahab opened this issue Aug 19, 2022 · 14 comments

Comments

@oyekanwahab
Copy link

oyekanwahab commented Aug 19, 2022

Is your feature request related to a problem? Please describe.
I have been using scrcpy for a very long time, all my phones are always rooted, so I always use scrcpy with tcpip, I just discovered that there is an otg mode, which is only accessible with USB

Describe the solution you'd like
Is it possible to enable this mode on tcpip mode, since the ADB daemon is not being used by the USB on tcpip mode?

Describe alternatives you've considered

Additional context
Add any other context or screenshots about the feature request here.

@rom1v
Copy link
Collaborator

rom1v commented Aug 19, 2022

No because we can only send HID events on Android using the AOA protocol (over USB).

@oyekanwahab
Copy link
Author

ok.
I was thinking that it was using ADB

I was thinking you wanted to implement what Deskdock was doing using ADB for mouse and keyboard input

@twaik
Copy link

twaik commented Oct 3, 2022

Actually it is possible with root + uinput.

@oyekanwahab
Copy link
Author

oyekanwahab commented Oct 6, 2022

I have a root device, can you show me how

@twaik
Copy link

twaik commented Oct 6, 2022

It will require a lot of modifications inside scrcpy. This case can not be handled in easy way.

@oyekanwahab
Copy link
Author

oyekanwahab commented Oct 7, 2022 via email

@twaik
Copy link

twaik commented Jun 3, 2024

@rom1v it seems like uinput works fine over ADB TCPIP connection. I can work with https://github.com/Blub/netevent tool cross-compiled to aarch64 with all devices except Xiaomi. I think it can be used to implement capturing PC's keyboard and mouse.

@rom1v
Copy link
Collaborator

rom1v commented Jun 3, 2024

Since this issue, UHID mode has been implemented: https://github.com/Genymobile/scrcpy/blob/master/doc/keyboard.md#uhid
And the feature to control the device without video playback has been added recently (on dev branch): #4868

@twaik
Copy link

twaik commented Jun 3, 2024

What about emulating mouse this way?

@rom1v
Copy link
Collaborator

rom1v commented Jun 3, 2024

@twaik
Copy link

twaik commented Jun 3, 2024

You are right, keyboard works after installing last version from release page. But for some reason mouse does not work. I mean cursor is intercepted, but I do not see it on screen. Also clicks make some weird action I can not really identify. Phone reacts like I swipe up.

@rom1v
Copy link
Collaborator

rom1v commented Jun 3, 2024

but I do not see it on screen

On some devices, the cursor is not displayed on lock screen.

Does it work on the home screen? (run scrcpy -M)

@twaik
Copy link

twaik commented Jun 3, 2024

It does not.

@twaik
Copy link

twaik commented Jun 3, 2024

Should I record a video?

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

3 participants