Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch default browser from Android's captive portal browser (CaptivePortalLogin)

On Android devices, our captive portal launches in Android's Captive Portal Browser. After authentication, we redirect the user to a status page, where they can see their session information, remaining time and data, etc. Most users choose to keep this page open.

The problem is that the status page redirect happens within the Captive Portal browser, which will eventually close. Is there any way that we can open the status page, in a 'full' browser, form within the Captive Portal browser?

Most of the relevant Android code seems to be in CaptivePortalLoginActivity.java. The mBrowserBailOutToken variable looks interesting but I don't see how we can get the token.

Any other ideas on how to handle a situation like this would also be appreciated.

like image 433
J. Johnson Avatar asked Dec 27 '15 06:12

J. Johnson


People also ask

What is Captiveportallogin on Samsung?

What is Com. captiveportallogin? To answer your question, it is the Captive Portal Login app's Android package. It is responsible for the authentication of WiFi networks. Think about all the times you've tried connecting to free WiFi networks - you would have seen a web page asking for login information.

What is captive portal on my Android phone?

The captive portal feature is a software implementation that blocks clients from accessing the network until user verification has been established. You can set up verification to allow access for both guests and authenticated users.

How do I fix my captive portal login?

Close everything in your browser. If you have your startup setting “Continue where you left off”, then change it to “Open the new tab page” and open your browser again. If you don't see the captive portal come up, try going to a http:// website as they can trigger the captive portal.

How does Android detect captive portal?

Captive portals were detected using cleartext HTTP probes to known destinations (such as connectivitycheck.gstatic.com ), and if the probe received an HTTP redirect, the device assumed that the network was a captive portal.


1 Answers

I don't think it is possible.

The mBrowserBailOut variable is set to a random number so you have no change to know that one from within the captive portal page.

Only if the redirect URL contains this variable it bails out.

The variable is used in cases there is an SSL error, so in case you have such, it would prompt the user to use the default browser.

EDIT: I mean what is funny, is that the URL only has to contain the token somewhere. So in theory you could make up an URL that contains all the possible tokens.

Long.MAX_VALUE is 9,223,372,036,854,775,807.

So that are far too much possibilities that fit into an URL, despite that fact that smaller numbers are already contained in larger ones.

like image 117
Alex Avatar answered Sep 19 '22 13:09

Alex