server: add root support
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.
usage:
adb root
scrcpy
scrcpy --adb root scrcpy
@rom1v It conflicts now, any comments? If you think this PR is bad, please let me know.
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.
@rom1v maybe you would consider this PR?
@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.