How to becoming contributor of AOSP on Hikey


  • Familiarize yourself with Gerrit; here are some links:

  • Make sure you have an account on and are properly added to the contributors agreement.

  • Get a http password:

    • Log in to
    • Click on your name on the upper right, then settings.
    • Click on HTTP password, then obtain password.
    • Copy the string to a script "".
    • Make the the script executable "chmod u+x".
  • Accept the Contributor Agreement, if necessary

Get the latest AOSP kernel tree
  • Run the following commands:
``` $ export AOSP=hikey $ export BRANCH=master $ export LOCAL=mychanges $ git clone $ cd $AOSP $ git checkout origin/$BRANCH -b $LOCAL
<strong><em>Commit your changes</em></strong>

Patch, git add and git commit everything you want. Your patches should at least pass scripts/, as usual
<strong><em>Add a Change-Id</em></strong>

Gerrit wants each logical change to have a Change-Id. This allows future versions of the same change (maybe modified due to review feedback) to have the same reference hash.

Get the sha1 list, you will need them on the next step:

$ git log --pretty=o origin/${BRANCH}…HEAD > …/sha1.list

Rebase your changes to rework commit messages and add manual Change-Id tags for each patch:

$ git rebase -i origin/$BRANCH

Change all the &quot;pick&quot;s to &quot;reword&quot; or just &quot;r&quot;

<li>Above the &quot;Signed-off-by:&quot; lines, add:</li>

Change-Id: I<original sha1sum for change from shalist>

<li>Note the I is the prefix on the sha1sum.</li>
<strong><em>Push the changes</em></strong>

Review all changes, making sure each has a unique Change-Id.

And finally, run

$ ./
$ git push origin $LOCAL:refs/for/$BRANCH

Then it will show the out put like this.

Counting objects: 22, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 527 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3)
remote: Processing changes: new: 1, done
remote: New Changes:
remote:[numbers] Title-of-your-patch
To device/linaro/hikey - Git at Google

  • [new branch] mychanges -> refs/for/master

Visit the link showing above:


And add following reviewers:
<li>(all three persons have the same address)</li>

Have fun!

(This documentation was referred from

If you see any place to improve the procedure then feel free to post below (or send me a PM).