OReilly_Embedded_Android(1).pdf

(1893 KB) Pobierz
Embedded Android
Embedded Android
Karim Yaghmour
Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo
734168893.003.png
 
Embedded Android
by Karim Yaghmour
Revision History for the :
ISBN: 978-1-449-30829-2
1317666851
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
History
1
Features and Characteristics
2
Development Model
4
Differences With "Classic" Open Source Projects
5
Feature Inclusion, Roadmaps, and New Releases
6
Ecosystem
7
A Word on the Open Handset Alliance
7
Getting "Android"
8
Legal Framework
9
Code Licenses
9
Branding Use
12
Google's Own Android Apps
13
Alternative App Markets
13
Oracle v Google
13
Hardware and Compliance Requirements
14
Compliance Definition Document
15
Compliance Test Suite
18
Development Setup and Tools
19
2. Internals Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
App Developer's View
21
Android Concepts
22
Framework Intro
25
App Development Tools
27
Native Development
27
Overall Architecture
28
Linux Kernel
29
Wakelocks
30
iii
734168893.004.png 734168893.005.png
Low Memory Killer
31
Binder
32
Anonymous Shared Memory (ashmem)
33
Alarm
34
Logger
35
Other Notable Androidisms
37
Hardware Support
38
The Linux Approach
38
Android's General Approach
39
Loading and Interfacing Methods
40
Device Support Details
42
Native User-Space
43
Filesystem layout
44
Libraries
45
Init
47
Toolbox
48
Daemons
49
Command-Line Utilities
50
Dalvik and Android's Java
50
Java Native Interface (JNI)
52
System Services
53
Service Manager and Binder Interaction
55
Calling on Services
57
A Service Example: the Activity Manager
57
Stock AOSP Packages
57
System Startup
59
3. AOSP Jumpstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Getting the AOSP
63
Inside the AOSP
65
Build Basics
68
Build System Setup
68
Building Android
69
Running Android
73
Using ADB
75
Mastering the Emulator
79
4. The Build System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Comparisons With Other Build Systems
85
Architecture
87
Configuration
88
envsetup.sh
91
Directive Definitions
95
iv | Table of Contents
734168893.001.png
Main Make Recipes
96
Cleaning
98
Module Build Templates
98
Output
102
Build Recipes
104
The Default droid Build
104
Seeing the Build Commands
105
Building the SDK for Linux and MacOS
105
Building the SDK for Windows
106
Building the CTS
106
Building the NDK
108
Updating the API
109
Building a Single Module
110
Building Out of Tree
110
Basic AOSP Hacks
112
Adding an App
112
Adding a Native Tool or Daemon
113
Adding a Native Library
114
Adding a Device
115
Adding an App Overlay
120
Table of Contents | v
734168893.002.png
Zgłoś jeśli naruszono regulamin