[Tutorial] Compile ICS on Ubuntu

Search This thread

dastin1015

Inactive Recognized Developer
i set up everything using your guide but i get an error when trying to build! see the screenhot!
2FcLv.png

Have you extracted your vendor files by using ./extract-files.sh inside your device directory while your device is connected to your computer? When you do so make sure to have adb set up.

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

stelios97

Inactive Recognized Developer
Feb 16, 2011
1,470
4,389
27
Famagusta
x10miniandpro.blogspot.com
Have you extracted your vendor files by using ./extract-files.sh inside your device directory while your device is connected to your computer? When you do so make sure to have adb set up.

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

i have installed adb as you said but i get this error when type this command: ./extract-files.sh

Code:
./extract-files.sh: 15: adb: not found
 

cdesai

Inactive Recognized Developer
Jan 16, 2011
2,296
4,089
IN YOUR HEAD
i have installed adb as you said but i get this error when type this command: ./extract-files.sh

Code:
./extract-files.sh: 15: adb: not found
Add adb to path by adding /path/to/your/sdk/platform-tools to PATH

Use this command

PATH=$PATH:/full-path-to-sdk/platform-tools
or this if sdk is in ur home directory (/home/username)
PATH=$PATH:~/path-to-sdk/platform-tools
 

dastin1015

Inactive Recognized Developer

Raba_lee

Member
Jun 27, 2011
21
1
Santiago
error

i have a problem when i type lunch. Im not an expert or anything, but it seems that it doesnot recognice my phone (i follow all the steps in the tutorial)

thanks
 

Attachments

  • error.jpg
    error.jpg
    42.2 KB · Views: 377

dastin1015

Inactive Recognized Developer
i have a problem when i type lunch. Im not an expert or anything, but it seems that it doesnot recognice my phone (i follow all the steps in the tutorial)

thanks

You need to add the repo for common.
Enter the following commands in the device/htc directory

Code:
$ git clone git://github.com/CyanogenMod/android_device_htc_common.git common

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

Raba_lee

Member
Jun 27, 2011
21
1
Santiago
thanks. i have another problem now. i know what the problem is, but i dont now how can i get the make file that is missing
 

Attachments

  • Screenshot.jpg
    Screenshot.jpg
    44.9 KB · Views: 331

Stefanex92

Senior Member
Nov 1, 2011
270
11
31
Brindisi
Copy the exact error you're getting and what directory you're in

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

Traceback (most recent call last):
File "/home/stefano/bin/repo", line 685, in <module>
main(sys.argv[1:])
File "/home/stefano/bin/repo", line 652, in main
_Init(args)
File "/home/stefano/bin/repo", line 184, in _Init
_CheckGitVersion()
File "/home/stefano/bin/repo", line 209, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
 

dastin1015

Inactive Recognized Developer
Traceback (most recent call last):
File "/home/stefano/bin/repo", line 685, in <module>
main(sys.argv[1:])
File "/home/stefano/bin/repo", line 652, in main
_Init(args)
File "/home/stefano/bin/repo", line 184, in _Init
_CheckGitVersion()
File "/home/stefano/bin/repo", line 209, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Try making sure that all library files are installed as well as making sure you followed every step to the word.
 

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から送信される。