0

Does anybody know where I can look at finding the source code for the modified version of Android that Samsung devices seem to be running?

The reason I ask is because i'm trying to figure out captive portal issues with Samsung devices (ONLY on samsung devices), as it seems they do not follow the standard Android methods for handling captive portal network login prompts.

There's numerous forums and questions online of people asking about this, and Samsung clearly has zero intention of giving any kind of answer to this ... so my only option I can think of is to try and find the source code to go through it, and figure out wtf they are doing differently to get my captive portals to trigger correctly.

Here's one forum as an example: https://community.meraki.com/t5/Wire...ces/td-p/38048

I've done everything I can imagine to get this to work, and nothing seems to work. Samsung devices don't even seem to query the /generate_204 URL even after responding with the wifi router's IP address to DNS queries. This ONLY happens on samsung devices .. ugh!

OR if anybody knows what Samsung is doing differently in their captive portal detection, I would <3 you forever if you could provide that section of the source code

For example, here's what i found in Google's android source code: https://android.googlesource.com/pla...acker.java#340

But it appears that Samsung devices, never even get to this point of attempting to query the /generate_204 and i don't know why! AHHH!

Just for reference, this is for my Open Source captive portal library (not for any commercial gain, but for benefit of the open source community): https://github.com/tripflex/captive-portal

Logging on my embedded device I see these logs when Samsung device connects to wifi:

[Mar 31 15:20:04.136] I (39010) tcpip_adapter: softAP assign IP to station,IP is: 192.168.4.2
[Mar 31 15:20:04.144] esp32_main.c:98         event: 17
[Mar 31 15:20:04.572] mgos_captive_portal:230 DNS A Query for connectivitycheck.gstatic.com sending IP 192.168.4.1
[Mar 31 15:20:04.581] mgos_captive_portal:230 DNS A Query for connectivitycheck.gstatic.com sending IP 192.168.4.1
[Mar 31 15:20:05.016] mgos_captive_portal:230 DNS A Query for www.google.com sending IP 192.168.4.1
[Mar 31 15:20:05.425] mgos_captive_portal:230 DNS A Query for connectivitycheck.gstatic.com sending IP 192.168.4.1
[Mar 31 15:20:05.434] mgos_captive_portal:230 DNS A Query for connectivitycheck.gstatic.com sending IP 192.168.4.1
[Mar 31 15:20:05.752] mgos_captive_portal:230 DNS A Query for www.google.com sending IP 192.168.4.1
[Mar 31 15:20:06.215] mgos_captive_portal:230 DNS A Query for px.moatads.com sending IP 192.168.4.1
[Mar 31 15:20:06.320] mgos_captive_portal:230 DNS A Query for mtalk.google.com sending IP 192.168.4.1
[Mar 31 15:20:06.396] mgos_captive_portal:230 DNS A Query for alt6-mtalk.google.com sending IP 192.168.4.1
[Mar 31 15:20:06.513] mgos_captive_portal:230 DNS A Query for api.samsungcloud.com sending IP 192.168.4.1
[Mar 31 15:20:11.355] mgos_captive_portal:230 DNS A Query for connectivitycheck.gstatic.com sending IP 192.168.4.1
[Mar 31 15:20:11.364] mgos_captive_portal:230 DNS A Query for connectivitycheck.gstatic.com sending IP 192.168.4.1
[Mar 31 15:20:11.669] mgos_captive_portal:230 DNS A Query for www.google.com sending IP 192.168.4.1

After "Clicking" on the wifi network in Wifi settings (after it's connected), I see this query:

[Mar 31 15:20:12.892] mg_lwip_net_if.c:364    0x3ffc9458 conn 0x3ffca3f4 from 192.168.4.2:60542
[Mar 31 15:20:12.899] mg_net.c:544            0x3ffc9458 0x3ffe2088 1073521852 0
[Mar 31 15:20:12.905] mg_net.c:551            0x3ffe2088 tcp://192.168.4.2:60542
[Mar 31 15:20:12.911] mgos_http_server.c:176  0x3ffe2088 HTTP connection from 192.168.4.2:60542
[Mar 31 15:20:12.918] mg_http.c:2012          /  2 1
[Mar 31 15:20:12.921] mgos_captive_portal.:42       method: "GET"
[Mar 31 15:20:12.926] mgos_captive_portal.:43          uri: "/"

But it doesn't query to anything like connectivitycheck.gstatic.com/generate_204 like ALL OTHER Android devices do, but it makes a query to the root / of the IP address (which i assume is with them showing the "Manage Router" link on the wifi settings page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.