Aagam Sheth's Blog

Aagam Sheth's Blog

UNIT 1 : Android OS Concepts

UNIT 1 : Android OS Concepts

Subscribe to my newsletter and never miss my upcoming articles

Listen to this article

Table of Contents

  1. Android an Open Platform for Mobile Development
  2. Open Handset Alliance
  3. Features of Android
  4. Android Development Framework
  5. Android Platform Architecture Framework
  6. Android Project Framework

Android an Open Platform for Mobile Development

  • Android is mobile operating system that is based on a modified version of Linux.
  • It was originally developed by Andy Rubin, the father of Android Platform.
  • Android Inc. was acquired by Google in 2005.
  • Google open sourced Android and distributes it for free.
  • Its source code is known as Android Open Source Project (AOSP), which is primarily licensed under the Apache License.
  • Android UI is mainly written in JAVA and core is in C.
  • The first commercially available smartphone running Android was the HTC Dream, also known as T-Mobile G1, announced on September 23, 2008.
  • Each major release of Android is named in alphabetical order after a dessert or sugary treat, with the first few Android versions being called "Alpha, Beta, Cupcake, Donut, Eclair, Froyo, and so on.
  • The current stable version is Android 11 ( R ), released on September 8, 2020.

Open Handset Alliance

  • The Open Handset Alliance (OHA) is a collection of technology companies, including hardware manufacturers, mobile carriers, software developers, semiconductor companies, and commercialization companies.
  • Of particular note are the prominent mobile technology companies, including Samsung, Motorola, HTC, T-Mobile, Vodafone, ARM, and Qualcomm.
  • In their own words, the OHA represents the following: A commitment to openness, a shared vision for the future, and concrete plans to make the vision a reality. To accelerate innovation in mobile and offer consumers a richer, less expensive, and better mobile experience.
  • The OHA hopes to deliver a better mobile software experience for consumers by providing the platform needed for innovative mobile development at a faster rate and with higher quality than existing platforms, without licensing fees for either software developers or handset manufacturers.

Features of Android

  1. Unified approach to application development.
  2. Free and Open Source.
  3. Familiar and inexpensive development tools.
  4. Enabling development of powerful applications.
  5. No obstacles to publication.
  6. A free market for applications.

Android Development Framework

  • Android SDK is required for Android Development.
    • In order to develop Android application Android SDK is required. The Android SDK includes everything you need to start developing, testing, and debugging Android applications.
    • It includes :
      1. The Android APIs : The core of the SDK is the Android API libraries that provide developer access to the Android stack. These are the same libraries that Google uses to create native Android applications.
      2. Development tools : The SDK includes several development tools that let you compile and debug your applications so that you can turn Android source code into executable applications.
      3. The Android Virtual Device Manager and Emulator : The Android emulator is a fully interactive mobile device emulator featuring several alternative skins. The emulator runs within an Android Virtual Device (AVD) that simulates a device hardware configuration. All Android applications run within the Dalvik VM. In fact, because it’s hardware-neutral, it provides a better independent test environment than any single hardware implementation.
      4. Full documentation : The SDK includes extensive code-level reference information detailing exactly what’s included in each package and class and how to use them. In addition to the code documentation, Android’s reference documentation and developer guide explains how to get started, gives detailed explanations of the fundamentals behind Android development, highlights best practices, and provides deep-dives into framework topics.
      5. Sample code : The Android SDK includes a selection of sample applications that demonstrate some of the possibilities available with Android, as well as simple programs that highlight how to use individual API features.
      6. Online Support : Android has rapidly generated a vibrant developer community. The Google Groups are active forums of Android developers with regular input from the Android engineering and developer relations teams at Google. StackOverflow is also a hugely popular destination for Android questions and a great place to find answers to beginner questions.
      7. Android Development Toolkit : Currently the Android Studio developed by Google based on JetBrains Intelij IDEA and Eclipse IDE are recommended for Android Development. Android has released the Android Development Tools (ADT) plugin that simplifies project creation and tightly integrates Eclipse with the Android emulator and the build and debugging tools.

Android Platform Architecture Framework

  • Android is an open source, Linux-based software stack created for a wide array of devices and form factors.


  1. The Linux Kernel : The foundation of the Android platform is the Linux kernel. For example, The Android ART framework relies on the Linux kernel for underlying functionalities such as threading and low-level memory management. Using a Linux kernel allows Android to take advantage of key security features and allows device manufacturers to develop hardware drivers for a well-known kernel.
  2. Hardware Abstraction Layer : The hardware abstraction layer (HAL) provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework. The HAL consists of multiple library modules, each of which implements an interface for a specific type of hardware component, such as the camera or Bluetooth module. When a framework API makes a call to access device hardware, the Android system loads the library module for that hardware component.
  3. Android Runtime : Android runtime consists of Dalvik Virtual Machine and Core Java Libraries. Dalvik Virtual Machine is a type of JVM used in android devices to run apps and is optimized for low memory and processing power environments. The .class files are compiled into .dex ( Dalvik Executable Format ) files which are then executed by DVM. DVM was developed by Dan Bornstien at Google. Android 5 or higher uses Android Runtime (ART) instead of Dalvik. ART is written to run multiple virtual machines on low-memory devices by executing DEX files, a bytecode format designed specially for Android that's optimized for minimal memory footprint. Android also includes a set of core runtime libraries that provide most of the functionality of the Java programming language that the Java API framework uses.
  4. Native C/C++ Libraries : Many core Android system components and services, such as ART and HAL, are built from native code that require native libraries written in C and C++. The Android platform provides Java framework APIs to expose the functionality of some of these native libraries to apps.
  5. Java API Framework : These APIs form the building blocks of Android apps by simplifying the reuse of core, modular system components and services, which include the following:
    • A rich and extensible View System you can use to build an app’s UI, including lists, grids, text boxes, buttons, and even an embeddable web browser.
    • A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files.
    • A Notification Manager that enables all apps to display custom alerts in the status bar.
    • An Activity Manager that manages the lifecycle of apps.
    • Content Providers that enable apps to access data from other apps, such as the Contacts app, or to share their data.
    • Developers have full access to the same framework API that Android system apps use.
  6. System Apps : All applications, both native and third-party, are built on the application layer by means of the same API libraries. The application layer runs within the Android runtime, using the classes and services made available from the application framework.

Android Project Framework

When you select Project view, you can see a lot more files and directories. The most important of which are the following:

  1. module-name/

    1. build/ : Contains build outputs.

    2. libs/ : Contains private libraries.

    3. src/ : Contains all code and resource files for the module in the following subdirectories:

      1. androidTest/ : Contains code for instrumentation tests that run on an Android device.

      2. main/ : Contains the "main" source files: the Android code and resources shared by all build variants.

        1. AndroidManifest.xml : Describes the nature of the application and each of its components.

        2. java/ : Contains Java code sources.

        3. jni/ : Contains native code using the Java Native Interface (JNI).

        4. gen/ : Contains the Java files generated by Android Studio, such as your R.java file and interfaces created from AIDL files.

        5. res/ : Contains application resources, such as drawable files, layout files, and UI string.

        6. assets/ : Contains file that should be compiled into an .apk file. You can navigate this directory in the same way as a typical file system using URIs and read files as a stream of bytes using the AssetManager.

        7. test/ : Contains code for local tests that run on your host JVM.

      3. build.gradle (module) : This defines the module-specific build configurations.

    4. build.gradle (project) : This defines your build configuration that apply to all modules.

Share this