Status: Implemented and tested

Bluetooth & BLE Subsystem

Bluetooth diagnostics inspects the radio controller, distinguishes Classic Bluetooth (BR/EDR) from Bluetooth Low Energy (BLE), queries advanced PHY modes (2M and Coded long-range), and maps paired peripheral profiles.

Why Are Bluetooth MAC Addresses Hidden on Modern Android?

Prior to Android 6.0, apps could read the physical Bluetooth MAC address via BluetoothAdapter.getAddress(). Because a hardware MAC address is immutable, advertising networks and commercial tracking beacons used it to track user movement across physical stores and public venues. Starting in Android 6.0 (API 23), Google permanently masked the return value to the constant string 02:00:00:00:00:00. On modern Android, reading the true hardware MAC requires system signature permissions.

Bluetooth Classic vs. BLE

Classic Bluetooth (BR/EDR): High continuous bandwidth (A2DP audio streaming, hands-free voice, file transfer).
Bluetooth Low Energy (BLE): Ultra-low power intermittent transmission for smartwatches, fitness bands, and IoT beacons.

Bluetooth 5.0 PHY Modes

Introduced in Android 8.0 (API 26), 2M PHY doubles transmission speed to 2 Mbps, while Coded PHY uses forward error correction to quadruple wireless range at lower bitrates.

How Voodoo Inspects Bluetooth Hardware

1. Primary Call & API-Level Fallback Chain

Extracted from BluetoothCollector.kt. Queries BluetoothAdapter, checks package manager feature flags, and uses segregated helpers for API 26+ PHY features and API 31+ permission checks:

// Excerpt from com.tool3.hardwareinfo.categories.bluetooth.BluetoothCollector.kt
val adapter = BluetoothAdapter.getDefaultAdapter()
val hasBle = context.packageManager.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)

// Modern BLE 5.0 capabilities (API 26+)
val is2MPhySupported = if (Build.VERSION.SDK_INT >= 26 && adapter != null) {
    ModernBluetoothHelper.isLe2MPhySupported(adapter)
} else false

val isCodedPhySupported = if (Build.VERSION.SDK_INT >= 26 && adapter != null) {
    ModernBluetoothHelper.isLeCodedPhySupported(adapter)
} else false

2. Permission & Privilege Gate

The Android Bluetooth permission model underwent a major shift in Android 12 (API 31):

  • Android 2.0 to Android 11: Required manifest permissions BLUETOOTH and BLUETOOTH_ADMIN (granted automatically at install).
  • Android 12+ (API 31+): Separated into runtime dangerous permissions: BLUETOOTH_CONNECT (to query bonded devices or adapter name) and BLUETOOTH_SCAN (to discover nearby peripherals).
  • If BLUETOOTH_CONNECT is ungranted on Android 12+, Voodoo reports basic hardware feature flags cleanly and marks device names as PERMISSION_DENIED.

3. Interpretation & Normalization Logic

  • Device Class Mapping: Major device class integers map to human labels (Audio/Video, Phone, Computer, Peripheral, Wearable).
  • State Mapping: Normalizes adapter state integers (STATE_OFF, STATE_TURNING_ON, STATE_ON).

4. Availability-State Triggers

  • On devices lacking Bluetooth hardware (e.g. certain Android TV boxes), returns AvailabilityState.UNAVAILABLE.
  • PHY 2M/Coded queries on Android < 8.0 trigger AvailabilityState.UNSUPPORTED.

Subsystem Field Inventory

Field ID Display Name Type Primary Source / API Min API
bluetooth.adapter_present Bluetooth Hardware Present BOOLEAN BluetoothAdapter.getDefaultAdapter() != null API 5
bluetooth.adapter_state Adapter State STRING BluetoothAdapter.getState() API 5
bluetooth.ble_supported BLE (Low Energy) Supported BOOLEAN PackageManager.hasSystemFeature(FEATURE_BLUETOOTH_LE) API 18
bluetooth.le_2m_phy BLE 2M PHY Supported BOOLEAN BluetoothAdapter.isLe2MPhySupported() API 26
bluetooth.le_coded_phy BLE Coded PHY (Long Range) BOOLEAN BluetoothAdapter.isLeCodedPhySupported() API 26