Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
105.49k stars 10.24k forks source link

Non-USB Debugging Mode (Mobile) #5020

Open bananaNuggets75 opened 2 weeks ago

bananaNuggets75 commented 2 weeks ago

Description

Implement a mode in scrcpy that allows users to connect and control their Android devices without needing to enable USB debugging. This feature is particularly useful for users with broken or non-functional screens.

Approaches

Benefits

This feature would be helpful to improve scrcpy utility and for the users with broken/not usable displays for their mobile devices

Giantvince1 commented 2 weeks ago

Unfortunately, this is completely impossible due to how Android works at its core. The USB debugging feature is only able to be turned on by the user directly, meaning that scrcpy would have to somehow know the screen's resolution AND display density before even beginning to control it via UHID to turn on USB debugging. Not only that but the process is rather complicated and differs from phone to phone, especially with Samsung or OnePlus devices. Other OEMs implement skins of their own as well, but that's the best example I could think of that I know changes around even how the Settings page works.

Edit: I should be more clear here; scrcpy CAN control the device using OTG mode without USB debugging enabled. HOWEVER, it is UNABLE to display the screen in any capacity, NOR can it capture audio, without having USB (or wireless) debugging enabled beforehand. This means that your physical screen must work at least well enough for you to navigate settings in order to enable USB debugging manually. It doesn't have to respond to touch, but as long as you can see enough of the screen to know what you're doing, you'll be fine.