Default captive portal settings in iode2.0

Hi,

I played a little bit with the captive portal settings of my S9 running iodè 2.0 and would like to go back to the default settings. However, I forgot to note down the default settings before I started changing settings (shame on me :frowning_face:).

As root I modified the following settings:

# pm disable com.android.captiveportallogin
# settings put global captive_portal_detection_enabled 0
# settings put global captive_portal_server localhost
# settings put global captive_portal_mode 0

Could you please let me know the default settings of these parameters?

Thanks & Regards
Tom

Hello @Tom,

iodèOS - Changes in LineageOS to prevent data leaks

Captive portal login: connectivitycheck.gstatic.com replaced by captiveportal.kuketz.de for connectivity check

Source: Set Captive Portal [Beginner]

adb shell settings put global captive_portal_http_url "http://captiveportal.kuketz.de"
adb shell settings put global captive_portal_https_url "https://captiveportal.kuketz.de"
adb shell settings put global captive_portal_fallback_url "http://captiveportal.kuketz.de"
adb shell settings put global captive_portal_other_fallback_urls "http://captiveportal.kuketz.de"

You can check whether the URLs have been adjusted as desired with the following command:

adb shell settings get global captive_portal_https_url

Output: https://captiveportal.kuketz.de

To undo the changes, the following command is sufficient:

adb shell settings delete global captive_portal_http_url
adb shell settings delete global captive_portal_https_url

Thanks Iodysseus,

In fact, I had read Mike’s blog before in order to completely disable the captive portal check (see “AFWall+ & Captive-Portal [Advanced] - [2]” in his blog). And when I tried to restore the default settings I had set the globals you have listed.

However, I was wondering, how to deal with the other globals that I had tweaked to disable the captive portal check.

# pm disable com.android.captiveportallogin
# settings put global captive_portal_detection_enabled 0
# settings put global captive_portal_server localhost
# settings put global captive_portal_mode 0

So, what I have done in the meantime is this:

# settings put global captive_portal_mode 1
# settings put global captive_portal_server captiveportal.kuketz.de
# settings put global captive_portal_http_url "http://captiveportal.kuketz.de"
# settings put global captive_portal_https_url "https://captiveportal.kuketz.de"
# settings put global captive_portal_fallback_url "http://captiveportal.kuketz.de"
# settings put global captive_portal_other_fallback_urls "http://captiveportal.kuketz.de"
# settings put global captive_portal_detection_enabled 1
# pm enable com.android.captiveportallogin

I hope it does the trick. At least, I get the output " https://captiveportal.kuketz.de" you mentioned, I see briefly the small “x” in the notification bar shortly before a Wifi connection is established and afterwards I have access to the internet. Still, I did not check the access via free Wifi portals. So, if there is anything wrong with my settings trying to restore the default behavior, I would appreciate to get a corresponding hint.

Thanks & Regards
Tom

1 Like

@Antoine, I appreciate your expertise. Please give your expert comment. Thank you.

@vince31fr is the expert :slight_smile:

I think you should remove all settings you defined :

settings put global captive_portal_detection_enabled 0  (==> deprecated)
settings delete global captive_portal_mode
settings delete global captive_portal_server
settings delete global captive_portal_http_url
settings delete global global captive_portal_https_url
settings delete global captive_portal_fallback_url
settings delete global captive_portal_other_fallback_urls

Thanks vince31fr,

I have done what you suggested and my Wifi access at home still works :slightly_smiling_face:. After the mandatory reboot, I enabled the Wifi access, I saw briefly the small “x” in the notification bar shortly before a Wifi connection was established and afterwards I had access to the internet.

BTW: Please not the typo in your reply. One of the two "global"s should be removed.

settings delete global global captive_portal_https_url

As the deprecated “captive_portal_detection_enabled” is concerned, I thought why keep this parameter when its deprecated, so in a second step I also removed that one.

settings delete captive_portal_detection_enabled

I repeated the mandatory reboot and found the same behavior as outlined above. For the next test I will have to find me a free Wifi hotspot to connect to.

Merci
Tom