[Android General] dhacke:
Dear XDA community,

this my first own thread and guide so please be forbear with me:)

And i hope i choose the right section:)

As the topic in the thread says it handles about the Captive Portal Checkin done by Android.

So first some general info about this.

1. What is the Captive Portal Checkin?

Every time your android phone connects to the internet via mobile connection or wlan it sends a request to the following url:

http://connectivitycheck.gstatic.com (Google URL).

After that your gets device gets http 204 answer from the mentioned url and at that point the x-symbol at your network icon in the status bar disappears.

The reason for that behavior is that Android wants to be sure that your connection has internet access.

If you block that request via AfWall for example the dns fails in some cases and you can't go into the Internet.

Silly.

2. Why is this problematic?

That's a good question because this answer from Google doesn't much hold data. But every time when this connection is done Google get the following information:

- IP-adress

- Time of the internet access

- the Browser which you use

In my case i use custom roms and no Gapps to avoid Google as much as i can. So i don't want that "ping" to Google.

That's the reason why i searched for possibilitys to get rid of this ping. And thanks to a german security and privacy specalist i found a possibilty to avoid the ping to Google and have working Internet, too.

3. What did that guy do?

Very simple. He just started his own Captive Portal Checkin Service. So no need for Google anymore:)

WHAT YOU NEED:

- Computer with installed ADB

- Active USB Debugging at your phone

- At least Android 7

TESTED ON:

I tested his instructions on my old Xperia Z3 phone (CarbonROM 7.0 based on Android 9, Custom Rom).

IMPORTANT:

You need to execute the commands with a booted system (valid for both posts where i write the instructions). It DOESN'T work in the terminal of recoveries (e.g. twrp).

Thanks [MENTION=9381128]jaysir[/MENTION] for the information.

INSTRUCTIONS:

Android 7:

1. Connect the phone with your computer

2. Activate ADB and test the connection with the "adb devices" command. If your phone shows up go to step 3.

3. Execute these commands in your terminal:

=> 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" '

Android 8 and 9:

1. Connect the phone with your computer

2. Activate ADB and test the connection with the "adb devices" command. If your phone shows up go to step 3.

3. Execute these commands in your terminal:

=> 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" '

Well that's it. When you want to revert back just execute the commands again with this url:

http command: http://connectivitycheck.gstatic.com/generate_204

https command:

https://connectivitycheck.gstatic.com/generate_204

Link to the source:

https://www.kuketz-blog.de/android-...204-http-antwort-von-captiveportal-kuketz-de/

If i make any typos tell me:)