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)
but this giving string
unknown
for every device. Any one know, how to detect boot loader
is unlocked or not BahuBahu
2 Answers
Check Status of Bootloader Whether Locked or Unlocked. Below are the two methods to check if the bootloader is locked or unlocked you can perform any of the operation to check the status of the bootloader. These methods will work for any android device or android version. To check if the bootloader is locked or not do this: connect your phone to pc and go to droidboot and then from pc, make sure in adb folder you have the recovery.img file present from th firmware zip file, then open command prompt and type this. Fastboot flash recovery recovery.img.
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
BahuBahu
The most reliable solution, as you mentioned, is to use SafetyNet Attestation. However, this does not detect all bootloader unlocks (for example my Nexus 6 running Magisk is not detected). Also you might get devices that fail, due to other reasons, such as being an emulator, running a custom ROM, being rooted, API hooking or even just having a phone that is not certified by Google.
If you are interested in cases where the bootloader is guaranteed to be unlocked, use the SafetyNet Attestation API and look at the advice field. If the API detects a unlocked bootloader,
{'advice': 'LOCK_BOOTLOADER'}
will appear in the token. Note that under normal usage, there will be no advice field.![Check Check](/uploads/1/2/4/7/124715504/629574888.jpg)
j.aevyzj.aevyz
Not the answer you're looking for? Browse other questions tagged androidbootloaderrooted-device or ask your own question.
In this post we will explain you how to check bootloader status of your Redmi Note 4 device. This is the most crucial step you want to check before doing anything with your device. Unlocked bootloader is required for flashing TWRP custom recovery, flash different patches and tweaks and also for creating and restoring backups.
Checking bootloader lock state on Redmi Note 4
So, to check if you’ve got locked or unlocked bootloader on your Xiaomi Redmi Note 4 device, follow these simple steps:
- Go to “Settings”;
- Then “About”;
- Tap five times on kernel versions;
- In a popup list tap on the first line;
- Scroll down and look for “fastboot lock state”;
- If you see “unlock” then you’ve got unlocked device;
- If you see “lock” that means the bootloader is locked and you need to unlock it to proceed with flashing TWRP Recovery etc…
Short FAQ about unlocking bootloader on Redmi Note 4
How to fix issue with 50% stuck while unlocking bootloader with en.miui.com/unlock
![How To Check If Bootloader Is Unlocked How To Check If Bootloader Is Unlocked](/uploads/1/2/4/7/124715504/231559636.png)
- If you’re stuck with 50% issue, try unlocking your device on Developer ROM.
- Make sure you’re using the same Mi account on your device and in MiUnlock.
- Xiaomi servers might be lagging at this current moment, simply try unlocking on the next day.
Do I need to unlock bootloader to flash ROM with MiFlash tool?
Yeap, it is required to unlock bootloader to flash your device with MiFlash tool.
Just bought a new Redmi Note 4, checked bootloader status and it’s already unlocked!
Well, that’s awesome! Pretty much it. That means that the seller (or the previous owner) has already unlocked this device. The seller saved your time and nerves.
How to Wipe Redmi Note 4 with locked bootloader?
Go to “Settings” > “Additional Settings” > “Factory reset”.
How to lock bootloader on Redmi Note 4?
You can lock bootloader only on original stock ROM without any changes, or else you’ll got bricked device. It’s not possible to lock bootloader on any custom ROM.
- To unlock bootloader, enter the fastboot mode and enter this line:
- fastboot oem lock
- To check status of bootloader:
- fastboot getvar all
- Check for “unlocked” line. “No” means bootloader is locked, “Yes” means bootloader is unlocked.
- To boot in system enter this line:
- fastboot reboot
How to root Redmi Note 4?
First you’ll need to flash TWRP custom recovery. To flash TWRP you need to unlock bootloader. There’s no other way to get root.
Will I get OTA updates on unlocked bootloader?
Yeap, you’ll get access to OTA updates with unlocked bootloader.