When you connect to a public Wi-Fi network at an airport, hotel, or coffee shop, Android automatically detects if internet access is blocked and launches a captive portal login page (often requiring you to accept terms and conditions or pay for access). It achieves this by periodically pinging a Google server (e.g., connectivitycheck.gstatic.com) via a system app known as “Captive Portal Login”. While necessary for public hotspots, this constant background polling consumes battery life and network data. Furthermore, in highly secure corporate or military environments where devices are strictly confined to isolated, air-gapped intranet Wi-Fi networks (which have no outbound internet access by design), the captive portal daemon will relentlessly throw “Sign into network” errors and may drop the Wi-Fi connection entirely in an attempt to find a better network.
This guide explains how to completely disable the Captive Portal Login daemon system-wide on an Android device via ADB, stopping the constant connectivity checks and preventing the OS from dropping isolated Wi-Fi connections.
Disable Captive Portal Login via ADB
Because “CaptivePortalLogin” is a protected system package, it cannot be disabled or uninstalled through the standard Settings UI. We must utilize the Android Debug Bridge (ADB) to unload the package from the current user space.
- Enable Developer Options on your Android device by tapping the Build number 7 times in Settings > About phone.
- Navigate to Settings > System > Developer options and turn on USB debugging.
- Connect your Android device to a PC or Mac via a USB cable. (Accept the RSA fingerprint prompt on the phone screen).
- Open Command Prompt (Windows) or Terminal (macOS/Linux) on your computer.
- Verify the connection by typing
adb devices. Your device should be listed. - To completely disable the captive portal connectivity check framework, execute the following command:
adb shell settings put global captive_portal_mode 0 - (Optional) If you want to take it a step further and freeze the actual system app responsible for rendering the login webview, run:
adb shell pm disable-user --user 0 com.android.captiveportallogin
Verify the Configuration Lockdown
By setting the global captive portal mode to 0, you instruct the Android networking stack to completely ignore the fact that a network does not have outbound internet access. It will immediately connect to the Wi-Fi router and stay connected, regardless of internet status.
To verify the restriction is active, reboot your smartphone. Connect to a known internal-only Wi-Fi network (or simply disconnect your home router from the modem so it broadcasts Wi-Fi without internet). The Android device will connect immediately. It will display a small “x” or exclamation mark over the Wi-Fi icon, but it will not prompt you to “Sign into network,” nor will it automatically disconnect to seek cellular data. Your device is now optimized for secure, isolated intranet usage.