[MyHosting.com]   [KO4BB Home Page]   [Manuals Home Page]   [KO4BB Wiki]

Disable Captive Portal Detection

By default, when connected to a WiFi access point, Android checks to see if the Internet is accessible. It does that by trying to connect to the Google site.

If it cannot connect to the Google servers, it marks the WiFi connection (by putting an X or ! near the WiFi icon in the notification bar) so that it will not automatically connect to it, choosing instead a network that has internet connection.

There are cases where you want to remain connected to a network even though it does not have internet access, and there may be other networks in range that do have internet access.

There are two ways to do this:

1. Via ADB

adb.exe is a tool installed on your computer when you install the Android SDK (necessary if you write Android apps). The Android SDK is typically installed under C:\Android and the ADB tool is found under C:\Android\android-sdk\platform-tools

Open an elevated command prompt and navigate to the platform-tools directory.

Connect your device to the computer via USB and check that ADB has found it by entering the command “adb devices”:

C:\Android\android-sdk\platform-tools>adb devices
List of devices attached
3788e4ef device

In this case, 3788e4ef is the serial number of the device connected via USB.

Then to disable the captive portal detection, you need to tell adb that you are going to send a command to that device, then give it the command:

C:\Android\android-sdk\platform-tools>adb -s 3788e4ef shell settings put global captive_portal_detection_enabled 0

You can then verify that the setting was changed:

C:\Android\android-sdk\platform-tools>adb -s 3788e4ef shell settings get global captive_portal_detection_enabled

2. By rooting the device

When the device is rooted, you can install a terminal emulation app and enter the commands above directly on the device itself.

android/disable_captive_portal_detection.txt · Last modified: 2017/05/28 16:28 by ko4bb
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Except as noted, this entire site Copyright © 2002-2017. KO4BB All rights reserved.