Utilize QtScrcpy and ToDesk to control Android Q remotely
Remote control is never easy job, but it’s really rigid demand in certain situation. There are many ready-to-use paid services, here I would like to share a free way to realize it.
Final achievement:
Requirments:
- Android mobile phone you want to control with wireless adb debug enabled.
- Win11(or other system support QtScrcpy) PC connected to the same wifi point as the phone.
- ToDesk client installed on the PC and device you want to perform the control.
Basically, you should make QtScrcpy working locally on the PC wirelessly, fllowing this instruction. And if you closed the remote window, the mobile phone will automatically locked and screened off. After a while, you may find that the remote window can’t be launched again, even though the device ID is valid though adb devices
, and the device is already connected.
1 |
|
If this is the situation, you can try to light up the phone though adb shell input keyevent 26
, which simulatively trigger the power button. After that, you may launch the device again.
|
Alternatively, you can create a script file on desktop to facilitate the process.
|
Now, If you tested the process remotely through ToDesk, while the laptop lid or monitor closed, you will get a white screen(白屏)after launched. This is mostly due to the energy-saving mode of graphics card. To solve this, you can purchase a video card spoofer (显卡欺骗器), or install a virtual display tool on PC.
Here I choose nomi-san/parsec-vdd, which is pretty simple to setup. After create a virtual display and restart QtScrcpy, you should resolve the white screen problem.
Last thing. Normally you have to reconnect with usb to start adb wifi and open 5555 listening port while the device is rebooted. To solve this, you can try to write config rule to /system/build.prop
like this:
service .adb.tcp.port=5555 // open port
persist,servicea.adb.enable=1 // enable adbd
Or, install a adb wifi
app to make it happen. Here I use RikkaApps/WADB。Remember to disable battery optimization and lock it to ensure background running before rebooting.