I have enabled wireless debugging on my android phone and connected it with a linux machine. But after few minutes or hours i have to re-enable the wireless debugging to keep connected.
When running adb connect 192.168.1.11:5555
i am getting Device refused to connect
error. So i have to connect my phone again with usb and give permission for wireless debugging. Which i am doing with below commands
adb tcpip 5555
adb connect 192.168.1.11:5555
I am on android 12 and arch linux. One more thing i want to share is, in wifi settings randomized mac-address is enabled, i have no idea if this is the reason or not.
If this is how wireless debugging works than is there a way to keep your device connected to adb with wireless-debugging without getting permissions provoked.
disable adb authorisation timeout
according to it if not connected for a time period (default 7 days) permissions will be revoked. So maybe this is the reason.