Flashing Android Pie on the Pico-Pi i.MX7D board

April 08, 2020

Last year Google announced its strategy for Android Things. In summary, Google’s idea is to put the focus on OEMs building solutions for smart speakers and smart displays, which means that Android Things is not a platform targeting developers anymore. Nevertheless you can still experiment with it, since most of the tools are still available online on the official Android Things site.

The lucky developers who had the chance to go to Google IO in 2018 got an Android Things starter kit as swag. If you are one of them or if you happen to own one of these kits, I’ve got some news for you. In this tutorial I’ll show you how you can reuse this kit for flashing Android Pie and maybe use it for experimenting with AOSP development.

Wait… Why do I need this?

If your are like me, most probably after getting to know about Google’s plans for Android Things you left the kit somewhere in a drawer and forgot about its existence.

Recently, I started getting into AOSP development and I thought it would be cool to put Android in some real hardware without the fear of “bricking” any expensive phone.

The first idea that came to my mind was to use a Raspberry Pi 3B, which as you can see was also originally supported by the Android Things project.

Unfortunately, I found out that I only have older versions of the Raspberry Pi laying around :( But then, I remembered about the mentioned Android Things kit and after a bit of googling and a chat with the NXP support team, I found out that the i.MX7D actually is able to run up to Android Pie (version 9). This is not bad at all knowing that the current public version at the time of writing is Android 10. This together with the items included in the kit make of this board the perfect playground for experimenting with AOSP development.

A few words about the kit

This kit is based on the Pico-Pi i.MX7D and it includes the different components that are shown below:

NXP i.MX7D starter kit

In (1) we can see the Pico-Pi i.MX7D. This board contains the i.MX7D SoM and has the following specifications:

  • CPU: 1 GHz dual-core ARM Cortex A7
  • Memory: 512 MB RAM
  • Storage: 4 GB eMMC
  • Interfaces: UART, I2C, SPI, PWM, GPIO

The i.MX7D is used in four different boards, i.e.: PI, NYMPH, DWARF and HOBBIT.

It is important to know that our board is the Pico-Pi i.MX7D, because this is needed to determine the exact configuration in later steps.

How to flash the iMX7D

Now that you have got a little bit of context, let’s bring the main course to the table!

In the following, I describe the steps that I followed to flash one of the available Android Pie images to the Pico-Pi i.MX7D. This tutorial assumes you are using Ubuntu Linux for carrying out the process, however most of the steps can be applied to other platforms.

1. Serial download mode

Put the Pico-Pi board into serial download mode. For doing so, identify the four jumpers shown in the images below. When you got the kit, the board is configured to use the eMMC boot mode by default. Now you need to change this configuration to the serial download mode, so that we can write our Android image to the board.

Pico-Pi i.MX7D eMMC bootPico-Pi i.MX7D eMMC boot

Pico-Pi i.MX7D serial bootPico-Pi i.MX7D serial boot

You can find all the boot configurations for the available Pico baseboards at [1]

Note: if by any chance you end up finding a guide titled “Development kit for Amazon AVS with Synaptics 2Mic and NXP PICO-PI-IMX7D, User’s Guide, Rev. 0, 11/2017”, which is available at [2], please note that the jumper configuration for the serial download mode as shown in the page 12 is wrong.

2. Pico-Pi and host connection

Use the included USB-A to USB-C cable to connect the Pico-Pi to your computer. Then we need to make sure the Pico-Pi is visible as a mass storage drive from the computer. By default, this is not like that, so we will use a tool called USB OTG Loader, which you can download from [3].

Unzip the file and navigate to the folder named pico-imx6-imx6ul-imx7_otg-installer_{datecode}. Note that {datecode} refers to the date included in the name of the file, which in the link provided is “20171101”. Then execute the following command:

sudo linux/imx_usb pico-imx7d_bootbomb_{datecode}.imx

Once the command finishes executing, you should be able to see several drives connected to your computer, which means that everything is working as expected.

3. Get the Android image

You can download the latest Android Pie image from the NXP website at [4]. You will be requested to create an account before downloading the file.

Alternatively, you can download the image from the TechNexion website at [5]. This doesn’t require any account.

Later I found out about the source code of this image available on the TechNexion’s Github repository [6]. Even though we won’t create the Android image from the source at this state this is a quite valuable resource for future exploration.

4. Write the image

For writing the image to the eMMC, the easiest way is to use a tool called Etcher. Once installed it, open it and select the file containing your Android image. Then select the target drive and click on flash.

Etcher UIEtcher UI

If you want to use the command line for doing this, you can use “dd” as shown in [7]. Just be careful not to delete your host drive!!

Once the writing is done after a few minutes, unplug the USB cable and change the jumpers to use the eMMC boot configuration again, so that your board can use the image to boot.

5. Result

Attach the included multitouch display to the board and plug it to the computer. After a few seconds, you should be able to see your fresh Android Pie running smoothly. Please note that the board is a bit short in RAM memory, so don’t expect the performance of a Pixel phone here :)

Hey, but it is more than enough for using it for our development purposes!

Android Pie easter egg on i.MX7DAndroid Pie easter egg on i.MX7D

What’s next?

Well, there are still a few open questions that I would like to answer by exploring further. Some of them are listed below:

  1. How to build a custom Android image from the AOSP and flash it to the i.MX7D? I found a resource in [6], which basically explains how to do this, but I still need to give it a try.

  2. Is it possible to use something newer than Android Pie on the i.MX7D? I already mentioned about the memory limitation of this board. When I spoke to the NXP support team, they said that this board supports up to Android Pie. This seems to be true, at least officially, since I wasn’t able to find any other image of Android targeting this specific hardware neither on the NXP nor the TechNexion sites. However I need to put this statement to the test.

  3. How to use the Android Things SDK with custom AOSP image? We all know about the Android Things image and how easy it is to interact with the different hardware interfaces available on the Pico-Pi. I would like to find out how to use this SDK with a custom image in order build a little project with a hardware component.

  4. The AOSP includes code for TV and Automotive, is it possible to build a custom image for these devices and flash it into the i.MX7D? Unfortunately I don’t have any knowlegdge on this at the moment, so I definitely need to figure out if the board could handle this. I saw some resources available on the NXP website which were labeled as “auto” and targeting i.MX8. This makes me think there are chances for playing with Automotive.

And this was it! I hope all this information gets on the way of some curious people. If you are among them and have some ideas or comments, please get in touch!


[1] Boot configuration settings for PICO baseboards

[2] Development Kit for Amazon AVS with Synaptics 2Mic and NXP PICO-PI-IMX 7D

[3] USB OTG Loader

[4] Android Pie image by NXP

[5] Android Pie image by TechNexion

[6] TechNexion’s Github Android repository

[7] TechNexion Pico-Pi flashing guide