How to Inspect Network Validation Probes and Link Stalls on Android Using ADB dumpsys connectivity_diagnostics

Maintaining reliable network connectivity on mobile devices requires sophisticated heuristics to detect when an active Wi-Fi or cellular connection has lost internet access, stalled on packet transmissions, or become trapped behind a captive portal. To allow system services, carrier apps, and network diagnostic tools to monitor connection health without requiring root privileges, modern Android releases implement the Connectivity Diagnostics framework. Using Android Debug Bridge (ADB), network engineers and app developers can query dumpsys connectivity_diagnostics to audit real-time network validation probes, DNS latency metrics, and link stall events.

Architecture of the Connectivity Diagnostics Service

In the Android networking stack, physical and virtual interfaces are represented by NetworkAgent instances managed by ConnectivityService. When a device joins a network, the system launches NetworkMonitor state machines to evaluate internet connectivity. This evaluation sends HTTP/HTTPS probes to known validation endpoints (such as Google connectivity check servers).

The ConnectivityDiagnosticsManager service continuously tracks these probes, compiling structured diagnostic events across three primary categories:

  • Validation Probe Results: Records whether DNS resolution, HTTP probes, and HTTPS fallback probes succeeded, failed, or were redirected to a captive portal login page.
  • Link Stalls: Triggered when high packet loss, TCP retransmission timeouts, or dead peer detection heuristics indicate that an interface has stopped transmitting data despite displaying an active physical link.
  • Network Quality Reports: Aggregates signal strength, round-trip times (RTT), and link bandwidth estimates across active network tokens.

Inspecting this diagnostic subsystem reveals precisely why Android marks a Wi-Fi connection as “Connected, no internet” or triggers an automatic failover to mobile data.

Verifying ADB Connectivity and Service Registration

Connect your Android device to your computer via USB or wireless debugging. Launch a terminal and confirm that ADB communicates with the target device:

adb devices

Verify that the diagnostic service is running in the Android system server by checking the registered services table:

adb shell service check connectivity_diagnostics

The system will return Service connectivity_diagnostics: found. If checking on an older Android release (Android 10 or earlier), this service is not present as a standalone module and diagnostics reside within dumpsys connectivity.

Dumping Connectivity Diagnostics Telemetry

To inspect the complete state of network validation and registered diagnostic listeners, execute dumpsys connectivity_diagnostics:

adb shell dumpsys connectivity_diagnostics

The diagnostic dump provides structured information across active network callbacks, validation histories, and interface health:

CONNECTIVITY DIAGNOSTICS MANAGER (dumpsys connectivity_diagnostics)

Active Network Callbacks:
  Callback[0]: uid=1000, pid=1642, network=101 (WIFI)
  Callback[1]: uid=10078, pid=3410, network=101 (WIFI), carrier=false

Validation Probe History:
  Network 101 (WIFI - wlan0):
    Last Validation: SUCCESS (duration=142ms, timestamp=14:52:10)
    Probes Sent:
      Probe DNS: SUCCESS (latency=18ms, server=8.8.8.8)
      Probe HTTP: SUCCESS (latency=54ms, url=http://connectivitycheck.gstatic.com/generate_204)
      Probe HTTPS: SUCCESS (latency=70ms, url=https://www.google.com/generate_204)
    Captive Portal: NOT_DETECTED
    Validation Attempts: 1

Link Stall Detection:
  Network 101:
    Stall Count: 0
    TCP Retransmission Ratio: 0.02%
    Packet Loss Rate: 0.0%
    Link Health: STABLE

Network 100 (CELLULAR - rmnet_data0):
    Status: SUSPENDED (Default Route on Network 101)
    Last Validation: SUCCESS (duration=280ms)

Auditing Network Validation Probes and Captive Portals

When troubleshooting public hotspots, corporate 802.1X networks, or hotel Wi-Fi networks where connections stall, filtering probe validation results clarifies why authentication pages fail to display:

adb shell dumpsys connectivity_diagnostics | grep -A 10 "Validation Probe History"

If an HTTP probe returns a redirect (HTTP 302) instead of the expected HTTP 204 response code, the system flags the network as CAPTIVE_PORTAL_DETECTED and dispatches the captive portal login activity. If the probe times out due to restrictive firewall rules blocking the Google probe URL, Android assumes the network is broken and disables automatic routing through that interface.

Monitoring Link Stall Detection and TCP Retransmissions

A “link stall” occurs when an interface remains physically associated with an access point or cell tower, but underlying packet delivery ceases. This frequently happens in fringe signal areas or when an access point silently drops upstream routing.

To audit active stall events and TCP retransmission spikes, execute:

adb shell dumpsys connectivity_diagnostics | grep -A 8 "Link Stall Detection"

The diagnostic output displays the number of suspected stalls, the calculated retransmission ratio, and whether the system initiated proactive socket tear-downs or triggered mobile data fallback.

Simulating Network Revalidation via ADB

When testing app resilience against fluctuating internet access, you can manually trigger network revalidation without toggling Wi-Fi or airplane mode. Using cmd connectivity, force the system to dispatch fresh validation probes:

adb shell cmd connectivity revalidate default

Immediately after triggering revalidation, watch the probe metrics update in real time:

adb shell dumpsys connectivity_diagnostics | grep -A 8 "Validation Attempts"

Reviewing the resulting latency logs confirms whether the local network successfully answered the HTTP 204 probe or whether persistent packet drops forced the system to mark the connection as degraded.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.