Skip to content

Instantly share code, notes, and snippets.

@00p513-dev
Last active July 27, 2024 16:31
Show Gist options
  • Save 00p513-dev/c8556fed0fbf6e2110c3a1a87c845deb to your computer and use it in GitHub Desktop.
Save 00p513-dev/c8556fed0fbf6e2110c3a1a87c845deb to your computer and use it in GitHub Desktop.
Useful fastboot commands
Command Purpose
fastboot devices Lists attached devices, along with their serial number
fastboot oem unlock Unlocks bootloader on most phones
fastboot oem unlock UNLOCK_CODE Use this if you have an unlock code
fastboot flashing unlock May be needed on older devices and some weird mtk phones (Tecno ke5k needed this for some reason)
fastboot flash PARTITION_NAME PATH_TO_IMAGE Flashes the partition with the image file
--disable-verity --disable-verification Add to a vbmeta flash command to disable verified boot
fastboot erase PARTITION NAME Erases the partition USE WITH CAUTION
fastboot -w Factory resets your phone
fastboot reboot Reboots your phone
fastboot reboot recovery Reboots your phone to recovery mode
fastboot reboot fastboot Reboots your phone to userspace fastboot/fastbootd
fastboot getvar all Gets various information about your phone

Note: use all commands with caution, some commands output also includes information such as your serial number or imei!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment