About this document


The scope of this document is to describe how to contribute code to Linaro Android as a developer inside Linaro, as an external developer and as a member company. The document also covers practical things like using gerrit and who to add for review (and the fallback solution until we have gerrit). It also covers copyrigth and licenses and the need for external contributors to hand over rights to Linaro. It will also cover the steps needed to prepare a contributions to aosp and who is allowed to push to Android Open Source Project (AOSP).


People within the different Linaro teams who need to use the Android source code for their work and anyone using the Android source code from git.linaro.org


Android LEB

The purpose with the Android LEB is to show fully enables Android builds on low cost development boards based on the Linaro members SoCs. There are nightly builds available for the Android LEBs and the Android LEBs are validated and bench marked with LAVA (Linaro Automated Validation).

The Android LEBs are based on the latest public Android release and code from the Linaro member companies. The LEBs contains binaries when member companies have not been able to provide source code. The code provided by the member companies contains code with the members (and others) copyright.

Generic Build

The generic build is based on the latest public Android release. The goal is to only have code that can be upstreamed in this build. To be able to upstream Linaro needs to have copyright for all changes added to the generic build. Any work done in the diffrent Linaro teams should be deliverer in this build.

Contributing to Linaro Android

As Linaro developer

Linaro developers are welcome to contribute improvements to Linaro Android and use the Android builds to show case your work.

The goal for Linaro Android is to contribute as much as possible to AOSP. Please follow the rules in the copyright Q&A for all patches intended for the generic build.

As external developer

For Linaro to be able to contribute a patch to AOSP an external developer must hand over the same rights to Linaro as Linaro has to hand over to the to the Android project when contributing to AOSP. This requires a contract between the external developer and Linaro. Unless it is major contribution it is probably easier to contribute the code directly to Google (or join Linaro).

It is possible external developers to participate in experiments and other work not intended to be contributed to AOSP on a development branch (see branching strategy document for details).

As member company

The member companies will mainly contribute their code and binaries to the LEBs. For any other contribution the they are handled as any other external developer.

Note that as long as there is no special agreement (giving up rights) between a member and Linaro that members code in the LEB can not be part of the Linaro Android teams code consolidation effort.

Copyright and licences

Linaro have signed and agreement with AOSP (See contributing to AOSP below) to be able to contribute code to them. In the agreement we hand over a number of rights to the Android project.

It is the developers resposability to follow the rules in Copyright Q&A and make sure that code has the correct license and that the license is followed.

As a rule of thumb for Android. Do not change the license. Keep the same licence as on the file you modify. If you as a developer want you work in Linaro to be contributed to AOSP and do not know what license to use contact the Linaro Android team.

Gate keepers

The Linaro Android team will act as gate keepers and make sure during the review that no patches are added to the official Linaro branch of the generic build without Linaro (or AOSP) copyright.


Linaro Android will use gerrit as code review tool and to handle access control to the Android gits.

The Linaro Android team follows the same workflow as AOSP. See http://source.android.com/source/life-of-a-patch.html.

How to push changes for review

Can either push to gerrit

git push linaro HEAD:refs/for/master

In the example above HEAD is pushed to the remote linaro with the intention that the patches should land on the master branch after review.

repo start mybranch build
<do some useful changes>
repo upload

In this example a branch is created with repo on the build project (or git). A branch can be started on a one or more or all project at the same time.

Repo upload will upload all committed changes for review based on information in the manifest used when the user did repo init.


After the patches have been pushed to gerrit for review the developer must add reviewers. Add people with knowledge about the modified code and add a member of the Linaro Android team.

The reviewer from the Android team will check give a +2 after the others have given +1 on the review, give +1 on test and have checked that a linaro.org address was used, copyright and license are ok.

For development branches the developer can set +2 themselves.

Contributing to AOSP


Linaro has signed an agreement with the Android project to be able to contribute code to AOSP. When Linaro contributes code to AOSP Linaro will hand over some rigths to the Android project. This is often referred to as giving away the copyright to patches.

According to the agreement Linaro gives a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and for any patents covered by the code a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the contribution.

To summarise. Linaro give AOSP the rigth to use the patch and any patents cover by it for free.

Copies of the actual agreement can be found here: page 1, page2.

People authorized to upload changes to AOSP

Only a small number of people are allowed to upload changes to AOSP. They are the people that are members of the LINARO LIMITED Contributors group.

There is also a LINARO LIMITED Contributors-owners group who can modify the LINARO LIMITED Contributors group (and its self).

The "LINARO LIMITED Contributors-owners" are responsible for making sure that all LINARO LIMITED contributors follow both LINARO LIMITED's internal policies and the Android Contributor License Agreement.

Contributing patches

Patches are contributed from the Generic build. The gate keepers have made sure that the generic build only contains patches that can be (based on the agreement) contributed to AOSP.

Before the patches can be contributed they need to be rebased to an clean Android tree based on the AOSP master branch.

Additional information



Linaro Android main wiki page


Linaro Copyright Q&A


Linaro HowTo GIT


AOSP Life of a patch


Platform/Android/LinaroAndroidContributionProcess (last modified 2013-06-12 07:10:45)