Search code examples
androidbootloaderrooted-device

How to check Boot loader is unlocked or not


I'm trying to check boot loader is unlocked or not. For this I've checked some discussions in online but i didn't get anything related except the below one (I don't know is it correct one or not)

String BootLoader_value = Build.BOOTLOADER;

but this giving string unknown for every device. Any one know, how to detect boot loader is unlocked or not


Solution

  • I saw this answer in SO. But now google is providing the API called SafetyNet. In this I've used Attestation API. This API is detecting bootloader is unlocked or not in the device. For other details check this table