از 27 مارس 2025، توصیه می کنیم از android-latest-release به جای aosp-main برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
این صفحه دو وظیفه مهم مشارکتکننده را پوشش میدهد: امضای قراردادهای مجوز مشارکتکننده و اطمینان از استفاده صحیح از سرصفحههای مجوز در کد شما.
قراردادهای مجوز مشارکت کننده را امضا کنید
همه مشارکتکنندگان منفرد (کسانی که فقط از طرف خودشان مشارکت میکنند) ایدهها، کد یا مستندات پروژه منبع باز Android (AOSP) ملزم به تکمیل، امضا و ارسال یک قرارداد مجوز مشارکتکننده فردی هستند. می توانید این قرارداد را به صورت آنلاین از طریق ابزار بررسی کد اجرا کنید. این توافقنامه شرایط کمک به مالکیت معنوی به AOSP را تعریف می کند. این مجوز برای محافظت از شما به عنوان یک مشارکت کننده و همچنین حفاظت از پروژه است. این حقوق شما را برای استفاده از مشارکت های خود برای هر هدف دیگری تغییر نمی دهد.
قرارداد مجوز مشارکت شرکتی برای یک شرکت (یا نهاد دیگر) با کارمندانی که در AOSP کار می کنند در دسترس است. این نسخه از توافقنامه به یک شرکت اجازه می دهد مشارکت های ارسال شده توسط کارمندان تعیین شده خود را مجاز کند و مجوزهای حق چاپ و حق اختراع را اعطا کند.
Google قراردادهای مجوز مشارکت کننده خود را بر اساس موارد استفاده شده توسط بنیاد نرم افزار آپاچی قرار می دهد که در وب سایت آپاچی قابل مشاهده است.
شامل سرصفحه های مجوز
پروژه متن باز Android (AOSP) از چند مجوز منبع باز تأیید شده برای نرم افزار ما استفاده می کند.
مجوز آپاچی، نسخه 2.0 (Apache 2.0) مجوز ترجیحی برای AOSP است و اکثر نرم افزارهای اندروید دارای مجوز Apache 2.0 هستند. در حالی که پروژه تلاش می کند به مجوز ترجیحی پایبند باشد، استثناهایی وجود دارد که به صورت موردی رسیدگی می شود. به عنوان مثال، وصلههای هسته لینوکس تحت مجوز GPLv2 با استثناهای سیستم هستند، که میتوان آنها را در آرشیو هسته لینوکس پیدا کرد.
برای نرمافزار فضای کاربر (غیر هسته)، Google Apache 2.0 (و مجوزهای مشابه مانند BSD و MIT) را به مجوزهای دیگر مانند مجوز عمومی عمومی کوچک گنو (LGPL) ترجیح میدهد. در اینجا دلیل آن است:
اندروید درباره آزادی و انتخاب است. هدف اندروید ترویج باز بودن در دنیای موبایل است و گوگل نمی تواند همه کاربردهای نرم افزار ما را پیش بینی یا دیکته کند. بنابراین، در حالی که گوگل همه را تشویق میکند که دستگاههای باز و قابل تغییر بسازند، ما فکر نمیکنیم این وظیفه ماست که آنها را مجبور به انجام این کار کنیم. استفاده از کتابخانه های LGPL می تواند محدود کننده باشد. در اینجا برخی از نگرانی های خاص ما آمده است:
به زبان ساده، LGPL نیازمند ارسال منبع به برنامه است. پیشنهاد کتبی برای منبع؛ یا پیوند دادن کتابخانه LGPL-ed به صورت پویا و اجازه دادن به کاربران برای ارتقا یا جایگزینی دستی کتابخانه. نرمافزار اندروید معمولاً بهعنوان یک تصویر سیستم استاتیک ارسال میشود، بنابراین رعایت این الزامات طراحیهای سازنده دستگاه را محدود میکند. به عنوان مثال، جایگزین کردن کتابخانه در حافظه فلش فقط خواندنی برای کاربر دشوار است.
LGPL برای اشکالزدایی این تغییرات نیاز به مجوز اصلاح مشتری و مهندسی معکوس دارد. اکثر سازندگان دستگاه نمی خواهند به این شرایط متعهد شوند.
از لحاظ تاریخی، کتابخانه های LGPL منبع بسیاری از مشکلات انطباق برای سازندگان دستگاه های پایین دست و توسعه دهندگان برنامه بوده است. آموزش مهندسان در مورد این مسائل دشوار و زمان بر است. برای موفقیت اندروید بسیار مهم است که سازندگان دستگاه بتوانند به راحتی مجوزها را رعایت کنند.
این نگرانی ها انتقاد از LGPL یا مجوزهای دیگر نیست. Google از همه مجوزهای منبع باز و رایگان قدردانی می کند و به اولویت های مجوز دیگران احترام می گذارد. گوگل تصمیم گرفته است که آپاچی 2.0 بهترین گزینه برای اهداف ما است.
هنگام ارسال کد برای گنجاندن در AOSP، باید از استفاده صحیح از هدر مجوزها اطمینان حاصل کنید. بخش های زیر نحوه مدیریت هدر مجوزها برای فایل های جدید و کدهای موجود را توضیح می دهد.
بهترین شیوه های مجوز و حق چاپ را دنبال کنید
این بهترین روشها را برای عنوان حق چاپ و مجوز دنبال کنید:
کپی رایت موجود را تغییر ندهید. به عنوان مثال، اگر میخواهید فایلی را به AOSP اضافه کنید که حاوی کدی است که در یک فایل با اعلان حق نسخهبرداری خودش ایجاد شده است، باید آن اعلامیه حق چاپ را از فایل اصلی حفظ کنید.
اگر یک فایل منبع کاملاً جدید اضافه میکنید، از حق نسخهبرداری پیشفرض AOSP و سرصفحه مجوز زیر استفاده کنید، مگر اینکه پروژهای که در آن مشارکت دارید مجوز از پیش تعریفشده دیگری داشته باشد:
Copyright (C) yyyy The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Contributor license agreements and headers\n\nThis page covers two important contributor tasks: signing contributor license\nagreements and ensuring correct use of licensing headers in your code.\n\nSign contributor license agreements\n-----------------------------------\n\nAll individual contributors (those making contributions only on their own\nbehalf) of ideas, code, or documentation to Android Open Source Project (AOSP)\nare required to complete, sign, and submit an\n[Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual).\nYou can execute this agreement online through the\n[code review tool](https://android-review.googlesource.com/#/settings/agreements).\nThe agreement defines the terms for contributing intellectual property\nto AOSP. This license is for your protection as a contributor as well as the\nprotection of the project; it doesn't change your rights to use your own\ncontributions for any other purpose.\n\nThe [Corporate Contributor License Agreement](https://cla.developers.google.com/about/google-corporate)\nis available for a corporation (or other entity) with employees working on AOSP.\nThis version of the agreement lets a corporation authorize contributions\nsubmitted by its designated employees and grant copyright and patent\nlicenses.\n| **Note:** A Corporate Contributor License Agreement doesn't remove the need for a developer to sign their own Individual Contributor License Agreement as an individual. The individual agreement is needed to cover any of their contributions that are *not* owned by the corporation signing the Corporate Contributor License Agreement.\n\nGoogle bases their contributor license agreements on those used by the\n[Apache Software Foundation](http://www.apache.org), which can\nbe found on the\n[Apache website](http://www.apache.org/licenses/).\n\nInclude license headers\n-----------------------\n\nThe Android Open Source Project (AOSP) uses a few\n[open source initiative](http://www.opensource.org/) approved open source\nlicenses for our software.\n\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n(Apache 2.0) is the preferred license for AOSP, and the majority of Android\nsoftware is licensed with Apache 2.0. While the project strives to adhere to the\npreferred license, there are exceptions, which are handled on a case-by-case\nbasis. For example, the Linux kernel patches are under the GPLv2 license with\nsystem exceptions, which can be found on\n[The Linux Kernel Archives](http://www.kernel.org/pub/linux/kernel/COPYING).\n\nFor userspace (nonkernel) software, Google prefer Apache 2.0 (and similar\nlicenses such as BSD and MIT) over other licenses such as the GNU Lesser General\nPublic License (LGPL). Here's why:\n\n- Android is about freedom and choice. The purpose of Android is to promote\n openness in the mobile world, and Google can't predict or dictate all of the\n uses for our software. So, while Google encourages everyone to make open and\n modifiable devices, we don't think it's our place to force them to do so. Using\n LGPL libraries could be restrictive. Here are some of our specific concerns:\n\n - In simplified terms, LGPL requires shipping of source to the application; a\n written offer for source; or linking the LGPL-ed library dynamically and\n allowing users to manually upgrade or replace the library. Android software is\n typically shipped as a static system image, so complying with these\n requirements restricts device manufacturer designs. For example, it's\n difficult for a user to replace a library on read-only flash storage.\n\n - LGPL requires the allowance of customer modification and reverse engineering\n for debugging those modifications. Most device makers don't want to be bound\n by these terms.\n\n - Historically, LGPL libraries have been the source of many compliance\n problems for downstream device makers and app developers. Educating\n engineers on these issues is difficult and time consuming. It's critical to\n Android's success that device makers can easily comply with the licenses.\n\nThese concerns aren't criticisms of LGPL or other licenses. Google appreciates\nall free and open source licenses, and respect others' license preferences.\nGoogle has decided that Apache 2.0 is the best fit for our goals.\n\nWhen submitting code to be included in AOSP, you must ensure proper use of\nlicense headers. The following sections explains how to handle\nlicense headers for new files and existing code.\n\n### Follow license and copyright best practices\n\nFollow these best practices for copyright and license header:\n\n- Don't modify an existing copyright. For example, if you want to contribute a\n file to AOSP that contains code that originated in a file with a its own\n copyright notice, you must retain that copyright notice from the original file.\n\n- If you add a wholly new source file, use the default AOSP copyright and the\n following license header, unless the project you're contributing to has a\n different predefined license:\n\n Copyright (C) \u003cvar translate=\"no\"\u003eyyyy\u003c/var\u003e The Android Open Source Project\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n | **Note:** \u003cvar translate=\"no\"\u003eyyyy\u003c/var\u003e refers to the year that the file is added."]]