Learning Embedded Android N Programming
eBook - ePub

Learning Embedded Android N Programming

Ivan Morgillo, Stefano Viola

Share book
  1. 282 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Learning Embedded Android N Programming

Ivan Morgillo, Stefano Viola

Book details
Book preview
Table of contents
Citations

About This Book

Create the perfectly customized system by unleashing the power of Android OS on your embedded device

About This Book

  • Understand the system architecture and how the source code is organized
  • Explore the power of Android and customize the build system
  • Build a fully customized Android version as per your requirements

Who This Book Is For

If you are a Java programmer who wants to customize, build, and deploy your own Android version using embedded programming, then this book is for you.

What You Will Learn

  • Master Android architecture and system design
  • Obtain source code and understand the modular organization
  • Customize and build your first system image for the Android emulator
  • Level up and build your own Android system for a real-world device
  • Use Android as a home automation and entertainment system
  • Tailor your system with optimizations and add-ons
  • Reach for the stars: look at the Internet of Things, entertainment, and domotics

In Detail

Take a deep dive into the Android build system and its customization with Learning Embedded Android Programming, written to help you master the steep learning curve of working with embedded Android. Start by exploring the basics of Android OS, discover Google's "repo" system, and discover how to retrieve AOSP source code. You'll then find out to set up the build environment and the first AOSP system. Next, learn how to customize the boot sequence with a new animation, and use an Android "kitchen" to "cook" your custom ROM. By the end of the book, you'll be able to build customized Android open source projects by developing your own set of features.

Style and approach

This step-by-step guide is packed with various real-world examples to help you create a fully customized Android system with the most useful features available.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Learning Embedded Android N Programming an online PDF/ePUB?
Yes, you can access Learning Embedded Android N Programming by Ivan Morgillo, Stefano Viola in PDF and/or ePUB format, as well as other popular books in Computer Science & Hardware. We have over one million books available in our catalogue for you to explore.

Information

Year
2016
ISBN
9781785282881
Subtopic
Hardware
Edition
1

Learning Embedded Android N Programming


Table of Contents

Learning Embedded Android N Programming
Credits
About the Authors
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Understanding the Architecture
An overview of the Android system
Linux kernel
Hardware abstraction layer – HAL
Libraries and the application framework
Libraries
The application framework
Binder IPC
The application layer
Android compatibility
The Android Compatibility Definition Document
Device types
Software compatibility
Beyond Java
Native API
Maintaining 32-bit support
From Dalvik to ART runtime
The Android runtime
A new old approach – AOT compilation
Garbage collection and other improvements
Waiting for Android Nougat
Meeting the Compatibility Test Suite
CTS setup
Device setup
Media files setup
Run!
Analyzing the test results
Diving deeper with CTS Verifier
Setup
Manual testing
Retrieving the results
Summary
2. Obtaining the Source Code – Structure and Philosophy
The Android philosophy
The license
Open source, closed doors
The Android development model
Source code tags and builds
Nexus
Phones
Tablets
Digital media players
Source code tools
Git
Repo
Gerrit
Setting up the environment
Free space
Installing the required tools
Getting ready
Downloading the code
Hands on the code
A look inside AOSP
The ART directory
The bionic directory
The build directory
The external directory
The device directory
The frameworks directory
The out directory
The packages directory
The system directory
The rest of the directory structure
Summary
3. Set up and Build – the Emulator Way
Preparing the host system
Hardware requirements
Software requirements
Installing Java JDK
Installing system dependencies
Setting up a Mac OS X environment
Creating a case-sensitive disk image
Installing the required software
The Android build system
An overview
Bootstrap
Setup
The TARGET_PRODUCT variable
The TARGET_BUILD_VARIANT variable
The TARGET_BUILD_TYPE variable
The TARGET_TOOLS_PREFIX variable
The OUT_DIR variable
The TARGET_PREBUILT_KERNEL variable
The buildspec.mk file
The lunch command
Building the system
More about make
Building a module
Cleaning a module
Cleaning everything
Listing modules
Recreating an image
Building tools
Beyond the system image
Android SDK
Android NDK
Android CTS
Inside an AOSP module
Diving into Android.mk
Android.mk variables ecosystem
The LOCAL_ variables
The BUILD_ variables
Module template examples
The native executable template
The shared library template
The application template
Creating a custom device
Diving into device configuration
From zero to the screenlock
Setup
Build
Run
Summary
4. Moving to Real-World Hardware
Debugging tools
Introducing ADB
Pushing files to devices
Pulling files from devices
Installing Android APK files
Logcat
Fastboot
Choosing our hardware
Hardware architectures
Minimum requirements
System on Chip – SoC
The baseband processor
Our hardware choice
Motorola Nexus 6
UDOO Quad
Compiling Android for a real-world device
Nexus 6
UDOO Quad
Setup
Bootloader
System
Kernel
Bootloader mode
Nexus devices
UDOO family boards
Flashing Android images
Nexus 6
UDOO
Summary
5. Customizing Kernel and Boot Sequence
An overview of the Linux kernel
Obtaining the kernel
Retrieving the kernel's binary version
Obtaining the kernel source code
Setting up the toolchain
Getting the toolchain
Preparing the host system
Configuring the kernel
Compiling the kernel
Working with non-Google devices
Driver management
Altering the CPU frequency
An overview of the governors
Customizing the boot image
Creating the boot image
Upgrading the new boot image
Android boot sequence
Internal ROM – bios
An overview of bootloader
The kernel
The Init process
The Android init language
Actions
Services
Options
Triggers
Commands
Imports
Summary
6. "Cooking" Your First ROM
History of custom ROMs
Cyanogenmod
Building Cyanogenmod
Installing a pre-build version
The Android Open Kang Project
Installing AOKP
Minor ROMs
Overview of OEM customizations
Samsung – TouchWiz
Huawei EMUI
HTC Sense
LG Optimus UI
Xiaomi MIUI
An overview of Android recovery
Diving into Android recovery
Installing an alternative recovery
Clockworkmod
TWRP – Team Win Recovery Project
Connecting to the recovery shell using ADB
Device permissions
Root access
SuperSu
Obtaining root access
Chef toolkit
Preparing the environment
Android kitchen
Other developers' tools
Manipulating DEX files with APKTool
Cooking our first ROM
Gathering the ingredients
Dumping system partitions
Modifying an Android system binary image
Modifying an Android binary boot image
Flashing our custom ROM
Summary
7. Tailoring Your Personal Android System
Receiving over the air updates – OTA
Updating the whole system
Updating the system incrementally
Applying a single component update
Creating over the air updates
OTA internals
Edify syntax
OTA f...

Table of contents