Android porting

Android is not just for smart phones. It is an open source operating system that can be embedded into a wide range of target hardware, with applications such as point of sale, test and measurement, industrial control, and information kiosks. This four day course will teach you how to create a custom Android platform from scratch, based on code from the Android Open Source Project (AOSP). The course is presented in modules, each with a practical session where you get the chance to try out the techniques described earlier. You will build up a functional embedded Android system, using a BeagleBone Black development board as the example target device. You will learn how to adapt the Android hardware abstraction layer to work with your target platform, and how to add your own code and packages to the final system image.

Download course details as a PDF
Click here for information about booking a course


4 days

Upcoming courses

Together with Techsupport: 19th to 22nd March 2018, Gothenburg, Sweden. Price SEK 33200. Click here for more information

If the time or location is not suitable for you, contact us to request a quote for an on-site course


This course is intended for engineers who are starting out with a fresh Android implementation or who need to understand and modify an existing one


Essential: good knowledge C/C++ and familiarity with Linux development and command-line tools
Desirable: a working knowledge of Java


All students will receive:

  • Printed and electronic copies of the presentations and lab notes
  • Worked solutions to the problems

Hands-on labs

An essential part of the training are the lab sessions, which take approximately 50% of the time. We normally work in pairs using a modern development board such as the Beaglebone. Each group will also need a laptop or desktop to run the system development tools. We will provide a bootable USB hard drive with an appropriate version of Linux and development tools so there is no need to install Linux beforehand.

Course outline

The Android Open Source Project

  • The steps to port Android to a new platform
  • Getting the AOSP code
  • Building Android from source

Creating a new Android product

  • Setting basic hardware characteristics
  • Selecting which packages to build into the final images
  • Adding a new product to the “lunch” menu

The Android kernel

  • Android-specific kernel features
  • Obtaining vendor kernel code
  • Building a custom kernel into target images

Bootloaders and bootstrap

  • Booting Android: boot image blobs
  • Flashing images using fastboot
  • The init program and init.*.rc scripts
  • Starting native services: how to add your own

Tracing and debugging

  • Profiling code execution using perf
  • Profiling using Android Systrace
  • Using gdbserver to debug native code

The Android build system

  • Understanding the make file
  • Creating your own packages

The Android framework

  • Android architecture
  • Binder
  • Android services
  • Interface between framework and native layer: JNI

The Hardware Abstraction Layer

  • The role of the libhardware libraries
  • A step-by-step walk through of a HAL library

The graphics stack

  • Surfaces and SurfaceFlinger
  • The hwcomposer HAL library
  • The gralloc HAL library
  • Integrating vendor OpenGL ES libraries

Human input devices

  • The input layer: touch screens, mice, keyboards and keypads
  • Adding input devices

Sound and vision

  • The audio HAL library
  • Configuring ALSA sound drivers
  • Video sources: camera devices and other inputs
  • Using OpenMAX plugins to add custom codecs


  • Configuring network interfaces
  • Mobile data, WiFi and Ethernet

Power management

  • Interaction between Power Manager and the kernel
  • Power states
  • Writing power-aware kernel drivers