Xoom with ICS 4.0.3 AOSP how to

Search This thread

winglord

Member
Dec 5, 2008
14
19
winglord, I was able to get it to build with the guide aceman posted. I believe its because of the modified make: make CC=gcc-4.4 CXX=g++-4.4

Where would I find a log for the entire build? A lot of stuff scrolls by while building.

Now I just need to get the recovery image out (guessing just delete it out of the ota .zip?) and try it out. My Xoom isnt with me right now.
Yes gcc 4.4 is less restrictive but gcc 4.6 supports more features and optimizations, and it's now the standard on ubuntu 11.xx.
 

winglord

Member
Dec 5, 2008
14
19
I tried that and it didn't seem to work for me. Once I used GCC 4.4 it worked. I couldn't tell you why, though.

So I finally got a build up and running - is there something special that has to be done with the vendor binaries? I know I have seen this in other builds too but the kernel is still showing 2.x and the camera, mic and gps are not working. Is that because work needs to be done to the kernel before it is 100% with ICS? This is my first time messing with an android build so forgive me if this is a dumb question.
Yes the kernel used is 2.6.39.4. Drivers for camera, gps... don't seem to be released yet.
 
  • Like
Reactions: aceman118

joe ferreira

Senior Member
May 21, 2007
582
296
Mountlake Terrace, WA
if you can not get your build to rebuild the boot.img try this

make clobber

it will clean out all of the build stuff so you can build from scratch again.


I have been using this guide for 4.0.3 in combination with your guide.

http://mjanja.co.ke/2011/11/building-android-4-0-on-ubuntu-11-10/

for my make command on my i7 2600k w/16gb ram (~10 mins from scratch)
make CC=gcc-4.4 CXX=g++-4.4 -j16
 
Last edited:

AzagraMac

Member
Mar 7, 2007
32
4
40
Spain
azagramac.gitbook.io
ERROR Building compile from source

Error building from source
Code:
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00002b16812c2180, pid=28542, tid=47375641790208
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# v  ~BufferBlob::getPsrInfo_stub
#
# An error report file with more information is saved as:
# /home/jose/Desarrollo/Android/ROM/AOS/hs_err_pid28542.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
make: *** [out/host/common/obj/JAVA_LIBRARIES/draw9patch_intermediates/javalib.jar] Abortado

My computer:
Ubuntu 10.10 64Bits Kernel 2.6.35-31

Java version
Code:
$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

$ javac -version
javac 1.6.0_26

Java HOME
Code:
## Java
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export PATH=$JAVA_HOME/bin:$PATH

Alternatives
Code:
$ ls -la /etc/alternatives/ja*
lrwxrwxrwx 1 root root 31 2011-12-23 17:39 jar -> /usr/lib/jvm/java-6-sun/bin/jar
lrwxrwxrwx 1 root root 41 2011-12-23 17:39 jar.1.gz -> /usr/lib/jvm/java-6-sun/man/man1/jar.1.gz
lrwxrwxrwx 1 root root 37 2011-12-23 17:39 jarsigner -> /usr/lib/jvm/java-6-sun/bin/jarsigner
lrwxrwxrwx 1 root root 47 2011-12-23 17:39 jarsigner.1.gz -> /usr/lib/jvm/java-6-sun/man/man1/jarsigner.1.gz
lrwxrwxrwx 1 root root 36 2011-12-23 17:39 java -> /usr/lib/jvm/java-6-sun/jre/bin/java
lrwxrwxrwx 1 root root 46 2011-12-23 17:39 java.1.gz -> /usr/lib/jvm/java-6-sun/jre/man/man1/java.1.gz
lrwxrwxrwx 1 root root 33 2011-12-23 17:39 javac -> /usr/lib/jvm/java-6-sun/bin/javac
lrwxrwxrwx 1 root root 43 2011-12-23 17:39 javac.1.gz -> /usr/lib/jvm/java-6-sun/man/man1/javac.1.gz
lrwxrwxrwx 1 root root 35 2011-12-23 17:39 javadoc -> /usr/lib/jvm/java-6-sun/bin/javadoc
lrwxrwxrwx 1 root root 45 2011-12-23 17:39 javadoc.1.gz -> /usr/lib/jvm/java-6-sun/man/man1/javadoc.1.gz
lrwxrwxrwx 1 root root 33 2011-12-23 17:39 javah -> /usr/lib/jvm/java-6-sun/bin/javah
lrwxrwxrwx 1 root root 43 2011-12-23 17:39 javah.1.gz -> /usr/lib/jvm/java-6-sun/man/man1/javah.1.gz
lrwxrwxrwx 1 root root 33 2011-12-23 17:39 javap -> /usr/lib/jvm/java-6-sun/bin/javap
lrwxrwxrwx 1 root root 43 2011-12-23 17:39 javap.1.gz -> /usr/lib/jvm/java-6-sun/man/man1/javap.1.gz
lrwxrwxrwx 1 root root 39 2011-12-23 17:39 java_vm -> /usr/lib/jvm/java-6-sun/jre/bin/java_vm
lrwxrwxrwx 1 root root 38 2011-12-23 17:39 javaws -> /usr/lib/jvm/java-6-sun/jre/bin/javaws
lrwxrwxrwx 1 root root 48 2011-12-23 17:39 javaws.1.gz -> /usr/lib/jvm/java-6-sun/jre/man/man1/javaws.1.gz

Java Virtual Machine
Code:
$ sudo update-java-alternatives -l
java-6-sun 63 /usr/lib/jvm/java-6-sun
 

AlEsC

Senior Member
Dec 28, 2007
107
32
Paris
Samsung Galaxy Note Pro 12.2
Code:
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00002b16812c2180, pid=28542, tid=47375641790208
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# v  ~BufferBlob::getPsrInfo_stub
#
# An error report file with more information is saved as:
# /home/jose/Desarrollo/Android/ROM/AOS/hs_err_pid28542.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
make: *** [out/host/common/obj/JAVA_LIBRARIES/draw9patch_intermediates/javalib.jar] Abortado

I haven't tryed on 10.10, but I've build it successfully on Ubuntu 11.10, Gentoo and Debian (all x64).
Like it is written in one of the howto linked here, I found out that the best way is to extract the sun-jdk v6 directly from the binaries downloaded from www.oracle.com, then change the path of your JAVA_HOME, export JAVAC ($JAVA_HOME/bin/javac) and change your PATH.

I don't think it matters in your case, but make sure you are using gcc/g++ 4.4.x and "make" 3.81.
 

ndanl

Senior Member
Sep 9, 2008
186
18
Timisoara
Based on information found here and on the web I will give it a try and build myself an image for stingray ;)) hope it will work out :D

Sent from my MB525 using XDA App
 

joe ferreira

Senior Member
May 21, 2007
582
296
Mountlake Terrace, WA
JBQ said:
https://groups.google.com/forum/#!topic/android-building/2RdMpo8ycr4

Dec 22 (6 days ago)
I've just pushed a change in the master branch that allows using GNU
make 3.82 instead of restricting to 3.81. The issues we had had with
that version in the past seem to have resolved themselves, which
implies that there might be different versions of GNU make numbered
3.82, some that work and some that don't.
If you feel like living on the bleeding edge, you can give it a try.

This is only for the master branch.

JBQ

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.


this may make things more interesting
 

joshndroid

Senior Member
Jun 22, 2011
3,373
4,780
Thanks for this.. Will have to get ubuntu back up on my new laptop and give her a whirl.. I only got 8gb ran Ide like to have more but motherboard didnt support it.. Dang it lol

Sent from my mind control device
 

nukedukem

Senior Member
Jun 23, 2010
477
54
Thanks for this.. Will have to get ubuntu back up on my new laptop and give her a whirl.. I only got 8gb ran Ide like to have more but motherboard didnt support it.. Dang it lol

Sent from my mind control device

I'm building on 8GB of ram at the moment. I think your CPU will be the biggest factor in how long it will take to compile. There are people on the nook color forums successfully building on only 2GB.

Sent from my PC36100 using XDA App
 

nukedukem

Senior Member
Jun 23, 2010
477
54
Any chance of getting the camera, etc with the binaries from here.

I'm downloading EOS #29 anyway if not.

If you flash an EOS build with working camera binaries, when you run the extract-files script in the device directory it will pull all those binaries and add them to your source for compiling. There are a couple files that won't be found on the device and you will get errors when you try to build. If you get to that point I can help you get around those errors if you like.

Sent from my PC36100 using XDA App
 

jonman364

Senior Member
Dec 14, 2010
82
22
Lansing, MI
The following files were missing
Code:
remote object '/system/app/UsbHelper.apk' does not exist
remote object '/system/lib/egl/libEGL_perfhud.so' does not exist
remote object '/system/lib/egl/libGLESv1_CM_perfhud.so' does not exist
remote object '/system/lib/egl/libGLESv2_perfhud.so' does not exist
remote object '/system/lib/libmoto_ecnswrapper.so' does not exist
remote object '/system/media/bootanimation.zip' does not exist
remote object '/system/vendor/etc/audio_effects.conf' does not exist
Do I just remove the references to these files in each makefile? I tried that with the first and it continued to the next. Or is there more to it?
 
Last edited:

Arasthel

Senior Member
Dec 30, 2009
128
250
The following files were missing
Code:
remote object '/system/app/UsbHelper.apk' does not exist
remote object '/system/lib/egl/libEGL_perfhud.so' does not exist
remote object '/system/lib/egl/libGLESv1_CM_perfhud.so' does not exist
remote object '/system/lib/egl/libGLESv2_perfhud.so' does not exist
remote object '/system/lib/libmoto_ecnswrapper.so' does not exist
remote object '/system/media/bootanimation.zip' does not exist
remote object '/system/vendor/etc/audio_effects.conf' does not exist
Do I just remove the references to these files in each makefile? I tried that with the first and it continued to the next. Or is there more to it?

I deleted the UsbHelper and the libmoto_ecnswrapper.so lines, as I couldn't find those files anywhere, but libEGL and libGLES can be found if you do a little search on google, bootanimation can be taken from a HC ROM and audio_effects.conf can be found, for example, in CM9 for Galaxy Nexus.
 

nukedukem

Senior Member
Jun 23, 2010
477
54
Yep just remove the references to those files. The 3 egl files are in the camera zip provided by team EOS but I guess if they were removed from the actual rom they aren't important.
 

winglord

Member
Dec 5, 2008
14
19
Look in the bottom of my instructions, you need to add -U_FORTIFY_SOURCE. If one encounters this issue, then you MUST update 5 files as indicated in my instructions to avoid compilation errors.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    Now that the code is out, let's start hacking the Xoom.
    These instructions are for Linux 64-bit Ubuntu 11.10 / Mint 12, with latest updates.

    • follow directions on source.android.com to set up your environment
    • then move to next page to set up the repo and download the code
    • make sure you use Sun/Oracle Java Development Kit 1.6.x. It WILL NOT work with OpenJDK, which comes with Ubuntu 11.10/Mint 12. (best is remove OpenJDK to avoid hard to track errors)
    • downloading the code takes ages (a good 2h even with a good connection) and requires at least 2GB of hard disk space. But for compilation, I'd recommend to have 20GB at least.
    • download proprietary drivers at: http://tinyurl.com/6rfu8rn
    • extract the drivers from Broadcom and NVidia, this will gives you 2 .sh files
    • just run these 2 .sh files and copy the created vendor/ directory into the root of your Google code repo.

    There are 2 kinds of Xoom

    • Xoom Verizon LTE, codename stingray
    • Xoom wifi, codename wingray
    Make some corrections in the code for GCC 4.6

    • external/mesa3d/src/glsl/linker.cpp: l.70 add: #include <cstddef>
    To build the code:

    • . ./build/envsetup.sh
    • lunch full_stingray-userdebug or full_wingray-userdebug
    • make -j5

    This can take 2h to compile on an average machine like my MacBook Pro with 8GB RAM (very important to have more than 4GB!!!), or even more. And having a quad-core machine (or even more cores), really saves you tons of time!
    Once compilation is done, it's time to flash:

    • go to out/target/product/wingray (or stingray)
    • put your Xoom in fastboot mode: power off, then volume down + power on
    • fastboot erase cache
    • fastboot erase userdata
    • fastboot flash boot boot.img
    • fastboot flash recovery recovery.img
    • fastboot flash system system.img
    • fastboot reboot

    Note: you don't need to flash recovery.img, you should instead flash ClockworkMod recovery (http://download.clockworkmod.com/recoveries/recovery-clockwork-4.0.0.4-stingray.img)

    And voila, you have a Xoom with WiFi working and all goodies from AOSP. This means no Google apps like Market...

    To install Google Apps:
    • download this zip file [http://www.mediafire.com/?1l4ravroiwt4ybw[/url]
    • unzip it and go inside the folder
    • boot your device normally
    • rm system/app/Nfc*
    • adb push system /system
    • adb reboot

    There are some errors with exchange service but Market, GMail, Maps work correctly. From there, go update your apps from Market :D

    Enjoy!

    Update 1: Android 4.0.1 issues back in 4.0.3?
    Some people noted some compilation errors I didn't get on 4.0.3 but on 4.0.1. Here are solutions for 4.0.1 (emulator) that may work for you:

    build/core/combo/HOST_linux-x86.mk:61 HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
    build/core/combo/javac.mk:15 COMMON_JAVAC := javac -J-Xmx512M -target 1.5 -source 1.5 -Xmaxerrs 9999999
    frameworks/base/libs/util/Android.mk: 63 LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
    libcore/luni/src/main/java/java/lang/Enum.java: 128 return ordinal - o.ordinal ();
    external/gtest/include/gtest/internal/gtest-param-util.h:40 #include <cstddef> (after #include <vector>)
    2
    Are you in ubuntu 11.10? I was having issues also. Check out this site...

    http://www.android-dev.ro/2011/12/13/building-android-4-0-on-ubuntu-11-10/
    1
    It builds just fine with 3 GB of RAM in my VM here. Takes around 1 hour for me, with 6 CPU threads assigned to the VM, and using -j6. I just wish I could make sure it doesn't waste time compiling the various demos and tests.

    I'm also using ccache to speed up (re)building. Google has instructions on how to set it up (it's really easy). Copied from their page (http://source.android.com/source/initializing.html):

    You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do "make clean" often, or if you frequently switch between different build products.

    Put the following in your .bashrc or equivalent.

    export USE_CCACHE=1

    By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.

    export CCACHE_DIR=<path-to-your-cache-directory>

    The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code.

    prebuilt/linux-x86/ccache/ccache -M 50G

    This setting is stored in the CCACHE_DIR and is persistent.

    I have it set to only 10 GB here, but if you intend to do a lot of rebuilding, 20-40 GB might be a better idea.
    1
    Hi,

    Huge thanks for those usefull instructions.
    Just a hint for Gentoo builders (and maybe others distrib), if you're having this error after the "lunch" command :

    Code:
    AOSP> lunch full_wingray-userdebug
    build/core/config.mk:268: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com.  Stop.
    
    ** Don't have a product spec for: 'full_wingray'
    ** Do you have the right repo manifest?

    just export env ANDROID_JAVA_HOME with full jdk path :

    Code:
    export ANDROID_JAVA_HOME=/opt/sun-jdk-1.6.0.29/
    1
    I tried that and it didn't seem to work for me. Once I used GCC 4.4 it worked. I couldn't tell you why, though.

    So I finally got a build up and running - is there something special that has to be done with the vendor binaries? I know I have seen this in other builds too but the kernel is still showing 2.x and the camera, mic and gps are not working. Is that because work needs to be done to the kernel before it is 100% with ICS? This is my first time messing with an android build so forgive me if this is a dumb question.
    Yes the kernel used is 2.6.39.4. Drivers for camera, gps... don't seem to be released yet.