Skip to content

Bootloader | Cheatsheet

A bootloader is a vendor-proprietary image responsible for bringing up the kernel on a device. The bootloader guards the device state and is responsible for initializing the Trusted Execution Environment (TEE) and binding its root of trust. The bootloader also verifies the integrity of the boot and recovery partitions before moving execution to the kernel.


OEM

fastboot oem device info

Check secure image for bootloader

fastboot oem check-image

Unlock bootloader

fastboot oem unlock <key>

Check state for FB

fastboot oem lock-state info

Dump status for bootloader

fastboot oem get-bootinfo

Get root status

fastboot oem check-rootinfo

Relock bootloader

fastboot oem relock

Erase Factory Reset Protection

fastboot oem frp-erase

Unlock Factory Reset Protection

fastboot oem frp-unlock

Run emmc diagnostic

fastboot oem emmc_diag

Dump eMMC info

fastboot oem emmc-dump
fastboot oem get_key_version

Dump battery status (millivolts)

fastboot oem battery_present_check
fastboot oem get_hwnff_ver
fastboot oem get-psid
fastboot oem get-build-number
fastboot oem get-product-model
fastboot devices

Get Variable Product

fastboot getvar all
fastboot getvar kernel
fastboot getvar version-bootloader
fastboot getvar product
fastboot getvar board
fastboot getvar secure
fastboot getvar hwrev
fastboot getvar radio
fastboot getvar storage-type
fastboot getvar emmc
fastboot getvar ufs
fastboot getvar ram
fastboot getvar cpu
fastboot getvar serialno
fastboot getvar cid
fastboot getvar channelid

Dump token

fastboot getvar token

Dump device secure state

fastboot getvar securestate

Dump device verity state

fastboot getvar verity-state

Dump warranty void info

fastboot getvar iswarrantyvoid

Dump max download size

fastboot getvar max-download-size

Dump reboot reason

fastboot getvar reason

Dump IMEI/IMEI2

fastboot getvar imei
fastboot getvar imei2

Dump MEID info

fastboot getvar meid

Dump factory date device was born

fastboot getvar date
fastboot getvar sku
fastboot getvar carrier_sku

Dump battery serial

fastboot getvar battid

Dump battery voltage

fastboot getvar battery-voltage

Dump ICCID

fastboot getvar iccid

Dump MD5 value

fastboot getvar cust_md5

Dump max sparse size

fastboot getvar max-sparse-size

Dump alarm status

fastboot getvar poweroffalarm

Dump ro.carrier

fastboot getvar ro.carrier

Dump ro.build.fingerprint settings

fastboot getvar ro.build.fingerprint

Dump baseband of device

fastboot getvar version.baseband

Dump kernel version

fastboot getvar kernel.version

Dump git info

fastboot getvar git

Dump current slot in use

fastboot getvar current-slot

Dump FRP status

fastboot getvar frp-state

Dump sim slot

fastboot getvar slot-count

Dump booted slot

fastboot getvar slot-successful

Dump unbootable slot

fastboot getvar slot-unbootable

Dump how many times we gonna boot on active slot before changing

fastboot getvar slot-retry-count

Dump logical block size

fastboot getvar logical-block-size

Dump erase block size

fastboot getvar erase-block-size

Dump status for userspace

fastboot getvar is-userspace

Dump pcb number

fastboot getvar pcb-part-no

Dump primary/secondary display

fastboot getvar primary-display
fastboot getvar secondary-display

Dump status for fdr

fastboot getvar fdr-allowed