[Tutorial] Compile ICS on Ubuntu

Search This thread

dastin1015

Inactive Recognized Developer
To compile Ice Cream Sandwich on Ubuntu I'm going to first give you steps to set up your computer to get this thing rolling.

This will NOT make a fully functional ROM, but will give you a place to start. Also I CANNOT fix every error you run into.

Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 80GB (or more) for a full set of builds.

1) You need the following:
-JDK 6 if you wish to build Ice Cream Sandwich. You can download it from java.sun.com. Or:
Code:
$ sudo apt-get install sun-java6-jdk

-Python 2.4 -- 2.7, which you can download from python.org. Or:
Code:
$ sudo apt-get install python

-Git 1.7 or newer. You can find it at git-scm.com. Or:
Code:
$ sudo apt-get install git-core

2) Install required packages. 64-bit (recommended)
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
  x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
  libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
  libxml2-utils

On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

3) Configure your USB.
Code:
$ gksudo gedit /etc/udev/rules.d/51-android.rules

Inside of this blank text file insert:
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"

#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"

#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"

#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"

#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"

#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"

#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"

#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"

#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"

#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"

#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"

#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"

#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"

#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"

#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"

#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"

#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"

#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"

#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"

#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"

#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"

#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"

#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"

#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"

#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"

#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"

#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"

#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"

4) Save the file and close it and then issue this command:
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules

5) Install the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

6) Initialize the repo:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1

7) When prompted, enter your real name and email address.

8) Gather the files:
Code:
$ repo sync

9) Compiling:
Code:
$ source build/envsetup.sh

Or:
Code:
$ . build/envsetup.sh

10) Issue:
Code:
$ lunch

11) Pick your poison.

12) Now issue:
Code:
$ make -j1


~How To Add A Device To The List~

1) Find the github for your device you wish to add. (For me it is the HTC Hero CDMA)

2) Now navigate to the location you are going clone the device tree to:
Code:
$ cd WORKING_DIRECTORY/device
$ mkdir htc

3) Clone the github device tree from remote to local: (The heroc would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [passion], Nexus S [crespo], Motorola Droid [sholes], HTC Incredible [inc], etc.)
Code:
$ git clone git://github.com/TeamICS/android_device_htc_heroc.git heroc

4) Now navigate into the folder:
Code:
$ cd heroc

5) Connect phone to computer and make sure USB debugging is enabled and you have adb set up.

6) Extract Device Proprietary Files:
Code:
$ ./extract-files.sh

7) Navigate back to your home directory for building:
Code:
$ cd ~/WORKING_DIRECTORY

8) Prepare To Compile:
Code:
$ source build/envsetup.sh

Or:
Code:
$ . build/envsetup.sh

9) Get your list of devices:
Code:
$ lunch

10) Pick your poison.

11) Now compile:
Code:
$ make -j1

Or for a flashable zip:
Code:
$ make -j1 otapackage

~NOTE~
If you are running into issues such as:

Code:
Which would you like? [full-eng] 5
build/core/product_config.mk:209: *** No matches for product "full_shooter".  Stop.
Device shooter not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for shooter not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
build/core/product_config.mk:209: *** No matches for product "full_shooter".  Stop.

** Don't have a product spec for: 'full_shooter'
** Do you have the right repo manifest?

What you need to do is to edit your blob to match the PRODUCT_NAME to the file name. For example with mine I have full_shooter.mk therefore in this file I need to have PRODUCT_NAME to match it. Whatever error it is looking for you just need to change the PRODUCT_NAME line to match what the error shows.
 
Last edited:

cdesai

Inactive Recognized Developer
Jan 16, 2011
2,296
4,089
IN YOUR HEAD
Quite aware, but since source has come out I've been working on this with others and from what we have seen 'make -j1' causes less errors than any other make command.

Yea, it all depends on your machine

Also, maybe you can add this
AOSP source is synced at 4 jobs by default, and it is quite uncomfortable for people having a slow connection(makes it worse)

So, do this:
You need to edit the default.xml file
Its in WORKING_DIRECTORY/.repo/manifests/default.xml (notice the "." in front of repo)

You can edit it to change the default job no.:
Fire up Terminal
Copy/paste this:
Code:
gedit WORKING_DIRECTORY/.repo/manifests/default.xml
Change the default no. of jobs in this line

Code:
<default revision="refs/tags/android-4.0.1_r1"
           remote="aosp"
           [B][U]sync-j="4" />[/U][/B]
Change four to your preferred number.

Done!
 
  • Like
Reactions: dastin1015

dmeadows013

Inactive Recognized Developer
Sep 27, 2010
2,491
3,791
Hoboken, NJ
epicandroidroms.blogspot.com
When I attempt to add my device (inc or vigor) I am given an error that the source cannot be found. I checked the Github repo and found that only the Hero and Desire are listed there. How would I go about adding the device to /devices/htc myself?
 

dastin1015

Inactive Recognized Developer
You said 64bit recommended, does this mean 32bit will work? I thought gingerbread and newer REQUIRED 64bit.

32 bit will now work.

When I attempt to add my device (inc or vigor) I am given an error that the source cannot be found. I checked the Github repo and found that only the Hero and Desire are listed there. How would I go about adding the device to /devices/htc myself?

You need to use your own github source. You can use Cyanogenmod's because our TeamICS only supports Hero CDMA, Hero GSM, and Droid Eris.
 
  • Like
Reactions: GuneetAtwal

KnowledgeBroker

Senior Member
Sep 7, 2010
1,618
731
Daytona Beach, Fl
Samsung Galaxy S8+
To compile Ice Cream Sandwich on Ubuntu I'm going to first give you steps to set up your computer to get this thing rolling.

This will NOT make a fully functional ROM, but will give you a place to start. Also I CANNOT fix every error you run into.

Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 80GB (or more) for a full set of builds.

1) You need the following:
-JDK 6 if you wish to build Ice Cream Sandwich. You can download it from java.sun.com. Or:
Code:
$ sudo apt-get install sun-java6-jdk

-Python 2.4 -- 2.7, which you can download from python.org. Or:
Code:
$ sudo apt-get install python

-Git 1.7 or newer. You can find it at git-scm.com. Or:
Code:
$ sudo apt-get install git-core

2) Install required packages. 64-bit (recommended)
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
  x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
  libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
  libxml2-utils

On newer versions of Ubuntu such as 11.10 you may need to do the following:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

3) Configure your USB.
Code:
$ gksudo gedit /etc/udev/rules.d/51-android.rules

Inside of this blank text file insert:
For all HTC Models:
Code:
#Acer
SUBSYSTEM==usb, SYSFS{idVendor}==0502, MODE=0666

#ASUS
SUBSYSTEM==usb, SYSFS{idVendor}==0b05, MODE=0666

#Dell
SUBSYSTEM==usb, SYSFS{idVendor}==413c, MODE=0666

#Foxconn
SUBSYSTEM==usb, SYSFS{idVendor}==0489, MODE=0666

#Garmin-Asus
SUBSYSTEM==usb, SYSFS{idVendor}==091E, MODE=0666

#Google
SUBSYSTEM==usb, SYSFS{idVendor}==18d1, MODE=0666

#HTC
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

#Huawei
SUBSYSTEM==usb, SYSFS{idVendor}==12d1, MODE=0666

#K-Touch
SUBSYSTEM==usb, SYSFS{idVendor}==24e3, MODE=0666

#KT Tech
SUBSYSTEM==usb, SYSFS{idVendor}==2116, MODE=0666

#Kyocera
SUBSYSTEM==usb, SYSFS{idVendor}==0482, MODE=0666

#Lenevo
SUBSYSTEM==usb, SYSFS{idVendor}==17EF, MODE=0666

#LG
SUBSYSTEM==usb, SYSFS{idVendor}==1004, MODE=0666

#Motorola
SUBSYSTEM==usb, SYSFS{idVendor}==22b8, MODE=0666

#NEC
SUBSYSTEM==usb, SYSFS{idVendor}==0409, MODE=0666

#Nook
SUBSYSTEM==usb, SYSFS{idVendor}==2080, MODE=0666

#Nvidia
SUBSYSTEM==usb, SYSFS{idVendor}==0955, MODE=0666

#OTGV
SUBSYSTEM==usb, SYSFS{idVendor}==2257, MODE=0666

#Pantech
SUBSYSTEM==usb, SYSFS{idVendor}==10A9, MODE=0666

#Philips
SUBSYSTEM==usb, SYSFS{idVendor}==0471, MODE=0666

#PMC-Sierra
SUBSYSTEM==usb, SYSFS{idVendor}==04da, MODE=0666

#Qualcomm
SUBSYSTEM==usb, SYSFS{idVendor}==05c6, MODE=0666

#SK Telesys
SUBSYSTEM==usb, SYSFS{idVendor}==1f53, MODE=0666

#Samsung
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666

#Sharp
SUBSYSTEM==usb, SYSFS{idVendor}==04dd, MODE=0666

#Sony Ericsson
SUBSYSTEM==usb, SYSFS{idVendor}==0fce, MODE=0666

#Toshiba
SUBSYSTEM==usb, SYSFS{idVendor}==0930, MODE=0666

#ZTE
SUBSYSTEM==usb, SYSFS{idVendor}==19D2, MODE=0666

4) Save the file and close it and then issue this command:
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules

5) Install the repo:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

6) Initialize the repo:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1

7) When prompted, please configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.

8) Gather the files:
Code:
$ repo sync

9) Compiling:
Code:
$ source build/envsetup.sh

Or:
Code:
$ . build/envsetup.sh

10) Issue:
Code:
$ lunch

11) Pick your poison.

12) Now issue:
Code:
$ make

Please note that you have already selected your build target with lunch, and it is unlikely at best to run on a different target than it was built for.


~How To Add A Device To The List~

1) Find the github for your device you wish to add. (For me it is the HTC Hero CDMA)

2) Now navigate to the location you are going clone the device tree to:
Code:
$ cd WORKING_DIRECTORY/device
$ mkdir htc

3) Clone the github device tree from remote to local: (The heroc would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [Passion], Nexus S [Crespo], Motorola Droid [Sholes], HTC Incredible [Inc], etc.)
Code:
$ git clone git://github.com/TeamICS/android_device_htc_heroc.git heroc

4) Now navigate into the folder:
Code:
$ cd heroc

5) Connect phone to computer and make sure USB debugging is enabled and you have adb set up.

6) Extract Device Proprietary Files:
Code:
$ ./extract-files.sh

7) Navigate back to your home directory for building:
Code:
$ cd ~/WORKING_DIRECTORY

8) Prepare To Compile:
Code:
$ source build/envsetup.sh

Or:
Code:
$ . build/envsetup.sh

9) Get your list of devices:
Code:
$ lunch

10) Pick your poison.

11) Now compile:
Code:
$ make -j1

Or for a flashable zip:
Code:
$ make -j1 otapackage

First, thanks for gathering just about everything I needed in one place, I had gotten pretty far in the process on windows before I decided doing it in windows was a stupid idea..

When I ran this-- 2) Install required packages. 64-bit (recommended)
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
  x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
  libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
  libxml2-utils
I got back some errors, but I think these things were already loaded, or it was because I hadn't approved the sources..? Not sure, but I'm downloading the source now so it couldn't be THAT important(yet). I'm using ubuntu 11.10 if that helps at all.

At this point: 9) Compiling:
Code:
$ source build/envsetup.sh

Or:
Code:
$ . build/envsetup.sh
could I have done
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r
and just be downloading ICS source? Because at the moment, it looks like it is downloading the source for all of the previous android source too.. isn't a bad thing, but I only made my partition 100gb in size because i was going to just work with ICS.
I'll probably go through this thread a little more throughly and do some other research while this download is going on-- thanks again for putting this thread together!
 

dastin1015

Inactive Recognized Developer
Well the Vigor (Rezound) was just released, so it is not yet on the CM source. Do I need the kernel source to get what I need?

You need more than the kernel. You need vendor files as well. Vendor files tell what your phones hardware is and how to build, etc. You usually get this from CM when they support your phone.

私のエボ3Dから送信される。
 

lanternslight456

Senior Member
Jan 14, 2011
868
522
www.androidinsomnia.com
3) Clone the github device tree from remote to local: (The heroc would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [Passion], Nexus S [Crespo], Motorola Droid [Sholes], HTC Incredible [Inc], etc.)

Ok, I'm looking for this, and I'm building for the htc glacier (mytouch 4g) I'm really new to this and looking for this on github. I've tried searching for glacier, mytouch 4g, mytouch, and several other derivatives and can't figure out what I'm supposed to find, it's mostly people's kernels. Can you give a little further guidance or clarification on this? For a new person to compiling from source. Thanks.
 

dastin1015

Inactive Recognized Developer
Ok, I'm looking for this, and I'm building for the htc glacier (mytouch 4g) I'm really new to this and looking for this on github. I've tried searching for glacier, mytouch 4g, mytouch, and several other derivatives and can't figure out what I'm supposed to find, it's mostly people's kernels. Can you give a little further guidance or clarification on this? For a new person to compiling from source. Thanks.

It's 4am where I'm at right now and I need some sleep and have class from noon to 4pm, but after that I will elaborate upon that.

私のエボ3Dから送信される。
 
  • Like
Reactions: GuneetAtwal

cdesai

Inactive Recognized Developer
Jan 16, 2011
2,296
4,089
IN YOUR HEAD
Ok, I'm looking for this, and I'm building for the htc glacier (mytouch 4g) I'm really new to this and looking for this on github. I've tried searching for glacier, mytouch 4g, mytouch, and several other derivatives and can't figure out what I'm supposed to find, it's mostly people's kernels. Can you give a little further guidance or clarification on this? For a new person to compiling from source. Thanks.
Here you go:

https://github.com/CyanogenMod/android_device_htc_glacier


clone this to WORKING_DIRECTORY/device/htc/glacier (make the folder if it doesnt exist)

You'll need to tweak few things before you can successfully build, like tweaking the overlay for AOSP ICS
 
  • Like
Reactions: lanternslight456

SWEATTAIMI

Senior Member
Oct 19, 2010
2,051
379
W4ZT3D
Package sun-java6-jdk has no installation candidate

I just had trouble to install the Sun Java6 JDK after updating to Ubuntu 10.04. The problem was that the system couldn’t find the package sun-java6-sdk and apt-get gave me the message:

Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate

What I did to solve this problem was to add a new source

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

After that a normal

sudo apt-get update
sudo apt-get install sun-java6-jdk
 

Sorrell

New member
Oct 10, 2011
3
1
I'm really sorry for the stupid question, but I can't seem to find the answer for this.

I'm using Ubuntu 11.10 64bit and I'm trying to get all the dependencies together so I can start playing. I already have all the repos in the default /etc/apt/sources.list enabled and get this feedback when I run
Code:
 apt-get install lib32readline5-dev

Code:
Package lib32readline5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  lib32readline-gplv2-dev

E: Package 'lib32readline5-dev' has no installation candidate

My question is do I have to get the package "lib32readline5-dev" or can I use the replacement package that apt recommends "lib32readline-gplv2-dev".

This post seems to suggest that it will work but I just wanted to make sure before I cause a huge problem for myself. :)
http://xdaforums.com/showpost.php?p=18631398&postcount=401

Also here is the package information from Ubuntu

http://packages.ubuntu.com/natty/lib32readline5-dev

http://packages.ubuntu.com/oneiric/lib32readline-gplv2-dev

they look like they do the same thing from the description.


Thanks for having patience and understanding with a N00b, and for all the work that you already put into this post, the information on this site is great.
--Sorrell
 
  • Like
Reactions: Denkai

dastin1015

Inactive Recognized Developer
I'm really sorry for the stupid question, but I can't seem to find the answer for this.

I'm using Ubuntu 11.10 64bit and I'm trying to get all the dependencies together so I can start playing. I already have all the repos in the default /etc/apt/sources.list enabled and get this feedback when I run
Code:
 apt-get install lib32readline5-dev

Code:
Package lib32readline5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  lib32readline-gplv2-dev

E: Package 'lib32readline5-dev' has no installation candidate

My question is do I have to get the package "lib32readline5-dev" or can I use the replacement package that apt recommends "lib32readline-gplv2-dev".

This post seems to suggest that it will work but I just wanted to make sure before I cause a huge problem for myself. :)
http://xdaforums.com/showpost.php?p=18631398&postcount=401

Also here is the package information from Ubuntu

http://packages.ubuntu.com/natty/lib32readline5-dev

http://packages.ubuntu.com/oneiric/lib32readline-gplv2-dev

they look like they do the same thing from the description.


Thanks for having patience and understanding with a N00b, and for all the work that you already put into this post, the information on this site is great.
--Sorrell

You'd be fine using this:
Code:
$ sudo apt-get install lib32readline-gplv2-dev

I've been compiling without it and I've been fine, but I'm adding now.
 

Sorrell

New member
Oct 10, 2011
3
1
Great, I think I`m ready to start breaking things now... lets hope I don't make my cappy useless. :)
 

stelios97

Inactive Recognized Developer
Feb 16, 2011
1,470
4,389
27
Famagusta
x10miniandpro.blogspot.com
i set up everything using your guide but i get an error when trying to build! see the screenhot!
2FcLv.png
 

Attachments

  • Screenshot.jpg
    Screenshot.jpg
    38 KB · Views: 394
  • Like
Reactions: Jwtiyar

Top Liked Posts

  • There are no posts matching your filters.
  • 43
    To compile Ice Cream Sandwich on Ubuntu I'm going to first give you steps to set up your computer to get this thing rolling.

    This will NOT make a fully functional ROM, but will give you a place to start. Also I CANNOT fix every error you run into.

    Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 80GB (or more) for a full set of builds.

    1) You need the following:
    -JDK 6 if you wish to build Ice Cream Sandwich. You can download it from java.sun.com. Or:
    Code:
    $ sudo apt-get install sun-java6-jdk

    -Python 2.4 -- 2.7, which you can download from python.org. Or:
    Code:
    $ sudo apt-get install python

    -Git 1.7 or newer. You can find it at git-scm.com. Or:
    Code:
    $ sudo apt-get install git-core

    2) Install required packages. 64-bit (recommended)
    Code:
    $ sudo apt-get install git-core gnupg flex bison gperf build-essential \
      zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
      x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
      libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
      libxml2-utils

    On newer versions of Ubuntu such as 11.10 you may need to do the following:
    Code:
    $ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

    3) Configure your USB.
    Code:
    $ gksudo gedit /etc/udev/rules.d/51-android.rules

    Inside of this blank text file insert:
    Code:
    #Acer
    SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
    
    #ASUS
    SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
    
    #Dell
    SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
    
    #Foxconn
    SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
    
    #Garmin-Asus
    SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
    
    #Google
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
    
    #HTC
    SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
    
    #Huawei
    SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
    
    #K-Touch
    SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
    
    #KT Tech
    SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
    
    #Kyocera
    SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
    
    #Lenevo
    SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
    
    #LG
    SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
    
    #Motorola
    SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
    
    #NEC
    SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
    
    #Nook
    SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
    
    #Nvidia
    SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
    
    #OTGV
    SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
    
    #Pantech
    SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
    
    #Philips
    SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
    
    #PMC-Sierra
    SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
    
    #Qualcomm
    SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
    
    #SK Telesys
    SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
    
    #Samsung
    SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
    
    #Sharp
    SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
    
    #Sony Ericsson
    SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
    
    #Toshiba
    SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
    
    #ZTE
    SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"

    4) Save the file and close it and then issue this command:
    Code:
    $ sudo chmod a+r /etc/udev/rules.d/51-android.rules

    5) Install the repo:
    Code:
    $ mkdir ~/bin
    $ PATH=~/bin:$PATH
    $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo

    6) Initialize the repo:
    Code:
    $ mkdir WORKING_DIRECTORY
    $ cd WORKING_DIRECTORY
    $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1

    7) When prompted, enter your real name and email address.

    8) Gather the files:
    Code:
    $ repo sync

    9) Compiling:
    Code:
    $ source build/envsetup.sh

    Or:
    Code:
    $ . build/envsetup.sh

    10) Issue:
    Code:
    $ lunch

    11) Pick your poison.

    12) Now issue:
    Code:
    $ make -j1


    ~How To Add A Device To The List~

    1) Find the github for your device you wish to add. (For me it is the HTC Hero CDMA)

    2) Now navigate to the location you are going clone the device tree to:
    Code:
    $ cd WORKING_DIRECTORY/device
    $ mkdir htc

    3) Clone the github device tree from remote to local: (The heroc would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [passion], Nexus S [crespo], Motorola Droid [sholes], HTC Incredible [inc], etc.)
    Code:
    $ git clone git://github.com/TeamICS/android_device_htc_heroc.git heroc

    4) Now navigate into the folder:
    Code:
    $ cd heroc

    5) Connect phone to computer and make sure USB debugging is enabled and you have adb set up.

    6) Extract Device Proprietary Files:
    Code:
    $ ./extract-files.sh

    7) Navigate back to your home directory for building:
    Code:
    $ cd ~/WORKING_DIRECTORY

    8) Prepare To Compile:
    Code:
    $ source build/envsetup.sh

    Or:
    Code:
    $ . build/envsetup.sh

    9) Get your list of devices:
    Code:
    $ lunch

    10) Pick your poison.

    11) Now compile:
    Code:
    $ make -j1

    Or for a flashable zip:
    Code:
    $ make -j1 otapackage

    ~NOTE~
    If you are running into issues such as:

    Code:
    Which would you like? [full-eng] 5
    build/core/product_config.mk:209: *** No matches for product "full_shooter".  Stop.
    Device shooter not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
    Repository for shooter not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
    build/core/product_config.mk:209: *** No matches for product "full_shooter".  Stop.
    
    ** Don't have a product spec for: 'full_shooter'
    ** Do you have the right repo manifest?

    What you need to do is to edit your blob to match the PRODUCT_NAME to the file name. For example with mine I have full_shooter.mk therefore in this file I need to have PRODUCT_NAME to match it. Whatever error it is looking for you just need to change the PRODUCT_NAME line to match what the error shows.
    5
    I'm really sorry for the stupid question, but I can't seem to find the answer for this.

    I'm using Ubuntu 11.10 64bit and I'm trying to get all the dependencies together so I can start playing. I already have all the repos in the default /etc/apt/sources.list enabled and get this feedback when I run
    Code:
     apt-get install lib32readline5-dev

    Code:
    Package lib32readline5-dev is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    However the following packages replace it:
      lib32readline-gplv2-dev
    
    E: Package 'lib32readline5-dev' has no installation candidate

    My question is do I have to get the package "lib32readline5-dev" or can I use the replacement package that apt recommends "lib32readline-gplv2-dev".

    This post seems to suggest that it will work but I just wanted to make sure before I cause a huge problem for myself. :)
    http://xdaforums.com/showpost.php?p=18631398&postcount=401

    Also here is the package information from Ubuntu

    http://packages.ubuntu.com/natty/lib32readline5-dev

    http://packages.ubuntu.com/oneiric/lib32readline-gplv2-dev

    they look like they do the same thing from the description.


    Thanks for having patience and understanding with a N00b, and for all the work that you already put into this post, the information on this site is great.
    --Sorrell

    You'd be fine using this:
    Code:
    $ sudo apt-get install lib32readline-gplv2-dev

    I've been compiling without it and I've been fine, but I'm adding now.
    3
    To compile Ice Cream Sandwich on Ubuntu I'm going to first give you steps to set up your computer to get this thing rolling.

    This will NOT make a fully functional ROM, but will give you a place to start. Also I CANNOT fix every error you run into.

    Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 80GB (or more) for a full set of builds.

    1) You need the following:
    -JDK 6 if you wish to build Ice Cream Sandwich. You can download it from java.sun.com. Or:
    Code:
    $ sudo apt-get install sun-java6-jdk

    -Python 2.4 -- 2.7, which you can download from python.org. Or:
    Code:
    $ sudo apt-get install python

    -Git 1.7 or newer. You can find it at git-scm.com. Or:
    Code:
    $ sudo apt-get install git-core

    2) Install required packages. 64-bit (recommended)
    Code:
    $ sudo apt-get install git-core gnupg flex bison gperf build-essential \
      zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
      x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
      libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
      libxml2-utils

    On newer versions of Ubuntu such as 11.10 you may need to do the following:
    Code:
    $ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

    3) Configure your USB.
    Code:
    $ gksudo gedit /etc/udev/rules.d/51-android.rules

    Inside of this blank text file insert:
    For all HTC Models:
    Code:
    #Acer
    SUBSYSTEM==usb, SYSFS{idVendor}==0502, MODE=0666
    
    #ASUS
    SUBSYSTEM==usb, SYSFS{idVendor}==0b05, MODE=0666
    
    #Dell
    SUBSYSTEM==usb, SYSFS{idVendor}==413c, MODE=0666
    
    #Foxconn
    SUBSYSTEM==usb, SYSFS{idVendor}==0489, MODE=0666
    
    #Garmin-Asus
    SUBSYSTEM==usb, SYSFS{idVendor}==091E, MODE=0666
    
    #Google
    SUBSYSTEM==usb, SYSFS{idVendor}==18d1, MODE=0666
    
    #HTC
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
    
    #Huawei
    SUBSYSTEM==usb, SYSFS{idVendor}==12d1, MODE=0666
    
    #K-Touch
    SUBSYSTEM==usb, SYSFS{idVendor}==24e3, MODE=0666
    
    #KT Tech
    SUBSYSTEM==usb, SYSFS{idVendor}==2116, MODE=0666
    
    #Kyocera
    SUBSYSTEM==usb, SYSFS{idVendor}==0482, MODE=0666
    
    #Lenevo
    SUBSYSTEM==usb, SYSFS{idVendor}==17EF, MODE=0666
    
    #LG
    SUBSYSTEM==usb, SYSFS{idVendor}==1004, MODE=0666
    
    #Motorola
    SUBSYSTEM==usb, SYSFS{idVendor}==22b8, MODE=0666
    
    #NEC
    SUBSYSTEM==usb, SYSFS{idVendor}==0409, MODE=0666
    
    #Nook
    SUBSYSTEM==usb, SYSFS{idVendor}==2080, MODE=0666
    
    #Nvidia
    SUBSYSTEM==usb, SYSFS{idVendor}==0955, MODE=0666
    
    #OTGV
    SUBSYSTEM==usb, SYSFS{idVendor}==2257, MODE=0666
    
    #Pantech
    SUBSYSTEM==usb, SYSFS{idVendor}==10A9, MODE=0666
    
    #Philips
    SUBSYSTEM==usb, SYSFS{idVendor}==0471, MODE=0666
    
    #PMC-Sierra
    SUBSYSTEM==usb, SYSFS{idVendor}==04da, MODE=0666
    
    #Qualcomm
    SUBSYSTEM==usb, SYSFS{idVendor}==05c6, MODE=0666
    
    #SK Telesys
    SUBSYSTEM==usb, SYSFS{idVendor}==1f53, MODE=0666
    
    #Samsung
    SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666
    
    #Sharp
    SUBSYSTEM==usb, SYSFS{idVendor}==04dd, MODE=0666
    
    #Sony Ericsson
    SUBSYSTEM==usb, SYSFS{idVendor}==0fce, MODE=0666
    
    #Toshiba
    SUBSYSTEM==usb, SYSFS{idVendor}==0930, MODE=0666
    
    #ZTE
    SUBSYSTEM==usb, SYSFS{idVendor}==19D2, MODE=0666

    4) Save the file and close it and then issue this command:
    Code:
    $ sudo chmod a+r /etc/udev/rules.d/51-android.rules

    5) Install the repo:
    Code:
    $ mkdir ~/bin
    $ PATH=~/bin:$PATH
    $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo

    6) Initialize the repo:
    Code:
    $ mkdir WORKING_DIRECTORY
    $ cd WORKING_DIRECTORY
    $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1

    7) When prompted, please configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.

    8) Gather the files:
    Code:
    $ repo sync

    9) Compiling:
    Code:
    $ source build/envsetup.sh

    Or:
    Code:
    $ . build/envsetup.sh

    10) Issue:
    Code:
    $ lunch

    11) Pick your poison.

    12) Now issue:
    Code:
    $ make

    Please note that you have already selected your build target with lunch, and it is unlikely at best to run on a different target than it was built for.


    ~How To Add A Device To The List~

    1) Find the github for your device you wish to add. (For me it is the HTC Hero CDMA)

    2) Now navigate to the location you are going clone the device tree to:
    Code:
    $ cd WORKING_DIRECTORY/device
    $ mkdir htc

    3) Clone the github device tree from remote to local: (The heroc would be whatever you want that folder to be named so make sure it is whatever standard name would be for your device, example: Nexus One [Passion], Nexus S [Crespo], Motorola Droid [Sholes], HTC Incredible [Inc], etc.)
    Code:
    $ git clone git://github.com/TeamICS/android_device_htc_heroc.git heroc

    4) Now navigate into the folder:
    Code:
    $ cd heroc

    5) Connect phone to computer and make sure USB debugging is enabled and you have adb set up.

    6) Extract Device Proprietary Files:
    Code:
    $ ./extract-files.sh

    7) Navigate back to your home directory for building:
    Code:
    $ cd ~/WORKING_DIRECTORY

    8) Prepare To Compile:
    Code:
    $ source build/envsetup.sh

    Or:
    Code:
    $ . build/envsetup.sh

    9) Get your list of devices:
    Code:
    $ lunch

    10) Pick your poison.

    11) Now compile:
    Code:
    $ make -j1

    Or for a flashable zip:
    Code:
    $ make -j1 otapackage

    First, thanks for gathering just about everything I needed in one place, I had gotten pretty far in the process on windows before I decided doing it in windows was a stupid idea..

    When I ran this-- 2) Install required packages. 64-bit (recommended)
    Code:
    $ sudo apt-get install git-core gnupg flex bison gperf build-essential \
      zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
      x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
      libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
      libxml2-utils
    I got back some errors, but I think these things were already loaded, or it was because I hadn't approved the sources..? Not sure, but I'm downloading the source now so it couldn't be THAT important(yet). I'm using ubuntu 11.10 if that helps at all.

    At this point: 9) Compiling:
    Code:
    $ source build/envsetup.sh

    Or:
    Code:
    $ . build/envsetup.sh
    could I have done
    Code:
    $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r
    and just be downloading ICS source? Because at the moment, it looks like it is downloading the source for all of the previous android source too.. isn't a bad thing, but I only made my partition 100gb in size because i was going to just work with ICS.
    I'll probably go through this thread a little more throughly and do some other research while this download is going on-- thanks again for putting this thread together!
    2
    Hello,

    No matter what lunch combo I pick I now get this error about desirec? I would prefer to build full heroc eng but at this point would be happy with anything... I eve resorted to reviewing Dastin's post on building for Heroc since I keep second guessing myself. I do appreciate everyone's kind help trying to teach a 40 year old a new trick!

    Lunch menu... pick a combo:
    1. full-eng
    2. full_x86-eng
    3. vbox_x86-eng
    4. full_heroc-userdebug
    5. full_heroc-eng
    6. full_heroc-user
    7. full_maguro-userdebug
    8. full_tuna-userdebug
    9. full_panda-eng
    10. TeamICS_desirec-eng
    11. TeamICS_heroc-eng

    Which would you like? [full-eng] 11
    build/core/product_config.mk:193: *** _nic.PRODUCTS.[[vendor/TeamICS/products/TeamICS_desirec.mk]]: "device/htc/desirec/full_desirec.mk" does not exist. Stop.

    ** Don't have a product spec for: 'TeamICS_heroc'
    ** Do you have the right repo manifest?


    Cheers

    We (Team ICS) use our own source for building. I'll send you a PM later on how to set it up

    私のEVO 3Dから送信される。
    2
    Well the Vigor (Rezound) was just released, so it is not yet on the CM source. Do I need the kernel source to get what I need?

    You need more than the kernel. You need vendor files as well. Vendor files tell what your phones hardware is and how to build, etc. You usually get this from CM when they support your phone.

    私のエボ3Dから送信される。