𝔖 Scriptorium
✦   LIBER   ✦

📁

Android on x86. An Introduction to Optimizing for Intel Architecture

✍ Scribed by Iggi Kracji, Darren Cummings


Publisher
Apress
Tongue
English
Leaves
375
Series
The Expert's Voice in Microprocessors
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Table of Contents


Contents at a Glance
Contents
About the Authors
Acknowledgments
Introduction
Chapter 1: History and Evolution of the Android OS
Origins
The First Distribution of Android
Open Source Apache License
What Is Android?
Applications
Application Frameworks
Native Libraries
Surface Manager
SQLite
WebKit
OpenGL/ES
Android Runtime
Linux Kernel
The Open Handset Alliance
Android Open Source Project
Astro (1.0)
Cupcake (1.5)
Donut (1.6)
Éclair (2.0/2.1)
Froyo (2.2.x)
Gingerbread (2.3.x)
Honeycomb (3.x)
Ice Cream Sandwich (4.0.x)
Jelly Bean (4.1.x)
KitKat (4.4.x)
Overview
Chapter 2: The Mobile Device and Operating System Landscape
Competition in the Mobile Space
iOS
Overview
Applications
Platforms
BlackBerry
Windows Phone
Symbian
MeeGo
Before Android
Smartphone History
Simon Personal Communicator
Nokia 9000 (Nokia Communicator)
Kyocera 6035
BlackBerry 5810
The Mobile Market: Success and Failure
Motorola i1
Droid X
BlackBerry Torch
iPhone
The Mobile Market: Trends
Location
Current Mobile Uses
Commerce
Overview
Chapter 3: Beyond the Mobile App—A Technology Foundation
Connected Devices
Home Computing
Automotive
Digital Entertainment
Special Requirements
Ruggedization
Ingress Protection Rating
Medical
Virtualized
Secure Communications
Type 1
Federal Information Processing Standard
The Cyber Fiber of Our Connected World
Cellular Networks
Open Mobile Alliance
Wireless Communications
Wi-Fi
Bluetooth
Mobile Interfaces
Touch Screens
Capacitive
Resistive
Vibration Motors
LED Lights
Accelerometer
Tilt Sensor
Hardware Buttons
Overview
Chapter 4: Android Development— Business Overview and Considerations
The Android Market Share
How Android Makes Money
Why Android Is Successful
Free
Open Source
Customization
Application Base
Hardware Choices
Device Price
Legacy and Future Platform Support
Legacy Support
Future Support
Why x86 and Android Are Right for You
Cross Compatibility
Barrier to Entry
Security of Android
Application Security
Platform Security
Licensing
Android Licensing Cost
Application Licensing Cost
Physical Development Costs
Software Development Systems
Android Testing Systems
Overview
Chapter 5: The Intel Mobile Processor
Intel’s x86 Line
History
Strengths and Weaknesses
Business Model
Clash of the Mobile Titans: ARM versus Intel
ARM
History
Strengths and Weaknesses
Business Model
Future
Intel’s Atom Line of Microprocessors
Intel Atom Evolution
Intel Atom Security
Intel Atom Features
Android and the Atom
Inside the Medfield System-on-Chip
Zooming In on the Saltwell CPU Architecture
Architecture Differences between Intel’s Saltwell and ARM’s Cortex A15
Architecture
Integer Pipelines
Instruction Sets
Multi-Core/Thread Support
Security Technology
Intel Hyper-Threading Technology
Application Compatibility: Native Development Kit and Binary Translator
Overview
Chapter 6: Installing the Android SDK for Intel Application Development
Preparing for the SDK Installation
Supported Operating Systems
Hardware Requirements
Installing the JDK
Installing Eclipse
Installing Apache Ant (Optional)
Downloading the SDK Starter Package and Adding SDK Components
Setting Up Eclipse to work with the SDK
Installing the ADT Plug-in for Eclipse
Configuring the ADT Plug-in
Overview of Android Virtual Device Emulation
Which Emulator Should You Use
Why Use the Emulator
Building an Emulator Image
Setting Up the SDK to Use x86 Emulator Images
Key Gingerbread Features
Battery Usage Stats
Task Manager
Cut and Paste Text
Ice Cream Sandwich Emulation
Prerequisites
Downloading Through the Android SDK Manager
Using the System Image
Downloading Manually
CPU Acceleration
GPU Acceleration
Overview
Chapter 7: Creating and Porting NDK-Based Android Applications
JNI and NDK Introduction
JNI Introduction
Java Methods and Their Corresponding Relationship with the C Function Prototype Java
Java and C Data Type Mapping
NDK Introduction
NDK Installation
Android NDK Installation
Install Cygwin
Install CDT
NDK Examples
Using the Command-Line Method to Generate a Library File
Create an Android App Project
Modify the Java Files
Generate the Project in Eclipse
Create a Subdirectory in the Project Root Directory
Create a C Interface File
Compile the Corresponding. C File
Create the NDK Makefile File in the jni Directory
Generating a Library File in the IDE
Workflow Analysis for NDK Application Development
NDK Compiler Optimization
Machine-Independent Compiler Switch Options
-0 or -01
-02
-03
-00
Intel Processor-Related Compiler Switch Options
Overview
Chapter 8: Debugging Android
Prerequisites
Intel USB Driver for Android Devices
Installing the Intel Atom x86 System Image for Android Emulator
Application Debugging Using the Android Debug Bridge
Setting Up ADB
ADB on Windows
ADB Host-Client Communication
Starting ADB
Key ADB Device Commands
Using the Android Debug Tools Plug-in for Eclipse
The Debug Perspective in Eclipse
The DDMS Perspective
Application Runtime Environment for Debugging
Intel Hardware Accelerated Execution Manager
KVM Installation
Using a 64-Bit Kernel
Install KVM
Starting the Android Virtual Device
Using AVD Manager in Eclipse to Launch a Virtual Device
Running Android Within Oracle VirtualBox
Google x86 VirtualBox Build Targets for Android 4.x
Downloading the Source Tree and Installing the Repository
Building a Custom Kernel with Mouse Support
Add Patched Kernel
Reduce Compile Time Using CCACHE
Build Android 4.0.x with New Kernel
Build the VirtualBox Disk and Android Installer
Using an Android Installer Disk to Create a Large Virtual Partition
Serial Port
Ethernet
Final Notes
Debugging with GDB, the GNU Project Debugger
The Intel Graphics Performance Analyzer (Intel GPA)
System Debug of Android OS Running on an Intel Atom Processor
JTAG Debugging
Android OS Debugging,
Device Driver Debugging
Hardware Breakpoints
Cross-Debug: Intel Atom Processor and ARM Architecture
Variable Length Instructions
Hardware Interrupts
Single Step
Virtual Memory Mapping
Considerations for Intel Hyper-Threading Technology
SoC and Interaction of Heterogeneous Multi-Core
SVEN (System Visible Event Nexus)
Signal Encode/Decode Debug
SVEN Benefits
Overview
Chapter 9: Performance Optimizations for Android Applications on x86
Basic Concepts of Performance Optimization
Selection of a Faster Instruction
Improve the Degree of Parallelism
Effective Use of the Register Cache
Methodology of Performance Optimizations
Performance Optimization Approaches
Performance Optimizations Automatically Done by a Compiler
Performance Optimizations Assisted by Development Tools
Use of High-Performance Libraries
Performance Optimizations Done Manually
Performance Tuning with Intel VTune
System Tuning
Tuning Based on the Microarchitecture of the Processor
VTune’s two modes
Intel Graphics Performance Analyzers
Introduction
Installation
Sample Usage of Intel GPA on Android
Android Multithreaded Design
Android Framework or a Thread
Java Thread Programming Interface
Threaded Programming Extensions and Support
Message
Handler
Message Queue
Looper
AsyncTask
Thread Example
Thread Synchronization
Thread Communication
Principles of Multithreaded Optimization for Intel Atom Processors
Case Study: Intel GPA–Assisted Multithreaded Optimization for an Android Application
Original Application and Intel GPA Analysis
Optimized Application and Intel GPA Analysis
Overview
Chapter 10: x86 NDK and C/C++ Optimizations
Vectorization
Vectorization Report
Pragmas
Auto-Vectorization and Limits
Interprocedural Optimizations
Optimization with Intel IPP
NDK Integrated Optimization Examples
C/C++: The Original Application Acceleration
Step 1: Create a New Android Application Project
Step 2: Write the C Implementation Code of the cCodeTask Function
Compiler Optimization Extension Application
Step 1: Modify the Android Part of the Application
Step 2: Modify the Makefile File of mycomputetask.c and Rebuild the Library Files
Step 2: Write the C Implementation Code for the anotherCCodeTask Function
Multiple Situations Comparison of Compiler Optimization Extensions
Example: Compare the Optimization Results by Using SSE Instructions
Overview
Chapter 11: Using Intel Hardware Accelerated Execution Manager on Windows, Mac OS, and Linux to Speed Up Android on x86 Emu...
Introduction
Downloading Intel HAXM
Downloading Through Android SDK Manager
Downloading Manually
Installing Intel HAXM on Windows
Adjusting Intel HAXM Memory Allocation
Intel Virtualization Technology (Intel VT-x) Capability
Intel VT-x Is Not Supported
Intel VT-x Is Not Enabled
Tips and Tricks
Mac OS
Adjusting Intel HAXM Memory Allocation
Removing Intel HAXM
Troubleshooting
Intel XD Is Not Supported
Intel XD Is Not Enabled
Intel VT-x Is Not Supported
Intel VT-x Is Not Enabled
Tips and Tricks
The following list contains recommendations to get the best experience out of the Android emulator using the Intel HAXM dri...
Linux
KVM Installation
Install KVM
Overview
Chapter 12: Performance Testing and Profiling Apps with Platform Tuning
Start with Your First x86 Full Format Video Player
Compile x86 FFmpeg: Cross-Compile
Compile x86 FFmpeg: Android.mk
How to Determine CPU Usage and Find Hotspots
Show CPU Usage Dynamically Onscreen
Get Function Running Time
Use Yasm to Get the Best-Performing x86 Library
How to Use Yasm
The Result of Using Yasm
Use SSE (Intel’s Streaming SIMD Extensions) to Optimize Color Space Transformation
What Is SIMD?
How SIMD Works
Implement NV21-RGB SSE Code
How to Display an Image Using the Android 4.0 NDK
The Common Cross-Compile Script
Testing and Profiling with Hardware Acceleration
Using the Integration Layer (IL) for Hardware Encoding
How to Get the OMX-IL Interface on Android for Intel Architecture
How Does the OMX-IL Work?
Demo: Special Effects Video Recorder
Packaging a Hardware Video Encoder Library
Implement Camera Preview
Profiling Java Code with Traceview
Start a Recording Thread
Adding Special Effects
Use OpenMAX AL on Android 4.0
The Advantage of Using Native Multimedia API (OpenMAX AL)
Demo: Streaming Media Player
Use a Powerful Media API: MediaCodec on Android 4.1
Sample Code: Audio Decoder
Use MediaCodec in NDK
Overview
Appendix A: References
Chapter 1: History and Evolution of the Android OS
Origins
First Android Distribution in 2007
What is Android?
The Open Handset Alliance (OHA)
The Android Open Source Project (AOSP)
Android Versions
Chapter 2: The Mobile Device and Operating System Landscape
Competition in Mobile Space
iOS
Meego
BlackBerry
Windows Phone
Before Android
The Mobile Market
Motorola i1
Droid X
BlackBerry Torch
iPhone
The Mobile Market: Trends
Location
Average Use
Commerce
Chapter 3: Beyond the Mobile App—A Technology Foundation
Connected Devices
Home Computing
Automotive
Special Requirements
Ruggedized
Medical
Secure Communications
The Cyber-Fiber of our Connected World
Cellular Networks
Wireless
Mobile Interfaces
Touch Screens
Resistive
Vibration Sensors (Haptics)
Accelerometer
Tilt Sensor
Hardware Buttons
Chapter 4: Android Development—Business Overview and Considerations
Market Share
Security
Licensing
Chapter 5: The Intel Mobile Processor
Clash of the Mobile Titans: ARM versus Intel
Intel
Android Atom Platforms
Chapter 6: Installing the Android SDK for Intel Application Development
Installation and Setup
Java Development Kit
Eclipse
Apache Ant
Software Development Kit
Emulation
Ice Cream Sandwich Emulation
Gingerbread Emulation
KVM
Intel Tools
Chapter 7: Creating and Porting NDK-Based Android Applications
Chapter 8: Debugging Android
Chapter 9: Performance Optimizations for Android Applications on x86
Chapter 10: x86 NDK and C/C++ Optimizations
Chapter 11: Using Intel Hardware Accelerated Execution Manager on Windows, Mac OS, and Linux to Speed Up Android on x86 Emu...
Chapter 12: Performance Testing and Profiling Apps with Platform Tuning
Index


📜 SIMILAR VOLUMES


Android on x86: An Introduction to Optim
✍ Iggy Krajci, Darren Cummings (auth.) 📂 Library 📅 2013 🏛 Apress 🌐 English

The Android on x86: An Introduction serves two main purposes. First, it makes the case for adapting your applications onto Intel’s x86 architecture, including discussions of the business potential, the changing landscape of the Android marketplace, and the unique challenges and opportunities that ar

Android on x86: An Introduction to Optim
✍ Iggy Krajci, Darren Cummings 📂 Library 📅 2013 🏛 Apress 🌐 English

<p><em>Android on x86: an Introduction to Optimizing for Intel® Architecture</em> serves two main purposes.  First, it makes the case for adapting your applications onto Intel’s x86 architecture, including discussions of the business potential, the changing landscape of the Android marketplace, and

Android on x86: An Introduction to Optim
✍ Iggy Krajci, Darren Cummings 📂 Library 📅 2013 🏛 Apress 🌐 English

<p><em>Android on x86: an Introduction to Optimizing for Intel® Architecture</em> serves two main purposes.  First, it makes the case for adapting your applications onto Intel’s x86 architecture, including discussions of the business potential, the changing landscape of the Android marketplace, and