What is Fastboot?

Fastboot is a protocol for communication between your device and a computer. It allows you to modify file system images over a USB connection, which is a quick way to update firmware during development. Fastboot requires the USB interface to work as 'device'.

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:

    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:

    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-2020.04-r2.2 (Jan 18 2021 - 15:54:04 +0000)

CPU:   NXP i.MX8QXP RevB A35 at 1200 MHz at 25C
DRAM:  2 GiB
MCA:   HW_VER=1  FW_VER=1.01
In:    serial
Out:   serial
Err:   serial
Model: Digi International ConnectCore 8X SBC Pro Board.
ConnectCore 8X SOM variant 0x02: 2 GiB LPDDR4, Wi-Fi, Bluetooth, MCA, Crypto-auth
  Board version 3, ID 135
Boot:  MMC0

  - SCFW 56682d58, SECO-FW 0e4b9cee, IMX-MKIMAGE 8da5cd23, ATF c949a88
  - U-Boot dub-2020.04-r2.2

flash target is MMC:0
Net:   eth0: ethernet@5b040000 [PRIME], eth1: ethernet@5b050000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0
  1. Start the fastboot mode in U-Boot:

    => fastboot 1
  2. 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
  3. Configure the partition of the eMMC to hold Android images by running these commands in U-Boot:

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

    => fastboot 1
  5. 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_D.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
  6. Reboot the device using fastboot.

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