SlideShare a Scribd company logo
Technical Review
www.folio3.com
www.folio3.com
Mobile Platforms
 There a lot of mobile
platforms
 SymbianOS
 IPhoneOS
 BlackberryOS
 WinMo
 ALP
 OpenMoko
 WebOS
 Android
 BadaOS
 Mobile Platform
requirements
 Stable real-time kernel
 Steady HAL
 Power management
 Rich system libraries
 Rich application
framework
 Essential applications
 Steady UI
 Optimized application
management
www.folio3.com
Introduction
 Another Mobile Platform
 Offers
 Operating System
 Kernel: Linux 2.6
 Sys Library: Subset of LibC, LibM,
 A complete application stack
 User land applications
 Development infrastructure
 SDK 2.0.1
 Java
 NDK 1.5
 C/C++
 Components reusability and integration
 Based on ARM based processor
 Can be run on x86 platform
(Cont.) Introduction
 License
 Open source from the beginning
 Apache License
 Made available
 Primarily for
 Cell (mobile) devices
 But can also be use on
 MIDs
 Nettops
 Mobile gaming devices
 Other light weight devices
 Releases
 1.5 – Cupcake
 1.6 – Donut
 2.0 – Eclair
 2.1 – Extension to Eclair
www.folio3.com
Support
 Full multimedia hardware and software stack
 Advanced application supports
 Background services
 Complex widgets
 Easy and manageable lifecycle
 Full control of the hardware through well designed
APIs
 Advanced I/O supports
www.folio3.com
History
 July 2005
 Google acquired Android Inc.
 November 2007
 OHA, Open Handset Alliance, consortium started with
 Texas Instruments, Broadcom Corporation, Google, HTC, Intel, LG, Marvell
Technology Group, Motorola, Nvidia, Qualcomm, Samsung Electronics, Sprint
Nextel, T-Mobile
 October 2008
 First Android phone release – HTC Dream
 December 2008
 OHA, Open Handset Alliance, expanded with
 ARM Holdings, Atheros Communications, Asustek Computer Inc, Garmin Ltd.,
Softbank, Sony Ericsson, Toshiba Corp, Vodafone Group
 January 2010
 OHA, Open Handset Alliance, expanded with
 China Mobile Comm Corp., China Telecomm Corp., China United
Network Comm., KDDI Corp., NTT DoCoMo Inc., Bouygues Telecom, etc
www.folio3.com
Open Handset Alliance
Kashif Ali Siddiqui - ksiddiqui@folio3.com | 2010
Architecture & Design
The Kernel
 Kernel – Linux 2.6
 Patches – Android
 Ashmem, binder, and Android Power Management (PM)
 OS HAL
 Provides management for
 Memory modules (Primary, Secondary)
 Processes
 Provides networking stack
 Full TCP/IP v4 support
 Provides device drivers
 Telephony, GSM, CDMA, GPRS, Edge, 3G, WiFi, Bluetooth, others
transceivers
 Accelerometer, gyroscope , GPS transceiver, magnetometer
 Touchscreen, keyboard, keypad, camera
 VGA display
 Others
www.folio3.com
Native System Libraries
 C/C++ libraries
 Interface through Java layer
 Includes …
1. Standard UNIX libc libraries
 Called BIONIC
 Derived from BSD
 Only on ARM and x86 platforms
1. Surface manager
2. 3D graphics with/without H/W acceleration using OpenGL ES
3. 2D scalable vector graphics using SGL (Skia)
4. TrueType fonts
5. Media frameworks including audio, video codecs
6. HTTP rendering engine – Webkit
7. Light database management through SQLite3
8. TCP socket security through SSL
www.folio3.com
Java Runtime
 Specialized Virtual Machine
 Dalvik Virtual Machine
 Written by Dan Bornstein
 Architecture - Register-based machine
 Class files - Delvik Executibles .dex files
 Structures ? Difference from normal class files
 Light weight, compact, and processor and memory efficient
 An uncompressed .dex size is less than compressed .jar
 Can contain several classes
 Code reordering and re-organization at installation time
 Designed to enable execution of multiple instances
www.folio3.com
(Cont.) Java Runtime
 Relies on Linux for underlying functionality such as
multi-threading and low level memory management
 The dx utility
 No official JIT compiler
 Core library – Java 1.5 SDK
 Completely not compatible with Java SE and ME
class library profiles
 E.g., J2ME, AWT, Swing are not supported
 Subset of the Apache Harmony
www.folio3.com
Dalvik Virtual Machine
 Motivation
 Can run on lesser RAM
 Can run on slower CPUs
 Can run without swap space defined
 Can run with less power
 Can enable concurrent execution of multiple instances
 Memory efficiency
 More memory requirement
 Each application runs in its own address space – process
 Optimization
 Shared constant pool in .dex files
 Minimal repetition
 Per type pools (implicit typing)
 Implicit labeling
www.folio3.com
(Cont.) Dalvik Virtual Machine
 Emphasis to use clean (shared/private) memory
 Emphasis to limit the use of dirty private memory
 Memory types
 Clean memories
 Common .dex files (shared)
 Application specific .dex files (private)
 Private dirty memories
 Application “live” .dex structures
 Application heap
 Shared dirty memories
 Common “live” .dex structures
 Shared COW heap
www.folio3.com
(Cont.) Dalvik Virtual Machine
 Separate Garbage Collection meta
 Specialized GC meta structures
 Optimized for memory usage with less fragmentation and sharing
 Each application heap is GCed independently
 Run time efficiency
 Install time verification
 Static type and reference checking, indices and offset checking
 Reduces run-time cost of checking the code
 Install time optimization
 Byte swapping and padding
 Static linking
 Inlining special native methods
 Pruning empty methods
 Adding auxiliary data
 Creating shared constant pools
www.folio3.com
(Cont.) Dalvik Virtual Machine
 Why
 To avoid instruction dispatch
 Avoid unnecessary memory accesses
 Consume instruction stream efficiently
 Higher semantic density per instruction
 Uses register based interpreter
 Stacks are used to keep tracks on the methods nesting and
calling sequence
 Efficient initialization and management of array data
www.folio3.com
Enter the Zygote
 The first process
 Similar to UNIX init process
 Preloads and preinitializes shared classes
 Create clean shared memories
 Create dirty shared memories
 Uses UNIX fork() to start a new application
 Provides shared mapping to the child
processes for shared classes
 Promotes the sharing of common code
www.folio3.com
Application Framework
 All Java Libraries
1. Activity manager – Manages application life cycle
 An activity is an application UI window
 Activities are managed through system’s activity stack
 Four states of activity
 Foreground – top on activity stack
 Paused – when lost focus, and still showing (partially) on the screen.
 Stopped – When completely hidden by another activity
 Killed - Killing the process
1. Package manager – Installed software manager
2. Window manager – Manages UI components along with
screens and transitions
3. Telephony manager – Provides the interface to the underneath
telephony/GSM services
www.folio3.com
(Cont.) Application Framework
5. Resource manager – Provides access to the non-code
components such as images, icons, audio/video, string
tables, etc.
6. Content manager – Mediates in the data sharing among
applications, such as contacts are shared to other
application.
 Various content providers
 Can access others, and publish own
 Content provider security
5. Location manager – Provides intends on registered
location. Uses GPS, or GSM tower ID or WiFi location
beacons to determine location.
www.folio3.com
(Cont.) Application Framework
8. View system – Provides widgets to the
application to create activities
 Two new views; MapView and WebView
8. Notification manager – Enables the application
to show custom alerts on the status bar.
9. XMPP services – Peer-to-peer Android device
communication layer
www.folio3.com
Applications
 Java applications
 Runs in separate user address space - process
 Each is managed by its own DVM instance
 Can be replaced
 Can be installed from
 Online app stores
 Usually end up in calling native code that might
goes to the kernel system call
www.folio3.com
Security & Access Control
 Only Java applications can be installed
 Each application runs in its process under DVM
 Each process (DVM) is a sandbox
 Each application has its own UIDs and GIDs
 Additional access control on several operations
 Architecture:
 No application by default has permission to perform any operation that would
adversely impact other applications, operating system, or the user.
 Such as
 R/W on user’s private data; contacts
 R/W on another application data files
 Performing network (through GPRS/Edge, Wifi), bluetooth access, or
 Keeping the device awake
 Application certificate, UID/GID, Access Control and URI Permissions
www.folio3.com
(Cont.) Security & Access
Control
 Application signing and certification
 Contains authors identification, and signing authority
 Access control
 The sandbox is executed with some permissions (access control) to the
operations.
 These access control permissions are defined in the application package,
 Set at installation point, and
 Can be modified by user when OS prompt for the permission to perform the
operation
 UIDs and GIDs
 Each application and its components are installed with unique UID
 Limits the applications to access
 Shared UIDs
 Only allow applications with identical digital signature
 Each file created has the creator’s UID
www.folio3.com
(Cont.) Security & Access
Control
 URI permissions
 Mainly for content providers
 Allows capability like access control
 Enables applications to manage other application’s accesses on their shared
contents
www.folio3.com
OS Concerns
 Kernel
 No udev support
 Static hardware linking and policy
 No dynamic hotplug control and management
 Replaced by Vold
 Provides static hotplug events processing
 Storage devices are not managed by HAL (VFS)
 Replaced by Vold
 Responsible of mounting and unmounting of MMC subsystem
device
 Hardcoded power-management policy
 Layered PM design
 Android PM mapped on Linux PM module
 To change the Android PM policy requires code change
www.folio3.com
(Cont.) OS Concerns
 Limited, un-natural (non-Linux style) I/O support
 Un-orthodox touchscreen support
 No official support through tslib
 Fixed sized framebuffer
 No support for larger resolution > 1024x768
 Static hardware support assumptions
 Telephony (3G signal indicator hardcoded)
 Wifi (signal indicator hardcoded)
 Ringer volume slider assumes telephony present
 No official Ethernet support
 No X Window System support
www.folio3.com
(Cont.) OS Concerns
 LibC - Bionic
 No glibc support
 Only available on ARM and x86 platforms
 Partial pthreads support
 No SysV IPC support
 Limited C++ support
 No STL support
 No Linux headers
 Limiting the development of native binaries
www.folio3.com
Application Development
 Online official guide
 http://developer.android.com/guide/index.html
 Development with Eclipse
 Using ADT plugin
 Tools
 Android – To create/update projects
 Emulator – Qemu based ARM emulation system
 Debugger bridge – To interface with the emulator
 Ant – To compile and build projects into .apk files
 Keytool – To maintain keystore and private keys
 Jarsigner – To sign .apk files with private keys
www.folio3.com
(Cont.) Application
Development
 Requires to learn the following skills
1. Java programming language
2. Java 1.5 SDK library
3. Android application life cycle
4. Android APIs
5. Mobile HPC programming
6. Use of sensory hardware and Internet services
www.folio3.com
(Cont.) Application
Development
 Native Development (NDK)
 http://developer.android.com/sdk/ndk
 Java Vs. Native development
 Why native development is required?
 Situations
 Resource intensive work
 Complex algorithms
 Hardware interactions
 …
www.folio3.com
Limitations
 Kernel
 Limited support for Mass Storage Devices
 No official support for mouse, Ethernet devices
 No support of other filesystems, and hardware
 Very thin network protocol stack
 System libraries
 No support for IPC among the application
 Replaced by content manager
 Limited pthread support
 Limited UNIX/Linux native library support
www.folio3.com
(Cont.) Limitations
 Application
 Applications can only be installed on the primary nonvolatile
memory
 Most of the Linux binaries will failed to run on Android
 Only Java based application can be executed
 Native code can be only packaged as library modules for the Java
application
 No compatibility to the Jave ME and SE platforms
 No Enterprise integration solutions
 Missing push messaging or notifications
www.folio3.com
Comparison With Other
Mobile Platforms
IPhone Blackberry Android
Background application   
Multiprocessing   
Peer-to-peer communication   
Extensible & Scalable in HW support   
Platform support   
Application development & publishing   
www.folio3.com
Comparison With Other
Mobile Platforms
IPhone Blackberry Android
Third party community support   
Enterprise integration   
Multimedia support   
Optimized Java support   
Native development   
Security   
Organization Support   
www.folio3.com
Future of Android
 IS VERY BIG
 Increasing support for more hardware and platforms
 Extensions to more system level libraries
 Extensions to more Java runtime libraries
 Enterprise level support
 Increase in platform domain from cellphone market
to military, gaming, medical, and other domains
 And more …
www.folio3.com
Conclusion
 It uses Linux, but loses all the flexibility of Linux
 Based on the assumption of hardware support available on the
smart-phones with no/limited flexibility for dynamic adjustments
 Requires custom work and patching to enable Android to run on
other non-mobile platform and/or with more hardware
 Provides native development, but disallows the creation,
execution of the native applications
 Provides easy application development using Java
 Provides rich application stack and multimedia support
 Backed by a stronger organization Google
 Technically more stronger and mature platform than other mobile
OS platforms such as IPhoneOS, Blackberry OS and WinMo
www.folio3.com

More Related Content

What's hot

J2me
J2meJ2me
Windows Phone Application Penetration Testing
Windows Phone Application Penetration Testing Windows Phone Application Penetration Testing
Windows Phone Application Penetration Testing
Jewel Joy
 
J2ME
J2MEJ2ME
J2 me 1
J2 me 1J2 me 1
J2 me 1
myrajendra
 
J2ME mobile app development
J2ME mobile app developmentJ2ME mobile app development
J2ME mobile app development
Muthu Kumar
 
Introduction to Mobile programming(J2ME)
Introduction to Mobile programming(J2ME)Introduction to Mobile programming(J2ME)
Introduction to Mobile programming(J2ME)
Wambua Wambua
 
InduSoft Thin Client Webinar 2012
InduSoft Thin Client Webinar 2012InduSoft Thin Client Webinar 2012
InduSoft Thin Client Webinar 2012
AVEVA
 
Windows Phone 8 Security and Testing WP8 Apps
Windows Phone 8 Security and Testing WP8 AppsWindows Phone 8 Security and Testing WP8 Apps
Windows Phone 8 Security and Testing WP8 Apps
Jorge Orchilles
 
Java2 MicroEdition-J2ME
Java2 MicroEdition-J2MEJava2 MicroEdition-J2ME
Java2 MicroEdition-J2ME
Rohan Chandane
 
MR201404 building secure linux application with privilege separation
MR201404 building secure linux application with privilege separationMR201404 building secure linux application with privilege separation
MR201404 building secure linux application with privilege separation
FFRI, Inc.
 
J2ME GUI Programming
J2ME GUI ProgrammingJ2ME GUI Programming
J2ME GUI Programming
Rohan Chandane
 

What's hot (11)

J2me
J2meJ2me
J2me
 
Windows Phone Application Penetration Testing
Windows Phone Application Penetration Testing Windows Phone Application Penetration Testing
Windows Phone Application Penetration Testing
 
J2ME
J2MEJ2ME
J2ME
 
J2 me 1
J2 me 1J2 me 1
J2 me 1
 
J2ME mobile app development
J2ME mobile app developmentJ2ME mobile app development
J2ME mobile app development
 
Introduction to Mobile programming(J2ME)
Introduction to Mobile programming(J2ME)Introduction to Mobile programming(J2ME)
Introduction to Mobile programming(J2ME)
 
InduSoft Thin Client Webinar 2012
InduSoft Thin Client Webinar 2012InduSoft Thin Client Webinar 2012
InduSoft Thin Client Webinar 2012
 
Windows Phone 8 Security and Testing WP8 Apps
Windows Phone 8 Security and Testing WP8 AppsWindows Phone 8 Security and Testing WP8 Apps
Windows Phone 8 Security and Testing WP8 Apps
 
Java2 MicroEdition-J2ME
Java2 MicroEdition-J2MEJava2 MicroEdition-J2ME
Java2 MicroEdition-J2ME
 
MR201404 building secure linux application with privilege separation
MR201404 building secure linux application with privilege separationMR201404 building secure linux application with privilege separation
MR201404 building secure linux application with privilege separation
 
J2ME GUI Programming
J2ME GUI ProgrammingJ2ME GUI Programming
J2ME GUI Programming
 

Viewers also liked

NetSuite Integration Solutions - Folio3
NetSuite Integration Solutions - Folio3NetSuite Integration Solutions - Folio3
NetSuite Integration Solutions - Folio3
Folio3 Software
 
Realtime and Synchronous Applications
Realtime and Synchronous ApplicationsRealtime and Synchronous Applications
Realtime and Synchronous Applications
Folio3 Software
 
Pixar
PixarPixar
Walkthrough
WalkthroughWalkthrough
Walkthrough
Aaron Newbigging
 
Regular Expression in Action
Regular Expression in ActionRegular Expression in Action
Regular Expression in Action
Folio3 Software
 
Folio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP Yii
Folio3 Software
 
HTTP Server Push Techniques
HTTP Server Push TechniquesHTTP Server Push Techniques
HTTP Server Push Techniques
Folio3 Software
 
All You Need to Know About Type Script
All You Need to Know About Type ScriptAll You Need to Know About Type Script
All You Need to Know About Type Script
Folio3 Software
 
OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)
Folio3 Software
 
Enter the Big Picture
Enter the Big PictureEnter the Big Picture
Enter the Big Picture
Folio3 Software
 
A Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer TestingA Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer Testing
Folio3 Software
 
Bab 11-sistem-injeksi-121001221458-phpapp01
Bab 11-sistem-injeksi-121001221458-phpapp01Bab 11-sistem-injeksi-121001221458-phpapp01
Bab 11-sistem-injeksi-121001221458-phpapp01Andri Prasetyo
 
Introduction to Enterprise Service Bus
Introduction to Enterprise Service BusIntroduction to Enterprise Service Bus
Introduction to Enterprise Service Bus
Folio3 Software
 
StackOverflow Architectural Overview
StackOverflow Architectural OverviewStackOverflow Architectural Overview
StackOverflow Architectural Overview
Folio3 Software
 

Viewers also liked (14)

NetSuite Integration Solutions - Folio3
NetSuite Integration Solutions - Folio3NetSuite Integration Solutions - Folio3
NetSuite Integration Solutions - Folio3
 
Realtime and Synchronous Applications
Realtime and Synchronous ApplicationsRealtime and Synchronous Applications
Realtime and Synchronous Applications
 
Pixar
PixarPixar
Pixar
 
Walkthrough
WalkthroughWalkthrough
Walkthrough
 
Regular Expression in Action
Regular Expression in ActionRegular Expression in Action
Regular Expression in Action
 
Folio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP YiiFolio3 - An Introduction to PHP Yii
Folio3 - An Introduction to PHP Yii
 
HTTP Server Push Techniques
HTTP Server Push TechniquesHTTP Server Push Techniques
HTTP Server Push Techniques
 
All You Need to Know About Type Script
All You Need to Know About Type ScriptAll You Need to Know About Type Script
All You Need to Know About Type Script
 
OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)
 
Enter the Big Picture
Enter the Big PictureEnter the Big Picture
Enter the Big Picture
 
A Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer TestingA Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer Testing
 
Bab 11-sistem-injeksi-121001221458-phpapp01
Bab 11-sistem-injeksi-121001221458-phpapp01Bab 11-sistem-injeksi-121001221458-phpapp01
Bab 11-sistem-injeksi-121001221458-phpapp01
 
Introduction to Enterprise Service Bus
Introduction to Enterprise Service BusIntroduction to Enterprise Service Bus
Introduction to Enterprise Service Bus
 
StackOverflow Architectural Overview
StackOverflow Architectural OverviewStackOverflow Architectural Overview
StackOverflow Architectural Overview
 

Similar to Andriod - Technical Review

Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
Bhavya Siddappa
 
Android
AndroidAndroid
Android
aktash12
 
Ramakri
RamakriRamakri
Ramakri
msramakrishna
 
Android Seminar
Android SeminarAndroid Seminar
Android Seminar
Ganesh Waghmare
 
Ch1 hello, android
Ch1 hello, androidCh1 hello, android
Ch1 hello, android
Jehad2012
 
Android platform overview
Android platform overviewAndroid platform overview
Android platform overview
tamilmani1020
 
Android platform overview
Android platform overviewAndroid platform overview
Android platform overview
magicshui
 
Presentation
PresentationPresentation
Presentation
Ayan Choudhury
 
Android Operating System
Android Operating System Android Operating System
Android Operating System
Mehvish Mushtaq
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
Sharmistha Mandal
 
Android General information
Android General informationAndroid General information
Android General information
Prashant Gosai
 
Adobe AIR Seminar
Adobe AIR SeminarAdobe AIR Seminar
Adobe AIR Seminar
Yoss Cohen
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for Beginners
Tripti Tiwari
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
Mike Wolfson
 
Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01
Santosh Sh
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App Development
Mike Kvintus
 
5945632 (1).ppt
5945632 (1).ppt5945632 (1).ppt
5945632 (1).ppt
Rekha Negi
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212
Yoojoo Jang
 
Introduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptxIntroduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptx
aparna14patil
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architecture
Dilip Singh
 

Similar to Andriod - Technical Review (20)

Android Anatomy
Android  AnatomyAndroid  Anatomy
Android Anatomy
 
Android
AndroidAndroid
Android
 
Ramakri
RamakriRamakri
Ramakri
 
Android Seminar
Android SeminarAndroid Seminar
Android Seminar
 
Ch1 hello, android
Ch1 hello, androidCh1 hello, android
Ch1 hello, android
 
Android platform overview
Android platform overviewAndroid platform overview
Android platform overview
 
Android platform overview
Android platform overviewAndroid platform overview
Android platform overview
 
Presentation
PresentationPresentation
Presentation
 
Android Operating System
Android Operating System Android Operating System
Android Operating System
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Android General information
Android General informationAndroid General information
Android General information
 
Adobe AIR Seminar
Adobe AIR SeminarAdobe AIR Seminar
Adobe AIR Seminar
 
Android- Introduction for Beginners
Android- Introduction for BeginnersAndroid- Introduction for Beginners
Android- Introduction for Beginners
 
Android For Java Developers
Android For Java DevelopersAndroid For Java Developers
Android For Java Developers
 
Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01Androidoverview 100405150711-phpapp01
Androidoverview 100405150711-phpapp01
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App Development
 
5945632 (1).ppt
5945632 (1).ppt5945632 (1).ppt
5945632 (1).ppt
 
Google Android Naver 1212
Google Android Naver 1212Google Android Naver 1212
Google Android Naver 1212
 
Introduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptxIntroduction to Mobile Operating System.pptx
Introduction to Mobile Operating System.pptx
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architecture
 

More from Folio3 Software

Shopify & Shopify Plus Ecommerce Development Experts
Shopify & Shopify Plus Ecommerce Development Experts Shopify & Shopify Plus Ecommerce Development Experts
Shopify & Shopify Plus Ecommerce Development Experts
Folio3 Software
 
Magento and Magento 2 Ecommerce Development
Magento and Magento 2 Ecommerce Development Magento and Magento 2 Ecommerce Development
Magento and Magento 2 Ecommerce Development
Folio3 Software
 
Introduction to Go-Lang
Introduction to Go-LangIntroduction to Go-Lang
Introduction to Go-Lang
Folio3 Software
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)
Folio3 Software
 
Introduction to SharePoint 2013
Introduction to SharePoint 2013Introduction to SharePoint 2013
Introduction to SharePoint 2013
Folio3 Software
 
An Overview of Blackberry 10
An Overview of Blackberry 10An Overview of Blackberry 10
An Overview of Blackberry 10
Folio3 Software
 
Enterprise Mobility - An Introduction
Enterprise Mobility - An IntroductionEnterprise Mobility - An Introduction
Enterprise Mobility - An Introduction
Folio3 Software
 
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Folio3 Software
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
Folio3 Software
 
NOSQL Database: Apache Cassandra
NOSQL Database: Apache CassandraNOSQL Database: Apache Cassandra
NOSQL Database: Apache Cassandra
Folio3 Software
 
Best Practices of Software Development
Best Practices of Software DevelopmentBest Practices of Software Development
Best Practices of Software Development
Folio3 Software
 
Offline Data Access in Enterprise Mobility
Offline Data Access in Enterprise MobilityOffline Data Access in Enterprise Mobility
Offline Data Access in Enterprise Mobility
Folio3 Software
 
Web Performance & Scalability Tools
Web Performance & Scalability ToolsWeb Performance & Scalability Tools
Web Performance & Scalability Tools
Folio3 Software
 
Web Application Security - Folio3
Web Application Security - Folio3Web Application Security - Folio3
Web Application Security - Folio3
Folio3 Software
 
Front End Oprtimization
Front End OprtimizationFront End Oprtimization
Front End Oprtimization
Folio3 Software
 
Dimensional Modelling - Basic Concept
Dimensional Modelling - Basic ConceptDimensional Modelling - Basic Concept
Dimensional Modelling - Basic Concept
Folio3 Software
 
Cache is king
Cache is kingCache is king
Cache is king
Folio3 Software
 
An Overview of Blackberry 10 & Blackberry App Development
An Overview of Blackberry 10 & Blackberry App DevelopmentAn Overview of Blackberry 10 & Blackberry App Development
An Overview of Blackberry 10 & Blackberry App Development
Folio3 Software
 
Cross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha TouchCross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha Touch
Folio3 Software
 

More from Folio3 Software (19)

Shopify & Shopify Plus Ecommerce Development Experts
Shopify & Shopify Plus Ecommerce Development Experts Shopify & Shopify Plus Ecommerce Development Experts
Shopify & Shopify Plus Ecommerce Development Experts
 
Magento and Magento 2 Ecommerce Development
Magento and Magento 2 Ecommerce Development Magento and Magento 2 Ecommerce Development
Magento and Magento 2 Ecommerce Development
 
Introduction to Go-Lang
Introduction to Go-LangIntroduction to Go-Lang
Introduction to Go-Lang
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)
 
Introduction to SharePoint 2013
Introduction to SharePoint 2013Introduction to SharePoint 2013
Introduction to SharePoint 2013
 
An Overview of Blackberry 10
An Overview of Blackberry 10An Overview of Blackberry 10
An Overview of Blackberry 10
 
Enterprise Mobility - An Introduction
Enterprise Mobility - An IntroductionEnterprise Mobility - An Introduction
Enterprise Mobility - An Introduction
 
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
Distributed and Fault Tolerant Realtime Computation with Apache Storm, Apache...
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
NOSQL Database: Apache Cassandra
NOSQL Database: Apache CassandraNOSQL Database: Apache Cassandra
NOSQL Database: Apache Cassandra
 
Best Practices of Software Development
Best Practices of Software DevelopmentBest Practices of Software Development
Best Practices of Software Development
 
Offline Data Access in Enterprise Mobility
Offline Data Access in Enterprise MobilityOffline Data Access in Enterprise Mobility
Offline Data Access in Enterprise Mobility
 
Web Performance & Scalability Tools
Web Performance & Scalability ToolsWeb Performance & Scalability Tools
Web Performance & Scalability Tools
 
Web Application Security - Folio3
Web Application Security - Folio3Web Application Security - Folio3
Web Application Security - Folio3
 
Front End Oprtimization
Front End OprtimizationFront End Oprtimization
Front End Oprtimization
 
Dimensional Modelling - Basic Concept
Dimensional Modelling - Basic ConceptDimensional Modelling - Basic Concept
Dimensional Modelling - Basic Concept
 
Cache is king
Cache is kingCache is king
Cache is king
 
An Overview of Blackberry 10 & Blackberry App Development
An Overview of Blackberry 10 & Blackberry App DevelopmentAn Overview of Blackberry 10 & Blackberry App Development
An Overview of Blackberry 10 & Blackberry App Development
 
Cross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha TouchCross Platform Mobile App Development - An Introduction to Sencha Touch
Cross Platform Mobile App Development - An Introduction to Sencha Touch
 

Andriod - Technical Review

  • 2. www.folio3.com Mobile Platforms  There a lot of mobile platforms  SymbianOS  IPhoneOS  BlackberryOS  WinMo  ALP  OpenMoko  WebOS  Android  BadaOS  Mobile Platform requirements  Stable real-time kernel  Steady HAL  Power management  Rich system libraries  Rich application framework  Essential applications  Steady UI  Optimized application management
  • 3. www.folio3.com Introduction  Another Mobile Platform  Offers  Operating System  Kernel: Linux 2.6  Sys Library: Subset of LibC, LibM,  A complete application stack  User land applications  Development infrastructure  SDK 2.0.1  Java  NDK 1.5  C/C++  Components reusability and integration  Based on ARM based processor  Can be run on x86 platform
  • 4. (Cont.) Introduction  License  Open source from the beginning  Apache License  Made available  Primarily for  Cell (mobile) devices  But can also be use on  MIDs  Nettops  Mobile gaming devices  Other light weight devices  Releases  1.5 – Cupcake  1.6 – Donut  2.0 – Eclair  2.1 – Extension to Eclair www.folio3.com
  • 5. Support  Full multimedia hardware and software stack  Advanced application supports  Background services  Complex widgets  Easy and manageable lifecycle  Full control of the hardware through well designed APIs  Advanced I/O supports www.folio3.com
  • 6. History  July 2005  Google acquired Android Inc.  November 2007  OHA, Open Handset Alliance, consortium started with  Texas Instruments, Broadcom Corporation, Google, HTC, Intel, LG, Marvell Technology Group, Motorola, Nvidia, Qualcomm, Samsung Electronics, Sprint Nextel, T-Mobile  October 2008  First Android phone release – HTC Dream  December 2008  OHA, Open Handset Alliance, expanded with  ARM Holdings, Atheros Communications, Asustek Computer Inc, Garmin Ltd., Softbank, Sony Ericsson, Toshiba Corp, Vodafone Group  January 2010  OHA, Open Handset Alliance, expanded with  China Mobile Comm Corp., China Telecomm Corp., China United Network Comm., KDDI Corp., NTT DoCoMo Inc., Bouygues Telecom, etc www.folio3.com
  • 8. Kashif Ali Siddiqui - ksiddiqui@folio3.com | 2010 Architecture & Design
  • 9. The Kernel  Kernel – Linux 2.6  Patches – Android  Ashmem, binder, and Android Power Management (PM)  OS HAL  Provides management for  Memory modules (Primary, Secondary)  Processes  Provides networking stack  Full TCP/IP v4 support  Provides device drivers  Telephony, GSM, CDMA, GPRS, Edge, 3G, WiFi, Bluetooth, others transceivers  Accelerometer, gyroscope , GPS transceiver, magnetometer  Touchscreen, keyboard, keypad, camera  VGA display  Others www.folio3.com
  • 10. Native System Libraries  C/C++ libraries  Interface through Java layer  Includes … 1. Standard UNIX libc libraries  Called BIONIC  Derived from BSD  Only on ARM and x86 platforms 1. Surface manager 2. 3D graphics with/without H/W acceleration using OpenGL ES 3. 2D scalable vector graphics using SGL (Skia) 4. TrueType fonts 5. Media frameworks including audio, video codecs 6. HTTP rendering engine – Webkit 7. Light database management through SQLite3 8. TCP socket security through SSL www.folio3.com
  • 11. Java Runtime  Specialized Virtual Machine  Dalvik Virtual Machine  Written by Dan Bornstein  Architecture - Register-based machine  Class files - Delvik Executibles .dex files  Structures ? Difference from normal class files  Light weight, compact, and processor and memory efficient  An uncompressed .dex size is less than compressed .jar  Can contain several classes  Code reordering and re-organization at installation time  Designed to enable execution of multiple instances www.folio3.com
  • 12. (Cont.) Java Runtime  Relies on Linux for underlying functionality such as multi-threading and low level memory management  The dx utility  No official JIT compiler  Core library – Java 1.5 SDK  Completely not compatible with Java SE and ME class library profiles  E.g., J2ME, AWT, Swing are not supported  Subset of the Apache Harmony www.folio3.com
  • 13. Dalvik Virtual Machine  Motivation  Can run on lesser RAM  Can run on slower CPUs  Can run without swap space defined  Can run with less power  Can enable concurrent execution of multiple instances  Memory efficiency  More memory requirement  Each application runs in its own address space – process  Optimization  Shared constant pool in .dex files  Minimal repetition  Per type pools (implicit typing)  Implicit labeling www.folio3.com
  • 14. (Cont.) Dalvik Virtual Machine  Emphasis to use clean (shared/private) memory  Emphasis to limit the use of dirty private memory  Memory types  Clean memories  Common .dex files (shared)  Application specific .dex files (private)  Private dirty memories  Application “live” .dex structures  Application heap  Shared dirty memories  Common “live” .dex structures  Shared COW heap www.folio3.com
  • 15. (Cont.) Dalvik Virtual Machine  Separate Garbage Collection meta  Specialized GC meta structures  Optimized for memory usage with less fragmentation and sharing  Each application heap is GCed independently  Run time efficiency  Install time verification  Static type and reference checking, indices and offset checking  Reduces run-time cost of checking the code  Install time optimization  Byte swapping and padding  Static linking  Inlining special native methods  Pruning empty methods  Adding auxiliary data  Creating shared constant pools www.folio3.com
  • 16. (Cont.) Dalvik Virtual Machine  Why  To avoid instruction dispatch  Avoid unnecessary memory accesses  Consume instruction stream efficiently  Higher semantic density per instruction  Uses register based interpreter  Stacks are used to keep tracks on the methods nesting and calling sequence  Efficient initialization and management of array data www.folio3.com
  • 17. Enter the Zygote  The first process  Similar to UNIX init process  Preloads and preinitializes shared classes  Create clean shared memories  Create dirty shared memories  Uses UNIX fork() to start a new application  Provides shared mapping to the child processes for shared classes  Promotes the sharing of common code www.folio3.com
  • 18. Application Framework  All Java Libraries 1. Activity manager – Manages application life cycle  An activity is an application UI window  Activities are managed through system’s activity stack  Four states of activity  Foreground – top on activity stack  Paused – when lost focus, and still showing (partially) on the screen.  Stopped – When completely hidden by another activity  Killed - Killing the process 1. Package manager – Installed software manager 2. Window manager – Manages UI components along with screens and transitions 3. Telephony manager – Provides the interface to the underneath telephony/GSM services www.folio3.com
  • 19. (Cont.) Application Framework 5. Resource manager – Provides access to the non-code components such as images, icons, audio/video, string tables, etc. 6. Content manager – Mediates in the data sharing among applications, such as contacts are shared to other application.  Various content providers  Can access others, and publish own  Content provider security 5. Location manager – Provides intends on registered location. Uses GPS, or GSM tower ID or WiFi location beacons to determine location. www.folio3.com
  • 20. (Cont.) Application Framework 8. View system – Provides widgets to the application to create activities  Two new views; MapView and WebView 8. Notification manager – Enables the application to show custom alerts on the status bar. 9. XMPP services – Peer-to-peer Android device communication layer www.folio3.com
  • 21. Applications  Java applications  Runs in separate user address space - process  Each is managed by its own DVM instance  Can be replaced  Can be installed from  Online app stores  Usually end up in calling native code that might goes to the kernel system call www.folio3.com
  • 22. Security & Access Control  Only Java applications can be installed  Each application runs in its process under DVM  Each process (DVM) is a sandbox  Each application has its own UIDs and GIDs  Additional access control on several operations  Architecture:  No application by default has permission to perform any operation that would adversely impact other applications, operating system, or the user.  Such as  R/W on user’s private data; contacts  R/W on another application data files  Performing network (through GPRS/Edge, Wifi), bluetooth access, or  Keeping the device awake  Application certificate, UID/GID, Access Control and URI Permissions www.folio3.com
  • 23. (Cont.) Security & Access Control  Application signing and certification  Contains authors identification, and signing authority  Access control  The sandbox is executed with some permissions (access control) to the operations.  These access control permissions are defined in the application package,  Set at installation point, and  Can be modified by user when OS prompt for the permission to perform the operation  UIDs and GIDs  Each application and its components are installed with unique UID  Limits the applications to access  Shared UIDs  Only allow applications with identical digital signature  Each file created has the creator’s UID www.folio3.com
  • 24. (Cont.) Security & Access Control  URI permissions  Mainly for content providers  Allows capability like access control  Enables applications to manage other application’s accesses on their shared contents www.folio3.com
  • 25. OS Concerns  Kernel  No udev support  Static hardware linking and policy  No dynamic hotplug control and management  Replaced by Vold  Provides static hotplug events processing  Storage devices are not managed by HAL (VFS)  Replaced by Vold  Responsible of mounting and unmounting of MMC subsystem device  Hardcoded power-management policy  Layered PM design  Android PM mapped on Linux PM module  To change the Android PM policy requires code change www.folio3.com
  • 26. (Cont.) OS Concerns  Limited, un-natural (non-Linux style) I/O support  Un-orthodox touchscreen support  No official support through tslib  Fixed sized framebuffer  No support for larger resolution > 1024x768  Static hardware support assumptions  Telephony (3G signal indicator hardcoded)  Wifi (signal indicator hardcoded)  Ringer volume slider assumes telephony present  No official Ethernet support  No X Window System support www.folio3.com
  • 27. (Cont.) OS Concerns  LibC - Bionic  No glibc support  Only available on ARM and x86 platforms  Partial pthreads support  No SysV IPC support  Limited C++ support  No STL support  No Linux headers  Limiting the development of native binaries www.folio3.com
  • 28. Application Development  Online official guide  http://developer.android.com/guide/index.html  Development with Eclipse  Using ADT plugin  Tools  Android – To create/update projects  Emulator – Qemu based ARM emulation system  Debugger bridge – To interface with the emulator  Ant – To compile and build projects into .apk files  Keytool – To maintain keystore and private keys  Jarsigner – To sign .apk files with private keys www.folio3.com
  • 29. (Cont.) Application Development  Requires to learn the following skills 1. Java programming language 2. Java 1.5 SDK library 3. Android application life cycle 4. Android APIs 5. Mobile HPC programming 6. Use of sensory hardware and Internet services www.folio3.com
  • 30. (Cont.) Application Development  Native Development (NDK)  http://developer.android.com/sdk/ndk  Java Vs. Native development  Why native development is required?  Situations  Resource intensive work  Complex algorithms  Hardware interactions  … www.folio3.com
  • 31. Limitations  Kernel  Limited support for Mass Storage Devices  No official support for mouse, Ethernet devices  No support of other filesystems, and hardware  Very thin network protocol stack  System libraries  No support for IPC among the application  Replaced by content manager  Limited pthread support  Limited UNIX/Linux native library support www.folio3.com
  • 32. (Cont.) Limitations  Application  Applications can only be installed on the primary nonvolatile memory  Most of the Linux binaries will failed to run on Android  Only Java based application can be executed  Native code can be only packaged as library modules for the Java application  No compatibility to the Jave ME and SE platforms  No Enterprise integration solutions  Missing push messaging or notifications www.folio3.com
  • 33. Comparison With Other Mobile Platforms IPhone Blackberry Android Background application    Multiprocessing    Peer-to-peer communication    Extensible & Scalable in HW support    Platform support    Application development & publishing    www.folio3.com
  • 34. Comparison With Other Mobile Platforms IPhone Blackberry Android Third party community support    Enterprise integration    Multimedia support    Optimized Java support    Native development    Security    Organization Support    www.folio3.com
  • 35. Future of Android  IS VERY BIG  Increasing support for more hardware and platforms  Extensions to more system level libraries  Extensions to more Java runtime libraries  Enterprise level support  Increase in platform domain from cellphone market to military, gaming, medical, and other domains  And more … www.folio3.com
  • 36. Conclusion  It uses Linux, but loses all the flexibility of Linux  Based on the assumption of hardware support available on the smart-phones with no/limited flexibility for dynamic adjustments  Requires custom work and patching to enable Android to run on other non-mobile platform and/or with more hardware  Provides native development, but disallows the creation, execution of the native applications  Provides easy application development using Java  Provides rich application stack and multimedia support  Backed by a stronger organization Google  Technically more stronger and mature platform than other mobile OS platforms such as IPhoneOS, Blackberry OS and WinMo www.folio3.com