The web site for the AOSP and AAOS Meetup has moved to https://aospandaaos.github.io/
March 2022
Cuttlefish is a great way to test Android Open Source (AOSP) builds. It has been around since AOSP 9.0 and yet it is still not very well known. In this post I will give an overview of Cuttlefish, and show how to use it.
This is the first in a series of blogs about Android Automotive OS
Android Automotive OS (AAOS) is a version of Android designed to run in a vehicle head unit and provide the “In Vehicle Infotainment” (IVI) system. In modern vehicles, the IVI system controls the heating and ventilation, provides audio streaming, shows the rear-view (and side view) cameras, offers navigation … and many other things besides.
This is a problem that I ran across recently. Building the whole AOSP code base is a big task, and normally you would choose a machine with plenty of RAM. But, sometimes you need to build on a lesser machine. It happened to me when I was on the road and I wanted to run a build on my laptop, which has 8 GiB RAM, and a dual core hyper-threaded Intel i7 CPU. I have used this set up with Marshmallow and earlier versions without problem – it just takes a while, that’s all.
Chris Simmonds has been working on ports of Android to the BeagleBone Black for several years, since he posted the first tutorial on running JellyBean 4.3.
Now all of that work has been consolidated into the Android4Beagle project. Android4Beagle aims to provide a vanilla Android build, based on AOSP. Currently, builds are available for KitKat, Lollipop and Marshmallow, with Nougat in the works.
Update: Brillo was abandoned by Google in December 2016 in favour of Android Things
Brillo (https://developers.google.com/brillo/) is Google's operating system for devices that are connected to the IoT. They communicate with each other, with the cloud and with mobile apps using a system called Weave (https://developers.google.com/weave/). Brillo and Weave are still under wraps: you have to request an invite from the two links in order to get access to documentation, sample code, and so on. However, there is enough information publicly available to build and test a device running Brillo, which is what this blog is about. I hope to cover Weave in a later post.
Brillo is actually a cut-down version of Android. Basically, all the Java components have been stripped away leaving a much simpler embedded Linux operating system. When building Brillo, some things pop out immediately, which may give a preview of future Android builds:
Below, I show how to build and run the Brillo emulator
Update: This page is out of date. I have put together all of the information on running Android on BeagelBone on the Android4Beagle page
At last, here is Android Lollipop for BeagleBone Black!
Once you have ported AOSP to your platform, an obvious next step is to install some apps: maybe Gmail or Angry Birds. Ideally, you would want Google Play Store so that you can select apps from the 100,000's available. But, there is a problem. Play Store, like most of the apps on Play Store, requires Google Mobile Services (GMS) to work. GMS extends the Android framework by adding the libraries, configuration files and applications required to support the extended Google APIs that most developers know simply as Google Services. Most of these components are in the system partition so either they have to be included as part of the base AOSP build or installed as root afterwards. There is also a licensing issue: the components that make up GMS and applications like Gmail, Google Maps and Google Now are proprietary to Google and require a license.
Update: This page is out of date. I have put together all of the information on running Android on BeagelBone on the Android4Beagle page
I have updated the internal eMMC flash and sdcard images for BeagleBone Black. Most changes are to make U-Boot work better with fastboot, especially to make it possible to enter fastboot without having to type "fastboot" at a U-Boot prompt and so avoid the need to have a serial cable. Also, I have increased the sizes of the system and userdata partitions so that you can install more apps. I am still using Android KitKat 4.4.4 and TI Linux 3.2 kernel with SGX accelerated graphics libraries.
Many Android bootloaders implement the fastboot protocol for loading and flashing images to internal memory (there is some background information about how Android boots and boot image formats in these slides: http://www.slideshare.net/chrissimmonds/android-bootslides20). Fastboot is a simple USB protocol using ASCII text strings for commands and responses. In recent versions of the AOSP you can find the specification in system/core/fastboot/fastboot_protocol.txt.