ANDROID PLATFORM

Android is a complex platform that offers developers with a mobile middleware that handles common mobile problems, it’s composed by 4 layers,

  • linux kernel a stripped and modified version of the linux kernel
  • system level libraries C++ libraries to interact with hardware components, modified version of the jvm (dalvik virtual machine)
  • application framework java SDK’s for interact with the under level components
  • applications

In the android platform applications must follow the threading model offered by the platform and must be written in JAVA android compatible

ANDROID IS LINUX? YES TO SOME EXTENT

The kernel part is based on the linux kernel with some additions and some things that got removed

KERNEL EXTENSIONS
DESCRIPTION
ASHMEM shared memory manager
Support for share memory for process communication
IPC binderfaster inter process communication support based on ASHMEM
ADVANCED POWER MANAGEMENTapplication callable api for managing power consumption

Feature removed from the linux system are

  • support for Glibc
  • window manager support
  • no linux utilities

so for this android is not a fully compatible linux extension

POWER MANAGEMENT WITH WAKELOCKS

applications can through the wakelocks java API can influence the behavior of the kernel power management ( this is an example of cross layering pattern )

NOT ALL THE SYSTEM IS JAVA BASED

Some performance critical components are implemented in C/C++ to improve performance for example the multimedia stack

DALVIK VIRTUAL MACHINE

Implemented in a registry-based model (in order to exploit the ARM architecture of smartphones ), it also run different bytecode of the JAVA standard in order to improve performance (called .dex also instructions are reduced by 30% )

ANDROID SDK MAIN COMPONENT

Android offers to developers some main concept to interact with the android runtime

COMPONENTDESCRIPTION
ACTIVITYMain application component that represent an interaction with the user
INTENTRequest to perform an operation to the android framework (as sharing content)
SERVICEcodes that runs in the background with no interaction with the user (no dedicated process/thread)
BROADCAST RECIEVERApplication component that handle broadcast messages

Other components are available

  • Activity manager to handle activity lifecicle and application management
  • package manager to handle application management
  • Window Manager & View System: handle windows on the screen
  • Resource Manager & Content Provider: handle system resource and data access to them (e.g. sqlite databases, filesystem)
  • Telephony, Notification & Location Manager

PREVIOUS NEXT