Android platform transplantation should be done in two steps

Publisher:幸福时刻Latest update time:2011-04-04 Source: IT168技术Keywords:Android Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The purpose of Android system porting is to run the Android system on specific hardware. In the process of porting, grasping the key points and reducing the workload is an important aspect. From the perspective of work, the usual method is to first be familiar with the interface of the hardware abstraction layer, and then integrate and reuse the existing drivers. The main workload is in the implementation of the hardware abstraction layer. In order to better understand and debug the system, you should also properly understand the calls of the upper layer to the hardware abstraction layer.
There are two main parts of porting:
Linux driver
Android system hardware abstraction layer
The driver in Linux works in the kernel space, and the Android system hardware abstraction layer works in the user space. With the combination of these two parts, the huge Android system can run on a specific hardware platform.
The main work of Android porting is shown in Figure 1.

c6aec885d85ef73c.jpg

Figure 1 Main tasks of Android porting
After having a specific hardware system, it is usually necessary to implement its driver in Linux. These drivers are usually standard Linux drivers and are basically the same on the Android platform and other Linux platforms. The main implementation aspect is the Hardware Abstract Layer in the Android system. The Hardware Abstract Layer calls the driver in Linux downwards and provides an interface upwards for other parts of the Android system (usually the Android local framework layer) to call.
Tip: The interface of the Android hardware abstract layer is the interface of the local porting layer, which is not a standard API and has no forward or backward compatibility.
The content that needs to be ported in the Android system mainly includes the following parts:
Display part (Display)
includes framebuffer driver + Gralloc module (optional implementation)
User input part (Input)
includes Event driver + EventHub (Android standard content)
Multimedia codec (Codec)
includes hardware Codec driver + Codec plug-in (such as OpenMax)
3D accelerator part (3D Accelerator)
includes hardware OpenGL driver + OpenGL plug-in
Audio part (Audio)
includes Audio driver + Audio hardware abstraction layer
Video output part (Video Out)
includes video display driver + Overlay hardware abstraction layer
Camera part (Camera)
includes Camera driver (usually v4l2) + Camera hardware abstraction layer
Phone part (Phone)
Modem driver + RIL library
Global positioning system part (GPS)
includes GPS driver (usually serial port) + GPS hardware abstraction layer
Wireless LAN part (WIFI)
includes Wlan driver and protocol + WIFI adaptation layer (Android standard content)
Bluetooth part (Bluetooth ) Tooth
includes BT driver and protocol + BT adaptation layer (Android standard content)
Sensor part (Sensor)
includes Sensor driver + Sensor hardware abstraction layer
Vibrator part (Vibrator)
includes Vibrator driver + Vibrator hardware abstraction layer (Android standard content)
Backlight part (Light)
includes Light driver + Light hardware abstraction layer
Alarm part (Alarm)
includes Alarm driver and RTC system + user space call (Android standard content)
Battery part (Battery)
includes battery driver + battery hardware abstraction layer (Android standard content)
Android has many components, but not every component needs to be transplanted. For some pure software components, there is no need to transplant. For some components, such as the browser engine, although the support of the lower-level network is required, the network interface is not directly transplanted for it, but the standard network interface is completed through the wireless LAN or telephone system data connection.
Android porting can be divided into several categories: basic graphical user interface (GUI) part, including display part and user input part; hardware-related acceleration part, including media codec and OpenGL; audio and video input and output link, including audio, video output and camera part; connection part, including wireless LAN, Bluetooth, GPS; phone part; accessories: including sensors, backlight, vibrator, etc.
In addition to the above porting aspects, power management is also a very important aspect, which is related to each subsystem of Android.
The main parts that need to be ported in the Android system are shown in Figure 2.

f2d6c8de73193ca8.jpg

Figure 2 Main components that need to be transplanted in the Android system
For most subsystems, the hardware abstraction layer and the driver need to be implemented according to the actual system conditions, such as: sensor part, audio part, video part, camera part, and phone part. There are also some subsystems where the hardware abstraction layer is standard and only the driver in the Linux kernel needs to be implemented, such as: input part, vibrator part, wireless LAN part, Bluetooth part, etc. For systems with standard hardware abstraction layers, sometimes some configuration work is usually required.
Today, with the development of the Android system, it is no longer just a platform for mobile devices, but can also be used for consumer electronics and smart home appliances, such as: netbooks, e-books, digital TVs, set-top boxes, fixed phones, etc. On these platforms, fewer components are usually required than on mobile devices. Generally speaking, the basic user interface part (including display and user input) needs to be transplanted, and other parts are optional. For example: the phone system, vibrator, backlight, sensor, etc. generally do not need to be implemented in non-mobile device systems; for some fixed-location devices, it is usually not necessary to implement the GPS system.

Keywords:Android Reference address:Android platform transplantation should be done in two steps

Previous article:Experience the upgrade of iPhone to run Android 2.3 successfully
Next article:Solution to the 2011 Macbook Pro stuck in gray screen when starting up

Recommended ReadingLatest update time:2024-11-16 22:51

The fifth-anniversary masterpiece, the second-generation Snapdragon 8 helps Realme GT5 create an Android flagship with excellent performance
On August 28, realme held a "leapfrog" fifth anniversary speech and a new product launch conference for the realme GT5, officially launching the new realme GT5. As Realme’s “fifth anniversary leapfrog masterpiece”, Realme GT5 is equipped with the second-generation Snapdragon 8 mobile platform to create an Android flag
[Mobile phone portable]
The fifth-anniversary masterpiece, the second-generation Snapdragon 8 helps Realme GT5 create an Android flagship with excellent performance
Microsoft is developing Android 12L system update for Surface Duo 1 and 2
       While Microsoft is still going to launch Android 11 for Surface Duo 1 (and Android 12 for Surface Duo 2), Microsoft is said to be already developing Android 12L for both phones. Microsoft doesn’t actually plan to launch Android 12 for either phone, but will jump directly to Android 12L because it has a special
[Mobile phone portable]
Will Android 9 mark the end of HTC's mobile phone business?
Google's just-released Pixel 3A was developed by a Taiwanese team that Google acquired from HTC a year ago. HTC has remained silent about its new flagship since the U12 Plus went on sale last summer. According to the Verge, HTC showed some signs of life this week when it announced the release schedule for its belated
[Mobile phone portable]
Android 5G AP back-end test shipments may decline in Q4
Industry sources said that given the possible decline in chip demand from mainland Chinese mobile phone manufacturers, Taiwan's packaging and testing manufacturers expect that shipments of AP back-end testing for 5G Android phones will decline in the fourth quarter of 2021. Electronic Times quoted the above-mentioned
[Mobile phone portable]
Android smartphone report for the first half of 2020 revealed
News on the morning of July 15th, recently, the data service provider Daily Interactive Getui Big Data launched the "Android Smartphone Report for the First Half of 2020", which provides insights into mainstream Android mobile phone brands from the perspectives of market overview, user portraits, etc., and reviews the
[Mobile phone portable]
Android smartphone report for the first half of 2020 revealed
Based on Android 12! Samsung OneUI 4.0 official version push: the list of upgraded models announced
      Recently, Samsung officially pushed the official version of OneUI 4.0 system to the Galaxy S21 series of mobile phones. The underlying system is based on Android 12.   The Beta of OneUI 4.0 started in mid-September, exactly two months after the stable version was pushed. This push is for the global market, and K
[Mobile phone portable]
Android 13 will natively support activating multiple eSIM cards on a single chip
      Traditional mobile phones use physical cards called SIM cards to connect to cellular networks. The current progress of eSIM digital cards is not fast, partly because Android does not provide good support. According to Esper’s latest report, Google may focus on eSIM in Android 13 to promote the popularization of
[Mobile phone portable]
Android 13 will natively support activating multiple eSIM cards on a single chip
WeChat Android 8.0.18 version is compatible with OPPO Find N, supporting parallel window dual-column display
      WeChat Android version 8.0.18 was officially released on January 13, changing the payment in the "Me" tab to service. At the same time, the search function supports searching for items or products by taking photos.   According to OnePlus' Liu Zuohu, the new version of WeChat has been adapted to the OPPO Find N f
[Mobile phone portable]
WeChat Android 8.0.18 version is compatible with OPPO Find N, supporting parallel window dual-column display
Latest Mobile phone portable Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号