Android internals

Knowing how Android works will help you make better use of the system and adapt it to work for you in novel applications. This course takes a deep dive into the internal workings of Android. You will learn about the architectural layers, the security model, and the main services such as activity manager, power manager and package manager. During the hands-on labs you will use an embedded development board (a BeagleBone Black) to create an embedded Android device which will include a single-use kiosk-mode app. You will find out how to import non-Android code, and how to interface with external hardware via USB and other peripheral interfaces. Other topics include debugging native code and profiling CPU, RAM, and power usage of the whole platform..

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


4 days


£1950 (excluding VAT)

Upcoming courses

None scheduled: contact us to request a quote


This course is ideal for engineers who want to know how Android works, and who want to customise and extend the platform


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


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. We normally work in pairs using a modern development board such as the BeagleBone Black. Each group will also need a laptop or desktop to run the system development tools. We will provide a bootable USB memory stick with an appropriate version of Linux and cross tool-chain so there is no need to install Linux beforehand.


Introduction to Android

  • Android architecture: the big picture
  • Getting the source code: the Android Open Source Project (AOSP)
  • How to configure AOSP for a specific device
  • Building Android from source

The kernel

  • Android-specific changes to Linux
  • Getting the source for vendor kernels
  • Building the kernel
  • Booting the kernel: device trees, RAM disks and boot blobs

The native layer

  • The init program and boot scripts
  • Adding your own native services
  • System properties: how they are defined and how to change them
  • The Hardware Abstraction Layer (HAL)

The Android framework

  • Binder and service manager
  • Android services
  • The interface between the framework and native layer: JNI


  • Activity manager: the application lifecycle and handling Intents
  • Package manager: managing user IDs and permissions
  • Power manager: power states and wake locks


  • Application sandboxing
  • Dalvik and ART
  • Crating a new run-time via the Zygote
  • Writing a single-use kiosk-mode application


  • User and group IDs
  • Android permissions, and how to add your own
  • How SE Linux adds an extra layer of protection
  • Security threats and "rooting"

Interfacing with hardware

  • Basic interfacing using GPIO
  • Interfacing with serial ports
  • Interfacing using i2c and SPI peripherals
  • USB host and accessories

Non-Android code

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

Debugging and profiling

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