Fastboot is the bootloader protocol used to query device state, boot temporary images, and flash bootloader-visible partitions.
On Curtana, Fastboot is essential for:
- Checking bootloader unlock state.
- Booting OrangeFox/TWRP temporarily.
- Flashing recovery.
- Recovering from some bootloops.
- Entering FastbootD for dynamic partition operations.
- Returning to stock with official Fastboot ROM scripts.
Android booted
-> adb works
-> fastboot does not work
Bootloader Fastboot screen
-> fastboot works
-> adb does not work
Recovery booted
-> adb may work
-> fastboot does not work unless recovery exposes a reboot path
FastbootD screen
-> fastboot works
-> used for userspace dynamic partitions
Run commands only in the mode expected by the guide you are following.
Boot to Fastboot:
scripts\adb\reboot_bootloader.batVerify:
scripts\fastboot\verify_fastboot.batManual equivalent:
fastboot devices
fastboot getvar product
fastboot getvar unlocked
fastboot getvar current-slotfastboot getvar often prints to stderr; that is normal.
Useful variables:
fastboot getvar product
fastboot getvar unlocked
fastboot getvar current-slot
fastboot getvar antiInterpretation:
| Variable | Meaning |
|---|---|
product |
Bootloader-reported codename. Curtana may report curtana or miatoll. |
unlocked |
Whether bootloader is unlocked. Custom flashing requires yes or true. |
current-slot |
A/B slot if exposed. Curtana workflows can still involve slot-aware packages. |
anti |
Anti-rollback index when exposed. Downgrades require caution. |
If product is not expected, stop. Do not flash while guessing.
Temporary boot is the safest first recovery test:
scripts\recovery\boot_orangefox.bat recovery\orangefox\orangefox.imgManual:
fastboot boot recovery\orangefox\orangefox.imgThis loads the recovery image into memory. It does not write the recovery partition. Use it to confirm compatibility before flashing.
After temporary boot is confirmed:
scripts\recovery\flash_recovery.bat recovery\orangefox\orangefox.imgManual:
fastboot flash recovery recovery\orangefox\orangefox.img
fastboot reboot recoveryBoot directly into recovery after flashing. Some stock systems restore stock recovery during normal boot.
Check:
scripts\fastboot\unlock_status_check.batThe script runs both:
fastboot getvar unlocked
fastboot oem device-infoTypical Xiaomi output includes:
Device unlocked: true
Device critical unlocked: true
Exact wording can vary by bootloader version.
Fastboot can write partitions with very little context. That makes it powerful and dangerous.
Low-risk read-only commands:
fastboot devices
fastboot getvar product
fastboot getvar unlockedMedium-risk commands:
fastboot boot recovery.img
fastboot reboot
fastboot reboot recovery
fastboot reboot fastbootHigh-risk commands:
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot erase userdata
fastboot wipe-superCritical-risk commands:
fastboot flash xbl xbl.elf
fastboot flash abl abl.elf
fastboot flash modem NON-HLOS.bin
fastboot flashing lockDo not flash bootloader, modem, or critical firmware partitions unless you are following a trusted stock restore package for the exact variant.
Enter FastbootD:
fastboot reboot fastbootThe device screen should change from the bootloader Fastboot screen to a userspace FastbootD screen. See FASTBOOTD_FIX.md for the dedicated guide.
Likely causes:
- Wrong mode.
- Bad driver.
- Bad cable.
- USB hub instability.
- Old platform-tools.
Fix:
Confirm phone is on Fastboot screen
-> check Device Manager
-> install Android Bootloader Interface driver
-> try rear motherboard USB port
-> update platform-tools
The bootloader is locked. Unlocking requires Xiaomi's official unlock flow and wipes data.
Do not try to bypass this with random scripts. Bypass attempts can make the device unrecoverable.
Likely causes:
- Wrong partition name.
- Trying to flash a dynamic logical partition in bootloader Fastboot instead of FastbootD.
- Package intended for another device.
- Recovery/ROM instructions not followed.
Likely causes:
- Image does not match partition.
- Sparse image expected in FastbootD.
- Wrong device build.
- Outdated Fastboot binary.
scripts\fastboot\verify_fastboot.bat
scripts\recovery\boot_orangefox.bat C:\Android\orangefox.imgExpected: phone leaves Fastboot and boots OrangeFox.
scripts\recovery\flash_recovery.bat C:\Android\orangefox.imgExpected: script asks for FLASH, writes recovery, then attempts to reboot recovery.
fastboot reboot fastboot
fastboot devicesExpected: device appears in FastbootD and remains visible to fastboot devices.
When asking for help, capture sanitized output:
fastboot devices
fastboot getvar all 2> logs\fastboot-getvar-all.txtRemove serial numbers, IMEI, token values, and account identifiers before sharing.