Embedded Android


Android is becoming a popular choice as an embedded operating system, largely because of its great UI and familiar programming interface. Support for Android is available from a wide range of chip, board and module vendors. This course will show you the internal workings of Android, guide you through selecting suitable hardware platforms and teach you how to customize the platform for your own needs.

You will learn how to build Android from source and reflash the system images using fastboot. You will find out how to lock-down the UI to create a single-purpose “kiosk mode” application, and how to access external hardware from Android apps, using JNI. You will learn about the Android security framework and how to reduce the chances of the device becoming compromised. There are modules on how SurfaceFlinger renders graphics for various displays, and on the all-important topic of debugging and profiling the final system.

Roughly half of the course is taken by hands-on lab sessions during which you will apply the theory to create an embedded Android device, based on the popular and readily available BeagleBone Black

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

Duration

4 days

Price

£1950 (excluding VAT)

Upcoming courses

12th to 15th February 2018, Winchester, UK. Click here for information about making a booking
If the time or location are not suitable to you, contact us to request a quote for an on-site course

Audience

This course is ideal for system architects, engineers and project leaders who want to know how Android works, and how to customize and extend the platform

Prerequisites

Good knowledge C/C++ and Java
Familiarity with Linux development and command-line tools

Materials

All students will receive:

  • A printed copy of the presentations and lab notes
  • Worked solutions to the problems, plus electronic copies of the course materials

Hands-on labs

An essential part of the training are the lab sessions, which take approximately 50% of the time. You will 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 cross tool-chain so there is no need to install Linux beforehand.

Outline

Introduction to Android

  • Android architecture: the big picture
  • Getting the source code: the Android Open Source Project (AOSP)
  • Building Android from source
  • Criteria for selecting hardware

The kernel

  • Linux kernel architecture
  • Android-specific changes to Linux
  • Building the kernel
  • Understanding device trees

Booting Android

  • Learning how the bootloader starts Android
  • Flashing images using fastboot
  • Customizing init boot scripts
  • Controlling system behaviour using system properties
  • Reducing boot time

The Android framework

  • Understanding Android services
  • The role of binder and AIDL in defining interfaces to services
  • Defining your own service
  • Calling native code using JNI
  • The Hardware Abstraction Layer (HAL)

Graphics

  • How SurfaceFlinger orchestrates image rendering
  • Internal and external displays
  • Streaming multi-media

Applications

  • Application sandboxing
  • Dalvik and ART
  • How to write a single-use kiosk-mode application

Debugging and profiling

  • Debugging native code
  • Profiling CPU usage using perf
  • Profiling memory usage
  • Profiling power usage

Security

  • User and group IDs
  • Android permissions, and how to add your own
  • How SELinux adds an extra layer of protection
  • Security threats and “rooting”

Interfacing with hardware

  • Some different approaches to reaching hardware from apps
  • USB host and accessories
  • Basic interfacing using GPIO
  • Interfacing with serial ports
  • Interfacing using i2c and SPI peripherals

Integrating non-Android code

  • Problems with integrating non-Android code
  • Using a chroot jail
  • Using Unix sockets to link into the framework and apps