# Default captive portal settings in iode2.0

**URL:** <https://community.iode.tech/t/default-captive-portal-settings-in-iode2-0/135>\
**Category:** System and Apps\
**Created:** [25 August 2021 18:29 UTC](https://community.iode.tech/t/default-captive-portal-settings-in-iode2-0/135 "2021-08-25T18:29:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom](https://community.iode.tech/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@Tom](https://community.iode.tech/u/Tom)\
**Post date:** [25 August 2021 18:29 UTC](https://community.iode.tech/t/default-captive-portal-settings-in-iode2-0/135/1 "2021-08-25T18:29:32Z")

</div>

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 ☹).

As root I modified the following settings:

```auto
# 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

---

<div class="post-metadata">

**Author:** ![iodysseus](https://community.iode.tech/user_avatar/community.iode.tech/iodysseus/32/2488_2.png) [@iodysseus](https://community.iode.tech/u/iodysseus)\
**Post date:** [25 August 2021 19:52 UTC](https://community.iode.tech/t/default-captive-portal-settings-in-iode2-0/135/2 "2021-08-25T19:52:55Z")

</div>

Hello @Tom,

iodèOS - [Changes in LineageOS to prevent data leaks](https://forum.xda-developers.com/t/rom-s9-s9-11-0-iodeos-lineageos-18-1-microg-adblocker-03-08-2021.4170059/)

> Captive portal login: [connectivitycheck.gstatic.com](http://connectivitycheck.gstatic.com) replaced by [captiveportal.kuketz.de](http://captiveportal.kuketz.de) for connectivity check

Source: [Set Captive Portal [Beginner]](https://www.kuketz-blog.de/empfehlungsecke/#captive-portal)

```auto
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:

```auto
adb shell settings delete global captive_portal_http_url
adb shell settings delete global captive_portal_https_url

```

---

<div class="post-metadata">

**Author:** ![Tom](https://community.iode.tech/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@Tom](https://community.iode.tech/u/Tom)\
**Post date:** [26 August 2021 07:17 UTC](https://community.iode.tech/t/default-captive-portal-settings-in-iode2-0/135/3 "2021-08-26T07:17:46Z")

</div>

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]](https://www.kuketz-blog.de/empfehlungsecke/#captive-portal)” 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.

```auto
# 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:

```auto
# 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](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

---

<div class="post-metadata">

**Author:** ![iodysseus](https://community.iode.tech/user_avatar/community.iode.tech/iodysseus/32/2488_2.png) [@iodysseus](https://community.iode.tech/u/iodysseus)\
**Post date:** [26 August 2021 08:05 UTC](https://community.iode.tech/t/default-captive-portal-settings-in-iode2-0/135/4 "2021-08-26T08:05:27Z")

</div>

> [@Tom](#):
>
> So, if there is anything wrong with my settings

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

---

<div class="post-metadata">

**Author:** ![Antoine](https://community.iode.tech/user_avatar/community.iode.tech/antoine/32/7_2.png) [@Antoine](https://community.iode.tech/u/Antoine)\
**Post date:** [26 August 2021 13:42 UTC](https://community.iode.tech/t/default-captive-portal-settings-in-iode2-0/135/5 "2021-08-26T13:42:06Z")

</div>

@vince31fr is the expert 🙂

---

<div class="post-metadata">

**Author:** ![vince31fr](https://community.iode.tech/user_avatar/community.iode.tech/vince31fr/32/13_2.png) [@vince31fr](https://community.iode.tech/u/vince31fr)\
**Post date:** [3 September 2021 08:16 UTC](https://community.iode.tech/t/default-captive-portal-settings-in-iode2-0/135/6 "2021-09-03T08:16:55Z")

</div>

I think you should remove all settings you defined :

```auto
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

```

---

<div class="post-metadata">

**Author:** ![Tom](https://community.iode.tech/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@Tom](https://community.iode.tech/u/Tom)\
**Post date:** [3 September 2021 17:14 UTC](https://community.iode.tech/t/default-captive-portal-settings-in-iode2-0/135/7 "2021-09-03T17:14:36Z")

</div>

Thanks vince31fr,

I have done what you suggested and my Wifi access at home still works 🙂. 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.

```auto
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
