Android Enthusiasts
Q&A for enthusiasts and power users of the Android operating system
Latest Questions
32
votes
3
answers
197669
views
How does WiFi in android detect if the device has to sign in or not?
When the device tries to connect to an access point or router, it has to sign in on the captive portal page with the message saying > "Sign in to Wi-Fi network". How does the access point/router identify that a sign in is required for the device and what is the process behind it?
When the device tries to connect to an access point or router, it has to sign in on the captive portal page with the message saying
> "Sign in to Wi-Fi network".
How does the access point/router identify that a sign in is required for the device and what is the process behind it?
Sagar Vaghela
(423 rep)
Sep 15, 2015, 08:24 AM
• Last activity: Jul 21, 2025, 08:38 PM
2
votes
2
answers
899
views
Auto-fill on WiFi Captive Portal
Is there a way to auto-fill the username/password when connecting to a Wifi's Captive Portal? If possible, I would like a method that does not require root access. The portal opens with the system's default "HTML viewer" and not with Firefox/Chrome which would solve the problem since these browsers...
Is there a way to auto-fill the username/password when connecting to a Wifi's Captive Portal? If possible, I would like a method that does not require root access.
The portal opens with the system's default "HTML viewer" and not with Firefox/Chrome which would solve the problem since these browsers offer auto-fill.
This question has been asked in the past and users suggested:
- Captive Portal Controller app (but requires root)
- CaptivePortalLogin app which claims to do this, but is in beta and does not seem to work for me.
Version: Android 11 / MIUI 12.5
andreasathan
(29 rep)
Oct 4, 2023, 06:30 AM
• Last activity: Jun 25, 2025, 02:03 AM
2
votes
3
answers
9132
views
CaptivePortalLogin crashes every time I try to join a network
Every time I try to join an unencrypted wifi network that is protected by a web login (e.g. in a hotel), I get a popup message saying "Android System: Sign in to a Wi-Fi network ", I click on this message, and the result is: CaptivePortalLogin has stopped Open app again I have tried also using Firef...
Every time I try to join an unencrypted wifi network that is protected by a web login (e.g. in a hotel), I get a popup message saying "Android System: Sign in to a Wi-Fi network ", I click on this message, and the result is:
CaptivePortalLogin has stopped
Open app again
I have tried also using Firefox or Chrome to find the portal by accessing a random HTTP page or the exact URL that my laptop is directed to to log in. Firefox returns "Server not found"; Chrome says "You are offline",
DNS_PROBE_FINISHED_NO_INTERNET
. My phone is set to not use mobile networks for data.
Is there any way to fix this or is there a workaround?
System information:
* Android 8.1.0 (security patch level 1 June 2018)
* Nokia 6.1, model TA-1050
* Kernel 4.4.78-perf+ (1/6/2018)
EDIT: I've tried a few apps as a workaround, such as [Wifi Web Auth](https://play.google.com/store/apps/details?id=es.hol.galvisoft.wifiwebauth) in case CaptivePortalLogin is the problem. This app errors with "Web page not available", ERR_INTERNET_DISCONNECTED
, which seems like an odd complaint for an app designed to establish a connection. [Wifi Quick Login](https://play.google.com/store/apps/details?id=com.albionresearch.wifiquickconnect) fails as well.
Dan
(121 rep)
Aug 13, 2018, 12:56 AM
• Last activity: Jun 15, 2025, 09:09 AM
13
votes
3
answers
11959
views
How to make a 'Captive Portal' on my mobile hotspot?
Some Wi-Fi networks such as those you find in coffee shops, when connected to, automatically redirect you to a web page where you will need to do something (enter credentials, accept terms of service, etc) in order to access the internet. Is the same possible with an Android hotspot?
Some Wi-Fi networks such as those you find in coffee shops, when connected to, automatically redirect you to a web page where you will need to do something (enter credentials, accept terms of service, etc) in order to access the internet.
Is the same possible with an Android hotspot?
CrossBones
(533 rep)
Jul 6, 2015, 04:53 PM
• Last activity: Aug 30, 2023, 10:30 AM
0
votes
0
answers
2369
views
How to Run Captive Portal Server on Android Device using Hotspot SoftAp and DHCP options
**Goal:** I want to run a web server that provides a Captive portal service on an Android Device, using the native Android [Soft AP/Hotspot](https://source.android.com/devices/tech/connect/wifi-softap-tethering), Termux, NodeJs, and the "new" way to detect captive portals using a DHCP option: [Capti...
**Goal:**
I want to run a web server that provides a Captive portal service on an Android Device, using the native Android [Soft AP/Hotspot](https://source.android.com/devices/tech/connect/wifi-softap-tethering) , Termux, NodeJs, and the "new" way to detect captive portals using a DHCP option: [Captive-Portal Identification in DHCP and Router Advertisements (RAs)](https://datatracker.ietf.org/doc/html/rfc8910) ,.
**Approach:**
I want to add an option on the DHCP handshake of my Android Device Soft AP as specified in the [RFC](https://datatracker.ietf.org/doc/html/rfc8910) , [Apple](https://developer.apple.com/news/?id=q78sq5rv) and [Android](https://developer.android.com/about/versions/11/features/captive-portal) official forums.
(the old way to create a captive portal was to intercept and controll all DNS or HTTP requests of each device conected to the AccessPoint, but in order to do it I need to ROOT my Device and install a DNS server or change the IP tables, and I dont want to do it becouse is very similar of what I already did that on a RaspberryPi)
**Current State:**
Im able to run a local Http Server running Nodejs in Termux app on an NOT ROOTED Android device,I want to know if it is posible to ADD THAT SIMPLE DHCP OPTION to the Android DHCP native handshake, maybe creating an APP and using the [wifi-softap-tethering](https://source.android.com/devices/tech/connect/wifi-softap-tethering) utilities or changing some kind of DHCP config file in some location like /etc/dhcp/dhcp.conf to add the option.
If adding a DHCP option is not posible Im gonna change the IP tables or run a DNS server and intercept the trafic to provide the Captive Portal Detection as the OLD fashion way.
**Previous Attempts:**
I was able to create a captive portal using DNSMASQ and HOSTAPD on a RaspberryPi, I suppose that I can do the same on MY Android device, but I want to USe the "modern Way" using DHCP captive portal options.
**Unknowns**
1. Where is the configuration of the local Android DHCP?, is it hardcoded in the source code or it exists in a /system/{some-dhcp-func}/dhcp.conf file?
2. Is it posible to add a DHCP option to the native Android Soft AP functionality?
3. Can I use or extend some offical Class of Android apk and create my app to add the DHCP Option in the Handshake?
4. Do I really need to root my device, install a DNS server and intercept all the DNS /HTTP trafic to provide the captive portal functionality?
Diego Meza
(101 rep)
Jul 15, 2022, 06:21 PM
• Last activity: Jun 1, 2023, 11:52 PM
5
votes
1
answers
15972
views
How to get the captive portal's URL which I am currently connected to?
I just connected to a WiFi network which uses captive portal login page. I would like to view the captive portal's URL or IP address. How do I do that? I have tried clicking forget network on the WiFi in order to get the login page again, but it just connects without triggering the login screen, I t...
I just connected to a WiFi network which uses captive portal login page. I would like to view the captive portal's URL or IP address.
How do I do that?
I have tried clicking forget network on the WiFi in order to get the login page again, but it just connects without triggering the login screen, I think it saves the login info upon correct login.
The second thing I have tried is to wipe the cache and data of the CaptivePortal app from system settings, with no luck.
Babken Vardanyan
(63 rep)
Jul 30, 2018, 03:37 PM
• Last activity: May 7, 2022, 06:04 AM
0
votes
2
answers
1490
views
Android does not detect a captive portal
I have an access point hosting a login page (which doesn't have actual internet access) and I'm using dnsmasq to answer all DNS requests with the IP address of this page. If an Android device connects, I want it to know that it's connected to a captive portal and show the "Sign-in to wifi network" p...
I have an access point hosting a login page (which doesn't have actual internet access) and I'm using dnsmasq to answer all DNS requests with the IP address of this page. If an Android device connects, I want it to know that it's connected to a captive portal and show the "Sign-in to wifi network" prompt but this doesn't happen (the device just silently connects to the AP), although Wireshark shows that the HTTP GET requests for
/generate_204
are properly responded with HTTP/1.1 200 OK
.
Any suggestions why this could be happening? Could there be something other than the response for /generate_204
that Android checks? I'm guessing that the detection fails if the device finds out that there's no internet access.
Awais Chishti
(111 rep)
Dec 30, 2016, 09:33 AM
• Last activity: Jan 28, 2022, 04:04 AM
1
votes
1
answers
13622
views
Can't connect to "Secured Network" via WiFi. Get stuck at a Lock screen
- OS: OxygenOS version 2.2.0 - Android version: 5.1.1 - Phone Model: ONE 2005 [OnePlus 2] (Build number: One A2005_14_151211) When I connect to a Secured Wifi network that requires that I "Accept" some sort of agreement, normally I would click on "Sign into Wi-Fi Network", which pops up on my status...
- OS: OxygenOS version 2.2.0
- Android version: 5.1.1
- Phone Model: ONE 2005 [OnePlus 2] (Build number: One A2005_14_151211)
When I connect to a Secured Wifi network that requires that I "Accept" some sort of agreement, normally I would click on "Sign into Wi-Fi Network", which pops up on my status screen and then I would "Accept" the agreement.
Now when I click on "Sign into Wi-Fi Network", all I see is a screen with a big circle around a lock. I can't tap on anything on this screen, except exiting out. If I exit out, I am taken back to my home screen and not connected to the internet. All that happens is that "Sign into Wi-Fi Network" appears in my status screen again. If I click on it again, I go right back to the lock screen.
Upon further investigation, I saw Option Dots on the top right on that screen with the big lock on it. I tapped the Option Dots, which brought up a menu with the following 2 options:
1. "Do not use this network"
2. "Use this network as is"
I selected "*Use this network as is*"
After doing this, I am taken back to my home screen as before. This time, the "Sign into Wi-Fi Network" option is no longer on my status screen and I am still not connected to the internet when I tried to access my email, Facebook, etc.
Any insight would be much appreciated.
Post-it Note
(21 rep)
Feb 12, 2016, 09:28 PM
• Last activity: Jan 27, 2022, 05:31 PM
1
votes
0
answers
5966
views
Cannot logon to a "captive portal" wi-fi network
I am unable to connect to any wi-fi networks that require a login through what I assume is captive portal. This worked fine for perhaps a year but has stopped working recently. I am running Android 8.1.0 on a Nokia 6. I get the following response after attempting go to the login: [
Roland Merrick
(11 rep)
Jul 5, 2018, 04:30 PM
• Last activity: Apr 5, 2021, 10:45 PM
1
votes
1
answers
1714
views
Tap here to sign in to network
Asus ROG 2 Phone 17.0240.2009.49 Not Rooted Happens All the time Wifi Connection in my home ------------------------------------------- Ever since updating to 17.0240.2009.49, my phone has been listing one of my wifi connections as "Limited" But today, it now prompts to "Sign in to Wi-Fi network" I...
Asus ROG 2 Phone
17.0240.2009.49
Not Rooted
Happens All the time
Wifi Connection in my home
-------------------------------------------
Ever since updating to 17.0240.2009.49, my phone has been listing one of my wifi connections as "Limited"
But today, it now prompts to "Sign in to Wi-Fi network"
I have no captive portal on this network.
My laptop (windows 10 pro) connects without any problems or prompt.
My tablet (Nexus 9) connects without any problems or prompt.
If I tap to sign in, I am shown a blank page.
If I select "Use this network as-is" in the 3 dots menu, it works for a few minutes and then puts an X on the Wifi Icon saying "no connection" - even though I was browsing web pages before then.
After that, I can't access anything.
I have tried:
static/dhcp - no change
Treat as Unmetered - no change
Rebooted - no change
Reset Wifi - no change
Dynamic/Static Mac address - no change
Rebooted the router - no change
looked through pfSense logs - no information
Any ideas?
-----------------------
Update:
After selecting "Use this network as-is", it shows connected for a bit, then shows disconnected with an X in the Wifi Icon. At that point, I can't access anything.
But after waiting a few minutes, I can access everything just fine again - even though it still shows an X on the Wifi Icon and says 'No Internet' when I pull down the status bar. However, that is only with Mobile Network Data turned OFF or I turn off "Switch to Mobile data when WiFi has no Internet"
So, for some stupid reason, the phone thinks I have no Internet on this Wifi SSID, so it tries over Network Data and fails - so nothing works.
There must be a Ping Test or something for Wifi that is failing and so it reports no Internet and borks everything up.
What the HECK is going on and how do I get this back to a sensible state?
Da Hai Zhu
(11 rep)
Oct 7, 2020, 01:47 AM
• Last activity: Oct 7, 2020, 11:17 AM
5
votes
2
answers
17113
views
Captive Portal detection causing phones to disconnect from Wi-Fi in intranet environment
Hello Android Enthusiasts! I am the manager of an Internet Cafe on a cruise ship, and we're being plagued by a persistent problem that I can't quite solve. We have a wireless network throughout the ship which can be used to access the Internet, but also includes a local intranet through which guests...
Hello Android Enthusiasts!
I am the manager of an Internet Cafe on a cruise ship, and we're being plagued by a persistent problem that I can't quite solve.
We have a wireless network throughout the ship which can be used to access the Internet, but also includes a local intranet through which guests can view the daily events schedule, check their account, and use a free internal messaging service.
The issue we are running into seems to be with Captive Portal detection, and from my observations it appears to be affecting only Samsung phones (might just be S4 and higher), and has been observed on every OS from 4.2.2 and up. What happens is that they connect to the wireless network, and are then told that sign-in is required. A captive portal window will pop up, which does bring up our home page. If they then connect to the Internet, no problem. But if they just want to use the intranet, or if it takes them too long to fill out the user registration form, they get told that the network has been disconnected and we have to start over again from "sign-in is required."
I've done quite a bit of searching online for answers, and one is that the user must select "use network as is" from the captive portal options, but I see this option on very few devices. Other options have involved rooting the phone and running some terminal commands, which is obviously not something I can ask the guests to do.
We posed the issue to our shoreside networking team, and they came back saying they had whitelisted the following URLs and that this should fix the problem:
clients3.google.com/
apple.com/library/test/
captive.apple.com
connectivitycheck.android.com
connectivitycheck.gstatic.com
connectivitycheck.android.com/generate_204
clients3.google.com/generate_204
android.clients.google.com
It did not, phones are still being disconnected after about a minute if no Internet connection is made.
Is there anything else we can try? We are ultimately looking for a fix that won't require our users to do anything special.
Jacki Murphy
(59 rep)
Mar 14, 2016, 03:37 AM
• Last activity: Jul 2, 2020, 10:35 PM
3
votes
2
answers
2555
views
Stay connected to WiFi that requires sign-in
I recently upgraded my Samsung Galaxy S4 Mini to Kitkat (4.4.2), and I noticed a new behaviour that I'd like to disable: when I'm connected to a wifi network with a captive portal that requires sign-in, and I don't actually sign in, the phone will disconnect from the network after a while, and I hav...
I recently upgraded my Samsung Galaxy S4 Mini to Kitkat (4.4.2), and I noticed a new behaviour that I'd like to disable: when I'm connected to a wifi network with a captive portal that requires sign-in, and I don't actually sign in, the phone will disconnect from the network after a while, and I have to reactivate that wifi network manually.
That's normally a useful thing to do, in order to maintain some kind of connectivity, but less so when the wifi network in question is the one in the London Underground, where there is no mobile phone signal. While using a normal web browser requires sign-in, there are some apps that work without it, such as Opera Mini and Facebook Chat, and sometimes I'd rather not spend my time on dealing with the sign-in page. Disconnecting from the wifi network will in this case only make connectivity worse.
Some googling suggested that I turn the option "Smart network switch" off, but it is already off and I still see this behaviour. Is there anything else I can do to make the phone keep the wifi connection regardless of whether I'm "signed in"?
legoscia
(131 rep)
Nov 15, 2014, 09:26 AM
• Last activity: Jun 12, 2020, 06:00 PM
13
votes
1
answers
19252
views
Captive Portal parameters
There are [several captive portal parameters][1] one could apply to an Android device via `settings put global` – the most famous probably being settings put global captive_portal_detection_enabled 0 to completely turn off captive portal check (for Android < 8). Can someone explain how to use the ot...
There are several captive portal parameters one could apply to an Android device via
settings put global
– the most famous probably being
settings put global captive_portal_detection_enabled 0
to completely turn off captive portal check (for Android < 8). Can someone explain how to use the others – e.g. to define a "custom captive portal server for tin-foils"? For example, one cannot simply do a
settings put global captive_portal_server example.com
as that would, in most cases, cause captive portal check to permanently fail (background: doing so, portal check would construct an URL http://example.com/generate_204
and check against that, expecting a specific response).
So apart from simply deactivating captive portal check altogether (which might, as I've read, lead to other issues like not being redirected to the correct portal in some cases), what else can one do to enhance privacy in this context?
Examples (if I got them right):
* captive_portal_mode
(Android 8+?):
* 0
: Don't attempt to detect captive portals
* 1
: Prompt the user to sign in
* 2
: Immediately disconnect from the network and do not reconnect to that network in the future
* captive_portal_detection_enabled
(Android <8?):
* 0
: Completely disable captive portal checks
* 1
: Enable it (default)
While these examples are pretty much straight-forward: How to use the other parameters?
Izzy
(91596 rep)
Nov 27, 2017, 03:22 PM
• Last activity: Feb 4, 2020, 01:49 PM
0
votes
1
answers
2083
views
Why am I getting an SSL error on my captive portal?
I setup a captive portal on a wireless access point. If I use a laptop to connect to it, the laptop pops up a browser telling me to login to the captive portal. I can open any browser on the laptop (IE, Chrome, Firefox) and it works fine. With my Samsung Galaxy S8 (Android 9), when I connect to the...
I setup a captive portal on a wireless access point.
If I use a laptop to connect to it, the laptop pops up a browser telling me to login to the captive portal. I can open any browser on the laptop (IE, Chrome, Firefox) and it works fine.
With my Samsung Galaxy S8 (Android 9), when I connect to the wireless access point, Android automatically checks for captive portals, same as every other device does these days. Since it detects it, it also pops up a browser and tries to load the login page, and on my phone, it shows an SSL cert error. Other Android phones don't have this error.
If I tell my phone to stay connected to the WiFi despite not having logged in, and open Chrome on my phone, the exact same captive portal redirect loads without any issues. It is clear that whatever internal browser my phone is popping up, it's not the regular Chrome browser, as that one works fine. It also doesn't appear to be the "Internet" app my phone shipped with, as that shows no SSL error either.
What browser is my Galaxy S8 using to detect captive portals? Why does it have an SSL error when other browsers and devices don't? How do I even begin to debug this?
Note: My SSL cert was generated by LetsEncrypt. It points to http://ocsp.int-x3.letsencrypt.org as the server for verifying that the cert hasn't been revoked. I added this domain to my captive portal's walled garden (bypass) list, so that connections to that domain are NOT redirected, but it didn't help.

John
(111 rep)
Jan 29, 2020, 11:15 PM
• Last activity: Feb 1, 2020, 12:11 AM
2
votes
1
answers
901
views
How to avoid WiFi disconnection if Google cannot be pinged?
Say I have blocked google and the sorts with my router. Now Android thinks that the wifi has no connection because it can't ping google and uses my mobile data instead although the WiFi is perfectly fine. How can I tell my phone to ping some other server in order to check the connection? (root is an...
Say I have blocked google and the sorts with my router. Now Android thinks that the wifi has no connection because it can't ping google and uses my mobile data instead although the WiFi is perfectly fine.
How can I tell my phone to ping some other server in order to check the connection? (root is an option).
julius
(23 rep)
Dec 2, 2019, 09:24 PM
• Last activity: Dec 3, 2019, 06:38 AM
1
votes
1
answers
3708
views
Prevent browser automatically launched when join to open wifi
How to prevent browser to automatically launched when I join to a wifi network with captive portal? i.e. with note 3
How to prevent browser to automatically launched when I join to a wifi network with captive portal? i.e. with note 3
vintry
(111 rep)
Nov 7, 2014, 03:12 AM
• Last activity: Oct 28, 2019, 07:37 AM
1
votes
1
answers
1094
views
Why isn't my Galaxy S8 popping up my Captive Portal login page?
I'm dealing with a Raspberry Pi 3 that is using hostapd to create its own wireless network. When an Android client first connects to the network, it tries to grab the page `http://connectivitycheck.gstatic.com/generate_204` to see if it's behind a client portal. My Raspberry Pi redirects this reques...
I'm dealing with a Raspberry Pi 3 that is using hostapd to create its own wireless network.
When an Android client first connects to the network, it tries to grab the page
http://connectivitycheck.gstatic.com/generate_204
to see if it's behind a client portal. My Raspberry Pi redirects this request to an instance of nginx that it is running, and returns a 302 redirect to my login page.
Because Android didn't get the response it was looking for (an HTTP 204), but got a 302 instead, from what I understand, it's supposed to popup my login page. I've seen this in action using other captive portal hardware.
In my case however, Android just shows a popup that says "Internet may not be available: Connect to another network or turn on Switch to mobile data".
Am I doing something wrong? Is there something specific Android is looking for in the login page before it will make it pop up?
Most of my testing is on my Galaxy S8. I tried it on a friend's S9, and that doesn't work either. Using a Windows 10 laptop though, the login page does popup.
Tal
(71 rep)
Aug 9, 2019, 10:54 PM
• Last activity: Aug 12, 2019, 04:08 PM
1
votes
1
answers
1920
views
Remove auto-fill text from native captive portal app
I accidentally entered my password in the username field of the captive portal and that now comes up as an auto-fill suggestion for the username, which I would like to delete/reset. This does not open up in the browser, but does so in some separate default window which I don't seem to have much cont...
I accidentally entered my password in the username field of the captive portal and that now comes up as an auto-fill suggestion for the username, which I would like to delete/reset. This does not open up in the browser, but does so in some separate default window which I don't seem to have much control over. Is this possible?
Roney Michael
(113 rep)
Apr 7, 2017, 05:04 PM
• Last activity: Jul 2, 2019, 02:05 PM
0
votes
0
answers
800
views
Browsers crashing when trying to access captive portal (Wi-Fi log in page)
Recently I noticed that whenever I try to login to a captive portal Wi-Fi page, all of the browsers that I'm using crash. This happens before the page even finishes loading and consenquently I am unable to log in to the Wi-Fi service. I have tried using different browsers (Stock Android browser, Goo...
Recently I noticed that whenever I try to login to a captive portal Wi-Fi page, all of the browsers that
I'm using crash. This happens before the page even finishes loading and consenquently I am unable to log in to the Wi-Fi service.
I have tried using different browsers (Stock Android browser, Google Chrome, Dolphin browser and Opera Mini). The following error shows:
Unfortunately "browser" has stopped
for each of the mentioned browsers or sometimes they just close to home screen with no specific error message. I suspect it may be due to a conflicting certificate signature or problems with certificate because Chrome shows
NET::ERR_CERT_AUTHORITY_INVALID with HTS
error but I have
no substantive evidence for this, since it used to work fine before.
Also I have noticed that on the other device running Android 7.0 it reports a problem with the certificate:
> There is a problem with the security certificate for this site
What could be the cause of the problem and are there any workarounds to fix this?
**Edit**: I've included the screenshot

xavier_fakerat
(10345 rep)
Jun 2, 2017, 08:39 PM
• Last activity: Oct 28, 2018, 06:13 PM
2
votes
1
answers
214
views
Reliably accessing public Wi-Fi "Agreement" page on Android
This has probably been addressed elsewhere, but I can't find it, so I will risk the ire of the community by asking it here. When I connect to public Wi-Fi on my Android phone (version 6.0.1 at the moment), it pops open Chrome so I can hit “agree” or whatever the public Wi-Fi provider asks me to hit...
This has probably been addressed elsewhere, but I can't find it, so I will risk the ire of the community by asking it here.
When I connect to public Wi-Fi on my Android phone (version 6.0.1 at the moment), it pops open Chrome so I can hit “agree” or whatever the public Wi-Fi provider asks me to hit before giving proper internet access. Chrome always tries to bring up https://www.google.com , which, of course, doesn't redirect properly because it's http**s**. So I manually type in hp.com since it's quick to type and doesn't redirect to https. Then whatever captive portal software is running can “catch” it and redirect me to the agreement page.
My question is: how to make Chrome (or Android) go somewhere else besides https://www.google.com ? I assumed it was my home page configuration in Chrome, but it's not.
In case it's relevant, I'm on a Samsung Galaxy S5.
theglossy1
(121 rep)
Dec 18, 2017, 06:55 PM
• Last activity: Dec 18, 2017, 10:33 PM
Showing page 1 of 20 total questions