Chapter 2. The Stack
This is the 9,000-foot overview of the Android platform. Although you’re concerned primarily with writing Android applications, understanding the layout of the system will help shape your understanding about what you can or cannot do easily with Android.
By the end of this chapter, you’ll understand how the whole system works, at least from the high level.
Stack Overview
The Android operating system is like a cake consisting of various layers. Each layer has its own characteristics and purpose. The layers are not cleanly separated but often seep into each other.
When you read through this chapter, keep in mind that I am concerned only with the big picture of the entire system and will get into the nitty-gritty details later on. Figure 2-1 shows the parts of the Android stack.
Linux
Android is built on top of Linux. Linux is a great operating system and the poster child of open source. There are many good reasons for choosing Linux as the base of the Android stack. Some of the main ones are its portability, security, and features.
Portability
Linux is a portable platform that is relatively easy to compile on various hardware architectures. What Linux brings to Android is a level of hardware abstractions. By basing Android on Linux, we don’t have to worry too much about underlying hardware features. Most low-level parts of Linux have been written in fairly portable C code, which allows for third parties to port Android to a variety of devices.
Get Learning Android now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.