0% found this document useful (0 votes)
41 views

【Android App Development】Understanding of Android Architecture

1. The Android architecture consists of multiple layers including hardware, Linux kernel, hardware abstraction layer, native libraries, Android runtime, application framework, and applications. 2. The hardware abstraction layer sits between the Linux kernel and native libraries to abstract the hardware and define interfaces for drivers. 3. There are three main types of Android development: porting applications, developing new applications, and developing the Android system itself like building new components.

Uploaded by

Siba Ssm
Copyright
© © All Rights Reserved
0% found this document useful (0 votes)
41 views

【Android App Development】Understanding of Android Architecture

1. The Android architecture consists of multiple layers including hardware, Linux kernel, hardware abstraction layer, native libraries, Android runtime, application framework, and applications. 2. The hardware abstraction layer sits between the Linux kernel and native libraries to abstract the hardware and define interfaces for drivers. 3. There are three main types of Android development: porting applications, developing new applications, and developing the Android system itself like building new components.

Uploaded by

Siba Ssm
Copyright
© © All Rights Reserved
You are on page 1/ 6

【Android App Development】An understanding of the Android architecture - to be added

later
Posted On 2023-03-27 08:59:14 237 0 report

1. Bottom_ hardware
The bottommost hardware of any Android device includes display, wifi ,storage devices etc. The bottommost hardware of Android will be cropped according to
your needs and choose the hardware you need.

2. Linux kernel layer


This layer mainly manages the hardware, including Display Driver, Camera Driver, Bluetooth Driver, Shared Memory Driver, USB Driver, Keypad Driver, WiFi
Driver, Sound Driver Audio Drivers), Power Management.

Some drivers are corresponding to the real hardware and are used to drive the underlying hardware, while some drivers are software abstractions and are
virtual drivers. The above shared memory driver and binder driver are software drivers.LogCat is also a software driver.

Android provides core system services based on Linux 2.6 , such as security , memory management , process management , network stack , driver model .
The Linux kernel also acts as an abstraction layer between hardware and software, which hides the details of the hardware and provides a unified service for
the upper layer.

Binder is used as a process communication mechanism to replace the traditional inter-process communication mechanism. This mechanism is implemented in
the Native layer and in the Java layer.

3. Hardware abstraction layer


This layer is implemented by different vendors, and this layer implements the call to the underlying driver.

C/C++ libraries in userspace;

Follow the Apache protocol;

Define the interface for the Linux driver implementation required by Android;

Completely abstract Android from hardware;

4. Native Libraries layer


This library is implemented in C/C++ by calling the methods of the hardware abstraction layer.
The various components of the Android system use these functions to be exposed to developers through the Android Application framework;

SurfaceManager :

Media Framework :

SQLite :

WebKit :

Libc :

OpenGL|ES : provides a set of C/C++ libraries at this layer, but provides a layer of Java libraries at the Framework layer;

Audio Manager :

FreeType :

SSL :

5.Android Runtime Environment: Android Runtime


Core Libraries : Core libraries that provide most of the Java programming functions, and are streamlined from JavaSE. You can use the help documentation in
the doc directory in the SDK.

Dalvik Virtual Machine : Android\Virtual Machine , Register-based . The stack-based implementation of most virtual machines is a . The virtual machine relies
on the basic functions provided by the Linux kernel, such as threading and the underlying memory management.

All Android applications are developed in Java and run on the Dalvik virtual machine.

6.Application Framework
It provides a set of APIs, and the four components are provided at this layer, and this framework also provides a set of services that will reside in a certain
program during the boot of the phone. For example, listen to phone calls, text messages , etc., and turn on the services of the corresponding broadcast
recipients. When Linux starts, the services are loaded, and each service occupies a Dalvik virtual machine.

By providing an open development platform, Android developers can compile extremely rich and novel applications, and developers can freely use the
hardware advantages of the device to access location information, run background services, set alarms, add notifications to the status bar, etc.;

Developers can fully use the framework APIs used by the core application, and the architecture of the application is designed to simplify the reuse of
components, so that any application can publish its functionality, and any other application can use these features. This mechanism allows the user to replace
components, all applications are actually a set of services and systems.

Click on the adb shell to view the connected phone, the ps command can view all the processes, the service list command can view all the services that have
been started, and the system services can be obtained through getSystemService.

In this layer, the mechanism of inter-process communication is encapsulated, which is the Binder mechanism;

7. Applications
Applications developed using Java.

For users : good user experience , strong user affinity .

For developers: Fast and flexible development platform, so that developers' inspiration can be quickly transformed into products.

8. Android development types


There are three types of Android development:
(1) Transplant and develop mobile phone systems

Porting an application from a different platform and developing .

For example, the underlying layer of this platform may not be supported, this port can be a whole port from the bottom driver to the upper level of the
application, or it can be an application port on different SDK versions.
(2) Application development

(3) Android system development


For example, the development browser is based on WebKit, which needs to be understood by the C/C++ code of the component, and the modified component
can be applied to your own development;

To develop mobile TV, you need to decode the data for video, complete a set of video decoding library in Native, and expose the API at the Framework layer for
developers to use;

9. Three forms of development


(1) SDK development: Windows, Linux, Mac;

Knowledge of Java language ;

Application architecture ;

Basic knowledge of GUI design;

the use of various views;

2D/3D graphics API;

Application design ideas ;

(2) NDK development: development under windows and linux

Knowledge of the Java language

Application architecture ;

JNI technology ;

C programming under Linux

(3) Source code development: full source code, Linux development;

Knowledge structure of Android source code development:

Knowledge of Linux operating system

Knowledge of Linux kernel (C)


Knowledge of Linux Drivers (C)

Android Underlying Library (C, C++)

Dalvik Virtual Machine (C++, Java)

Android GUI (C++, Java)

Audio , Video Multimedia (C , C++ , Java)

Telephony section (C, C++, Java)

Sensor section (C, C++, Java)

You might also like