Is there any API/code to check if Android phone's bootloader is unlocked?
            Asked
            
        
        
            Active
            
        
            Viewed 1,904 times
        
    2
            
            
        - 
                    2This question should be reopened because it is a genuine question asking for an Android API to check whether bootloader is unlocked. – Darpan Feb 11 '19 at 12:23
 
1 Answers
5
            
            
        If there was such an API you couldn't trust it because a non-standard ROM could implement it to say whatever it wanted.
        antlersoft
        
- 14,636
 - 4
 - 35
 - 55
 
- 
                    Google's Attestation API now provides this functionality. The check uses cryptographic keys and must be performed on a server you control; this works around the weakness I noted above. – antlersoft Aug 09 '22 at 06:42