Android AOSP Source Code Download and Build
Today I am going to discuss how to download and build Android Source code. I will also share info on how to run Emulator on generated AOSP source image. I am sharing step by step approach for download and build.
Step to download android source code(AOSP) in Ubuntu
1. First, create one folder like “aosp-m” to copy AOSP code in your machine.
2. Open terminal(Ctrl+Alt+T) and change your Dir to latest created Dir let say “aosp-m”
3. After that Run the following command in terminal:-
git clone git://gitz01/cm/download/android/manifest
if this link does not work then try this one
repo init -u https://android.googlesource.com/platform/manifest
4. Run Following command in terminal one by one
git config — global user.name “Your Name”
git config — global user.email “you@example.com”
5. then run following command
repo init -u git://gitz01/cm/download/android/manifest -b master -m identifiedmanifest.xml
if this link does not work then try this one
repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r78
here you can replace identifiedmanifest.xml to your desired AOSP source code, Let Say “android-6.0.1_r10.xml” this is the code name of marshmallow.
6. and in the last run “repo sync” command. This command starts downloading your desired AOSP code in your machine. This operation takes more than 1 hour (depending on your INTERNET connection speed) to download source code.
Note:- Sometime just copy-paste not work properly in the terminal, in that case, you type these commands.
Thanks for the support ! :)