% FASTBOOT(1) android-platform-system-core | fastboot Manuals
% The Android Open Source Project

# NAME

fastboot - Android flashing and booting utility

# SYNOPSIS

**fastboot** [-w] [-u] [-s _device_] [-p _product_] [-c _cmdline_] [-i _vendorId_] [-b _baseAddr_] [-n _pageSize_] [-S _size_[K|M|G]] _command_

# DESCRIPTION

WARNING: This manual might be outdated, please refer to the official
documentation.

**fastboot** is a command line tool for flashing an Android device, boot an
Android device to fastboot mode, etc..

# OPTIONS

-w
: Erase userdata and cache (and format if supported by partition type).

-u
: Do not erase partition before formatting.

-s _device_
: Specify device serial number or path to device port.

-l
: With **devices** command, list device paths." 

-p _product_
: Specify product name.

-c _cmdline_
: Override kernel commandline.

-i _vendorId_
: Specify a custom USB vendor ID.

-b|--base _baseAddr_
: Specify a custom kernel base address (default: **0x10000000**).

--kernel-offset
: Specify a custom kernel offset (default: **0x00008000**).

--ramdisk-offset
: Specify a custom ramdisk offset (default: **0x01000000**).

--tags-offset _offset_
: Specify a custom tags offset (default: **0x00000100**).

-n|--page-size _pageSize_
: Specify the nand page size (default: **2048**).

-S _size_[K|M|G]
: Automatically sparse files greater than 'size'. **0** to disable.

--slot _suffix_
: Specify slot suffix to be used if the device supports slots. This will be
  added to all partition names that use slots. **all** can be given to refer to
  all slots. **other** can be given to refer to a non-current slot. If this flag
  is not used, slotted partitions will default to the current active slot.

-a, --set-active[=<suffix>]
: Sets the active slot. If no suffix is provided, this will default to the value
  given by **--slot**. If slots are not supported, this does nothing. This will
  run after all non-reboot commands.

--wipe-and-use-fbe
: On devices which support it, erase userdata and cache, and enable file-based
  encryption.

--unbuffered
: Do not buffer input or output.

--version
: Display version.

-h|--help
: show this message.

# COMMANDS

fastboot update _filename_
: Reflash device from update.zip.

fastboot flashall
: Flash boot, system, vendor, and (if found) recovery.

fastboot flash _partition_ [_filename_]
: Write a file to a flash partition.

fastboot flashing lock
: Locks the device. Prevents flashing.

fastboot flashing unlock
: Unlocks the device. Allows flashing any partition except bootloader-related
  partitions.

fastboot flashing lock_critical
: Prevents flashing bootloader-related partitions.

fastboot flashing unlock_critical
: Enables flashing bootloader-related partitions.

fastboot flashing get_unlock_ability
: Queries bootloader to see if the device is unlocked.

fastboot erase _partition_
: Erase a flash partition.

fastboot format[:[_fs type_][:[_size_]] _partition_
: Format a flash partition. Can override the fs type and/or size the bootloader
  reports.

fastboot getvar _variable_
: Display a bootloader variable.

fastboot set_active _suffix_
: Sets the active slot. If slots are not supported, this does nothing.

fastboot boot _kernel_ [_ramdisk_ [_second_]]
: Download and boot kernel.

fastboot flash:raw boot _kernel_ [_ramdisk_ [_second_]]
: Create bootimage and flash it.

fastboot devices [-l]
: List all connected devices (with device paths if **-l** is used).

fastboot continue
: Continue with autoboot.

fastboot reboot [bootloader]
: Reboot device [into bootloader].

fastboot reboot-bootloader
: Reboot device into bootloader.

fastboot help
: Show this help message.