TroubleshootingPublished: 6 min read

Wireless Debugging Keeps Turning Off? Causes and Fixes

Why Wireless debugging turns off by itself or will not turn on, including the greyed-out switch and the "connect to Wi-Fi" message, and how to fix each cause.

Wireless debugging turns itself off for three normal reasons: the phone restarted, it left the Wi-Fi network it was enabled on, or the Wi-Fi dropped for a moment (often from battery saving). If the switch will not turn on at all, the phone is almost always not connected to Wi-Fi. Android does this on purpose, so the fix is usually to switch it back on, not to repair anything. Your pairing survives all of these, so you never need to pair again.

Quick diagnosis

What you seeMost likely causeFix
Off after every restartNormal Android behaviourTurn it on again after boot
Off after changing Wi-Fi or leaving homeIt is tied to the networkTurn it on again on the new network
Off after the screen was off for a whileWi-Fi sleeps or the phone saved powerKeep Wi-Fi on during sleep, stop battery optimisation
Switch greyed out, "connect to a Wi-Fi network"No Wi-Fi connectionJoin Wi-Fi or a hotspot
Switch flips back off right after you turn it onNetwork not allowed, or Wi-Fi blocks itTap Allow, try another network
Developer options disappeared tooAn update or the brand reset itTap Build number seven times again

Cause 1: the phone restarted

On most phones, Wireless debugging is off after every reboot. This is a security choice by Android: a phone that just started should not be listening on the network. USB debugging stays on, Wireless debugging does not.

Fix: switch it on again after each restart. To make that faster, add the quick settings tile:

  1. Open Developer options.
  2. Tap Quick settings developer tiles.
  3. Turn on Wireless debugging.
  4. Pull down the quick settings panel, edit it, and drag the tile into place.

Now one tap in the notification shade turns it on.

Cause 2: the phone changed or lost Wi-Fi

Wireless debugging is enabled for one network. When the phone moves to another network, or loses Wi-Fi, Android switches it off. When you turn it on again, Android asks whether to allow debugging on this network. Tick Always allow on this network for networks you trust, such as your home Wi-Fi, so you are not asked every time.

Reports from Android test builds say newer versions may turn Wireless debugging back on by themselves on trusted networks. That is not in the stable versions most phones run today, so do not rely on it.

Cause 3: Wi-Fi sleeps when the screen is off

Many brands pause Wi-Fi or kill background connections to save battery, which ends the session and can switch Wireless debugging off. This is common on Xiaomi, vivo, OPPO, realme and Tecno/Infinix phones with aggressive power saving.

Try these, one at a time:

  • Turn off Battery saver or Ultra power saving while you work.
  • In Wi-Fi settings, look for an option like Keep Wi-Fi on during sleep or Wi-Fi optimisation and set it so Wi-Fi stays on. The name varies by brand and many newer phones do not show it.
  • Keep the phone charging and turn on Stay awake in Developer options.
  • Set the battery setting of the app you use for adb to No restrictions (or Don't optimise).

Cause 4: the switch will not turn on at all

If the switch is greyed out or flips back immediately:

  • Not on Wi-Fi. Mobile data does not count. Join any Wi-Fi network. If you have no router, a hotspot from another phone works: Wireless debugging needs a Wi-Fi network, not internet.
  • You tapped Deny. When asked "Allow wireless debugging on this network?", tap Allow.
  • Guest or office Wi-Fi. Some networks isolate devices or block the ports adb uses. Try a home network or a hotspot.
  • VPN or private DNS apps. Some VPNs take over the network. Pause them and try again.
  • Android 10 or older. There is no Wireless debugging. Check Settings › About phone › Android version.
  • Work profile or managed phone. A company policy can block debugging, often shown as "managed by your administrator". Only the administrator can change that.
  • Some Huawei models. Huawei says Wireless debugging is not offered on some of its phones and tablets at all.

Cause 5: Developer options was reset

System updates, and on some brands a long time without use, can turn Developer options off, which takes Wireless debugging with it. Tap Build number (or OS version on Xiaomi, Software version on vivo) seven times again, then switch Wireless debugging back on. Paths per brand: Wireless debugging on Xiaomi, vivo, OPPO, Samsung and more.

Do you need to pair again?

No. Turning Wireless debugging off and on keeps the list of paired devices. You only need a new pairing if:

  • you removed the device under Wireless debugging › Paired devices,
  • you tapped Revoke USB debugging authorizations, or
  • the device went unused for a long time. On many phones Android forgets an authorisation after about seven days without a connection. Disable adb authorization timeout in Developer options stops that.

What does change every time is the port. A computer has to type the new one in adb connect. The reason is explained in why the Wireless debugging port changes.

How ADB Kit handles it

ADB Kit is built around the fact that Wireless debugging turns off:

  • Once paired, it reconnects by itself when Wireless debugging is switched on again. It finds the new port on the network, so you never type one.
  • If the connection drops while you use it, a bar says Connection lost. Wireless debugging may be off. with a Reconnect button.
  • When an action needs the connection, a small Reconnect popup opens. It retries when you come back from Developer options and closes once connected.
  • If the phone forgot the pairing, it says The device forgot this app. Pair it again. and shows the pairing steps.
  • Recipes scheduled in Auto script try one quiet reconnect. If Wireless debugging was off at run time, the run is recorded with Wireless debugging was off. Connect, then run it again.

So the routine after a restart is: tap the quick settings tile, open ADB Kit, done.

If you use a computer

On a PC, the same causes apply. After you turn Wireless debugging on again:

adb mdns services
adb connect 192.168.1.20:41237

adb mdns services lists the phone's current connect port, and recent platform-tools versions often reconnect paired phones by themselves. If you get Connection refused, the phone is not listening on that port, see fix adb connect: Connection refused.