33 responses to “Building Android 4.0 on Ubuntu 11.10”

  1. Ben

    Excellent tutorial, thanks for posting. Any chance you will follow up with how to set up the vendor files for non-dev phones?

  2. Jaspal Sanddhu

    While building ICS4 on Ubuntu 11.10 on 32 bit JDK, I get the following error while compiling..

    chost Executable: bb_dump (out/host/linux-x86/obj/EXECUTABLES/bb_dump_intermediates/bb_dump)
    /usr/bin/ld: cannot find -lncurses
    collect2: ld returned 1 exit status
    make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
    make: *** Waiting for unfinished jobs….

  3. Stéphane Guérin

    Thank you for this very helpful article!
    FYI, to make it compile without error I also needed to do:
    sudo apt-get install g++-4.4-multilib gcc-4.4-multilib

  4. Mathieu

    After following your guide, I’ve this error :
    build/core/base_rules.mk:166: *** abi/cpp: MODULE.TARGET.SHARED_LIBRARIES.libgabi++ already defined by Custom_android/abi/cpp. Arrêt.

    Do you know how to fix it ?

    I’m on kubuntu 11.10

  5. e8hffff

    Java install is not easy as versions are changed to release 7u1

  6. e8hffff

    I’ve given up as I don’t want to downgrade JAVA. It’s pretty slack that Google can’t keep upto date for their code to suit the base engine.

  7. joe ferreira

    for this line if I wanted to make a otapackage

    make CC=gcc-4.4 CXX=g++-4.4 -j4

    would I change it to this?

    make otapackage CC=gcc-4.4 CXX=g++-4.4 -j4
  8. EwanG

    OK, now that I have finally completed the exercise, a few suggestions for your consideration:

    1) I would emphasize the need to install Ubuntu 64-bit at the start. The Ubuntu download page and many of the online guides recommend using the 32-bit version for compatibility, and so I got a fair bit into this before seeing the need to be 64-bit.

    2) A couple things were “off” on the Java instructions. First of all, if you follow your link, it takes you to the 7 branch. So you might want to point out to folks that they can click on the box on the right for “Previous Versions”, and then get the 1.6.9 029 version that both Android and your instructions prefer. Second, the given statement to add to the .profile doesn’t create a working PATH fix (at least for my setup of 11.10). I had to edit the .profile instead to add a line:
    PATH=”/opt/java/64/jdk1.6.0_29/bin:$PATH”

    3) Once you’ve completed the build instructions, you should point out the need to run that “. build/envsetup.sh” first. Then both you and the Google site use the lunch tool for the example. However lunch is not installed by default. Fortunately Ubuntu gives you the apt-get line for lunch-python, but it might be helpful to add it.

    FWIW, after all this I did get a successful build of ICS to run in my emulator. Now to start working to customize for my 7 inch tablet :-)

  9. ventanas

    excellent tips!
    thank you very much for these instructions on ubuntu 11.

    :)
    ventanas

  10. ventanas

    Hi,

    are you able to get apt-get working fine under ubuntu 11.10 behind a proxy with NTLM authentication?

    I’ve been spending two days trying to get it working but nothing seems to work.

    I have proxy_ip, proxy_port, proxy_user_name and proxy_password to setup, I have tried putting them all in the /etc/bash.bashrc file using the HTTP_PROXY environment variable, but it doesn’t work.

    any suggestion?

    :)
    M

  11. chethan678

    Hi, i am trying to download the source code for ICS but when i try to init my repo gives error…

    repo init -u git://github.com/CyanogenMod/android.git -b ics
    fatal: Cannot get https://android.googlesource.com/tools/repo/clone.bundle
    fatal: error unknown url type: https
    user@localhost:~/Android/ics$

    someone please help me…i am trying hard reading every q&a but couldn’t get it through…

Leave a Reply