Download Android kernel source code

11,524

Solution 1

git clone git://android.git.kernel.org/kernel/common.git

and then

cd common  ==============>>> this is the step u missed.

git branch -a 

git checkout -t  remotes/origin/android-2.6.38 -b mygoldfish2_6_38 

git branch -r 

git checkout -t  origin/android-2.6.35 -b mygoldfish_2_6_35

and then the following command gives:

git branch
  android-2.6.36
  mygoldfish2_6_38
* mygoldfish_2_6_35

Solution 2

Well if you just need the source, but not local git repo, then just take a snapshot that you need, i.e. this one.
Similary you can download any git tree snapshot, just notice tags links over the https://android.googlesource.com

Share:
11,524
Admin
Author by

Admin

Updated on June 23, 2022

Comments

  • Admin
    Admin almost 2 years

    I have been trying to download goldfish kernel source code but no luck.

    Upon hitting the following command I end up with the source code of sized 1GB:

    git clone https://android.googlesource.com/kernel/common
    

    However we I pressed on following command,

    git checkout -t origin/android-goldfish-2.6.29 -b goldfish
    

    it prompt me:

    Fatal error: git repository not found.
    

    Even though,

    git branch -r
    

    is also giving me same error.