Status: Implemented and tested

GNSS & GPS Positioning Subsystem

Global Navigation Satellite System (GNSS) diagnostics inspects satellite positioning receivers, multi-constellation tracking capabilities, dual-frequency carrier signals, and Assisted-GPS (A-GPS) network configurations.

GPS vs. GNSS: Three Critical Distinctions

In technical terminology, GPS (Navstar GPS) refers specifically to the United States government satellite network. GNSS is the universal umbrella term encompassing all international satellite navigation constellations: GPS (USA), GLONASS (Russia), Galileo (European Union), BeiDou (China), QZSS (Japan), and NavIC (India). Voodoo strictly separates:

  1. Supported Constellations: Constellations the hardware radio receiver is technically capable of demodulating.
  2. Observed Satellites: Satellites actively tracked in the sky during a live positioning session.
  3. Physical Receiver Model: The actual silicon chip (e.g. Broadcom BCM47765, Qualcomm Gen9). Standard Android APIs rarely expose the exact GNSS chip model; we never guess a chipset based solely on constellation lists.
Dual-Frequency GNSS (L1 + L5 Carrier Signals)

Traditional single-frequency receivers track only the primary civilian L1/E1 signal (~1575.42 MHz), which is susceptible to ionospheric delays and urban multipath reflection. Modern high-accuracy phones support dual-frequency GNSS, simultaneously receiving secondary L5/E5a signals (~1176.45 MHz) to achieve sub-meter positioning precision in dense urban canyons.

How Voodoo Inspects GNSS Subsystems

1. Primary Call & API-Level Fallback Chain

Extracted from GnssCollector.kt. Uses GnssStatus (API 24+), checks carrier frequencies on API 26+, queries GNSS hardware model/year on API 28+, and parses /system/etc/gps.conf:

// Excerpt from com.tool3.hardwareinfo.categories.gnss.GnssCollector.kt
val locationManager = context.getSystemService(Context.LOCATION_SERVICE) as LocationManager
val hasGpsFeature = context.packageManager.hasSystemFeature(PackageManager.FEATURE_LOCATION_GPS)

// API 28+ GNSS Hardware Model & Silicon Year
val hwModelName = if (Build.VERSION.SDK_INT >= 28) {
    ModernGnssHelper.getGnssHardwareModelName(locationManager)
} else null

val hwYear = if (Build.VERSION.SDK_INT >= 28) {
    ModernGnssHelper.getGnssYearOfHardware(locationManager)
} else null

// Parse /system/etc/gps.conf for A-GPS NTP and SUPL servers
val gpsConfig = GpsConfigParser.parse()

2. Permission & Privilege Gate

  • Feature flag checks (FEATURE_LOCATION_GPS) and parsing gps.conf require zero permissions.
  • Registering a GnssStatus.Callback to inspect live satellite signals requires runtime ACCESS_FINE_LOCATION. If denied, Voodoo reports static hardware capabilities cleanly and labels live satellite status as PERMISSION_DENIED.

3. Interpretation & Normalization Logic

  • Constellation Mapping: Integer constants from GnssStatus.CONSTELLATION_* map to standardized names: GPS (1), SBAS (2), GLONASS (3), QZSS (4), BeiDou (5), Galileo (6), IRNSS/NavIC (7).
  • Dual-Frequency Detection: When carrier frequencies are reported via hasCarrierFrequencyHz() (API 26+), frequencies around 1176.45 MHz are flagged as confirming physical L5/E5a dual-frequency support.

4. Availability-State Triggers

  • GnssStatus on Android < 7.0 triggers AvailabilityState.UNSUPPORTED, routing through legacy GpsStatus.
  • When the manufacturer leaves getGnssHardwareModelName() empty (common on Qualcomm and MediaTek HALs), marked AvailabilityState.UNAVAILABLE.

Subsystem Field Inventory

Field ID Display Name Type Primary Source / API Min API
gnss.gps_present GNSS Hardware Receiver BOOLEAN PackageManager.hasSystemFeature(FEATURE_LOCATION_GPS) API 1
gnss.supported_constellations Supported Constellations LIST GnssStatus constellation enumeration (API 24+) API 24
gnss.dual_frequency Dual-Frequency (L1+L5) BOOLEAN GnssStatus.getCarrierFrequencyHz() (API 26+) API 26
gnss.hardware_model GNSS Hardware Model Name STRING LocationManager.getGnssHardwareModelName() (API 28+) API 28
gnss.agps_supl_server A-GPS SUPL Server STRING /system/etc/gps.conf parser API 1