Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
108.89k stars 10.48k forks source link

Mobile app support #3078

Open TechyAditya opened 2 years ago

TechyAditya commented 2 years ago

There are apps like Samsung SideSync, Realme Link, and similarly, lots of apps with system privilege exists. Why not implement the same for scrcpy?

Problem: scrcpy is unusable or unreliable without ADB access

Solution: Make a mobile app that acts as a security access point for both mobile and desktops.

List of possibilities:

  1. Magisk module and root access to allow permissions
  2. Flashable zip file to the android phone
  3. Setting permissions to the app through ADB commands (similar to how 3rd party navigation gesture apps work)
  4. Use screen recorder permissions to share audio and video to the PC. For mouse and keyboard, there are many ways. Accessibility settings can be used to control the phone (not sure how this thing works). One-time ADB command can be used to grant some input permissions to the app. And, I have seen sightings of libusb or similar modules in some Github issues.

1st 2 ways are meant for advanced developers or custom ROM users, which will be much more reliable and stay as easy as flashing zip from recovery. The other 2 ways are meant for literally everyone who somehow wants to make the scrcpy work wirelessly without voiding the warranty or breaking system updates. For the user interface, let the app stay a very basic UI and be open source and the community will shine, making replicas for the scrcpy app with beautiful UI and mods (even Android TVs can be benefitted xD).

twaik commented 2 years ago

Actually root or adb prevelegies are unneded here. All you need is Mirroring and Accessibility APIs. There are a lot of android vnc servers using those apis.