For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bootloader detection [Android only]

The bootloader is the first component that runs when a device powers on, and a locked bootloader is the foundation of Android's Verified Boot and hardware root of trust. Bootloader detection identifies when the device bootloader is unlocked or when Verified Boot is otherwise compromised, meaning the device can no longer be trusted. The check relies on hardware-backed Key Attestation (Root of Trust) rather than easily spoofable system properties.

Attackers unlock the bootloader or weaken Verified Boot to:

  • Install custom firmware or a custom ROM, disabling OS-level security guarantees.

  • Gain root access and bypass integrity protections, allowing tampering with the app and other apps' data.

  • Prepare the environment for further tampering and dynamic analysis.

Below are code snippets demonstrating bootloader detection:

// Android bootloader check
override fun onBootloader() {
    TODO("Not yet implemented")
}

// Flutter bootloader detection
onBootloader: () => print("Bootloader detected")

// Cordova bootloader detection
bootloader: () => {
    // Place your reaction here
}

// React Native bootloader detection
bootloader: () => {
    // Place your reaction here
}

// Capacitor bootloader detection
bootloader: () => {
    // Place your reaction here
}

Last updated