What is fastboot?

Fastboot refers to three different things:

  • A protocol for communication between your device and a computer.

  • The software that runs on the device when in fastboot mode.

  • The executable file on the computer you use to make them talk to each other.

Generally speaking, fastboot is a protocol you can use to flash partitions on your device. It allows you to modify file system images over a USB connection, which is a quick way to update firmware during development.

Fastboot is the name of a tool. It has nothing to do with booting your Android images faster.

Set up your computer

To use fastboot on your development computer, install the fastboot tool and add the udev rules in your system.

  1. Install the fastboot tool.

    The fastboot tool is generated at out/host/linux-x86/bin/fastboot in the development machine when building the Android images (see Build your development images). To avoid building full images to get this tool, you can:

  2. Add a udev rule for the USB.

    User must be part of the plugdev group to use fastboot. Create a new /etc/udev/rules.d/51-android.rules file with the following contents:

    /etc/udev/rules.d/51-android.rules
    SUBSYSTEM=="usb", ATTR{idVendor}=="0525", ATTRS{idProduct}=="a4a5", MODE="0666", GROUP="plugdev"
  3. Reload and trigger the udev rules.

    Reboot your system or well reload the udev rules without rebooting your PC with the following commands:

    $ sudo udevadm control --reload
    $ sudo udevadm trigger

Update firmware with fastboot

You can program the Android system of your device with fastboot. It updates boot, recovery, vendor, and system partitions and then reboots the device.

This process requires a USB-C cable connected between the development computer and the device.

If your device is not booting U-Boot see Recover your device.
  1. Get the firmware images:

    • <u-boot-filename>.imx for your hardware variant. See Hardware variants.

    • boot.img

    • recovery.img

    • vendor.img

    • system.img

    1. After building the development firmware, you can find the image files inside the out/target/product/ccimx8xsbcpro directory. See Build development firmware for more information about building the Android system.

    2. Already signed images with your release keys. See Generate release custom images.

    3. You can download Digi-provided pre-built images from:

  2. Save/copy the firmware images.

  3. Connect the board to your host computer. See Step 2 - Set up the hardware for instructions.

  4. Open a serial connection to the serial port to which the device is connected. Use the following settings:

    • Port: Serial port to which your device is attached

    • Baud rate: 115200

    • Data Bits: 8

    • Parity: None

    • Stop Bits: 1

    • Flow control: None

  5. Reset the device (press the Reset button on the board) and immediately press a key in the serial terminal to stop the auto-boot process. You will be stopped at the U-Boot bootloader prompt:

    U-Boot dub-2018.03-r1.3 (May 06 2019 - 00:13:13 +0200)
    
    CPU:   Freescale i.MX8QXP revB A35 at 1200 MHz at 49C
    DRAM:  2 GiB
    MCA:   HW_VER=1  FW_VER=0.12
    MMC:   FSL_SDHC: 0, FSL_SDHC: 1
    In:    serial
    Out:   serial
    Err:   serial
    Model: Digi International ConnectCore 8X SBC Pro Board.
    ConnectCore 8X SOM variant 0x02: Automotive QuadXPlus 1.2GHz, 16GB eMMC, 2GB LPDDR4, -40/+85C, Wireless, Bluetooth
    Board: ConnectCore 8X SBC Pro, version 2, ID 135
    Boot:  MMC0
    
     BuildInfo:
      - SCFW 65afe5f6, SECO-FW 9d71fd5b, IMX-MKIMAGE 19b9d9b6, ATF d6451cc
      - U-Boot dub-2018.03-r1.3
    
    flash target is MMC:0
    Net:   eth0: ethernet@5b040000 [PRIME], eth1: ethernet@5b050000
    Fastboot: Normal
    Hit any key to stop autoboot:  0
    =>
  6. Start the fastboot mode in U-Boot:

    => fastboot 1
  7. Update the U-Boot image (optional):

    1. On your development computer, execute the following command to update the U-Boot image:

      $ fastboot flash bootloader <u-boot-filename>.imx
    2. Reset the board to boot into the recently updated U-Boot, and press any key to stop the autoboot process.

    3. Reset the U-Boot environment to default values. (This will not reset protected variables like the MAC address). To do so, issue this command:

      => env default -a
    4. Save the U-Boot environment to apply the default configuration.

      => env save
  8. Configure the partition of the eMMC to hold Android images by running these commands in U-Boot:

    => setenv mmcdev 0
    => run partition_mmc_android
  9. Restart fastboot mode in U-Boot.

    => fastboot 1
  10. Update the Android firmware images.

    You can update the images in several ways:

    1. While developing, the new images are in your out directory after a build. You can program them in the device by issuing fastboot in your development computer:

      $ fastboot flashall

      The -w option wipes the /data and /cache partitions on the device.

      $ fastboot -w flashall
    2. If you downloaded the pre-built images, you can update the device using 82004353_A.zip:

      $ fastboot update {and-zip-part-number}.zip
    3. If you already have signed images (see Generate release custom images), you can load them with the following command:

      $ fastboot update signed-img.zip
    4. Or you can program partitions one by one with the command:

      fastboot flash <partition_name> <path_to_image>
      Flash boot partition
      $ fastboot flash boot boot.img
      Flash recovery partition
      $ fastboot flash recovery recovery.img
      Flash vendor partition
      $ fastboot flash vendor vendor.img
      Flash system partition
      $ fastboot flash system system.img
  11. Reboot the device using fastboot.

    $ fastboot reboot
    The first Android boot takes several minutes due to system deployment.