3

Out of curiosity, what method is Google using to validate a working internet connection? Are they hitting a universal endpoint? https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_VALIDATED

Any link to some AOSP would be very helpful as well.

Grant Park
  • 1,004
  • 1
  • 9
  • 29

1 Answers1

2

Your question got me curious and searched on cs.android.com (AOSP viewer) a bit.
Looks to me that the stack does a probing step here in order to move to VALIDATED state in this part of code here

The first thing it checks is whether we are in a captive portal situation. The default URL to check that is here in ConnectivityService:

  private static final String DEFAULT_CAPTIVE_PORTAL_HTTP_URL =
            "http://connectivitycheck.gstatic.com/generate_204";
Rick Sanchez
  • 4,528
  • 2
  • 27
  • 53
  • 2
    looks like after the captive portal check, theres a check for a working private dns, then bandwidth if necessary. once these are all satisfied, the VALIDATED state is set. – Grant Park Jun 24 '20 at 18:03
  • Looks like that server is blocked in China: https://www.comparitech.com/privacy-security-tools/blockedinchina/ – Mark Jan 21 '21 at 12:53
  • Yep, everything Google is. https://blog.headuck.com/2020/10/23/how-samsung-devices-connect-qq-baidu-taobao-hao123/ – Rick Sanchez Jan 21 '21 at 13:29