Interview QuestionPractical QuestionFollow-up Questions

What Is Android

skydovesJaewoong Eum (skydoves)||12 min read

What Is Android

Android is an open source operating system based on the Linux kernel, developed and maintained by Google. It is designed primarily for touchscreen mobile devices like smartphones and tablets, but it also powers a wide range of hardware including wearables, TVs, cars, and IoT devices. Understanding Android's layered architecture and how each layer contributes to application development is a foundational interview topic. By the end of this lesson, you will be able to:

  • Describe Android as an open source platform built on the Linux kernel.
  • Explain the layered architecture from the kernel through the application framework.
  • Identify the role of Android Runtime (ART) in executing application code.
  • Distinguish between the framework APIs and the native C/C++ libraries.

Platform Overview

Android is the most widely deployed mobile operating system globally. Its open source nature, released through the Android Open Source Project (AOSP), allows device manufacturers to customize the platform for their hardware while maintaining compatibility through the Compatibility Definition Document (CDD) and the Compatibility Test Suite (CTS).

Applications are primarily written in Kotlin or Java and compiled into bytecode that runs on the Android Runtime. The Google Play Store is the primary distribution channel, but Android also supports sideloading and third party app stores. This openness is a defining characteristic that differentiates Android from more restricted mobile platforms.

Architecture Layers

Android's platform architecture is organized into distinct layers, each building on the one below it:

Linux Kernel: The foundation of the operating system. It handles hardware abstraction, process management, memory management, and security enforcement. Device drivers for components like displays, cameras, Wi-Fi, and Bluetooth live at this layer. The kernel also provides the core security model through user based permissions and process isolation.

Hardware Abstraction Layer (HAL): Provides standard interfaces between the Android framework and device specific hardware. Each HAL module is a shared library that implements a defined interface for a hardware component. When a framework API accesses hardware, the system loads the appropriate HAL module.

Native C/C++ Libraries: A set of libraries written in C and C++ that provide performance sensitive functionality. Key libraries include OpenGL ES for graphics rendering, SQLite for local database operations, WebKit for web content, and Media Framework for audio and video playback. NDK developers can call into these libraries directly for tasks that require low level control.

Android Runtime (ART): Executes application bytecode. ART uses Ahead of Time (AOT) compilation during installation and Just in Time (JIT) compilation at runtime to optimize performance. Each application runs in its own process with its own instance of ART, providing process isolation. ART also handles garbage collection, debugging support, and profiling.

Application Framework: The Java and Kotlin APIs that developers use to build applications. This layer includes ActivityManager for managing Activity lifecycles and tasks, WindowManager for managing window display, Content Providers for sharing data between applications, NotificationManager for system notifications, and PackageManager for querying installed packages.

Application Layer

The top layer consists of all user facing applications, both system apps (Settings, Contacts, Phone) and third party apps. All applications use the same framework APIs, meaning system apps have no special API access compared to third party apps (with some exceptions for privileged system permissions).

Applications are packaged as APK or AAB files containing compiled bytecode, resources, assets, and a manifest file. The manifest declares the app's components (Activities, Services, Broadcast Receivers, Content Providers), required permissions, and minimum SDK version.

This interview continues for subscribers

Subscribe to Dove Letter for full access to exclusive interviews about Android and Kotlin development.

Become a Sponsor