Book Image

Learning Embedded Android N Programming

By : Ivan Morgillo
Book Image

Learning Embedded Android N Programming

By: Ivan Morgillo

Overview of this book

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.
Table of Contents (15 chapters)
Learning Embedded Android N Programming
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Index

A

  • adb
    • about / Building tools, Introducing ADB
    • files, pushing to devices / Pushing files to devices
    • files, pulling from devices / Pulling files from devices
    • Android APK files, installing / Installing Android APK files
  • ADB
    • used, for connecting to recovery shell / Connecting to the recovery shell using ADB
  • ADK Toolkit
    • reference link / Creating the Android app
  • advanced Linux kernel modding
    • about / Advanced Linux kernel modding
    • CPU frequency management / Diving into CPU frequency management
    • custom CPU frequency governor, adding / Adding a custom CPU frequency governor
  • advanced ROM customization
    • about / Advanced ROM customization
    • ROM customization, from binary / ROM customization from binary
    • ROM customization, from source / Customizing ROM from source
  • all-in-one ADK device
    • UDOO, used / Using UDOO as an all-in-one ADK device
  • alternative recovery
    • installing / Installing an alternative recovery
  • Android
    • philosophy / The Android philosophy
    • license / The license
    • open source projects / Open source, closed doors
    • development model / The Android development model
    • source code tags / Source code tags and builds
    • builds / Source code tags and builds
    • devices, in Nexus family / Nexus
    • source code tools / Source code tools
    • Gerrit / Gerrit
    • reference link / The rest of the directory structure
    • compiling, for real-world device / Compiling Android for a real-world device
    • about / History of custom ROMs
  • Android-powered toys
    • about / Toys
  • Android.mk
    • diving into / Diving into Android.mk
  • Android.mk variables ecosystem
    • about / Android.mk variables ecosystem
    • LOCAL_ variables / The LOCAL_ variables
    • BUILD_ variables / The BUILD_ variables
  • Android ADK
    • reference link / Android ADK
  • Android Application Binary Interfaces (ABIs)
    • about / Native API
  • Android Auto
    • about / Android Auto
  • Android Automotive implementation / Device types
  • Android binary boot image
    • modifying / Modifying an Android binary boot image
  • Android boot sequence
    • about / Android boot sequence
    • internal ROM - bios / Internal ROM – bios
  • Android build system
    • about / The Android build system
    • setting up / Setup
    • building / Building the system
  • Android compatibility
    • about / Android compatibility
  • Android Compatibility Definition Document (CDD)
    • about / The Android Compatibility Definition Document
    • device types / Device types
    • software compatibility / Software compatibility
  • Android CTS
    • about / Android CTS
  • Android Developers
    • reference / Run
  • Android Device Monitor
    • about / Introducing ADB
  • Android framework, hacking
    • about / Hacking the Android framework
    • boot sequence UI customization / Customizing the boot sequence UI
    • Android Settings menu customization / Customizing the Android Settings menu
  • Android Handset / Device types
  • Android images, flashing
    • about / Flashing Android images
    • Nexus 6 / Nexus 6
    • UDOO / UDOO
  • Android init language
    • about / The Android init language
    • action / Actions
    • services / Services
    • options statements / Options
    • triggers / Triggers
    • commands / Commands
    • imports / Imports
  • Android kitchen
    • about / Android kitchen
    • reference / Android kitchen
  • Android Lollipop source code
    • about / From zero to the screenlock
    • setting up / Setup
    • build process / Build
    • running / Run
  • Android N
    • new features / Looking forward
  • Android NDK
    • about / Android NDK
  • Android Open Kang Project (AOKP)
    • about / The Android Open Kang Project
    • ROM Control menu / The Android Open Kang Project
    • reference / The Android Open Kang Project
    • goodies / The Android Open Kang Project
    • installing / Installing AOKP
  • Android recovery
    • overview / An overview of Android recovery
    • diving into / Diving into Android recovery
  • Android runtime
    • about / The Android runtime
    • AOT compilation / A new old approach – AOT compilation
    • Garbage Collection (GC) / Garbage collection and other improvements
    • performance improvements / Garbage collection and other improvements
  • Android SDK
    • about / Android SDK
  • Android system / Libraries and the application framework
    • overview / An overview of the Android system
    • Linux kernel / Linux kernel
    • hardware abstraction layer (HAL) / Hardware abstraction layer – HAL
    • libraries / Libraries
    • application framework / The application framework
    • Binder IPC / Binder IPC
    • application layer / The application layer
  • Android system binary image
    • modifying / Modifying an Android system binary image
  • Android Television device / Device types
  • Android vanilla recovery
    • Reboot system now option / Diving into Android recovery
    • Apply update form ADB option / Diving into Android recovery
    • Wipe cache partition option / Diving into Android recovery
    • Wipe data/factory reset option / Diving into Android recovery
  • Android Watch / Device types
  • Android Wear
    • about / Android Wear
  • AOKP PUSH / Installing AOKP
  • AOSP
    • about / A look inside AOSP
    • ART directory / The ART directory
    • bionic directory / The bionic directory
    • build directory / The build directory
    • external directory / The external directory
    • device directory / The device directory
    • frameworks directory / The frameworks directory
    • out directory / The out directory
    • packages directory / The packages directory
    • system directory / The system directory
    • directory structure / The rest of the directory structure
  • AOSP module
    • about / Inside an AOSP module
  • APKTool
    • DEX files, manipulating with / Manipulating DEX files with APKTool
    • about / Manipulating DEX files with APKTool
    • reference / Manipulating DEX files with APKTool
  • Application Framework
    • activity manager / The application framework
    • resource manager / The application framework
    • location manager / The application framework
    • notification manager / The application framework
    • content providers / The application framework
    • views and widgets / The application framework
  • application template / The application template
  • Arduino
    • about / Meeting Arduino
    • Android ADK / Android ADK
    • UDOO, using ADK device / Using UDOO as an all-in-one ADK device
  • Arduino IDE
    • reference link / Flashing the Arduino board
  • Arduino shields
    • examples / Meeting Arduino
  • Arduino UNO
    • about / Meeting Arduino

B

  • 32-bit support
    • about / Maintaining 32-bit support
    • features / Maintaining 32-bit support
    • CPU architecture / Maintaining 32-bit support
  • baseband processor
    • about / The baseband processor
  • binary version
    • retrieving, of kernel / Retrieving the kernel's binary version
  • Binder Inter-Process Communication (IPC) / Binder IPC
  • bloatware / The Android Open Kang Project
  • boot image
    • customizing / Customizing the boot image
    • creating / Creating the boot image
    • upgrading / Upgrading the new boot image
  • bootloader
    • about / An overview of bootloader
  • bootloader mode
    • flash option / Fastboot
    • erase option / Fastboot
    • reboot option / Fastboot
    • format option / Fastboot
    • about / Bootloader mode
  • Bootstrap
    • about / Bootstrap
  • buildspec.mk file
    • about / The buildspec.mk file
  • BUILD_ variables, Android.mk variables
    • BUILD_EXECUTABLE / The BUILD_ variables
    • BUILD_PREBUILT / The BUILD_ variables
    • BUILD_MULTI_PREBUILT / The BUILD_ variables
    • BUILD_PACKAGE / The BUILD_ variables
    • BUILD_SHARED_LIBRARY / The BUILD_ variables
    • BUILD_STATIC_LIBRARY / The BUILD_ variables
    • BUILD_JAVA_LIBRARY / The BUILD_ variables

C

  • Chef toolkit
    • about / Chef toolkit
  • Chromecast Audio
    • about / Multimedia
  • Clockworkmod
    • about / Clockworkmod
    • installing / Clockworkmod
    • reference / Clockworkmod
  • Clockworkmod UI / Clockworkmod
  • Compatibility Test Suite (CTS)
    • about / Meeting the Compatibility Test Suite
    • unit tests / Meeting the Compatibility Test Suite
    • functional tests / Meeting the Compatibility Test Suite
    • robustness tests / Meeting the Compatibility Test Suite
    • performance tests / Meeting the Compatibility Test Suite
    • setup / CTS setup
    • device setup / Device setup
    • media files setup / Media files setup
    • test plan, running / Run!
    • test results, analyzing / Analyzing the test results
  • CPU frequency
    • altering / Altering the CPU frequency
  • cross-compilation / Setting up the toolchain
  • CTS Verifier
    • about / Diving deeper with CTS Verifier
    • setup / Setup
    • manual testing / Manual testing
    • results, retrieving / Retrieving the results
  • custom device
    • creating / Creating a custom device
    • configuring / Diving into device configuration
  • custom ROM
    • history / History of custom ROMs
    • flashing / Flashing our custom ROM
  • Cyanogenmod
    • about / Cyanogenmod
    • features / Cyanogenmod
    • building / Building Cyanogenmod
    • reference / Building Cyanogenmod
    • pre-build version, installing / Installing a pre-build version

D

  • Dalvik
    • about / From Dalvik to ART runtime
  • Dalvik Executable
    • about / Manipulating DEX files with APKTool
  • debugging tools
    • about / Debugging tools
    • adb / Introducing ADB
    • fastboot / Fastboot
  • device directory, AOSP
    • common directory / The device directory
    • generic directory / The device directory
    • google directory / The device directory
    • sample directory / The device directory
  • device permissions
    • about / Device permissions
    • root access / Root access
  • device setup
    • about / Device setup
    • Factory Restore / Device setup
    • Location, turning on / Device setup
    • Screen Lock, disabling / Device setup
  • Device Under Test (DUT)
    • about / Meeting the Compatibility Test Suite
  • DEX files
    • manipulating, with APKTool / Manipulating DEX files with APKTool
  • Display Shield / Meeting Arduino
  • Domain Specific Language (DSL)
    • about / Applying a single component update
  • domotics
    • about / Domotics
  • driver's management
    • about / Driver management
  • DroniX
    • about / Minor ROMs
    • reference / Minor ROMs
  • dsixda
    • about / Android kitchen

E

  • Edify syntax
    • about / Edify syntax
    • methods / Edify syntax
  • environment, Android build system
    • setting up / Setting up the environment
    • free space / Free space
  • Ethernet Shield / Meeting Arduino

F

  • fastboot
    • about / Building tools, Fastboot
  • features, Cyanogenmod
    • theming support / Cyanogenmod
    • FLAC support / Cyanogenmod
    • bigger APN (Access Point Network) list / Cyanogenmod
    • OpenVPN client / Cyanogenmod
    • enriched Power Off menu / Cyanogenmod
  • flash memory
    • about / History of custom ROMs
  • folders, AOSP directory structure
    • abi / The rest of the directory structure
    • bootable / The rest of the directory structure
    • dalvik / The rest of the directory structure
    • development / The rest of the directory structure
    • docs / The rest of the directory structure
    • note / The rest of the directory structure
    • hardware / The rest of the directory structure
    • libcore / The rest of the directory structure
    • ndk / The rest of the directory structure
    • pdk / The rest of the directory structure
    • prebuilts / The rest of the directory structure
    • sdk / The rest of the directory structure
    • tools / The rest of the directory structure

G

  • General purpose Input/Output (GPIO) drivers / Linux kernel
  • goodies, Android Open Kang Project (AOKP)
    • Vibration Pattern / The Android Open Kang Project
    • Navigation Ring / The Android Open Kang Project
    • LED Control / The Android Open Kang Project
    • Custom Toggles / The Android Open Kang Project
  • Google
    • password, reference link / Hands on the code
  • Google Mobile Services (GMS) / A look inside AOSP
  • governors
    • about / An overview of the governors
    • ondemand / An overview of the governors
    • interactive / An overview of the governors

H

  • hardware
    • selecting / Choosing our hardware
  • hardware architectures
    • about / Hardware architectures
    • requisites / Minimum requirements
  • hexadecimal editor
    • about / Other developers' tools
  • HomeMirror
    • reference link / Domotics
  • host system
    • preparing / Preparing the host system, Preparing the host system
    • hardware requisites / Hardware requirements
    • software requisites / Software requirements
  • HTC Sense
    • about / HTC Sense
  • Huawei EMUI
    • about / Huawei EMUI

I

  • I/O schedulers
    • noop / Exploring I/O schedulers
    • SIO / Exploring I/O schedulers
    • CFQ / Exploring I/O schedulers
    • BFQ / Exploring I/O schedulers
    • anticipatory / Exploring I/O schedulers
    • ROW / Exploring I/O schedulers
    • deadline / Exploring I/O schedulers
  • image
    • recreating / Recreating an image
  • incremental OTA
    • about / Creating over the air updates
  • Init process
    • about / The Init process
  • Internet of Things
    • possibilities, exploring / Exploring the possibilities of the Internet of Things

J

  • Java Native Interface (JNI) semantics
    • about / Native API
  • Just-In-Time compilation
    • about / From Dalvik to ART runtime
  • Just In Time (JIT) / The ART directory

K

  • kernel
    • obtaining / Obtaining the kernel
    • binary version, retrieving of / Retrieving the kernel's binary version
    • configuring / Configuring the kernel
    • compiling / Compiling the kernel
    • about / The kernel
  • kernel source code
    • obtaining / Obtaining the kernel source code

L

  • legacy devices
    • about / Cyanogenmod
  • LG Optimus UI
    • about / LG Optimus UI
    • vocal command feature / LG Optimus UI
  • libraries, Android system
    • SQLite / Libraries
    • SSL / Libraries
    • OpenGL / Libraries
    • SGL / Libraries
    • Media Framework / Libraries
    • WebKit / Libraries
    • libc / Libraries
    • Surface manager / Libraries
  • Linaro toolchain
    • download link / Setting up the toolchain
  • Linux kernel
    • about / An overview of the Linux kernel
  • LOCAL_ variables, Android.mk variables
    • LOCAL_PATH / The LOCAL_ variables
    • LOCAL_MODULE / The LOCAL_ variables
    • LOCAL_MODULE_CLASS / The LOCAL_ variables
    • LOCAL_SRC_FILES / The LOCAL_ variables
    • LOCAL_PACKAGE_NAME / The LOCAL_ variables
    • LOCAL_SHARED_LIBRARIES / The LOCAL_ variables
    • LOCAL_MODULE_TAGS / The LOCAL_ variables
    • LOCAL_MODULE_PATH / The LOCAL_ variables
    • LOCAL_CC / The LOCAL_ variables
    • LOCAL_CXX / The LOCAL_ variables
    • LOCAL_CFLAGS / The LOCAL_ variables
    • LOCAL_CPPFLAGS / The LOCAL_ variables
    • LOCAL_CPP_EXTENSION / The LOCAL_ variables
    • LOCAL_C_INCLUDE / The LOCAL_ variables
    • LOCAL_LDFLAGS / The LOCAL_ variables
    • LOCAL_PREBUILT_EXECUTABLES / The LOCAL_ variables
    • LOCAL_PREBUILT_LIBS / The LOCAL_ variables
    • LOCAL_PREBUILT_PACKAGE / The LOCAL_ variables
  • logcat
    • about / Logcat
  • logging buffers
    • radio / Logcat
    • events / Logcat
  • lunch command
    • about / Bootstrap, The lunch command

M

  • Mac OS X environment
    • setting up / Setting up a Mac OS X environment
    • case sensitive disk image, creating / Creating a case-sensitive disk image
    • required software, installing / Installing the required software
  • make command
    • about / More about make
  • minor ROMs
    • about / Minor ROMs
  • mkbootimg tool / Creating the boot image
  • mm command
    • about / Bootstrap
  • module
    • building / Building a module
    • cleaning / Cleaning a module
    • listing / Listing modules
  • module template examples
    • about / Module template examples
    • native executable template / The native executable template
    • shared library template / The shared library template
    • application template / The application template
  • Motorola Nexus 6
    • about / Motorola Nexus 6
    • technical specifications / Motorola Nexus 6

N

  • NAND memory
    • about / History of custom ROMs
  • Native API
    • about / Native API
  • native executable template / The native executable template
  • Nespresso Prodigio
    • about / Domotics
  • Nexus
    • about / Nexus
    • phones / Phones
    • tablets / Tablets
    • digital media players / Digital media players
  • Nexus 6
    • about / Nexus 6
    • URL, for official web page / Nexus 6
  • Nexus devices
    • about / Nexus devices
  • non-Google devices
    • working with / Working with non-Google devices

O

  • OEM customizations
    • overview / Overview of OEM customizations
    • TouchWiz / Samsung – TouchWiz
    • Huawei EMUI / Huawei EMUI
    • HTC Sense / HTC Sense
    • LG Optimus UI / LG Optimus UI
    • Xiaomi MIUI / Xiaomi MIUI
  • OTA
    • about / Receiving over the air updates – OTA
    • for custom ROM / OTA for custom ROM
  • OTA internals
    • about / OTA internals
  • OTA updates
    • receiving / Receiving over the air updates – OTA
    • whole system updates / Updating the whole system
    • incremental system updates / Updating the system incrementally
    • single update packages / Applying a single component update
    • creating / Creating over the air updates
  • OUT_DIR variable
    • about / The OUT_DIR variable

P

  • packages, adding to Android's build system
    • about / Adding new packages to Android's build system
    • by binary / Adding a package by binary
    • by source code / Adding packages by source code
  • possibilities
    • exploring, of Internet of Things / Exploring the possibilities of the Internet of Things
  • Proto Shield / Meeting Arduino

R

  • RC car
    • reference link / Toys
  • ready-to-use components / An overview of the Android system
  • real-world device
    • Android, compiling for / Compiling Android for a real-world device
  • recovery alternatives
    • about / Installing an alternative recovery
    • Clockworkmod / Clockworkmod
    • Team Win Recovery Project (TWRP) / TWRP – Team Win Recovery Project
  • reference board
    • about / UDOO
  • Relay Shield / Meeting Arduino
  • required tools
    • installing / Installing the required tools
  • ROM
    • creating / Cooking our first ROM
    • requisites, gathering / Gathering the ingredients
  • root access
    • about / Root access
    • obtaining / Obtaining root access

S

  • shared library template / The shared library template
  • shields
    • about / Meeting Arduino
  • SoC
    • about / System on Chip – SoC
  • software requisites, host system
    • Java JDK, installing / Installing Java JDK
    • system dependencies, installing / Installing system dependencies
  • source.android.com
    • reference link / The rest of the directory structure
  • source code
    • reference link / Getting ready
    • about / Getting ready
    • downloading / Downloading the code
    • working with / Hands on the code
  • source code tools
    • about / Source code tools
    • Git / Git
    • Repo / Repo
  • standard Linux kernel, governors
    • on-demand / Diving into CPU frequency management
    • powersave / Diving into CPU frequency management
    • performance / Diving into CPU frequency management
    • interactive / Diving into CPU frequency management
    • conservative / Diving into CPU frequency management
    • userspace / Diving into CPU frequency management
  • SuperSu
    • about / SuperSu
    • reference / SuperSu
  • system partitions
    • dumping / Dumping system partitions
  • system performance enhancement
    • about / Enhancing the system performance
    • system property file, customizing / Customizing the system property file
    • custom init sequence, adding / Adding a custom init sequence

T

  • TARGET_BUILD_TYPE variable
    • about / The TARGET_BUILD_TYPE variable
  • TARGET_BUILD_VARIANT variable
    • about / The TARGET_BUILD_VARIANT variable
  • TARGET_PREBUILT_KERNEL variable
    • about / The TARGET_PREBUILT_KERNEL variable
  • TARGET_PRODUCT variable
    • about / The TARGET_PRODUCT variable
  • TARGET_TOOLS_PREFIX variable
    • about / The TARGET_TOOLS_PREFIX variable
  • Team Win Recovery Project (TWRP)
    • about / TWRP – Team Win Recovery Project
    • reference / TWRP – Team Win Recovery Project
  • toolchain
    • setting up / Setting up the toolchain
    • obtaining / Getting the toolchain
  • TouchWiz
    • about / Samsung – TouchWiz
  • traces
    • about / The Android runtime

U

  • UDOO
    • used, all-in-one ADK device / Using UDOO as an all-in-one ADK device
    • Arduino board, flashing / Flashing the Arduino board
    • Android app, creating / Creating the Android app
  • UDOO family boards
    • about / UDOO family boards
  • UDOO Quad
    • about / UDOO Quad, UDOO Quad
    • technical specifications / UDOO Quad
    • URL, for source code / UDOO Quad
    • setup / Setup
    • bootloader, compiling / Bootloader
    • system image build process, launching / System
    • kernel, building / Kernel

V

  • variables, Android build system
    • TARGET_PRODUCT variable / The TARGET_PRODUCT variable
    • TARGET_BUILD_VARIANT variable / The TARGET_BUILD_VARIANT variable
    • TARGET_BUILD_TYPE variable / The TARGET_BUILD_TYPE variable
    • TARGET_TOOLS_PREFIX variable / The TARGET_TOOLS_PREFIX variable
    • OUT_DIR variable / The OUT_DIR variable
    • TARGET_PREBUILT_KERNEL variable / The TARGET_PREBUILT_KERNEL variable
    • buildspec.mk file / The buildspec.mk file
    • lunch command / The lunch command
  • versions, Cyanogenmod
    • nightly / Installing a pre-build version
    • experimental / Installing a pre-build version
    • M Snapshot / Installing a pre-build version
    • Release Candidate / Installing a pre-build version
    • stable / Installing a pre-build version

X

  • Xiaomi MIUI
    • about / Xiaomi MIUI