Android Architecture or Android software stack is divided into five layers:
1) Linux Kernel
2) Native Libraries (middleware),
3) Android Runtime
4) Application Framework
-> Linux Kernel is heart of the android architecture which manages all the available drivers such as display drivers, camera drivers, Bluetooth drivers, audio drivers, memory drivers, etc. which are required during the runtime.
-> On the top of linux kernel, there are Native libraries such as OpenGL, FreeType, SQLite, Media, C runtime library (libc) etc. SQLite is for database, FreeType for font support, Media for playing and recording audio and video formats.
-> Android Runtime, includes core libraries and DVM (Dalvik Virtual Machine) which is responsible to run android application. DVM is like JVM but it is optimized for mobile devices and consumes less memory,providing fast performance.Core libraries enable Android application developers to write Android applications using standard Java or Kotlin programming language.
-> On the top of Native libraries and android runtime, there is android framework which provides Android API’s such as UI (User Interface), telephony, resources, locations, Content Providers (data) and package managers. It provides classes and interfaces for android application development.
-> On the top of android framework, there are applications which are pre-installed applications like home, contacts, camera, gallery etc and third party applications downloaded from the play store like chat applications, games etc. will be installed on this layer only. It runs within the Android run time with the help of the classes and services provided by the application framework.