Contents

Preface

1 Why Android?

Adopting Android

Full Stack

Broad Acceptance

Beautiful UI

Linux Based

Powerful Development Environment

Open Source

AOSP and Google

Other Choices

Micro-Controllers

Other RTOSs

Summary

2 Booting Acme

Setting Up a Build Machine

Downloading the Code

Repo

Forking the Source

Android Version Selection

Local Mirror

Hosted Git Repositories

Tree Snapshot

Repository Commit Pinning

Example: Local Mirror of Forked Repositories

Building an Image

Device Tools

fastboot

adb

Flashing the Device

Summary

3 Getting Started

Putting Android in Its Place

Hardware

The Linux Kernel

System Libraries

Applications

The Android Framework

The Android Service Model

Exploring the Source

Other Sources

What’s in the Box?

Summary

4 The Kernel

The Linux Kernel

Kernel Process Management

Kernel Memory Management

The Android Kernel

Android Kernel Features

Building a Kernel

The Build System

Downloading the Source

Summary

5 Platform Security

Types of Security

Verified Boot

Operational Security

Android Software Layers

The Process Sandbox

SE Linux for Android

SE Policy Definition

Android Permissions

File Systems

User Protections

Customizing Permissions

Sample Custom Permission–Protected App

Sample Custom Permission Client App

Summary

6 System Startup: Installing and Booting the System

The Boot Process

Bootloader

Fastboot

Kernel

The File System

init

Recovery

Building a Daemon

Creating the Acme Device

Repo Again

Starting the Daemon

Summary

7 Android Startup: Dalvik and Zygote

Dalvik

ART

ART Basics

Hybrid ART

Zygote

Zygote Memory Management

Zygote Startup

Runtime Initialization

System Service Startup

Summary

Citations

8 Getting to Android: The HAL

Why a HAL?

Is a HAL Necessary?

Designing the HAL

Building a HAL

Code Structure

Implementing the HAL

Summary

9 Getting to Java: The JNI

Code Structure

Using the Device

Using the HAL

Using the Java Native Interface

Executing Native Code

JNI: The Java Side

JNI: The Native Side

A Java Proximity Application

JNI: Some Hints

Summary

10 Project Treble: Binderized HAL

HIDL Architecture

hwservicemanager

HIDL Services

HIDL Client Applications

Hardware Interface Definition Language (HIDL)

HIDL Types

HIDL Services

HIDL Clients

Summary

11 Creating a Custom Binderized HAL

Acme Custom HIDL

Summary

12 Clients for a Custom Binderized HAL

Native C++ Aproximity Client

SE Linux for Android Changes for aproximitycl

Build aproximitycl into Acme

Java/Kotlin Aproximity Client

SE Linux for Android Changes for AproximityClient

Build AproximityClient into Acme

Summary

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.88.114.76