Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android System Programming

You're reading from   Android System Programming Porting, customizing, and debugging Android HAL

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781787125360
Length 470 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Roger Ye Roger Ye
Author Profile Icon Roger Ye
Roger Ye
Shen Liu Shen Liu
Author Profile Icon Shen Liu
Shen Liu
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Introduction to Android System Programming FREE CHAPTER 2. Setting Up the Development Environment 3. Discovering Kernel, HAL, and Virtual Hardware 4. Customizing the Android Emulator 5. Enabling the ARM Translator and Introducing Native Bridge 6. Debugging the Boot Up Process Using a Customized ramdisk 7. Enabling Wi-Fi on the Android Emulator 8. Creating Your Own Device on VirtualBox 9. Booting Up x86vbox Using PXE/NFS 10. Enabling Graphics 11. Enabling VirtualBox-Specific Hardware Interfaces 12. Introducing Recovery 13. Creating OTA Packages 14. Customizing and Debugging Recovery

Strategy of integration

In the preceding sections, we talked about Android architecture, AOSP, and third-party open source projects for Android. The software industry has been there for decades. There are so many existing source codes that can be reused and the need to create something from scratch is very rare. The porting and customization for a new platform is basically art of integration.

In this book, we will use the AOSP source code as the foundation and try to build everything on top of it. However, we may not be able to rely on AOSP source code only. In fact, we want to demonstrate how to support a platform that is not supported by AOSP. How are we going to do this? Do we create something from scratch? The answer is no. We will demonstrate how we can integrate all existing projects together to create a new platform. That's the reason why we discuss third-party open source projects.

In our case, VirtualBox is not supported by AOSP and we are going to enable it using AOSP and Android-x86. We need to use projects from both AOSP and Android-x86 to build a system for VirtualBox. However, our goal is to create a new build system for VirtualBox with minimal changes to the AOSP source code tree. This is also the goal of many other projects based on AOSP.

Based on the previous understanding, we have four categories of projects in our integration process:

  • The original unmodified AOSP projects: In these kinds of projects, we will use AOSP projects without any changes.
  • The third-party projects: In this category, the projects are added by the third-party projects and are not part of AOSP, so there are no changes involved as well.
  • Projects modified by both AOSP and one of the third-party projects: This is complicated. We need to review the third-party changes and decide whether we want to include them in our system or not.
  • Projects modified by multiple open source projects and AOSP: This is the most complicated case that we should avoid to integrate or change.

It is very easy to understand that we should try to reuse projects in category 1 and 2 as much as possible. The challenges and major work will be in category 3, while we should try to avoid category 4 whenever possible.

You have been reading a chapter from
Android System Programming
Published in: May 2017
Publisher: Packt
ISBN-13: 9781787125360
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime