Training Android Internals: Android Frameworks and HAL Implementation

ac6-formation, un département d'Ac6 SAS
 
Site displayed in English (USA)
Site affiché en English (USA)View the site in French
go-up

leftthintrapezium-20-6b337e ac6 > ac6-formation > Operating Systems > Android > Android Internals Inquire Download as PDF Call us Write us
G3Android Internals
Android Frameworks and HAL Implementation
Android Frameworks and HAL Implementation
Objectives
  • Explore the Android source code architecture
    • The Android init process
    • System services
    • The Android Binder
    • Android security and SELinux
    • The Android Application Framework
  • The Android Hardware Abstraction Layer
    • The Android Multimedia Framework and OpenMAX
    • Understand the static and dynamic framework structure
    • Class structure
    • Split between Java and C++ code
    • Data flow through the frameworks
    • Control structure of the frameworks
Labs are conducted on the Android emulator
We use the last released AOSP (Android Open Source Platform) version.
For on-site trainings, if suitable Linux workstations are not available, we provide virtual machine images for VirtualBox; in all cases the requisite is a recent 64bit PC (at least 4 cores) with 64Gb of RAM (32Gb may work but is not recommended) and 600Gb of free disk space.
  • Engineers that must work on the Android port on a new platform
    • Writing the HAL for a new board
    • Debugging the HAL and Android frameworks
    • Expanding the Android platform for specific usages
    • Good Linux kernel and driver programming experience
    • Android installation knowledge
    • Basic knowledge of the structure of an Android application
    • Good C++ and Java programming skills
    • Basic Java knowledge
  • Theoretical course
    • PDF course material (in English) supplemented by a printed version.
    • The trainer answers trainees' questions during the training and provide technical and pedagogical assistance.
  • Practical activities
    • Practical activities represent from 40% to 50% of course duration.
    • Code examples, exercises and solutions
    • One PC (Linux ou Windows) for the practical activities with, if appropriate, a target board.
      • One PC for two trainees when there are more than 6 trainees.
    • For onsite trainings:
      • An installation and test manual is provided to allow preinstallation of the needed software.
      • The trainer come with target boards if needed during the practical activities (and bring them back at the end of the course).
  • Downloadable preconfigured virtual machine for post-course practical activities
  • At the start of each session the trainer will interact with the trainees to ensure the course fits their expectations and correct if needed
  • This course can be dispensed from 3 to 5 days:
    • The first three days are mandatory to understand the architecture of the Android Frameworks
    • The fourth day covers in more depth the multimedia and video handling
    • The fifth day covers the audio framework in detail (this requires part of the knowledge dispensed in the fourth day, so is only available in a full 5 days course)
  • Any embedded systems engineer or technician with the above prerequisites.
  • The prerequisites indicated above are assessed before the training by the technical supervision of the traineein his company, or by the trainee himself in the exceptional case of an individual trainee.
  • Trainee progress is assessed in two different ways, depending on the course:
    • For courses lending themselves to practical exercises, the results of the exercises are checked by the trainer while, if necessary, helping trainees to carry them out by providing additional details.
    • Quizzes are offered at the end of sections that do not include practical exercises to verifythat the trainees have assimilated the points presented
  • At the end of the training, each trainee receives a certificate attesting that they have successfully completed the course.
    • In the event of a problem, discovered during the course, due to a lack of prerequisites by the trainee a different or additional training is offered to them, generally to reinforce their prerequisites,in agreement with their company manager if applicable.

Course Outline

  • Linux and Android
  • Android Licensing
  • Accessing the kernel source code
  • The Android-specific kernel drivers
    • Ashmem
    • Logger
    • Low_memory_killer
    • Timed_output
    • Timed_gpio
    • Buttons and Keypad management
  • The Android GKI kernels
  • The Android Kernel debugger
Exercise:  Setting up the build environment and launching the build
  • The Android code base
  • Building Android
    • The Android build environment
    • The Android Emulators (Goldfish and Cuttlefish)
    • The Android build system
    • The Android.mk files
  • Adding new components to the build system
    • Java components
    • Native components
    • Applications
  • Creating a new Android platform
  • Converting to Soong
    • Blueprint files
  • Android Treble
    • Android Partitions
    • Android Shared System Image (SSI)
    • Interface Enforcement
  • Debugging
Exercise:  Creating and compiling a new Android platform
  • Android properties
  • The Android initialization
    • Android Initialization and Device management
    • The Android initialization language
    • The Android boot sequence
    • The “zygote” process
  • Security Enhanced Android
    • Security in Android and SELinux
    • Toolbox commands
    • Security and the build system
    • SEPolicy files
  • The bionic C library
    • Why a new C library
    • The bionic Android-specific features
    • What is missing in bionic
  • Adding native components
    • Adding native executables
    • Defining Java methods in C++
    • JNI for Android
  • Platform interface for native components
    • Accessing system properties
    • Accessing the Android log system
    • Interacting with daemon services
  • The Android NDK and JNI
  • SWIG
Exercise:  Creating a new native component
  • The Android Binder architecture
    • Why a new IPC mechanism
    • Android as a massively distributed system
    • The Binder in action
    • The Binder kernel driver
  • Binder implementation
    • The AIDL language
    • The AIDL tool
    • Binder Java classes
    • C++ binder implementation classes
  • Writing Services
    • Standard Java services
    • Services and the Binder
    • Service Binding
    • Stable AIDL
  • Binder implementation
    • Binder Java classes
    • Reference counting in C++ Android frameworks
    • C++ binder implementation classes
    • Implementing a C++ Service
    • The AIDL NDK backend
  • System services
    • What is a system service
    • Static and context-dependent services
    • Structure of a system service
    • Adding a new system service
    • The system ServiceManager process
Exercise:  Coding a system service
  • Android Power Management
  • The Driver API
  • The user-mode API
  • The Java API
  • Why a HAL?
  • Conventional and Legacy HALs
    • Architecture
    • Main HAL components
    • The legacy Sensor HAL
  • HIDL HALs
    • HAL Types
    • The Hardware Interface Definition Language
  • Migrating from HIDL to AIDL
Exercise:  Create a simple HAL component
  • Sensors in Android
    • The sensor types
    • The Sensor Manager
    • Accessing Sensors
  • Framework Architecture
    • Sensor discovery
    • Sensor Calibration
  • The Location Manager and Geocoding
  • Multimedia in an Android device
    • Data formats and File formats
    • Codec and Demux
  • Multimedia for Applications
    • Audio and video playback (MediaPlayer class)
    • Audio and video capture (MediaRecorder class)
  • Framework Architecture
    • General framework architecture
    • General data and control flows
    • The MediaPlayer service layer
    • Stagefright and OpenMAX
Exercise:  Implementation of an mp3 playback service
  • Multimedia in an Android device
  • StageFright in the Android Media Framework
    • The legacy OpenCore framework
    • The Stagefright class structure
  • OpenMAX Overview
    • The Khronos Group
    • OpenMAX/DL: the Development Layer
    • OpenMAX/IL: the Integration Layer
    • OpenMAX/AL: the Application Layer
    • OpenMAX and OpenSL/ES
  • OpenMAX in the Android Media Framework
    • Interface between Android and OpenMAX
    • The OpenMAX/IL Architecture
  • Integration of OpenMAX/IL in Stagefright
    • Component registration
    • Component configuration
    • Component Quirks
  • The OpenMAX/IL Bellagio implementation
    • OpenMAX/IL LGPL implementation of the core
    • Sample implementation of components
  • Overview
  • The Hardware composer
  • Audio routing
  • Architecture of Audio manager
    • Audio system
    • Audio policy manager
    • Audio policy service
  • Control flow
    • Playback and recording control
    • Time source generation
  • Output/input audio flow
    • Buffer management
  • Audio track
    • Overview
    • Track live cycle
    • Data flow
  • Audio mixer:
    • Overview
    • Mixer life cycle
    • Fast mixer
    • Resampling
    • Volume
  • Audio policies
    • Audio Policies and policy devices
    • HAL Audio policy provided services
    • Use from the audio policy manager
    • Use of audio services by the HAL audio policy
    • Output duplication
    • Suspend/resume
  • Audio devices
    • Audio device classes
    • Data flow
    • Interaction with audio track and record
  • Audio streams and effects
More

To book a training session or for more information, please contact us on info@ac6-training.com.

Registrations are accepted till one week before the start date for scheduled classes. For late registrations, please consult us.

You can also fill and send us the registration form

This course can be provided either remotely, in our Paris training center or worldwide on your premises.

Scheduled classes are confirmed as soon as there is two confirmed bookings. Bookings are accepted until 1 week before the course start.

Last update of course schedule: 15 December 2025

Booking one of our trainings is subject to our General Terms of Sales