yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] MS.:
I did understood, just somehow i managed to delete part of my answer. Or i never finished to type it. I didn't sleep last night at all so everything is possible, sorry :)

Since OTA updates are much smaller then full ROM, i highly doubt if there's full GAPPS package included.
[Samsung Galaxy Nexus] dr0id99:
Thanks for the info!
[Samsung Galaxy Nexus] yankkkpe:
Good job guys, everything is okay :D
[Samsung Galaxy Nexus] g.kohei:
Q

How to compile galaxy4.apk using aosp?

I cant find...
[Samsung Galaxy Nexus] Sleuth255:
lol... fully functioning toro build here. The crap about no AOSP support is just that. Obviously its a licensing thing: Google can distribute Qualcomm code in a rom but not release standalone drivers for subsequent use. Therefore, as long as you own the LTE phone, you own the binaries too and have free personal use license. Too bad all the bloggers didn't mention this when they moaned about the "fracturing of AOSP"...

As long as you simply pull proprietary blobs off your phone using the provided script, you can build fully functional toro AOSP roms without problems. Kudos to dave_t321 for this post further up in the thread. It really is key to the process. The rm -rf commands are key to making this all work correctly since the generic blobs/make scripts will be removed. Also, I loaded blobs from a 4.0.4 build with no issues. Since the drivers themselves don't really change much, I suspect that 4.0.2 may work as well.

Anyway, after using Dave's method I did this:

. build/envsetup.sh (this will add in the proprietary blobs)

lunch (choose option 9)

make clobber

make -j1 (I'm using a linux VM which is why I chose 1)

Now to get GAPPS/root and a chance to play with make snod....

edit... interestingly, the su binary was already in out/target/product/toro/system/xbin so I went into adb shell, did a su and had root... Apparently AOSP is root capable out of the box (makes sense) so all we need is the superuser apk so it can be managed... very cool.
[Samsung Galaxy Nexus] descendency:
I downloaded virtualbox, installed Ubuntu 10.04 64 bit, and went into terminal. Typed the following:

$ sudo -i

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

$ apt-get update

$ apt-get install sun-java6-jdk

yields

I tried the suggestion about checking sources.list for duplicates.

---

My fix to this is to download the standard jdk bin file, have it extract the files, and create a symbolic link in the /bin/ folder to java and javac. Will this work? (I plan to try it and report back)

edit: had to symlink jar too. javadoc too.
[Samsung Galaxy Nexus] Sleuth255:
btw: I enabled root on my Ubuntu dev environment and then am doing all my work logged in as the root user. Much more straightforward...

Just do a sudo passwd root and set the root password to enable this account. Then you can log back in as root with full permissions.
[Samsung Galaxy Nexus] adrynalyne:
mmm packages/wallpapers/Galaxy4
[Samsung Galaxy Nexus] adrynalyne:
No. It has basic root support if you make a userdebug build. Superuser.apk has its own su binary and it must be the correct version to work with the apk. Google's provided su is not the right one.
[Samsung Galaxy Nexus] Sleuth255:
Yep... just discovered that. Do I also need busybox?
[Samsung Galaxy Nexus] adrynalyne:
Not for root. You will need it for various root-required tools/apps.
[Samsung Galaxy Nexus] g.kohei:
yes! I know...but

make clean

lunch

8(full maguro usedebug

time make -j4

wallpaers directory is be when I build aosp.

but build img not include glaxy4,phase beam etc.

livewallpaper is some built nexus,water,

why?

If I add script anywhere,please tell me.

thanks.
[Samsung Galaxy Nexus] adrynalyne:
Build/target/product/core.mk

Add Galaxy4 to the list.
[Samsung Galaxy Nexus] g.kohei:
thanks.

I can see galaxy4!
[Samsung Galaxy Nexus] Sleuth255:
Is core.mk the best place to include this sort of package?
[Samsung Galaxy Nexus] Sleuth255:
Connecting the dots here... So this is what is meant by "insecure kernel"!
[Samsung Galaxy Nexus] adrynalyne:
Well, sort of.

An insecure kernel by itself automatically defaults to # with adb shell.
[Samsung Galaxy Nexus] beekay201:
The packages listed in build/target/product/core.mk get built for all build variants.

Otherwise, project's Android.mk will tell build system (through LOCAL_MODULE_TAGS) for which build variants it should add the resulting package.
[Samsung Galaxy Nexus] jav_:
it works as it said it would

---------- Post added at 09:06 PM ---------- Previous post was at 08:56 PM ----------

had to downgrade back to 10.04.. you can also just follow the original install directions which is what i did starting with "Downloading the Source" at source . android . com (won't let me post links)
[Samsung Galaxy Nexus] crachel:
this JDK situation is somewhat of a PITA. AOSP is heading toward openJDK support in the master branch, and it's said if you remove the checks, it will build successfully now. I haven't tried myself.

Here's a good write up about 3 methods to get the jdk-6 installed,

http://askubuntu.com/questions/67909/how-do-i-install-oracles-jdk-6

The easiest being:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk
[Samsung Galaxy Nexus] jav_:
I could be wrong, but I believe that this is the recommended repository to use instead of ferramroberto:

ppa:sun-java-community-team/sun-java6

I believe it's provided by sun directly. You can see more about it at their launchpad, but I can't post links yet: launchpad . net /~sun-java-community-team/+archive/sun-java6 (remove the spaces in launchpad . net)
[Samsung Galaxy Nexus] OniV2:
I searched the thread for answers and didn't really find any, so I'll make my enquiry here:

If I was to compile 4.0.3 from source and output it as an OTA .ZIP, would it be essentially the same as what Google will eventually post up on their 'Galaxy Nexus Factory Images' page? Or should we expect 4.0.3 to be tweaked and changed furthermore for the official 4.0.3 OTA (I heard that the error was in deployment though, rather than the actual build that we can create from source)?
[Samsung Galaxy Nexus] adrynalyne:
It would be the same, deep down, but no it would not be identical. Any closed source apps or modules are not included with AOSP.

An example would be Google calendar sync. A pure aosp build cannot sync with Google calendars in the cloud.
[Samsung Galaxy Nexus] OniV2:
That makes sense. What if I was to, say, to flash GApps (e.g. From the CM9 developer thread) after compiling and flashing 4.0.3? That would provide me with Google's closed source apps and services, correct?

Or, what if I simply flashed it as an update over stock 4.0.2?
[Samsung Galaxy Nexus] mbroeders:
If you flash it as an update, all apps in system (e.g. gmail, calander sync etc) will be deleted (i believe). But flashing the gapps package does indeed provide you with Google's closed source apps, so that would be a proper solution.
[Samsung Galaxy Nexus] g.kohei:
Sorry.

Error happen.

I want build aosp include all Livewallpaper.

I added in core.mk that script(phasebeam,magicsmoke...so everything

Finally I could see Galaxy4,PhaseBeam,MusicVisualization,nexus,water

But I couldnt see other Live wallpapers(HoloSpiral,magicsmoke,bubbles

oh...why...

Is it necessary to change orre install jad6 ?
[Samsung Galaxy Nexus] jav_:
It would not be identical. Google basically pulls AOSP source like any ROM developer would and has their own git repositories with their own Custom "ROM". For example, in the AOSP code base, the default ringtone and notification are different than the defaults in the ROM google puts out for the Nexus phones. So, small settings and things like that might be defaulted differently, aside from the whole GApps thing. What I'm talking about would mostly be setting tweaks, etc though. Like the boot animation as well for example will be the simple "ANDROID" boot animation as opposed to the one included in the stock ROM for the Galaxy Nexus Factory Images
[Samsung Galaxy Nexus] descendency:
That should be added to the OP.

apt-add-repository ppa:sun-java-community-team/sun-java6

instead of

apt-add-repository "deb http://archive.canonical.com/ lucid partner"
[Samsung Galaxy Nexus] crachel:
I can't get the JDK from that repository on Oneiric
[Samsung Galaxy Nexus] Sleuth255:
Noticed your post from another thread and thought I'd hunt down your issue to see if I could help out. Did you already try this?

$ sudo sysctl -w net.ipv4.tcp_window_scaling=0
$ repo sync -j1

this forces single threading and fixed TCP window size.

Also, Ubuntu LTS 10.4 is the preferred build environment. I highly recommend installing that along with the minimum gnome gui:

sudo aptitude install --no-install-recommends ubuntu-desktop

Finally, I would enable the root user then doing everything logged in as root. Makes it a lot simpler. Just set a password on the account to enable.

sudo passwd root
[Samsung Galaxy Nexus] crachel:
Ok, I believe this to be the "correct" & cleanest way to get JDK6 on a fresh 11.10 install (considering the JDK6 won't have anymore updates)

Download jdk-6u30-linux-x64.bin directly from Oracle (warning: they require sign-up with FAR too much personal information)

make the bin executable (chmod 755 or a+x) and run it "./jdk-6u30-linux-x64.bin"

move the dir it creates where you want it (~/dev/jdk1.6.0_30/) and point your path to the bin dir (~/dev/jdk1.6.0_30/bin)

here's my path

export PATH=~/android-sdk-linux/tools:~/android-sdk-linux/platform-tools:~/bin:~/dev/jdk1.6.0_30/bin:${PATH}

notice the ${PATH} at the END? that makes sure it looks in the dir's before it (ie jdk6/bin) and not the openJDK already installed

the command "which java" should output "/home/crachel/dev/jdk1.6.0_30/bin/java" (obviously depending on your dir location)

a very simple install with no messy repositories or symlinking or other such method

Aside: you might be able to edit "find-jdk-tools-jar.sh" in build/core to point to openJDK to build the master branch, but I have not tried that
[Samsung Galaxy Nexus] Planet X:
Could somebody please let me know how I get it done to compile a ROM odexed? I mean that I get .odex files in /system/app? I usally use "brunch maguro" but I always end up with a deodexed ROM. I like odex because of faster boot times and it feels snappier.
[Samsung Galaxy Nexus] adrynalyne:
Well, the 'snappier' feeling is pure placebo.

You can build a user build if you prefer. brunch I am sure defaults to userdebug, which is deodexed.
[Samsung Galaxy Nexus] AdamLange:
nvm :) i fixed it
[Samsung Galaxy Nexus] Planet X:
Thank you. But isn't brunch maguro -user without root?
[Samsung Galaxy Nexus] beekay201:
yes. userdebug/eng have root in adb only, unless you replace aosp su binary with chainsdd su binary and add superuser.apk to your build.
[Samsung Galaxy Nexus] Planet X:
I will try that later today. Just flash su.zip from recovery after build with brunch maguro-user. I have tried to build for my Transformer also from the same WORKING_DIRECTORY but that messed the whole thing up. So I had to setup the whole thing again. I thought it would be possible to use the same WORKING_DIRECTORY for different devices. Is that right?

Just make clobber from before and it should be fine isn't it?
[Samsung Galaxy Nexus] AdamLange:
Do it manually, flashing su.zip may cause that superuser.apk will not see your device rooted. I built maguro-user-relase 4.0.3 with ro.secure=0 so the adb is running as root and then manuyally pushed su to /system/xbin/, chmod'ed to 06755, linked to /system/bin and pushed Superuser.apk to /system/app

an boom :) maguro-4.0.3-user-release with root, google apps :) like from stock image from google :D
[Samsung Galaxy Nexus] adrynalyne:
Without the stock sounds, wallpapers, nfc writing ability, Google Apps, working Android Beam, Google Calendar sync, full dictionary support for keyboard, extra toys for camcorder, and more I probably forgot:p
[Samsung Galaxy Nexus] AdamLange:
I told you i got all of these :) just a simple modification of build process and voila!
[Samsung Galaxy Nexus] crachel:
setup a .mk file to have the binaries/prebuilts included in your system.img and you won't have to push anything manually
[Samsung Galaxy Nexus] Planet X:
Finally I have got it. An OTA package with .odex files and kept root.

Thats it:

source build/envsteup.sh cm_maguro-user && DISABLE_DEXPREOPT=true && make otapackage -j4 && make installclean

It wont start in emulator but I have got a flashable OTA package. And its working fine.
[Samsung Galaxy Nexus] vtrandal:
Command in step 2 of this TUTORIAL/GUIDE caught my attention:

repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.3_r1

Google's AOSP repository tag "android-4.0.3_r1" corresponds to build number IML74K which I believe is now broken and/or the vendor binaries provided by Google are wrong. Maybe I've made a mistake in my build process, but I have repeatedly checked everything.

I've been building my own ROMs for two years starting with the Nexus One and now the Galaxy Nexus. Something's wrong with android-4.0.3_r1 when building for maguro (Galaxy Nexus). At the very least the camera does not work. I'm not sure what else is broken but that's enough for me.

I cannot be the only person experiencing this problem. People who are building 4.0.3 ROMs that work for the Galaxy Nexus should share their secrets. It's no wonder VillainROM is based on 4.0.1_r1.2!

Since my phone (Google's anointed yakju version) arrived with ITL41F/android-4.0.1_r1.2, I decided to build that. The resulting build was incompatible with my phone's bootloader! A workaround was to flash the .img files one at a time and skip recovery.img.

So Google's AOSP with regard to Android 4 on the Galaxy Nexus is a mess. Build number ITL41D has two branches. ITL41F is incompatible with the bootloader it shipped with. And IML74K is foobar. Such a challenge!

Vince.
[Samsung Galaxy Nexus] Planet X:
I had the same error when I first compiled with the propieriarty drivers zip from Google.

Then I followed this guide: http://xdaforums.com/showpost.php?p=22707173&postcount=353

This step: 4.) connect your phone and go to /system/device/samsung/maguro/ and enter ./extract-files.sh to get proprietary drivers.

After that the build was working fine.
[Samsung Galaxy Nexus] latisen:
Thanks for this awsome guide!
[Samsung Galaxy Nexus] dave_t321:
Google doesn't have a licence to distribute the proprietary blobs to make the camera work. There's some other bits that won't work to but I can't remember what they are..

IML74K works just fine with the right proprietary files though. There's a guide in this very thread about how to do it!

For bootloader compatibility you can edit device/samsung/tuna/board-info.txt with the relevant information.

By the way, tags don't "break". They are snapshots of the code at the time when they are "tagged". If you checkout android-4.0.3_r1 on the day it was pushed or tomorrow or the next day, it's the same code.
[Samsung Galaxy Nexus] ffxx68:
Yes, it helped a lot... though my limited experience with Android platform development (I'm starting now a new customization project) needs some additional guidance. I hope someone could help ...

It is suggeted suggest to locally clone both platform_frameworks_base (assuming I want to make changes there) and platform_manifest (to mantain the default.xml as suggested above, I guess). Ok, but something I don't understand is with the directory structures.

I've cloned locally (i.e. "repo sync"-ed) the entire AOSP already, so I get something like this in my aosp local root dir:

drwxrwxr-x 9 ffxx68 ffxx68 4096 2012-03-16 14:30 bionic
drwxrwxr-x 5 ffxx68 ffxx68 4096 2012-03-16 14:30 bootable
drwxrwxr-x 7 ffxx68 ffxx68 4096 2012-03-16 14:30 build
drwxrwxr-x 8 ffxx68 ffxx68 4096 2012-03-16 14:30 cts
drwxrwxr-x 16 ffxx68 ffxx68 4096 2012-03-16 14:30 dalvik
drwxrwxr-x 20 ffxx68 ffxx68 4096 2012-03-16 14:30 development
drwxrwxr-x 7 ffxx68 ffxx68 4096 2012-03-16 14:30 device
drwxrwxr-x 83 ffxx68 ffxx68 4096 2012-03-16 14:32 external
drwxrwxr-x 5 ffxx68 ffxx68 4096 2012-03-16 14:33 frameworks
drwxrwxr-x 9 ffxx68 ffxx68 4096 2012-03-16 14:33 hardware
drwxrwxr-x 14 ffxx68 ffxx68 4096 2012-03-16 14:33 libcore
-r--r--r-- 1 ffxx68 ffxx68 87 2012-03-16 14:30 Makefile
drwxrwxr-x 8 ffxx68 ffxx68 4096 2012-03-16 14:33 ndk
drwxrwxr-x 5 ffxx68 ffxx68 4096 2012-03-16 14:44 out
drwxrwxr-x 7 ffxx68 ffxx68 4096 2012-03-16 14:34 packages
drwxrwxr-x 15 ffxx68 ffxx68 4096 2012-03-16 14:36 prebuilt
drwxrwxr-x 27 ffxx68 ffxx68 4096 2012-03-16 14:36 sdk
drwxrwxr-x 9 ffxx68 ffxx68 4096 2012-03-16 14:36 system

but when I'm going to clone those two repos, starting from the same root, I get these new dirs:

platform_frameworks_base

platform_manifest

under which I find dirs and files which are found in different sub-dirs in the original aosp structure. platform_frameworks_base for example maps to framework/base. I expected files in the original aosp structure to be replaced directly, instead.

That is evidently not the case, so my doubt is about the best approach to follow, with my customizations. Should I make my changes in the new platform_* dirs and copy whatever I change over onto the main repo one, or am I missing something more basic here?

I'm sure my question looks dumb to most of the audience here, sorry about that, but I'd like to start with the most convenient approach since the beginning of my project.

thanks

Fabio
[Samsung Galaxy Nexus] vtrandal:
Thanks so much, but I already tried it with that specific step -several times repeatedly checking everything. That's how I built my own ROMs for my Nexus One. But that only makes things worse for my Galaxy Nexus when building android-4.0.3_r1. After flashing my phone it hangs at the Google screen. And thanks for the link to the guide. I will follow it very closely, because I must be making some mistake.

---------- Post added at 07:21 PM ---------- Previous post was at 06:40 PM ----------

First, Thanks! I will refer to the guide in this thread. I must be making some mistake somewhere in my build process.

However, Google *DOES* distribute proprietary vendor binaries/drivers here:

http://code.google.com/android/nexus/drivers.html

Google leaves it to the user to accept the vendor's license agreement when they unzip and extract the drivers. I've tried using those drivers and I've tried using the ones extracted directly from my phone. Neither is working for me.

And thanks for the tip about fixing bootloader compatibility. I will try that.

And finally, yes I understand that tags don't "break." I apologize for my poor choice of words. What I meant was it's not working for me at the moment. I'm merely speculating on the extremely remote possibility that Google's repository might be corrupted in some way for this specific tag.

I know it's extremely unlikely that a repository has got some corruption (especially if no one else is complaining about it) but it's not impossible. I've seen it happen - only once when someone with root access mucked with the file system.

But what's really worrisome to me is no one else seems as stumped as I am. I just don't know why it doesn't work for me. I hope following the guide in this thread fixes things for me. Maybe I will upgrade my build environment from Ubuntu 10.04 LTS to Ubuntu 11 per Google's documentation.
[Samsung Galaxy Nexus] dave_t321:
Yep, those are some of the drivers for 4.0.3 but not all of them! The ones that are missing will make your camera and GPS work. Google doesn't have a licence to distribute the files for those like they've done with the ones you linked to.

There's instructions on how to do it a few pages back.

On bootloaders, there's a table here with which one is recommended for each build version.
[Samsung Galaxy Nexus] WatermelonSugar:
Great tutorial and even better better help from every one in thread....Thanks heaps

just compiled first attempt on new comp build ubuntu 11.10 i7-3820 16G and ssd, 28 minutes total time on 8 threads!

From all the advice here I will try some source mods and compile some more:)

cheers
[Samsung Galaxy Nexus] endymion2k5:
Great tutorial and helped me lots getting the build to compile for maguro, altho im having some trouble finishing the build. Hope someone can give me a nudge in the right direction.

Steps taken:

Installed ubuntu 10.04.4 X64, updated all packages, installed VM Tools (its running within vmware workstation)

Followed the tutorial till the java jdk bit.

Installed Java JDK 1.6.30 from the oracle website as suggested from post 271. Added the path to .bashrc to make it stick.

Picked up the tutorial again and finished it.

When compiling for over 2 hours, i reach a certain point where it fails to detect GCC. The file in question is located under prebuilts/tools/gcc-sdk/ and is called 'gcc'. The paths given in there seem to be incorrect.

I cannot locate x86_64-linux-gcc anywhere on my system, i can locate i686-linux-gcc. I tried to modify the 'gcc' file in question (which is a bash file), but did not have any success.

What am i doing wrong?

host C: emulator64-arm <= external/qemu/audio/audio.c
prebuilts/tools/gcc-sdk/gcc: line 41: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-gcc: No such file or directory
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator64-arm_intermediates/audio/audio.o] Error 127

Thanks in advance
[Samsung Galaxy Nexus] beekay201:
update: master branch still boots fine without CM9 busybox. If i replace su and add Superuser from ChainsDD, Superuser.apk can't find the correct binary, making apps stay at "Asking for root rights" (i.e. Titanium Backup). I've faced busybox problems in the past that would be causing the bootloop, that happens again here. maybe some bionic change/commit in aosp? anybody seen this behaviour in aosp/master? if not, can you share date for last repo sync, if you are able to get bb/su/Superuser working, this would be a nice time to point me in the right direction ;) busybox wasn't needed for Superuser to work.

original post contents inside quotes

edit: not sure why, but today i rm'ed the whole thing and started over, lunched and rebuild. boots all the way. trying to get su/superuser in, let's see how it goes.
[Samsung Galaxy Nexus] crachel:
You've probably not done anything wrong. My environment was building fine, then I did a repo sync and kept getting a similar error

There was a commit

https://android-review.googlesource.com/#/c/34000/

that appears to deal with GCC, but honestly, I don't really know.
[Samsung Galaxy Nexus] krepi:
The issue seems to come from a new way to handle compilers in

/home/android-source/prebuilts/tools/gcc-sdk

Provisions are made to use either a 64 bits or a 32 bits compiler but none of the toolchains are known in the current repository as far as I know.

My solution so far is to modify the gcc file.

diff --git a/gcc-sdk/gcc b/gcc-sdk/gcc
index eac1c47..b90cac8 100755
--- a/gcc-sdk/gcc
+++ b/gcc-sdk/gcc
@@ -20,6 +20,9 @@ suffix_m64=${options##* -m64 } # suffix after the last -m64
len_m32=${#suffix_m32} # length of suffix after the last -m32
len_m64=${#suffix_m64} # length of suffix after the last -m64

+if true; then
+MY_TOOL=`dirname $0`/../../../prebuilt/linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/bin/i686-linux-${PROGNAME}
+else
if [ $len_m32 -ge $len_m64 ] ; then
# Choose 64-bit if -m64 only, -m64 appears after -m32, or neither exist (-eq)
MY_TOOL=`dirname $0`/${PREFIX64}-${PROGNAME}
@@ -36,5 +39,6 @@ else
# Otherwise, choose 32-bit
MY_TOOL=`dirname $0`/${PREFIX32}-${PROGNAME}
fi
+fi

$MY_TOOL "$@"

Note : it will break later. X86_64 toolchain is indeed needed to compile emulator64-arm. But may be it can be disabled.
[Samsung Galaxy Nexus] ffxx68:
Hi, anyone who could help me with the doubts I posted here in

http://xdaforums.com/showpost.php?p=23689553&postcount=287

thanks again in advance