scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

server: add root support

Open vvb2060 opened this issue 1 year ago • 5 comments

The service can now run with root. It will auto change the main thread's euid to 2000 for binder calls. If a binder call requires root user, notify the main thread to switch to euid 0.

Tested on Android 14, can display secure content.

scrcpy-server.zip

usage:

adb root
scrcpy

vvb2060 avatar May 26 '24 16:05 vvb2060

scrcpy --adb root scrcpy

adam12639 avatar Jun 22 '24 12:06 adam12639

@rom1v It conflicts now, any comments? If you think this PR is bad, please let me know.

vvb2060 avatar Jun 22 '24 12:06 vvb2060

this PR only modifies the service part, I don't care how to notify the exe to start the service with root. (For me adb root is enough.

vvb2060 avatar Jun 22 '24 12:06 vvb2060

@rom1v maybe you would consider this PR?

Vladik01-11 avatar Sep 02 '24 14:09 Vladik01-11

@rom1v Any updates on this? I grabbed v2.4 client and just replaced the server with the attached file in this PR, and I can confirm it simply works on my Android 14 phone (KernelSU-rooted with SU perm given to Shell). But yeah, latest client is already v3.1 by now.

BobbyWibowo avatar Jan 01 '25 20:01 BobbyWibowo