Treating A20 boards like an outdated piece of HW by vendors makes building Android for Cubietruck not trivial task. Finding documentation, mailing list or blog post that clearly describes steps is almost impossible. Most of the links to SDK are broken and instructions outdated. Because of that, I decided to leave couple notes for me and all of you lost in this madness.

Hopefully below steps can build a foundation for future development and improvements.

Get the code

It took me a couple of googling hours to realize that key was to carefully search cubietech sever. Finally, I found this.

So I cloned repos with code:

Based on other instruction that I hit previously (but the download link was broken) I run build process:

Lichee compilation error

World would be too beautiful if everything would work right out of the box, so I hit this very informative build error:

After some digging I managed to narrow down issue to piece of smart code, that injected version string through define, which generated above mess. Without thinking much about fix I just changed incorrectly generated define to driver version string. This string will be presented in UMP modinfo. Patch which fix above looks like that:

After above change repeated build command finish without errors.


I assume you directory layout looks like this:

Go to Android directory and source environment setup script. Android do not like shells other then bash, so change your shell if you are using something different:

You will get a menu which will look like this:

Of course, our target is sugar_cubietruck-eng, so type 16. Then copy kernel and modules using extract-bsp function and start building:

Wrong make version

Android expects make in version 3.81 or 3.82 and recent distros (like my Debian stretch/sid) have make>=4.0. Problem signature looks like this:

You can workaround this problem using below patch:

Java SE 1.6 required

If your distro is not prepared you can hit something like this:

To fix this issues add this repo to your /etc/apt/sources.list

Then update and install required Java SDK.

You also may need to update alternatives if Java SE 1.6 was installed previously:

Missing dependencies

If you will hit some weird compiler errors like this:

This means that you have missing dependencies. On Debian you can fix this with:

After all above fixes running make again should build the image:

It took some time, so you can go for coffee. Final messaged for passed build should look like this:

Pack image

In the output it will tell you where your image is:

Image installation

The image can be installed using LiveSuit. Flashing instructions can be found on sunxi wiki.



As you can see Android boots to initial screen and it looks like we have a working procedure for building Cubietech Android SDK. This gives good ground for future experimentation.

Hopefully, above instructions work for you and will not run out of date soon. If you found any problems/errors please let me know in comments. If you think content can be useful to others please share.

Thanks for reading.