Kể từ ngày 27 tháng 3 năm 2025, bạn nên sử dụng android-latest-release
thay vì aosp-main
để xây dựng và đóng góp cho AOSP. Để biết thêm thông tin, hãy xem phần Thay đổi đối với AOSP.
Tổng quan về AOSP
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Android là một hệ điều hành dành cho nhiều thiết bị có nhiều kiểu dáng. Tài liệu và mã nguồn cho Android được cung cấp cho mọi người dưới dạng Dự án nguồn mở Android (AOSP). Bạn có thể sử dụng AOSP để tạo các biến thể tuỳ chỉnh của hệ điều hành Android cho thiết bị của riêng mình.
AOSP được thiết kế để không có điểm lỗi trung tâm, trong đó một bên tham gia trong ngành hạn chế hoặc kiểm soát các đổi mới của bên khác. Do đó, AOSP là một sản phẩm dành cho nhà phát triển đầy đủ, chất lượng sản xuất với mã nguồn mở để tuỳ chỉnh và chuyển đổi.
Phần tài liệu này giúp các nhà phát triển AOSP mới bắt đầu sử dụng nền tảng này và thực hiện các nhiệm vụ phát triển thiết yếu.
Các điều khoản bắt buộc
Sau đây là danh sách các thuật ngữ và định nghĩa được sử dụng trong tài liệu Bắt đầu. Bạn nên nghiên cứu từng định nghĩa trước khi tiếp tục.
- Nhà phát triển ứng dụng Android
Nhà phát triển ứng dụng Android viết ứng dụng Android hoặc các ứng dụng chạy trên Android. Có hai cách phân loại nhà phát triển ứng dụng: nhà phát triển ứng dụng bên thứ nhất (1p) và nhà phát triển ứng dụng bên thứ ba (3p).
- Nhà phát triển ứng dụng bên thứ nhất của Android
- Nhà phát triển ứng dụng Android có quyền truy cập vào API hệ thống AOSP và viết các ứng dụng đặc quyền cũng như ứng dụng của nhà sản xuất thiết bị.
- Nhà phát triển ứng dụng bên thứ ba cho Android
- Nhà phát triển ứng dụng Android chỉ sử dụng SDK công khai của Android để tạo ứng dụng Android.
Nếu bạn muốn phát triển ứng dụng bên thứ ba cho Android, hãy tham khảo developers.android.com
. Thông tin trên trang web này chỉ dành cho những người làm việc trực tiếp với AOSP.
- Cầu gỡ lỗi Android (adb)
- Một công cụ dòng lệnh (
adb
) cho phép máy trạm của bạn giao tiếp với một thiết bị ảo, được mô phỏng bằng phần mềm hoặc thiết bị thực.
- Thiết bị tương thích với Android
- Thiết bị có thể chạy mọi ứng dụng bên thứ ba do các nhà phát triển bên thứ ba viết bằng SDK và NDK của Android. Thiết bị tương thích với Android phải tuân thủ các yêu cầu của Tài liệu định nghĩa về khả năng tương thích (CDD) và vượt qua Bộ kiểm thử tính tương thích (CTS). Các thiết bị tương thích với Android đủ điều kiện tham gia hệ sinh thái Android, bao gồm cả việc có thể được cấp phép sử dụng Cửa hàng Google Play, có thể được cấp phép sử dụng bộ ứng dụng và API Dịch vụ của Google dành cho thiết bị di động (GMS) cũng như có thể sử dụng nhãn hiệu Android. Mọi người đều có thể sử dụng mã nguồn Android, nhưng để được coi là một phần của hệ sinh thái Android, thiết bị phải tương thích với Android. Để biết thêm thông tin về khả năng tương thích và CTS, hãy xem bài viết Tổng quan về Chương trình tương thích với Android
- Tài liệu định nghĩa về khả năng tương thích (CDD)
- Tài liệu liệt kê các yêu cầu về phần mềm và phần cứng đối với thiết bị tương thích với Android.
- Người đóng góp
Một người đóng góp cho mã nguồn AOSP. Người đóng góp có thể là nhân viên của Google, nhân viên của các công ty khác và cá nhân không liên kết với công ty nào. Mọi cộng tác viên AOSP đều sử dụng cùng một công cụ, tuân theo cùng một quy trình xem xét mã và tuân theo cùng một kiểu lập trình. Bạn không cần phải là người đóng góp để sử dụng AOSP; bạn có thể tải AOSP xuống, sửa đổi AOSP theo nhu cầu của riêng mình và triển khai AOSP trên một thiết bị mà không cần đóng góp mã để người khác sử dụng.
Google có giới hạn về loại mã đóng góp được chấp nhận. Ví dụ: bạn có thể muốn đóng góp một API ứng dụng thay thế, chẳng hạn như một môi trường đầy đủ dựa trên C++. Google sẽ từ chối đóng góp đó vì Android khuyến khích các ứng dụng chạy trong môi trường thời gian chạy ART. Tương tự, Google không chấp nhận các nội dung đóng góp như thư viện GPL hoặc LGPL không tương thích với mục tiêu cấp phép.
Nếu bạn muốn đóng góp mã nguồn, hãy liên hệ với Google trước khi bắt đầu công việc.
- Bộ kiểm tra tính tương thích (CTS)
Một bộ kiểm thử miễn phí, cấp thương mại, có thể tải xuống dưới dạng tệp nhị phân hoặc nguồn trong AOSP. CTS là một tập hợp các bài kiểm thử đơn vị được thiết kế để tích hợp vào quy trình làm việc hằng ngày của bạn. Mục đích của CTS là phát hiện các vấn đề không tương thích và đảm bảo rằng phần mềm vẫn tương thích trong suốt quá trình phát triển.
- Mực ống
Một thiết bị Android ảo có thể định cấu hình, có thể chạy từ xa bằng các dịch vụ đám mây của bên thứ ba, chẳng hạn như Google Cloud Engine và cục bộ trên máy Linux x86.
- Nhà phát triển
Trong ngữ cảnh của AOSP, nhà phát triển là bất kỳ ai làm việc với AOSP theo bất kỳ cách nào. Thuật ngữ "nhà phát triển" được dùng để chỉ chung những người có thể đọc tài liệu này, chẳng hạn như nhà sản xuất thiết bị gốc (OEM), nhà sản xuất điện thoại di động, nhà mạng và nhà sáng tạo hệ thống trên một chip (SoC).
- Các dịch vụ của Google dành cho thiết bị di động (GMS)
Một tập hợp các ứng dụng và API của Google có thể được cài đặt sẵn trên thiết bị.
- Target
Một hoán vị của thiết bị, chẳng hạn như một mẫu hoặc hệ số hình dạng cụ thể. Ví dụ: aosp_cf_x86_64_only_phone-userdebug
đại diện cho một điện thoại x86 65 MB có thông tin gỡ lỗi được thiết kế để chạy trên trình mô phỏng cuttlefish.
Triết lý quản trị
Một nhóm các công ty được gọi là Liên minh thiết bị cầm tay mở (OHA), do Google dẫn dắt, đã tạo ra Android. Ngày nay, nhiều công ty (cả các thành viên ban đầu của OHA và các công ty khác) đã đầu tư rất nhiều vào Android. Các công ty này đã phân bổ tài nguyên kỹ thuật đáng kể để cải thiện Android và đưa thiết bị Android ra thị trường.
Các công ty đã đầu tư vào Android là vì họ tin rằng một nền tảng mở là cần thiết. Android là một nỗ lực nguồn mở (chứ không phải phần mềm miễn phí) một cách rõ ràng và có chủ ý; một nhóm các tổ chức có nhu cầu chung đã gộp các tài nguyên để cộng tác trong một lần triển khai sản phẩm dùng chung. Trước hết, triết lý của Android là thực dụng. Mục tiêu là một sản phẩm dùng chung mà mỗi cộng tác viên có thể điều chỉnh và tuỳ chỉnh.
Tất nhiên, việc tuỳ chỉnh không được kiểm soát có thể dẫn đến việc triển khai không tương thích.
Để ngăn chặn tình trạng không tương thích, Dự án nguồn mở Android (AOSP) duy trì Chương trình tương thích với Android. Chương trình này nêu rõ ý nghĩa của việc tương thích với Android và những yêu cầu đối với nhà sản xuất thiết bị để đạt được trạng thái đó. Bất kỳ ai cũng có thể sử dụng mã nguồn Android cho bất kỳ mục đích nào và Google hoan nghênh mọi mục đích sử dụng hợp pháp. Tuy nhiên, để tham gia hệ sinh thái dùng chung các ứng dụng mà các thành viên OHA đang xây dựng xung quanh Android, nhà sản xuất thiết bị phải tham gia Chương trình tương thích với Android.
AOSP do Google dẫn dắt, là đơn vị duy trì và phát triển Android. Mặc dù Android bao gồm nhiều dự án phụ, nhưng AOSP lại quản lý dự án một cách nghiêm ngặt.
Google xem và quản lý Android như một sản phẩm phần mềm toàn diện, chứ không phải là một bản phân phối, thông số kỹ thuật hoặc tập hợp các phần có thể thay thế. Ý định của Google là nhà sản xuất thiết bị chuyển Android sang một thiết bị; họ không triển khai thông số kỹ thuật hoặc tuyển chọn bản phân phối.
Tiếp theo là gì?
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# AOSP overview\n\n*Android* is an operating system for a wide array of devices with different\nform factors. The documentation and source code for Android is available to\nanyone as the *Android Open Source Project (AOSP)*. You can use\nAOSP to create custom variants of the Android OS for your own devices.\n\nAOSP is designed so that there's no central point of failure, where one\nindustry player restricts or controls the innovations of another. Therefore,\nAOSP is a full, production-quality developer product with source code open for\ncustomization and porting.\n\nThis section of documentation helps new AOSP developers get started with the\nplatform and to perform essential development tasks.\n\nRequired terms\n--------------\n\nFollowing is a list of terms and definitions used throughout the Getting\nStarted documentation. You should study each definition before continuing\nfurther.\n\n*Android app developer*\n\n: Android app developers writes *Android apps* or applications that run on\n Android. There are two classification of app developers: first-party (1p) and\n third-party (3p) app developers.\n\n *Android first-party app developer*\n : An Android app developer that has access to AOSP System APIs and writes\n privileged and device manufacturer apps.\n\n *Android third-party app developer*\n : An Android app developer who solely uses Android's public SDK to create\n Android apps.\n\nIf you want to develop third-party apps for Android, refer to\n[`developers.android.com`](https://developer.android.com/). The information on\nthis website is solely for those working directly with AOSP.\n\n*Android debug bridge (adb)*\n: A command-line tool (`adb`) that allows your workstation communicate with a\n virtual, software-emulated, or physical device.\n\n*Android-compatible device*\n: A device that can run any third-party app written by third-party developers\n using the Android SDK and NDK. Android-compatible devices must adhere to the\n requirements of the\n [Compatibility Definition Document (CDD)](#cdd) and pass the\n [Compatibility Test Suite (CTS)](#cts). Android-compatible\n devices are eligible to participate in the Android ecosystem which includes\n potential licensure of the Android Play Store, potential licensure the\n [Google Mobile Services (GMS)](#gms) suite of\n applications and APIs, and use of the Android trademark. Anyone is welcome to\n use the Android source code, but to be considered part of the Android ecosystem,\n a device must be Android-compatible. For further information on compatibility\n and CTS, see the\n [Android Compatibility Program overview](/docs/compatibility/overview)\n\n*Compatibility Definition Document (CDD)*\n: A document that enumerates the software and hardware requirements for an\n Android-compatible device.\n\n*Contributor*\n\n: A person who makes contributions to the AOSP source code. Contributors\n can be employees of Google, employees from other companies, and individuals\n with no company affiliation. Every AOSP contributor uses the same tools, follows\n the same code review process, and is subject to the same coding style. You\n don't have to be a contributor to use AOSP; you can download AOSP,\n modify it for your own needs, and deploy it on a device without contributing\n code for others to use.\n\n There are limits to the type of code contributions Google accepts. For example,\n you might want to contribute an alternative application API, such as a full\n C++-based environment. Google would decline that contribution because Android\n encourages applications to be run in the ART runtime. Similarly, Google doesn't\n accept contributions such as GPL or LGPL libraries that are incompatible with\n licensing goals.\n\n If you are interested in contributing source code,\n [contact Google](/docs/setup/community) prior to beginning work.\n\n*Compatibility Test Suite (CTS)*\n\n: A free, commercial-grade test suite, available for download as a binary or as\n source in AOSP. The CTS is a set of unit tests designed to be integrated into\n your daily workflow. CTS's intent is to reveal incompatibilities, and ensure\n that the software remains compatible throughout the development process.\n\n*Cuttlefish*\n\n: A configurable virtual Android-powered device that can run remotely, using\n third-party cloud offerings, such as Google Cloud Engine, and locally on Linux\n x86 machines.\n\n*Developer*\n\n: In the context of AOSP, a developer is anyone who works with AOSP in any\n way. The term \"developer\" is used to generically refer to the various people who\n might read this documentation, such as original equipment manufacturers\n (OEMs), handset makers, carriers, and System-on-a-Chip (SoC) creators.\n\n*Google Mobile Services (GMS)*\n\n: A collection of Google apps and APIs that can be pre-installed on devices.\n\n*Target*\n\n: A permutation of a device, such as a specific model or form factor. For\n example, `aosp_cf_x86_64_only_phone-userdebug` represents a x86 65MB phone with\n debugging information that is designed to run on the cuttlefish emulator.\n\nGovernance philosophy\n---------------------\n\nA group of companies known as the Open Handset Alliance (OHA), led by Google,\noriginated Android. Today, many companies---both original members of the OHA and\nothers---have invested heavily in Android. These companies have allocated\nsignificant engineering resources to improve Android and bring Android devices\nto market.\n\nThe companies that have invested in Android have done so because they believe an\nopen platform is necessary. Android is intentionally and explicitly an open\nsource effort (as opposed to free software); a group of organizations with\nshared needs has pooled resources to collaborate on a single implementation of a\nshared product. First and foremost, the Android philosophy is pragmatic. The\nobjective is a shared product that each contributor can tailor and customize.\n\nOf course, uncontrolled customization can lead to incompatible implementations.\nTo prevent incompatibility, the Android Open Source Project (AOSP) maintains\nthe\n[Android Compatibility program](/docs/compatibility/overview),\nwhich spells out what it means to be Android-compatible and what's required of\ndevice builders to achieve that status. Anyone can use the Android source code\nfor any purpose, and Google welcomes all legitimate uses. However, to take part\nin the shared ecosystem of applications OHA members are building around Android,\ndevice builders must participate in the Android Compatibility program.\n\nAOSP is led by Google, who maintains and further develops Android. Although\nAndroid consists of multiple subprojects, AOSP is strictly project management.\nGoogle views and manage Android as a single, holistic software product, not a\ndistribution, specification, or collection of replaceable parts. Google's intent\nis that device builders port Android to a device; they don't implement a\nspecification or curate a distribution.\n\nWhat's next?\n------------\n\n- If you're new to AOSP and want to run through a tutorial on AOSP\n development, proceed with [AOSP tutorial](/docs/setup/start).\n\n- If you believe that your device needs to be Android-compatible, refer to the\n [Android Compatibility program](/docs/compatibility/overview).\n\n- If you want to learn about the background of AOSP, including Google's\n participation in the platform, see\n [AOSP frequently asked questions](/docs/setup/about/faqs)."]]