Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,738,731 Members 40,824 Now Online
XDA Developers Android and Mobile Development Forum

Xoom with ICS 4.0.3 AOSP how to

Tip us?
 
winglord
Old
(Last edited by winglord; 20th December 2011 at 01:47 AM.) Reason: 4.0.1 errors back in 4.0.3?
#1  
Junior Member - OP
Thanks Meter 19
Posts: 14
Join Date: Dec 2008
Talking Xoom with ICS 4.0.3 AOSP how to

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/rec...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

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>)
The Following 18 Users Say Thank You to winglord For This Useful Post: [ Click to Expand ]
 
Kippui
Old
#2  
Senior Member
Thanks Meter 35
Posts: 568
Join Date: Jan 2011
How much space just to tinker with ICS/gingerbread?

I have a 1.5 mbps DSL connection and 200gb would take me 8 day/24 hour of downloading and I cant do that.
 
Ianas
Old
#3  
Member
Thanks Meter 12
Posts: 48
Join Date: Nov 2008
Location: Salt Lake City

 
DONATE TO ME
Quote:
Originally Posted by Kippui View Post
How much space just to tinker with ICS/gingerbread?

I have a 1.5 mbps DSL connection and 200gb would take me 8 day/24 hour of downloading and I cant do that.
I do my building in a VM and the virtual disk image that has ubuntu and AOSP has grown to 45 GB after a compile.

Also, question for OP... why don't we see people using "make -j(n) otapackage" to create CWM compatible ROMs? Just make sure it doesn't have a recovery in it (or it will torch your existing recovery). I torched my recovery the first time I did it, but I think I fixed it (haven't reflashed to find out).
 
RMerlin
Old
#4  
Senior Member
Thanks Meter 47
Posts: 143
Join Date: Jan 2011
Location: Montreal
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):

Quote:
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.
The Following User Says Thank You to RMerlin For This Useful Post: [ Click to Expand ]
 
winglord
Old
(Last edited by winglord; 18th December 2011 at 07:39 AM.)
#5  
Junior Member - OP
Thanks Meter 19
Posts: 14
Join Date: Dec 2008
The full AOSP tree + out directory takes 24G on my machine using du -sh.
The OTA package is 90MB, including the recovery, which you probably want to remove.

Indeed, I forgot to mention using USE_CCACHE, it really speeds up your builds. Make sure your cache dir is the top of your AOSP tree, it's even better.
 
AlEsC
Old
#6  
Member
Thanks Meter 26
Posts: 88
Join Date: Dec 2007
Location: Paris
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:
Select 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:
Select Code
export ANDROID_JAVA_HOME=/opt/sun-jdk-1.6.0.29/
The Following User Says Thank You to AlEsC For This Useful Post: [ Click to Expand ]
 
ydaraishy
Old
#7  
Senior Member
Thanks Meter 54
Posts: 204
Join Date: Jun 2010
Quote:
Originally Posted by winglord View Post
There are 2 kinds of Xoom
  • Xoom Verizon LTE, codename stingray
  • Xoom wifi, codename wingray
There's three kinds of Xoom, the GSM MZ601 as well (Moto's codename everest). This is not supported by Google, but hopefully the hardware is close enough to stingray that the port shouldn't be overly difficult. At worst, the port to everest might have issues with vendor_ril?
 
ChadH42
Old
#8  
ChadH42's Avatar
Senior Member
Thanks Meter 288
Posts: 1,056
Join Date: Sep 2010
Location: New Jersey
please post your finished from.

Sent from my Full Android on Wingray using Tapatalk
Device: Samsung Galaxy S5
Carrier: Verizon
ROM: Rooted NCG
Recovery: Stock
 
AlEsC
Old
#9  
Member
Thanks Meter 26
Posts: 88
Join Date: Dec 2007
Location: Paris
Does someone know if there is a way to run builded images into the sdk emulator ?
 
popokrew
Old
#10  
popokrew's Avatar
Senior Member
Thanks Meter 33
Posts: 185
Join Date: Oct 2010
Location: Ft Lauderdale
Not sure what I am doing wrong:

Code:
Select Code
/ICS_SOURCE# make -j4 otapackage
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=full_wingray
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IML74K
============================================
build/core/main.mk:324: implicitly installing apns-conf_sdk.xml
No private recovery resources for TARGET_DEVICE wingray
host C++: llvm-rs-cc <= frameworks/compile/slang/llvm-rs-cc.cpp
host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs.cpp
host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs_ast_replace.cpp
host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs_context.cpp
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]

<built-in>:0:0: note: this is the location of the previous definition
<built-in>:0:0: note: this is the location of the previous definition
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors

make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/llvm-rs-cc.o] Error 1
make: *** Waiting for unfinished jobs....
cc1plus: all warnings being treated as errors

make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_ast_replace.o] Error 1
cc1plus: all warnings being treated as errors

make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_context.o] Error 1
cc1plus: all warnings being treated as errors

make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs.o] Error 1
root@VirtualBox:~/ICS_SOURCE#
Im using this guide as it has more details: http://www.freeyourandroid.com/guide/compile-ics

Any guidance someone could offer would be great.
HTC One (M7)
Motorola Xoom WiFi

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes