Android on x86
Iggy Krajci, Darren Cummings · Apress eBooks · 2013
Application FrameworksAndroid provides developers the ability and tools to create extensive, interactive, rich graphical applications to users, and is targeted to deploy these applications to the Google Play Store.Developers have access to the same APIs that are used inside of core applications, as well as access to almost all existing Java libraries.For the development process of Android applications, consult Chapter 6: Installing the Android SDK for Intel Application Development. Native LibrariesThe next level is where the road diverges.The native libraries and the Android runtime exist in roughly the same space.The native libraries are compiled and preinstalled C/C++ binaries that the Android system depends on.These include all of the libraries in the green section of Figure 1-1.The following sections contain descriptions of some of the more prominent native libraries and their functions inside of Android. Surface ManagerThis is often referred to as Android's Window Manager.Surface Manager is used for composing what any individual screen will look like.It also does some more subtle things that help Android run smoothly, such as off-screen buffering and transitions. SQLiteThis is a database used to persist information across sessions of an Android device.On Android, the SQLite database is stored inside of the device's internal memory so SD cards can be interchanged without losing device-specific information. WebKitWebKit allows for HTML to be rendered and displayed to Android very quickly and efficiently.This is the default browser engine in the Android system and is available to system and third-party applications. Astro (1.0)Astro is where Android started, released as a beta in November 2007, and released to the public in September of 2008 on the HTC Dream.Astro showed off various core features of the Android OS and included many of the apps that Android users now know and love.These include Android Market, a web browser, e-mail/Gmail, Google Maps, Messaging, Media Player, YouTube, and various others.Cupcake (1.5) Cupcake, released April 30, 2009, was the next major version of Android to hit the commercial markets.Cupcake was based on the Linux kernel 2.6.27 and included many new features to users and developers.The major changes were support for virtual keyboards, support for widgets on the home screen, animations added in various places, and auto-pairing and stereo support for Bluetooth-capable devices.On a humorous side note, from Cupcake and onward all Android versions to date have been named after desserts.Donut (1.6) On September 15, 2009, Google released Android version 1.6, named Donut.With Donut came an updated Linux kernel from 2.6.27 to 2.6.29, as well as some new features and supported devices.Major features included voice and text search of contacts/web/ bookmarks, support for WVGA screens, and improvements to camera functionality and speed.Donut was the last version of Android in the 1.x series to be released.Éclair (2.0/2.1)Éclair was released October 26, 2009, which continued to be built on the Linux kernel version 2.6.29.With SDK version 2.0 came many new features and capabilities for both developers and consumers.Large changes were made to the way that Android looked and felt on capable devices, including significant speed improvements in many different applications.The premier device for Android 2.0 was Motorola's Droid on Verizon Wireless.On December 3, 2009, Google updated Android to version 2.0.1 in efforts to fix some small bugs and update the API for developers.It wasn't until January 12, 2010 that Android was moved to version 2.1.Similar to the update in December, version 2.1 primarily included updates to the underlying API and bug fixes. Chapter 2The Mobile Device and Operating System Landscape 50 billion connected devices by 2020. -Ericsson, 2010Networked computers.Connected devices.Mobile devices.Machine-to-machine (M2M).On-the-Go (OTG).Portable computing.Smart services.The list goes on and on.The terminology used to describe machines that send data to other machines seems to change every day.With all of these different types of devices that are seemingly similar, it's easy to confuse them.Android is certainly not the only operating system used on devices in today's markets.Various mobile operating systems have existed, and many are still in competition with Android.Although the focus of this book is on the Android market, an understanding of the competition-iOS, Windows Phone, and so on-is important for any successful business venture and is therefore the focus of this chapter.This is best put into words by the famous Chinese general and strategist Sun Tzu, in his The Art of War: "If you know the enemy and know yourself, you need not fear the results of a hundred battles." Competition in the Mobile SpaceThe Android operating system is a very popular choice among consumers in the current commercial market.Over 250 million Android devices are in use today.But Android is not the only choice, nor was it the first mobile operating system implemented.There are several additional mobile operating systems, including iOS from Apple, MeeGo from Intel and Nokia, Windows Phone from Microsoft, and so on.There are many differences in the implementation of these operating systems and many diverse reasons that these platforms are used.This section provides a light overview of these other mobile operating systems, by discussing their strengths and weaknesses. CPU AccelerationYou can improve the performance of Intel Atom x86 Image for Android Ice Cream Sandwich using hardware-based virtualization with Intel VT-x technology.If your computer has an Intel processor with VT-x support, it is recommended that you use Intel HAXM with this system image.For more information about Intel HAXM, visit http://int-software.intel.com/en-us/android.Note ■ Intel HAXm is for Windows and os X operating systems only.for linux hosts, you can use Kernel-based virtual machine (Kvm) to accelerate emulation performance.for information on installing and configuring Kvm on Ubuntu, refer to the following guide at https://help.ubuntu.com/community/KVM/Installation. GPU AccelerationThe Intel Atom x86 image for Android Ice Cream Sandwich can make use of hardware GPU features to increase the performance of games, graphics-intensive programs, and user interface elements. Note ■The functionality and performance of gPU acceleration is highly dependent on your computer's graphics card and graphics drivers.To use hardware GPU acceleration, perform the following steps:1. Open the Android AVD Manager. Select the AVD and click Edit.3. The AVD editor window will appear.In the Hardware section, click New, as shown in Figure 6-24.Intel Graphics Performance Analyzers Intel Graphics Performance Analyzers (Intel GPA) are a suite of optimization and analysis tools used only for Intel processors that support Intel Core and Intel Atom processor-based hardware platforms.Intel GPA provides a graphical user interface for the CPU/GPU speed analysis and customization features.It enables developers to find performance bottlenecks and optimize applications for devices based on the Intel chipset platform.Intel GPA consists of the System Analyzer, Frame Analyzer, and the Software Development Kit (SDK). Chapter 11 Using Intel Hardware Accelerated Execution Manager on Windows, Mac OS, and Linux to Speed Up Android on x86 EmulationI do not fear computers.I fear the lack of them. -Isaac AsimovOnce the Android SDK is installed, the Android emulator is running, and your development environment is set up to your liking, there is still one frustration ahead: the Android emulator can be extremely slow.Especially when testing and debugging larger applications, the emulator's speed is a noticeable bottleneck in development.The best solution to this is the Intel Hardware Accelerated Execution Manager (Intel HAXM) with Intel Virtualization Technology (Intel VT).If your development system uses one of the supported Intel processors, this hardware-assisted virtualization engine, or hypervisor, will enable lightning-fast Android emulation.