Android 12.1 release for Nitrogen8 family
Published on January 4, 2023
We are glad to deliver the latest Android 12.1 1.0.0 release for all our i.MX 8M-based Nitrogen platforms:
- Nitrogen8M (and SOM)
- Nitrogen8M Mini (and SOM)
- Nitrogen8M Plus SOM
For the impatient
You can download the Android 12 images from here:
- For Nitrogen8M (+SoM) platforms:
- For Nitrogen8M Mini (+SoM) platforms:
- For Nitrogen8M Plus SoM platforms:
Flashing using fastboot
The .zip
archives include all the files to be flashed using fastboot.
Note that fastboot will only flash to your eMMC device.
First you need to enter fastboot mode from U-Boot prompt:
=> fastboot 0
Once the platform is in fastboot mode, you simply need to call the flashing script:
~/$ unzip s12*nitrogen8*.zip -d s12-nitrogen8
~/$ cd s12-nitrogen8
~/s12-nitrogen8$ ./device/boundary/scripts/flash_fastboot.sh
Since our i.MX 8 platforms might come with different eMMC sizes, you can select which size you want to use at flashing time. If you don't provide that argument, the "default" size of 16GB will be flashed. But, if you have an "old" board, it will most likely include 8GB of eMMC; here is the command to use its full size:
~/s12-nitrogen8$ ./device/boundary/scripts/flash_fastboot.sh -s 8
Note that you can also use fastboot
from a Windows Host PC, see following blog post to learn how:
C:\s12-nitrogen8> device\boundary\scripts\flash_fastboot.bat nitrogen8m
Updating U-Boot
We recommend updating U-Boot once the image is flashed:
=> run upgradeu
What's new?
This section will only describe the changes / features made since last release.
Android 12 OS updates
Google provides a list of notable changes for developers:
- https://developer.android.com/about/versions/12/12L
- Android version optimized for large screens!
- Support of split screens allowing several apps to run in parallel.
- Code based upon
android-12.1.0_r11
(July 2022)
SELinux
As usual, this release comes with SELinux enabled and enforced. If you are using the userdebug build, you can switch to permissive mode by setting 1 variable in U-Boot:
=> setenv selinux permissive
=> saveenv
Note that this feature only works on userdebug builds, user builds are enforced at all time.
AVB2.0
Same as our previous release, this one supports Android Verified Boot 2.0! So I can't make any modification now? No, there's a way to disable verity for userdebug builds:
$ adb root
$ adb disable-verity
$ adb reboot
At this point you will be able to modify every partition (you can even use adb sync
)
However, it goes without saying that this disablement isn't possible on user builds.
non-A/B OTA updates
This release uses a non-A/B partitioning which allows to save some space and keep the most space for your applications. Also, it does not use the same partitioning as previous releases as some partitions got bigger, breaking partitioning compatibility unfortunately. In order to build an OTA package, you can simply enter this make command (once the env is setup properly):
$ make otapackage
Then, you can setup ota.conf
to reflect your server settings if you plan on hosting your own updates.
Moreover this release allows you to push an update using ADB and then kick the OTA app to do the necessary checks and reboot the platform as needed:
$ adb push $OUT/nitrogen8m-ota-*.zip /sdcard/update.zip
$ adb shell 'am start -n com.fsl.android.ota/.OtaAppActivity --es OTA file:///sdcard/update.zip'
You will eventually see your platform reboot into recovery partition and apply the update.
A/B OTA updates
This release is our first one to support A/B partitioning scheme! Non-A/B remains the default option when building the BSP, however switching to A/B is as easy as setting an environment variable:
$ export AB_OTA_UPDATER=true
$ make -j12
Moreover, instead of duplicating all partitions twice, this release enables new AOSP features:
Regarding any sample app/process to update the system, one can use the SystemUpdaterSample app included in the image:
Otherwise, if you have an ADB access to the platform, you can push the update as follows from the top of your build:
$ system/update_engine/scripts/update_device.py $OUT/nitrogen*-ota*.zip
If you have any questions/interest in this approach, feel free to contact us.
Linux Kernel 5.15.x
This Android release is based on a 5.15.x kernel. It therefore benefits from all our latest drivers/fixes as well as newest Vivante graphics libraries (v6.4.3.p4).
U-Boot 2022.04
This release uses U-Boot 2022.04:
- A board can reboot to fastboot from fastboot (useful during flashing process):
$ fastboot reboot bootloader
- Also you can now flash U-Boot over fastboot as well:
$ fastboot flash bootloader flash.bin
Boundary Devices additions
Just like our previous releases, this one includes unique features that only Boundary Devices provides:
- Dynamic display support
- Our U-Boot version still detects the connected displays automatically (MIPI-DSI + HDMI)
- You can see our list of supported MIPI-DSI displays from our website here
- Optimized Camera HAL version
- This release offers continuous autofocus support for our cameras
- Support for our 802.11b/g/n/ac + BT5.0 Silex Module
- Display rotation setting from U-Boot
=> setenv hwrotation 270
=> saveenv
=> reset
-
- Variety of accessories
- All our accessories like OV5640 cameras are all supported
- 8M Plus platform also supports Basler daA3840 camera
- Variety of accessories
- SD card support as external storage
- Camera settings flexibility
- Our release allows changing the camera configuration by setting a property
- Example with Basler + OV5640 setup for 8MP:
adb shell setprop persist.vendor.camera.config imx8mp-basler-ov5640
Source code access
For the newcomers, please make sure to read our "Android Getting Started Guide" since it contains all the information you need to download, build and flash an Android image.
Since AOSP requirement is still to use Ubuntu Xenial (16.04) to build the OS, many might find it useful to use Docker, we provide a dockerfile if needed:
Otherwise, for those already familiar with our releases, here is a condensed version to get the Android 12 source code:
~/$ mkdir myandroid
~/$ cd myandroid
~/myandroid$ repo init -u https://github.com/boundarydevices/android-manifest.git \
-b boundary-android-12.1.0_1.0.0
~/myandroid$ repo sync
~/myandroid$ source build/envsetup.sh
~/myandroid$ lunch
... choose nitrogen8m / nitrogen8mm / nitrogen8mp from the list of boards
~/myandroid$ ./imx-make.sh -j12
As you can see, we use a special make script instead of the regular make command. The reason is that in order to have as few AOSP changes as possible, NXP created a separate script in order to build dependencies that are the kernel, dtbo, u-boot images. One could also use the following approach to only build the dependencies with that script and then use standard Android build:
~/myandroid$ ./imx-make.sh kernel bootloader -j12
~/myandroid$ make -j12
As always, let us know your experiences (both good and bad) when you test out this image.