I use a Xiaomi phone for wireless debugging while developing and testing a Flutter app, but the feature is very unreliable. Sometimes wireless debugging turns itself off only a few seconds after I enable it, while other times it stays connected for hours. Is this a Xiaomi-specific power-management issue, or do other Android manufacturers have similar problems? If wireless debugging works reliably for you, please share your phone's manufacturer and model so I can consider it for a future upgrade.
3 Answers
Try keeping the Wi-Fi connection active by continuously pinging the phone from a terminal. This may prevent an aggressive power-saving feature from putting the connection to sleep.
Wireless debugging has been reliable for me on a Samsung Galaxy S25. It’s the main way I debug nowadays, and I haven’t had it randomly disable itself.
Good to hear. A Samsung may be worth considering if it avoids these random disconnects.
I had the same problem with a Mi 11 Lite. I originally assumed it was an Android Studio issue, but seeing the same behavior on that phone makes Xiaomi’s power-management settings a likely culprit.
That’s useful to know. It does sound like Xiaomi may be responsible rather than Android Studio.

I’ll try that. However, wireless debugging sometimes shuts off even while I’m leaving its settings screen open, so I’m not sure Wi-Fi inactivity is the whole explanation.