My goal is when using remote access via TeamViewer to autotap on screen sharing prompt when it appears on target device (andorid 16)
I've tried adb commands , it does work.
adb -s [removed per Community Guidelines] shell 'while true; do dumpsys window | grep -iq MediaProjection && input tap removed per Community Guidelines]; sleep 0.2; done'
However, when network switch to mobile data, wireless debugging stops.
The prompt no longer autoclicks.
How to proceed please? I am a no coding expert.
Either (1) How to make wireless debugging survive network switch.
Or
(2) How to make the autoclick permanent