Blog from February, 2022


Supported platforms for Android 11 SECO BSP are:

For any supported platform, the building instructions, configuration features, installation process, and usage are described in common pages.

In the following list you can find useful documentation about Android 11 SECO BSP:

It is possible to upgrade SECO Android 11 BSP on NXP i.MX8 platform using the standard OTA upgrade procedure typical of Android devices.

The procedure consists of 3 main steps:

Step 1: build otaupdate package

To build ota package please refer to https://secogroup.atlassian.net/wiki/spaces/SECOTech/blog/2021/11/28/1403914418/Build+Android+11+for+SECO+boards#Build-otapackage%3A

Step 2: Copy otaupdate.zip to Android 11 system

You can transfer Android 11 otaupdate.zip to the system in two different ways:

  • Transfer otaupdate package file on Android 11 system using a USB stick

    • Prepare a USBkey with a FAT32 filesystem on the first partition

    • Copy ota update package file on the root folder using the name: otaupdate.zip

    • Insert the USB key on one USB port of the system

  • Transfer otaupdate package file on Android 11 system using ADP protocol

    • Connect your PC with the Android 11 system via ADB (refer to Connect to SECO Android 11 system via ADB )

    • use “adb push” instruction to transfer the file in /data/seco/OTA/otaupdate.zip path on the board:

      • adb push otaupdate.zip /data/seco/OTA/otaupdate.zip 

Step 3: Run the update

To run the update just access the following submenu in Android Settings:

  • --> Android Settings

    • --> SECO Settings

      • --> OTA upgrade the system

        • --> OK

  • It is also possible to run ota update manually, via ADB shell, using the following command:

    • ota_update_tools.sh
  • It is possible to follow the progress of OTA update using logcat tool:

    • adb logcat

It is possible to connect with any SECO Android 11 board using adb console.

What is ADB

From Android Developer Documentation site:

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.

ADB client component is available for Windows, Linux and MacOS. There are many tutorials on Internet that explain how to use this simple, but powerful tool.

HOW TO connect ADB

Android 11 system for SECO board offers two different possibilities for opening an ADB console on the system:

  • Connecting ADB via USB-OTG cable

  • Connect ADB over Air (via a TCP/IP connection, Ethernet or WiFi)

Connecting ADB via USB-OTG cable

It is possible to open an ADB console on Android 11 SECO board in a really simple way:

  • Connect and USB-OTG cable between the PC and the board. In the same way as if it is a cellphone.

  • On your Windows or Linux system if will appears the new USB device.

  • Accept the connection.

  • Open a cmd terminal on Windows, or a bash terminal on Linux

  • execute the command “adb shell”:

    adb shell

Connecting ADB over Air

If you are not in proximity of the Android 11 device, or you prefer not to use a USB cable attached to the device, it is possible to use a network connection to access the ADB console on device.

  • A network connection is required for using ADB over Air. Make sure that the system has a valid connection to your local network and that it is reachable from your PC.

  • Open Android Settings on the device, and enter in th SECO Settings section

  • Enable the switch “ADB over Air”

  • With “ADB over Air“ configuration enabled, the device IP should appear under the switch.

  • On your PC open cmd terminal or a bash shell, and type the command:

    adb connect <DEVICE_IP_ADDRESS>:5000
    adb shell
    • Where <DEVICE_IP_ADDRESS> is the IP address of your device

On SECO Android 11 BSP it is possible to create and test custom “devicetree.dtb” and “overlay.dtbo” files for implementing and validating custom DISPLAY configuration or peripherals.

You can customize and test new dtb/dtbo files without using external resources, you just need the SECO board, and a PC (Windows or Linux) for connecting to it with ADB protocol (via USB cable or over IP).

Please refer to Connecting via ADB for detailed instructions on HOW TO connect the board via ADB.

Procedure

  • Connect to the board via ADB protocol (ref to Connecting via ADB for details) or via Serial cable

  • Enter in the folder /data/seco/dts_sources:

    • cd /data/seco/dts_sources

  • Inside “seco/” folder you will find the dts sources files you can modify and compile for changing default dtb or dtbo

    • Here is an example from c43 board:

  • You can edit .dts files using the vi editor included in our Android distribution and add or change dts code in the source files.

    • Example command for editing devicetree dts file on C43 board:

      vi seco/seco-imx8qm-c43.dts
    • Example command for editing overlays dts file on C43 board:

      vi seco/overlays/seco-imx8qm-c43-lvds-GENERIC-single-channel-overlay.dts
  • After having changed the sources file with the right setup, it is possible to compile dtb and dtbo binary files with the script ./dtscompile.sh <file_to_be_compiled>:

    ./dtscompile.sh  seco/overlays/seco-imx8qm-c43-lvds-GENERIC-single-channel-overlay.dts
  • or:

    ./dtscompile.sh  seco/seco-imx8qm-c43.dts
  • Results will be copied in /data/seco/ folder:

    • /data/seco/overlay.dtbo

    • /data/seco/devicetree.dtb

  • You can edit /data/seco/android_seco.conf:

    vi /data/seco/android_seco.conf
  • and add in it the following definitions:

    ### Enable dtb customization
    enablecustomization=true
    
    ### Definitions for dtb custom file
    customdtb=devicetree.dtb
    
    ### Definitions for device tree overlay custom file
    customdtbo=overlay.dtbo
    
  • N.B. If you are defining a new video output you need also to unconfigure any defined video:

    ### Force video selection. 
    # Posible values are: NONE, LVD0, ... LVD6, HDM0, HIN0, EDP0, HLV0, ELV0, LEH0, EHD0
    videosel=NONE
    
  • The changes will be applied starting from the next reboot.

  • At startup pay attention to the following messages for verifying the new setup:

    switch to partitions #0, OK
    mmc0(part 0) is current device
    587 bytes read in 11 ms (51.8 KiB/s)
     verify OK, boot 'boot_a'
    Found custom dtb of size 165905 in path /misc/seco/devicetree.dtb  <----
    165905 bytes read in 13 ms (12.2 MiB/s)       <---------- size
    Found custom dtbo of size 3147 in path /misc/seco/overlay.dtbo    <-----
    3147 bytes read in 12 ms (255.9 KiB/s)        <---------- size
    Warn! Can't find videoselection NONE in dtbo image.    <-------
    Kernel load addr 0x80280000 size 43283 KiB
    kernel   @ 80280000 (44321280)
    ramdisk  @ 86400000 (8505136)
    fdt       @ 83e80000 (165905)       <----------  size
    ## Flattened Device Tree blob at 83e80000
       Booting using the fdt blob at 0x83e80000
       Using Device Tree in place at 0000000083e80000, end 0000000083f2bfff
    
    
  • P.S. If you prefer you can edit dts files on your Desktop PC, and copy them using adb push command:

    adb push seco-imx8qm-c43.dts /data/seco/seco/seco-imx8qm-c43.dts
    adb push test.dtb /data/seco/overlays/seco-imx8qm-c43-lvds-GENERIC-single-channel-overlay.dts
    
  • P.P.S. It is also possible to customize only the dtb or only the dtbo file. If only one of these files has been found, the default configuration will be used instead of the missing one.