Building an AOSP Rom – Baby steps

16 Oct 2011

Ref:

http://source.android.com/source/initializing.html

Setting up a Linux build environment

 

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" 
sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner" 
sudo apt-get update 
sudo apt-get install sun-java6-jdk

curl https://android.git.kernel.org/repo > ~/bin/repo $ chmod a+x ~/bin/repo[/code][/code]

The repo was missing on the site, so got it from an alternate location: [/code][/code]

curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo[/code]

[/code]

[email protected]:~/android_source$ repo init -u git://android.git.kernel.org/platform/manifest.git
Getting manifest ...
from git://android.git.kernel.org/platform/manifest.git
android.git.kernel.org[0: 149.20.4.77]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
fatal: cannot obtain manifest git://android.git.kernel.org/platform/manifest.git[/code]

Seems the manifest is missing. But fortunately, Google has mirrored it to https://github.com/android/platform_manifest[/code]

(Thanks, gen_scheisskopf at Xda for the info)[/code]

[email protected]:~$ repo init -u https://github.com/android/platform_manifest.git[/code]

Getting repo ...
from git://codeaurora.org/tools/repo.git
remote: Counting objects: 1116, done.
remote: Compressing objects: 100% (420/420), done.
remote: Total 1116 (delta 681), reused 1068 (delta 674)
Receiving objects: 100% (1116/1116), 392.38 KiB | 104 KiB/s, done.
Resolving deltas: 100% (681/681), done.
From git://codeaurora.org/tools/repo
* [new branch] master -> origin/master
* [new branch] stable -> origin/stable
* [new tag] v1.6.8.1 -> v1.6.8.1
* [new tag] v1.7.5 -> v1.7.5
From git://codeaurora.org/tools/repo
* [new tag] v1.0 -> v1.0
* [new tag] v1.0.1 -> v1.0.1
* [new tag] v1.0.2 -> v1.0.2
* [new tag] v1.0.3 -> v1.0.3
* [new tag] v1.0.4 -> v1.0.4
* [new tag] v1.0.5 -> v1.0.5
* [new tag] v1.0.6 -> v1.0.6
* [new tag] v1.0.7 -> v1.0.7
* [new tag] v1.0.8 -> v1.0.8
* [new tag] v1.0.9 -> v1.0.9
* [new tag] v1.1 -> v1.1
* [new tag] v1.2 -> v1.2
* [new tag] v1.3 -> v1.3
* [new tag] v1.3.1 -> v1.3.1
* [new tag] v1.3.2 -> v1.3.2
* [new tag] v1.4 -> v1.4
* [new tag] v1.4.1 -> v1.4.1
* [new tag] v1.4.2 -> v1.4.2
* [new tag] v1.4.3 -> v1.4.3
* [new tag] v1.4.4 -> v1.4.4
* [new tag] v1.5 -> v1.5
* [new tag] v1.5.1 -> v1.5.1
* [new tag] v1.6 -> v1.6
* [new tag] v1.6.1 -> v1.6.1
* [new tag] v1.6.10 -> v1.6.10
* [new tag] v1.6.10.1 -> v1.6.10.1
* [new tag] v1.6.10.2 -> v1.6.10.2
* [new tag] v1.6.2 -> v1.6.2
* [new tag] v1.6.3 -> v1.6.3
* [new tag] v1.6.4 -> v1.6.4
* [new tag] v1.6.5 -> v1.6.5
* [new tag] v1.6.6 -> v1.6.6
* [new tag] v1.6.7 -> v1.6.7
* [new tag] v1.6.7.1 -> v1.6.7.1
* [new tag] v1.6.7.2 -> v1.6.7.2
* [new tag] v1.6.7.3 -> v1.6.7.3
* [new tag] v1.6.7.4 -> v1.6.7.4
* [new tag] v1.6.7.5 -> v1.6.7.5
* [new tag] v1.6.8 -> v1.6.8
* [new tag] v1.6.8.10 -> v1.6.8.10
* [new tag] v1.6.8.11 -> v1.6.8.11
* [new tag] v1.6.8.2 -> v1.6.8.2
* [new tag] v1.6.8.3 -> v1.6.8.3
* [new tag] v1.6.8.4 -> v1.6.8.4
* [new tag] v1.6.8.5 -> v1.6.8.5
* [new tag] v1.6.8.6 -> v1.6.8.6
* [new tag] v1.6.8.7 -> v1.6.8.7
* [new tag] v1.6.8.8 -> v1.6.8.8
* [new tag] v1.6.8.9 -> v1.6.8.9
* [new tag] v1.6.9 -> v1.6.9
* [new tag] v1.6.9.1 -> v1.6.9.1
* [new tag] v1.6.9.2 -> v1.6.9.2
* [new tag] v1.6.9.3 -> v1.6.9.3
* [new tag] v1.6.9.4 -> v1.6.9.4
* [new tag] v1.6.9.5 -> v1.6.9.5
* [new tag] v1.6.9.6 -> v1.6.9.6
* [new tag] v1.6.9.7 -> v1.6.9.7
* [new tag] v1.6.9.8 -> v1.6.9.8
* [new tag] v1.7 -> v1.7
* [new tag] v1.7.1 -> v1.7.1
* [new tag] v1.7.2 -> v1.7.2
* [new tag] v1.7.3 -> v1.7.3
* [new tag] v1.7.3.1 -> v1.7.3.1
* [new tag] v1.7.4 -> v1.7.4
* [new tag] v1.7.4.1 -> v1.7.4.1
* [new tag] v1.7.4.2 -> v1.7.4.2
* [new tag] v1.7.4.3 -> v1.7.4.3
Getting manifest ...
from https://github.com/android/platform_manifest.git
remote: Counting objects: 874, done.
remote: Compressing objects: 100% (359/359), done.
remote: Total 874 (delta 369), reused 853 (delta 351)
Receiving objects: 100% (874/874), 284.60 KiB | 99 KiB/s, done.
Resolving deltas: 100% (369/369), done.
From https://github.com/android/platform_manifest
* [new branch] android-1.5 -> origin/android-1.5
* [new branch] android-1.5r2 -> origin/android-1.5r2
* [new branch] android-1.5r3 -> origin/android-1.5r3
* [new branch] android-1.5r4 -> origin/android-1.5r4
* [new branch] android-1.6_r1 -> origin/android-1.6_r1
* [new branch] android-1.6_r1.1 -> origin/android-1.6_r1.1
* [new branch] android-1.6_r1.2 -> origin/android-1.6_r1.2
* [new branch] android-1.6_r1.3 -> origin/android-1.6_r1.3
* [new branch] android-1.6_r1.4 -> origin/android-1.6_r1.4
* [new branch] android-1.6_r1.5 -> origin/android-1.6_r1.5
* [new branch] android-1.6_r2 -> origin/android-1.6_r2
* [new branch] android-2.0.1_r1 -> origin/android-2.0.1_r1
* [new branch] android-2.0_r1 -> origin/android-2.0_r1
* [new branch] android-2.1_r1 -> origin/android-2.1_r1
* [new branch] android-2.1_r2 -> origin/android-2.1_r2
* [new branch] android-2.1_r2.1p -> origin/android-2.1_r2.1p
* [new branch] android-2.1_r2.1p2 -> origin/android-2.1_r2.1p2
* [new branch] android-2.1_r2.1s -> origin/android-2.1_r2.1s
* [new branch] android-2.2.1_r1 -> origin/android-2.2.1_r1
* [new branch] android-2.2.1_r2 -> origin/android-2.2.1_r2
* [new branch] android-2.2.2_r1 -> origin/android-2.2.2_r1
* [new branch] android-2.2_r1 -> origin/android-2.2_r1
* [new branch] android-2.2_r1.1 -> origin/android-2.2_r1.1
* [new branch] android-2.2_r1.2 -> origin/android-2.2_r1.2
* [new branch] android-2.2_r1.3 -> origin/android-2.2_r1.3
* [new branch] android-2.3.1_r1 -> origin/android-2.3.1_r1
* [new branch] android-2.3.2_r1 -> origin/android-2.3.2_r1
* [new branch] android-2.3.3_r1 -> origin/android-2.3.3_r1
* [new branch] android-2.3.3_r1.1 -> origin/android-2.3.3_r1.1
* [new branch] android-2.3.4_r0.9 -> origin/android-2.3.4_r0.9
* [new branch] android-2.3.4_r1 -> origin/android-2.3.4_r1
* [new branch] android-2.3.5_r1 -> origin/android-2.3.5_r1
* [new branch] android-2.3_r1 -> origin/android-2.3_r1
* [new branch] android-adt-0.9.8 -> origin/android-adt-0.9.8
* [new branch] android-adt-0.9.9 -> origin/android-adt-0.9.9
* [new branch] android-cts-2.1_r2 -> origin/android-cts-2.1_r2
* [new branch] android-cts-2.1_r3 -> origin/android-cts-2.1_r3
* [new branch] android-cts-2.1_r4 -> origin/android-cts-2.1_r4
* [new branch] android-cts-2.1_r5 -> origin/android-cts-2.1_r5
* [new branch] android-cts-2.2_r1 -> origin/android-cts-2.2_r1
* [new branch] android-cts-2.2_r2 -> origin/android-cts-2.2_r2
* [new branch] android-cts-2.2_r3 -> origin/android-cts-2.2_r3
* [new branch] android-cts-2.2_r4 -> origin/android-cts-2.2_r4
* [new branch] android-cts-2.2_r5 -> origin/android-cts-2.2_r5
* [new branch] android-cts-2.2_r6 -> origin/android-cts-2.2_r6
* [new branch] android-cts-2.2_r7 -> origin/android-cts-2.2_r7
* [new branch] android-cts-2.3_r1 -> origin/android-cts-2.3_r1
* [new branch] android-cts-2.3_r2 -> origin/android-cts-2.3_r2
* [new branch] android-cts-2.3_r3 -> origin/android-cts-2.3_r3
* [new branch] android-cts-2.3_r4 -> origin/android-cts-2.3_r4
* [new branch] android-cts-2.3_r5 -> origin/android-cts-2.3_r5
* [new branch] android-sdk-1.5-pre -> origin/android-sdk-1.5-pre
* [new branch] android-sdk-1.5_r1 -> origin/android-sdk-1.5_r1
* [new branch] android-sdk-1.5_r3 -> origin/android-sdk-1.5_r3
* [new branch] android-sdk-1.6-docs_r1 -> origin/android-sdk-1.6-docs_r1
* [new branch] android-sdk-1.6_r1 -> origin/android-sdk-1.6_r1
* [new branch] android-sdk-1.6_r2 -> origin/android-sdk-1.6_r2
* [new branch] android-sdk-2.0.1-docs_r1 -> origin/android-sdk-2.0.1-docs_r1
* [new branch] android-sdk-2.0.1_r1 -> origin/android-sdk-2.0.1_r1
* [new branch] android-sdk-2.0_r1 -> origin/android-sdk-2.0_r1
* [new branch] android-sdk-2.1_r1 -> origin/android-sdk-2.1_r1
* [new branch] android-sdk-2.2_r1 -> origin/android-sdk-2.2_r1
* [new branch] android-sdk-2.2_r2 -> origin/android-sdk-2.2_r2
* [new branch] android-sdk-2.3.4_r1 -> origin/android-sdk-2.3.4_r1
* [new branch] android-sdk-adt_r12 -> origin/android-sdk-adt_r12
* [new branch] android-sdk-tools_r12 -> origin/android-sdk-tools_r12
* [new branch] android-sdk-tools_r2 -> origin/android-sdk-tools_r2
* [new branch] android-sdk-tools_r3 -> origin/android-sdk-tools_r3
* [new branch] android-sdk-tools_r4 -> origin/android-sdk-tools_r4
* [new branch] android-sdk-tools_r5 -> origin/android-sdk-tools_r5
* [new branch] android-sdk-tools_r6 -> origin/android-sdk-tools_r6
* [new branch] android-sdk-tools_r7 -> origin/android-sdk-tools_r7
* [new branch] cdma-import -> origin/cdma-import
* [new branch] cupcake -> origin/cupcake
* [new branch] cupcake-release -> origin/cupcake-release
* [new branch] donut -> origin/donut
* [new branch] donut-plus-aosp -> origin/donut-plus-aosp
* [new branch] eclair -> origin/eclair
* [new branch] froyo -> origin/froyo
* [new branch] froyo-plus-aosp -> origin/froyo-plus-aosp
* [new branch] gingerbread -> origin/gingerbread
* [new branch] master -> origin/master
* [new branch] release-1.0 -> origin/release-1.0
* [new branch] tools-adt_r11 -> origin/tools-adt_r11
* [new branch] tools_r10 -> origin/tools_r10
* [new branch] tools_r11 -> origin/tools_r11
* [new branch] tools_r12 -> origin/tools_r12
* [new branch] tools_r13 -> origin/tools_r13
* [new branch] tools_r7 -> origin/tools_r7
* [new branch] tools_r8 -> origin/tools_r8
* [new branch] tools_r9 -> origin/tools_r9
* [new tag] android-1.5 -> android-1.5
* [new tag] android-1.5r2 -> android-1.5r2
* [new tag] android-1.5r3 -> android-1.5r3
* [new tag] android-1.5r4 -> android-1.5r4
* [new tag] android-1.6_r1 -> android-1.6_r1
* [new tag] android-1.6_r1.1 -> android-1.6_r1.1
* [new tag] android-1.6_r1.2 -> android-1.6_r1.2
* [new tag] android-1.6_r1.3 -> android-1.6_r1.3
* [new tag] android-1.6_r1.4 -> android-1.6_r1.4
* [new tag] android-1.6_r1.5 -> android-1.6_r1.5
* [new tag] android-1.6_r2 -> android-1.6_r2
* [new tag] android-2.0.1_r1 -> android-2.0.1_r1
* [new tag] android-2.0_r1 -> android-2.0_r1
* [new tag] android-2.1_r1 -> android-2.1_r1
* [new tag] android-2.1_r2 -> android-2.1_r2
* [new tag] android-2.1_r2.1p -> android-2.1_r2.1p
* [new tag] android-2.1_r2.1p2 -> android-2.1_r2.1p2
* [new tag] android-2.1_r2.1s -> android-2.1_r2.1s
* [new tag] android-2.2.1_r1 -> android-2.2.1_r1
* [new tag] android-2.2.1_r2 -> android-2.2.1_r2
* [new tag] android-2.2.2_r1 -> android-2.2.2_r1
* [new tag] android-2.2_r1 -> android-2.2_r1
* [new tag] android-2.2_r1.1 -> android-2.2_r1.1
* [new tag] android-2.2_r1.2 -> android-2.2_r1.2
* [new tag] android-2.2_r1.3 -> android-2.2_r1.3
* [new tag] android-2.3.1_r1 -> android-2.3.1_r1
* [new tag] android-2.3.2_r1 -> android-2.3.2_r1
* [new tag] android-2.3.3_r1.1 -> android-2.3.3_r1.1
* [new tag] android-2.3.3_r1a -> android-2.3.3_r1a
* [new tag] android-2.3.4_r0.9 -> android-2.3.4_r0.9
* [new tag] android-2.3.4_r1 -> android-2.3.4_r1
* [new tag] android-2.3.5_r1 -> android-2.3.5_r1
* [new tag] android-2.3_r1 -> android-2.3_r1
* [new tag] android-adt-0.9.8 -> android-adt-0.9.8
* [new tag] android-adt-0.9.9 -> android-adt-0.9.9
* [new tag] android-cts-2.1_r2 -> android-cts-2.1_r2
* [new tag] android-cts-2.1_r3 -> android-cts-2.1_r3
* [new tag] android-cts-2.1_r4 -> android-cts-2.1_r4
* [new tag] android-cts-2.1_r5 -> android-cts-2.1_r5
* [new tag] android-cts-2.2_r1 -> android-cts-2.2_r1
* [new tag] android-cts-2.2_r2 -> android-cts-2.2_r2
* [new tag] android-cts-2.2_r3 -> android-cts-2.2_r3
* [new tag] android-cts-2.2_r4 -> android-cts-2.2_r4
* [new tag] android-cts-2.2_r5 -> android-cts-2.2_r5
* [new tag] android-cts-2.2_r6 -> android-cts-2.2_r6
* [new tag] android-cts-2.2_r7 -> android-cts-2.2_r7
* [new tag] android-cts-2.3_r1 -> android-cts-2.3_r1
* [new tag] android-cts-2.3_r2 -> android-cts-2.3_r2
* [new tag] android-cts-2.3_r3 -> android-cts-2.3_r3
* [new tag] android-cts-2.3_r4 -> android-cts-2.3_r4
* [new tag] android-cts-2.3_r5 -> android-cts-2.3_r5
* [new tag] android-sdk-1.5-pre -> android-sdk-1.5-pre
* [new tag] android-sdk-1.5_r1 -> android-sdk-1.5_r1
* [new tag] android-sdk-1.5_r3 -> android-sdk-1.5_r3
* [new tag] android-sdk-1.6-docs_r1 -> android-sdk-1.6-docs_r1
* [new tag] android-sdk-1.6_r1 -> android-sdk-1.6_r1
* [new tag] android-sdk-1.6_r2 -> android-sdk-1.6_r2
* [new tag] android-sdk-2.0.1-docs_r1 -> android-sdk-2.0.1-docs_r1
* [new tag] android-sdk-2.0.1_r1 -> android-sdk-2.0.1_r1
* [new tag] android-sdk-2.0_r1 -> android-sdk-2.0_r1
* [new tag] android-sdk-2.1_r1 -> android-sdk-2.1_r1
* [new tag] android-sdk-2.2_r1 -> android-sdk-2.2_r1
* [new tag] android-sdk-2.2_r2 -> android-sdk-2.2_r2
* [new tag] android-sdk-2.3.4_r1 -> android-sdk-2.3.4_r1
* [new tag] android-sdk-adt_r12 -> android-sdk-adt_r12
* [new tag] android-sdk-tools_r12 -> android-sdk-tools_r12
* [new tag] android-sdk-tools_r2 -> android-sdk-tools_r2
* [new tag] android-sdk-tools_r3 -> android-sdk-tools_r3
* [new tag] android-sdk-tools_r4 -> android-sdk-tools_r4
* [new tag] android-sdk-tools_r5 -> android-sdk-tools_r5
* [new tag] android-sdk-tools_r6 -> android-sdk-tools_r6
* [new tag] android-sdk-tools_r7 -> android-sdk-tools_r7
From https://github.com/android/platform_manifest
* [new tag] android-1.0 -> android-1.0
* [new tag] android-2.3.3_r1 -> android-2.3.3_r1

Your Name [Droid Zone]: dz
Your Email [[email protected]]: [email protected]

Your identity is: dz <[email protected]>
is this correct [y/n]? y

Testing colorized output (for 'repo diff', 'repo status'):
black red green yellow blue magenta cyan white
bold dim ul reverse
Enable color display in this user account (y/n)? y

repo initialized in /home/droidzone[/code]

Ok, test is a success.[/code]

Once again, I'll try because I want only Gingerbread[/code]

repo init -u https://github.com/android/platform_manifest.git -b gingerbread[/code]

[/code]

repo sync again lands in trouble[/code]

[email protected]:~/android_source$ repo sync
android.git.kernel.org[0: 149.20.4.77]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
error: Cannot fetch platform/bionic[/code]

[/code]

[/code]

[/code]


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.