Bootloader Unlocking Locking Procedures - falendra-sahu/rooting GitHub Wiki
๐ Bootloader Unlocking Procedures
Unlocking the bootloader is the first step toward rooting, flashing custom ROMs, installing custom recoveries, and full Android control. This guide explains the general process and OEM-specific methods.
โ ๏ธ Important Warnings
- Unlocking bootloader will erase all data (Factory Reset).
- May void warranty depending on the OEM.
- Some devices require permission from the OEM.
- Always backup your important data before unlocking.
๐ ๏ธ General Steps to Unlock Bootloader (Fastboot Method)
โ Works on most stock Android, OnePlus, Pixel, and some Xiaomi/realme devices.
Requirements:
- ADB & Fastboot: Download Platform Tools
- USB Cable & PC
- OEM Unlocking enabled in Developer Options
Steps:
-
Enable Developer Options:
- Go to Settings > About Phone > Tap Build Number 7 times.
-
Enable OEM Unlocking:
- Go to Settings > Developer Options > Enable OEM Unlocking.
-
Enable USB Debugging:
- In Developer Options, turn on USB Debugging.
-
Reboot to Fastboot Mode:
adb reboot bootloader
-
Check device connection:
fastboot devices
-
Unlock the bootloader:
fastboot oem unlock
or
fastboot flashing unlock
-
Confirm unlock on your device screen using Volume and Power buttons.
๐ OEM-Specific Bootloader Unlock Guides
๐ฑ Xiaomi / Redmi / POCO
-
Create a Mi account and log in to the phone.
-
Enable OEM Unlocking and USB Debugging.
-
Go to Mi Unlock Status and bind account.
-
Boot into fastboot:
adb reboot bootloader
-
Use Mi Unlock Tool.
-
Log in with your Mi Account and follow steps.
-
Wait for 7-day period (if applicable).
-
After unlock: data will be wiped.
๐ฑ OnePlus
-
Enable Developer Options and OEM Unlocking.
-
Boot to Fastboot:
adb reboot bootloader
-
Unlock:
fastboot flashing unlock
-
Confirm on device screen.
๐ฑ Samsung (Snapdragon/Exynos)
Samsung devices require OEM Unlock + unlocking KG/RMM state.
- Enable Developer Options โ OEM Unlock.
- Reboot to Download Mode.
- Use Odin Tool to flash custom recovery or patched boot.
- Knox will trip once bootloader is unlocked (warranty void).
๐ฑ realme / Oppo
- Realme/Oppo stopped official unlocking.
- Some older models support Realme/Oppo Unlock Tool APK.
- Flashing via EDL mode or test point needed on newer devices.
- May require MSMDownloadTool.
๐ฑ Pixel / Nexus
Easiest and safest devices to unlock.
-
Enable OEM Unlocking.
-
Boot to Fastboot:
adb reboot bootloader
-
Unlock:
fastboot flashing unlock
๐ How to Re-Lock the Bootloader (Optional)
-
Flash back to official stock ROM.
-
Reboot to fastboot mode.
-
Run:
fastboot oem lock
or
fastboot flashing lock
โ ๏ธ Do not re-lock if running custom ROM โ this will brick the device.
๐งพ Common Issues & Fixes
Issue | Solution |
---|---|
"fastboot flashing unlock" not working | Use "fastboot oem unlock" instead |
Unlock failed on Xiaomi | Wait for 7-day period; use same Mi Account |
Samsung bootloader greyed out | Flash latest stock firmware, try again |
Device reboots to recovery/bootloop | Flash stock or compatible recovery |
๐ Useful Links
- Android Platform Tools (ADB/Fastboot)
- Mi Unlock Tool
- Odin Tool (Samsung)
- Fastboot Commands Cheat Sheet