Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Android based Embedded System

Design

Bindu C J
Embedded Product Design

Android
Open-source Linux-based operating system used for
smartphones and tablet computers, owned by American
company; Google
The first beta version of the Android Software
Development Kit (SDK) was released by Google in 2007
First commercial version, Android 1.0, was released in
September 2008.

Bindu C J
Embedded Product Design

Android Versions

Bindu C J
Embedded Product Design

Open Handset Alliance (OHA)


Open Handset Alliance (OHA) is a consortium of
84[1] firms to develop open standards for mobile devices.
Member firms include :
Google, HTC, Sony, Dell, Intel, Motorola, Qualcomm, Texas
Instruments, Samsung Electronics, LG Electronics, TMobile, Sprint Corporation, Nvidia, and Wind River
Systems.

Bindu C J
Embedded Product Design

Getting "Android"
Two main pieces required to get Android working on your
embedded system:
Android-compatible Linux kernel and
Android Platform

Android Platform is essentially a custom Linux distribution


containing the user space packages

Bindu C J
Embedded Product Design

Hardware and Compliance


Requirements
Android should run on any hardware that runs Linux.
Android has in fact been made to run on ARM, x86, MIPS,
SuperH, and PowerPC, all architectures supported by
Linux.
If you want to port Android to your hardware, you must
first port Linux to it

Bindu C J
Embedded Product Design

Android Concepts
Developers must take a few key concepts into account
when developing Android apps.
These concepts shape the architecture of all Android apps
and dictate what developers can and cannot do.
Intents are one of the most important concepts in Android

Bindu C J
Embedded Product Design

Android Concepts

Components
Intents
Component Lifecycle
Manifest File
Processes and Threads
Remote Procedure Calls (RPC)

Bindu C J
Embedded Product Design

Components of Android
Application
Android applications are made of loosely-tied components.
Components of one app can invoke/use components of other apps
There is no single entry point to an Android app: no main()
function or any equivalent.
There are predefined events called intents that developers can tie
their components to, thereby enabling their components to be
activated on the occurrence of the corresponding events

Bindu C J
Embedded Product Design

Components of Android
Application
Four main types of components

Activities
Services
Broadcast Receivers
Content Providers

Bindu C J
Embedded Product Design

10

Intents
Intents are one of the most important concepts in Android

They are the late-binding mechanisms that allow components to


interact.
The intent itself is a passive object.

It's the contents (payload), the mechanism used to fire it along


with the system's rules that will gate its behavior.
Intents are tied to the type of component they are sent to.
An intent sent to a service, for example, can only be received by
a service
Bindu C J
Embedded Product Design

11

Framework Intro
Android also defines its own development framework, which
allows developers to access functionality typically found in other
development framework
User Interface
UI elements in Android include traditional widgets such as
buttons, text boxes, dialogs, menus, and event handlers.
Data Storage
Security and Permissions
Bindu C J
Embedded Product Design

12

App Development Tools


Android Software Development Kit (SDK).
SDK, along with Eclipse, its corresponding Android
Development Tools (ADT) plugin, and the QEMU-based
emulator in the SDK, allow developers to do the vast
majority of development work

Bindu C J
Embedded Product Design

13

Native Development
Native Development Kit (NDK) help developers to run

some C code natively


Mostly aimed at game developers
APIs made available within the context of the NDK are
mostly geared towards graphics rendering and sensor input
retrieval.
The infamous Angry Birds game, for example, relies heavily
on code running natively.
Bindu C J
Embedded Product Design

14

Native Development
NDK used to port over an existing codebase to Android.
C code developed for other mobile devices need not be
rewritten in Java. Instead, you can use the NDK to compile
it for Android and package it with some Java code to use
some of the more Android specific functionality made
available by the SDK

Bindu C J
Embedded Product Design

15

Android's architecture

Bindu C J
Embedded Product Design

16

Android's architecture-Linux Kernel


Linux kernel is the center-piece of all distributions
traditionally labeled as "Linux, including mainstream
distributions such as Ubuntu, Fedora, and Debian
It's available in "vanilla" form from the Linux Kernel
Archives
Android developers patch the "vanilla" kernel to meet their

needs.
Bindu C J
Embedded Product Design

17

Android's architecture-Wakelocks
The most common use case of Linux's power management
is a laptop computer. When the lid is closed on a laptop running

Linux, it will usually go into "sleep" mode


That modus operandi works fine for a laptop and desktop-like devices,
but it doesn't fit mobile devices such as handsets
Android's development team devised a mechanism that changes the
above modus operandi to make them more palatable to such use cases.
Instead of letting the system be put to sleep at the user's behest, an
Androidized kernel is made to go to sleep as soon and as often as
possible.
And to keep the system from going to sleep while important processing
is being done or while an app is waiting for the user's input, wakelocks
are provided to keep the system awake
Bindu C J
Embedded Product Design

18

Android's architecture- Low Memory


Killer
Android's behavior is very much predicated on lowmemory conditions.

Hence, out-of-memory behavior is crucial.


Android development team has added an additional low
memory killer to the kernel
Android's low-memory killer weeds out processes hosting
components that haven't been used in a long time and that
are not high-priority
Bindu C J
Embedded Product Design

19

Android's architecture- Binder


Binder is a cornerstone of Android's architecture
Binder attempts to provide remote object invocation
capabilities on top of a classic OS.
Instead of re-engineering traditional OS concepts, Binder
"attempts to embrace and transcend them.
Hence, developers get the benefits of dealing with remote

services as objects without having to deal with a new OS.


Bindu C J
Embedded Product Design

20

You might also like