Inside the Android OS is a comprehensive guide and reference for technical professionals who want to customize and integrate Android into embedded devices, and construct or maintain successful Android-based products. Replete with code examples, it encourages you to create your own working code as yo
Inside the Android OS: Building, Customizing, Managing and Operating Android System Services
β Scribed by G. Meike, Lawrence Schiefer
- Publisher
- Addison-Wesley Professional
- Year
- 2021
- Tongue
- English
- Leaves
- 266
- Series
- Android Deep Dive
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
- Assess advantages and tradeoffs using Android in smart IoT devices
- Master practical processes for customizing Android
- Set up a build platform, download the AOSP source, and build an Android image
- Explore Android's components, architecture, source code, and development tools
- Understand essential kernel modules that are unique to Android
- Use Android's extensive security infrastructure to protect devices and users
- Walk through Android boot, from power-on through system initialization
- Explore subsystem startup, and use Zygote containers to control application processes
- Interface with hardware through Android's Hardware Abstraction Layer (HAL)
- Provide access to Java programs via Java Native Interface (JNI)
- Gain new flexibility by using binderized HAL (Project Treble)
- Implement native C/C++ or Java client apps without bundling vendor libraries
β¦ Table of Contents
Cover
Half Title
Title
Copyright
Dedication
Contents at a Glance
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
A
B
C
D
E, F
G, H
I, J
K, L
M
N, O, P
Q, R
S
T
U, V, W, X-Y-Z
β¦ Subjects
Android; Android System Services;
π SIMILAR VOLUMES
In 2004, Android was two people who wanted to build camera software. But they couldn't get investors interested. Today, Android is a large team at Google, shipping an operating system (including camera software) to over three billion devices worldwide. This is the inside story, told by the people
<p><b>Build, customize, and debug your own Android system</b></p><h4>Key Features</h4><ul><li>Master Android system-level programming by integrating, customizing, and extending popular open source projects</li><li>Use Android emulators to explore the true potential of your hardware</li><li>Master ke