首页 > 其他分享 >What is AOSP? Everything you need to know

What is AOSP? Everything you need to know

时间:2022-09-20 14:23:58浏览次数:98  
标签:What Google hardware AOSP need Android developers OS

The Android Open Source Project (AOSP) is the bedrock of modern Android skins like One UI and MIUI.

By Robert Triggs • July 15, 2022

google play store android phone

One of Android’s greatest strengths, and source of occasional frustrations, is its wide variety of software variations. Samsung, Sony, and even Google offer their own take on the core Android experience, introducing their own unique features and ideas to improve on the basic software below. This is all made possible thanks to a common base operating system (OS) that provides the core functionality. That’s right, all of the Android OS variants that you know and love are based on AOSP, or the Android Open Source Project.

Put simply, AOSP is an open-source operating system development project maintained by Google. Since it’s open-source, anyone is free to review and contribute code and fixes to the project repository. However, Google oversees its general direction and has the final say in the bulk of its development.

The AOSP receives regular bug fixes, which get packaged and delivered to Android smartphones in the form of monthly security patches. Google also unveils major new features each year at its I/O developer conference, with yearly releases like the upcoming Android 13.

Read more: Stock Android vs Android One vs Android Go: the differences explained

As well as being open to contributions, the Android Open Source Project is free to use and alter under an open-source license. Manufacturers like Amazon and Samsung are free to tweak the project for their own purposes and have developed their own spin-offs, including the multi-purpose Fire OS. This has turned out to be an important factor in Huawei’s continued development of EMUI and Harmony OS following US trade sanctions.

It’s also important to note that most phone manufacturers obtain versions of AOSP from chipset vendors like Qualcomm. This is because Android has to be tailored to the low-level hardware via drivers. This has historically been the cause of delayed Android updates and limited years of update support. Ultimately, Google is happy with this arrangement, as it encourages developers to use Android for a wide range of internet-connected gadgets. In return, an array of companies each contribute fixes and improvements to the OS. It’s a win-win.

What does the Android Open Source Project include?

As I’m sure you can imagine, operating systems are complex beasts and Android is no different. AOSP covers a range of software layers within the operating system, providing access points and tools for hardware and app developers alike.

The “lower-level” layers are where device manufacturers code the OS to work with their specific hardware. The Linux Kernel, for example, is the core program that manages the CPU resources, system memory, networking, etc, so that apps and services can run. The Hardware Abstraction Layer (HAL) layer links common app APIs for Bluetooth, sound, etc, with the device’s microphone, speakers, and more.

See also: Is Android just Linux under the hood?

“Higher-level” layers are used by app developers. Native Libraries enable developers to build content with commonly supported low-level libraries like OpenGL ES, Webkit, and more. Above that, Android Frameworks provides app developers with hook-ins for common OS functions that we all use every day. These range from location data, pushing notifications, and making phone calls. The Android Runtime is the middle man, converting app code into native instructions for the underlying hardware.

Android OS Stack

Combined, the Android Open Source Project stack (pictured above) is a complete solution for Android hardware and software developers.

The AOSP isn’t just an ever-growing codebase though. Google also provides design and development tools as part of the project, ranging from compatibility documentation to best security practices and app design principles. Google also hosts a selection of test suites to help developers ensure their devices implement APIs and features correctly.

What’s the difference between AOSP and stock Android?

google play store android phone

The Android Open Source Project is often confused with “stock Android” but that’s an oversimplification.

While the AOSP contains everything developers need to build Android, it crucially doesn’t include everything you need for a finished smartphone. This is because Google and the AOSP can’t provide kernel device drivers for every hardware configuration out there. By device driver, we mean the firmware required for a phone’s hardware, such as the processor or cameras. Phone and SoC manufacturers, such as Qualcomm and Samsung, have to incorporate these drivers into their respective Android builds. This is partly why updates take time to trickle down from AOSP to the smartphone in your hand.

AOSP also doesn’t come with Google’s suite of software applications, such as its Chrome browser, YouTube, and even the Google Play Store. It also doesn’t include a number of Google’s under-the-hood technologies and APIs that enable features like mobile payments, voice commands, and cloud storage. These are licensed separately to manufacturers as Google Mobile Services (GMS).

When Huawei lost access to US technologies, it could no longer license GMS but could keep using AOSP. As such, Huawei began replacing GMS features with its in-house Huawei Mobile Service (HMS). However, this means that apps that rely on GMS have to be rebuilt using HMS to work correctly. Hence why you can’t be guaranteed to find your favorite Android apps on the latest Huawei devices.

Up next: How does Google make money from Android?

Any manufacturer that wants to install GMS on top of Android has to obtain a GMS license and a Mobile Application Distribution Agreement (MADA) for their device and then pass several compatibility tests. There’s the Android Compatibility Test Suite (CTS) to validate software and hardware components and APIs. Then, the Google Mobile Services Test Suite (GTS) and Vendor Test Suite (VTS) test multimedia capabilities, OS kernel, and HAL capabilities. Another condition for obtaining a GMS license is to pre-load a number of Google’s apps on a new device.

The difference between AOSP and GMS has become a very important distinction following the US-China trade dispute.

The future of AOSP

Android 13 stock photos

The Android Open Source Project continues to be the foundation of Android’s success, thanks to countless hours of developer input from around the world. While Android devices aren’t going anywhere soon, Google may already be looking for a future operating system.

Google Fuchsia first popped up on GitHub in August 2016 but we’ve heard little about it since. We still don’t know too much about Fuchsia for smartphones. That said, it appears to be designed for an even wider range of devices than Android. Fuchsia also features Google’s own non-Linux kernel called Zircon and supports Google’s Dart scripting language. At the moment, Fuchsia is open-source and free, just like Android. Let’s hope any future plans stay that way. Interested developers can download and build the OS from the Fushsia website.

标签:What,Google,hardware,AOSP,need,Android,developers,OS
From: https://www.cnblogs.com/xzs603/p/16710863.html

相关文章