2 Hardware Abstraction Layer HAL

softwarebuck April 25, 2021 0 Comments



The Linux Kernel


The foundation of the Android platform is the Linux kernel. For example, theAndroid Runtime (ART) relies on the Linux kernel for underlyingfunctionalities such as threading and low-level memory management.Using a Linux kernel allows Android to take advantage of key security featuresand allows device manufacturers to develop hardware drivers for a well-knownkernel.

Android Runtime


For devices running Android version 5.0 (API level 21) or higher, each appruns in its own process and with its own instance of the Android Runtime(ART). ART is written to run multiple virtual machines on low-memory devicesby executing DEX files, a bytecode format designed specially for Androidthat’s optimized for minimal memory footprint. Build toolchains, such as Jack,compile Java sources into DEX bytecode, which can run on the Android platform.Some of the major features of ART include the following: * Ahead-of-time (AOT) and just-in-time (JIT) compilation * Optimized garbage collection (GC) * On Android 9 (API level 28) and higher, conversion of an app package’s Dalvik Executable format (DEX) files to more compact machine code. * Better debugging support, including a dedicated sampling profiler, detailed diagnostic exceptions and crash reporting, and the ability to set watchpoints to monitor specific fields Prior to Android version 5.0 (API level 21), Dalvik was the Android runtime.If your app runs well on ART, then it should work on Dalvik as well, but thereverse may not be true.Android also includes a set of core runtime libraries that provide most of thefunctionality of the Java programming language, including some Java 8 languagefeatures, that the Java API framework uses.

Java API Framework


The entire feature-set of the Android OS is available to you through APIswritten in the Java language. These APIs form the building blocks you need tocreate Android apps by simplifying the reuse of core, modular systemcomponents 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 and provides a common navigation back stack * Content Providers that enable apps to access data from other apps, such as the Contacts app, or to share their own data Developers have full access to the same framework APIs that Android systemapps use.

System Apps


Android comes with a set of core apps for email, SMS messaging, calendars,internet browsing, contacts, and more. Apps included with the platform have nospecial status among the apps the user chooses to install. So a third-partyapp can become the user’s default web browser, SMS messenger, or even thedefault keyboard (some exceptions apply, such as the system’s Settings app).The system apps function both as apps for users and to provide keycapabilities that developers can access from their own app. For example, ifyour app would like to deliver an SMS message, you don’t need to build thatfunctionality yourself—you can instead invoke whichever SMS app is alreadyinstalled to deliver a message to the recipient you specify.Android Platform Architecture With Diagram

4. Android Runtime


This layer was designed to run the application in low memory as well. Indevice that has Android version 5.0 or higher, each app runs in it’s ownprocess. Also, it has it’s own instance of Android Runtime. ART is written torun multiple virtual machine on low memory devices by executing DEX files. DEXfiles is a bytecode format designed for Android. Some of the major features ofART is as below – a. Optimised Garbage collector. b. Ahead-of-time(AOT) and Just-in-Time(JIT) compilation. c. Improved debugging support.Before Android 5.0, Dalvik was the Android Runtime. If any application runsproperly in Android Runtime, then, it will work properly in Dalvik as well.But, the vice-versa may not be true. This layer also contains some core libraries that provides most of thefunctionality of the Java programming language that Java api framework uses.Thus, it enables android application developers to create project using Javaprogramming language.

5. Java API Framework


This layer provides many higher level services as java class. You can use thisclass into your application to use such services. Services are 1. Resource Manager: It helps to access values from strings file, layoutfiles etc. 2. Notification Manager: It enables to display notification in status bar. 3. Activity Manager: This manages app life cycle and navigation back stack. 4. Content Providers: Used to access data from other apps. For example,Access contacts from contact app etc. 5. View System: Used to build application UI. You can make structures likelist, grid, textview etc.

6. System Apps


This is top layer and contains all the android applications. The androidapplications may be core apps or built by the user. Some core apps may be forEmail, Messaging, calendars etc. This app does not have a special priorityfrom the app that user choose to install. User can choose any app to sendemail of his/her own choice.

1. Linux kernel


The Linux Kernel is the bottom-most layer in the Android architecture andextremely important part of the software on nearly every Android device. Itshandle and support Resource management, Security management, Network stack,Process management and Power management of the Android system.Android is Linux based, it gives the Android developers a pre-built, alreadymaintained operating system kernel to start with so they don’t have to writetheir own kernel.

2. Hardware Abstraction Layer (HAL)


HAL layer not highlighted by Google in the starting time of Android. Thehardware abstraction layer (HAL) provides standard interfaces that exposedevice hardware capabilities to the higher-level Java API framework.Thru HAL you can access Audio, Bluetooth, Camera, Sensors drivers and can usein your application.Now Android gives you to extra flexibility to implement own device specs anddriver, you can create own hooks between Android Platform stack and hardware.Android is also open source, so you can also contribute enhancements.

3. Android Runtime


Android is updating technology day by day to make faster apps. ART- AndroidRuntime is an application runtime environment. Android apps are stored inmemory where it required space. Laughing app go thru process – stored in RAMmemory and execute in short of time, all this supported in Android Runtimeconfiguration by android.Two major concept is in Android is JIN – Just in time compilation and AOT –Ahead-of-time compilation.

5. Java API Framework


The entire feature-set of the Android OS is available to you through APIs arewritten in the Java language. These APIs form the building blocks you need tocreate Android apps by simplifying the reuse of core, modular systemcomponents, and services, which include the following:Like Activity, Content provider, Location etc.

6. System Apps


Android has some default and basic apps in OS, which included some is Internetbrowsing, Contacts, Calendars, emails, messaging applications. You can Installyour own apps , its not restricted. Almost all manufacturing company and appsproviding own keyboard, google chrome come with Pixel phones and the user alsoinstall different browsers. The basic app can be removed from the system ifyou have root access.If you don’t like branded apps, you can remove by some extra effort, sometimesit’s possible to root android mobile and sometimes not. Root access gives bythe company to company on devices (Rooting a device can be done by using somesoftware is available in the market, but still its depend on the configurationof mobile). So there is some apps form company like Mi apps by Mi.For developer perspective, if your app would like to deliver an SMS message,you don’t need to build that functionality yourself, you can instead invokewhichever SMS app is already installed to deliver a message to the recipientyou specify.Degree in Computer Science and Engineer: App Developer and has multipleProgramming languages experience. Enthusiasm for technology & like learningtechnical.

Leave a Reply

Your email address will not be published. Required fields are marked *