Status: Implemented and tested

Voodoo App Diagnostics Subsystem

The App Diagnostics subsystem provides complete introspection of the Voodoo Hardware Info utility itself: application identity, build metadata, target SDK levels, process IDs, runtime memory footprint, and environment telemetry.

Why Self-Diagnostics Matters for Technical Support

When troubleshooting hardware reporting discrepancies on custom ROMs or rare devices, developers require exact runtime details: Was the app compiled in debug or release mode? What was the active process UID? What target SDK was enforced by the OS? How much PSS (Proportional Set Size) memory was allocated? Including self-diagnostic parameters inside every exported report ensures bug tickets have complete, reproducible context.

Fixed Application Identity

Application Name: Voodoo Hardware Info
Application ID: com.tool3.hardwareinfo
Minimum SDK Target: API 5 (Android 2.0)
Compilation Target: API 34 (Android 14)

Zero AndroidX Overhead

Voodoo is engineered with native Android Views and platform APIs, completely omitting the multi-megabyte AndroidX library bundle. This allows a baseline APK size under 1.5 MB and a runtime memory footprint under 6 MB PSS on legacy devices.

How Voodoo Inspects Its Own Runtime

1. Primary Call & Fallback Chain

Extracted from MyAppCollector.kt. Queries its own package metadata via PackageManager, process ID via android.os.Process, and Java heap limits:

// Excerpt from com.tool3.hardwareinfo.categories.myapp.MyAppCollector.kt
val pkgInfo = context.packageManager.getPackageInfo(context.packageName, 0)
val pid = android.os.Process.myPid()
val uid = android.os.Process.myUid()

val versionName = pkgInfo.versionName ?: "Unknown"
val versionCode = if (Build.VERSION.SDK_INT >= 28) {
    pkgInfo.longVersionCode
} else {
    pkgInfo.versionCode.toLong()
}

// Runtime Java Heap
val runtime = Runtime.getRuntime()
val heapAllocated = runtime.totalMemory() - runtime.freeMemory()
val heapMax = runtime.maxMemory()

2. Permission & Privilege Gate

An application querying its own package information, PID, UID, and runtime memory requires zero permissions.

3. Interpretation & Normalization Logic

  • Build Type Identification: Evaluates ApplicationInfo.FLAG_DEBUGGABLE to confirm if the APK is an official production build (release) or a development build (debug).
  • Memory Formatting: Converts heap usage into megabytes with binary unit suffixes.

4. Availability-State Triggers

All self-inspection fields are guaranteed AvailabilityState.AVAILABLE across every Android release from API 1 to 34+.

Subsystem Field Inventory

Field ID Display Name Type Primary Source / API Min API
myapp.application_id Application ID STRING com.tool3.hardwareinfo API 1
myapp.version_name Version Name STRING PackageInfo.versionName API 1
myapp.version_code Version Code INTEGER PackageInfo.longVersionCode (API 28+) API 1
myapp.process_pid Process PID INTEGER android.os.Process.myPid() API 1
myapp.target_sdk Target SDK Level INTEGER ApplicationInfo.targetSdkVersion API 4