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'.

Once you have generated the images, you can use them to update your Android system from U-Boot. This process is recommended to:

If your device is not booting U-Boot see Recover your device.

Follow these steps to update eMMC partitions:

1. 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

2. Obtain the firmware image files

The list of files built by Digi Embedded for Android is:

  • u-boot-ccimx8xsbcpro2GB-<variant>.imx. See U-Boot files by variant to select the appropriate file for your hardware variant.

  • partition-table.img

  • dtbo-imx8qxp.img

  • boot.img

  • vendor_boot.img

  • vbmeta-imx8qxp.img

  • super.img

These image files can be:

3. Establish a serial connection with your device

  1. Connect a USB serial cable to the CONSOLE connector on the board and to your host computer.

  2. Connect a USB type-C cable to your development PC and the other end to the target USB type-C connector. See Step 2 - Set up the hardware for instructions.

  3. Open a serial connection with the device. You can use any serial terminal program such as Tera Term, Minicom, CoolTerm, or HyperTerminal.

    PuTTY terminal program is not recommended due to an incompatibility with the USB/serial driver.

    Open a serial connection with the following settings:

    Parameter Value

    Port

    Serial port where the device is connected

    Baud rate

    115200

    Data bits

    8

    Parity

    None

    Stop bits

    1

    Flow control

    None

4. Update firmware with fastboot

You can program the Android system of your device with fastboot. It updates all device partitions and then reboots the device.

  1. 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 SPL dub-2020.04-r2.2 (Jan 18 2021 - 15:54:04 +0000)
    Normal Boot
    Trying to boot from MMC1
    Primary set selected
    Load image from MMC/SD 0x5f400
    
    
    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
    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: 2 GiB LPDDR4, Wi-Fi, Bluetooth, MCA, Crypto-auth
      Board version 3, ID 135
    Boot:  MMC0
    
     BuildInfo:
      - 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
    => 
  2. Update the U-Boot image (optional):

    1. Enter U-Boot fastboot mode:

      1. Unlock fastboot:

        => env set skip-fblock-check yes
      2. Start the fastboot mode in U-Boot:

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

      $ fastboot flash bootloader u-boot-ccimx8xsbcpro2GB-<variant>.imx
    3. Configure the partition of the eMMC to hold Android images by executing the following command on your development computer:

      $ fastboot flash gpt <partition-table.img>
    4. Reset the board to boot into the recently updated U-Boot, and press any key to stop the autoboot process.

    5. 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
    6. Save the U-Boot environment to apply the default configuration.

      => env save
  3. Enter U-Boot fastboot mode:

    1. Unlock fastboot:

      => env set skip-fblock-check yes
      => env save
      Digi recommends to remove skip-fblock-check U-Boot variable once the program process finishes.
    2. Start the fastboot mode in U-Boot:

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

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

    $ fastboot --slot all flashall

    The -w option wipes userdata.

    $ fastboot -w --slot all flashall
    1. Program individual partitions one by one with the command:

      $ fastboot flash <partition_name> <path_to_pre-built-image>
      $ fastboot flash dtbo_a dtbo-imx8qxp.img
      $ fastboot flash dtbo_b dtbo-imx8qxp.img
      $ fastboot flash boot_a boot.img
      $ fastboot flash boot_b boot.img
      $ fastboot flash vendor_boot_a vendor_boot.img
      $ fastboot flash vendor_boot_b vendor_boot.img
      $ fastboot flash vbmeta_a vbmeta-imx8qxp.img
      $ fastboot flash vbmeta_b vbmeta-imx8qxp.img
      $ fastboot flash super super.img
    2. You can wipe userdata with:

      $ fastboot -w

    If you already have signed images (see Generate release custom images), you can load them with the following command:

    $ fastboot update signed-img.zip
  5. If required, reboot the device using fastboot.

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