yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] beekay201:
this is just the way he does it. there are several other ways to achieve this.

that's normal, since you did not specify which folder to clone into. git simply assumed that you were on the right parent folder when you cloned.

platform_frameworks_base is to be cloned inside frameworks, in a folder named base. if you take notice at manifest, project path: frameworks/base.

platform_manifest is to be cloned into .repo/

What remote branch are you using in your local aosp repo? if you're using master, maybe some things are not where you expect them to be, as there has been quite a few changes on aosp master branch.

Maybe now is a good time to introduce to the ones that don't know about it.

In the submitting/review/merging code process of aosp, changes seem to be almost at the same time in github and in gerrit. keep reading.

I'll take frameworks/base as an example. Here you see the commit history on the master branch of project frameworks/base.

You'll see "Add empty libmedia_native in old location" commit by Conley Owens, which was then authored and merged into master tree by Glenn Kasten.

Github is the background running process. Gerrit takes care of the review process. In this link, you can see the latest commits that were reviewed and merged through Gerrit, but was first submitted and tested through github. For example, "Add empty libmedia_native in old location".

repo sync, github and gerrit are all close friends, but they may track dev history at different speeds. after commits are merged in gerrit, (i think) they're merged in github, and when we do repo sync in our local repo, it fetches latest changes, the ones that are already merged, since it syncs with gerrit/aosp master tree.

github must probably be the one where changes occur faster, but then again, from what i've seen, when there's a github commit, there's a gerrit change with it.

I would suggest using branches locally. Add a different remote origin (for example your frameworks/base project in github), and create a new branch tracking it.

To update local with remote, just switch to that new local branch and pull.

PaulW21781's way through manifest also works of course, with the advantage that repo sync fetches from the repo/remote you tell it. The principle being that when you fork android/platform_frameworks_base, and then clone it to your local repo, in the correct folder, it will substitute the previous project totally.

With branches, you're not really adding a different or editing the android manifest, and replacing the whole project folder.

Ways of doing it I guess.

no problem, but a lof of this stuff is about git/gerrit, not really about aosp. there's just too much ground to cover, you'll need to search on these for yourself.
[Samsung Galaxy Nexus] ffxx68:
Thanks bk201doesntexist. That clarified even more. Indeed, I'm uncovering more and more stuff, the more I go on with my trials.
[Samsung Galaxy Nexus] beekay201:
Anybody read JBQ's post? Just did.

http://groups.google.com/group/andr.../1ab0be3d997c36ee?show_docid=1ab0be3d997c36ee

..

Guys who were talking about 64bit/emulator, JBQ was talking about it in the link above as well.
[Samsung Galaxy Nexus] crachel:
I'm building again, as he says, but my crespo userdebug ROM won't boot. so still something is wrong (I haven't tried maguro)
[Samsung Galaxy Nexus] beekay201:
straight vanilla build?
[Samsung Galaxy Nexus] crachel:
yep.. this weekend I'm going to nuke my working dir and sync fresh to see if that helps
[Samsung Galaxy Nexus] beekay201:
sometimes it helps, i've done it a few times myself. :)

i'm having issues getting su/superuser and busybox to boot on maguro. some recent commit in master branch causes this, i believe. need to dig into it further.
[Samsung Galaxy Nexus] bigboss875:
thanx very nice tutorial
[Samsung Galaxy Nexus] crachel:
wiped the entire working dir last Friday and rebuilt.. the crespo userdebug still would not boot

yesterday, I repo sync'd the last 5 or so days worth of commits, rebuilt, and the device boots again
[Samsung Galaxy Nexus] mwalt2:
Thanks, this tutorial was very easy to follow. Is there a way to update the the source on local storage to 4.0.4 without downloading everything again (ie just get the files that were changed)?
[Samsung Galaxy Nexus] beekay201:
good news, it's already on aosp repo

http://groups.google.com/group/android-building/browse_thread/thread/6280654df9ed0efa

edit: and now the whining will stop. great. factory images are out.
[Samsung Galaxy Nexus] mprziv:
would love if the OP could point us to what needs to be altered for building from 4.0.4 source.

Do we just switch the repo to

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

and then use the 4.0.4 drivers from here?

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

For anyone wondering, this seems to be working. Those changes above are all that appear to be needed.
[Samsung Galaxy Nexus] crachel:
alternatively, you could just init the repo on the master branch and only a sync would be necessary
[Samsung Galaxy Nexus] mprziv:
I'm fairly new to building in linux, what would the 2 lines of code look like to init the repo on the master branch, and then sync.

I'm guessing to sync, we'd use "repo sync"?
[Samsung Galaxy Nexus] crachel:
repo init -u https://android.googlesource.com/platform/manifest

would bring down the master branch and yes, "repo sync" to sync

the way you're doing it is fine too, but would be used typically if you want to maybe have a different working dir for several OS iterations
[Samsung Galaxy Nexus] volors:
Thank you very much
[Samsung Galaxy Nexus] everythingsgonegreen:
Thanks for the tutorial.

I'm wondering how to add vendor apk's and libs to the system image. I'm not doing the make otapackage, just a plain make and flashing the image to the device. I've made some code changes to fix a missing feature and to do some debugging, but I also have some apk's and libs I'd like to include during my build.

I've added a .mk file adding to the PRODUCT_COPY_FILES variable, but where do I reference this .mk file to include it as part of the build process?

Thanks
[Samsung Galaxy Nexus] dave_t321:
put this at the bottom of device/samsung/maguro/full_maguro.mk

$(call inherit-product, path/to/makefile.mk)

PRODUCT_COPY_FILES won't work with .apks without a modification to the build system though. Instructions for that are in this thread somewhere..
[Samsung Galaxy Nexus] everythingsgonegreen:
Thanks.

Is there a better way to include the .apk's in the build?
[Samsung Galaxy Nexus] everythingsgonegreen:
missing dictionaries?

So I've compiled 4.0.4 with some changes in the code to get some missing/broken features working and I'm happy with it, I can go on with my debugging and adding to the features I want, but...

I was aware that the gapps were not included with AOSP and after some use, I'm really missing my English dictionary for auto-complete/correct etc.

What package is this in, or is it not supposed to be missing?
[Samsung Galaxy Nexus] Typhoon20:
Cheers for that mate, gonna have a crack at this.
[Samsung Galaxy Nexus] Pandages:
init.d requirements, documentation, LINK!

Hey guys, I wrote a bit of information on how to get init.d working either on a custom ROM or on a rooted stock ROM.

XDA user bk201doesntexist suggested that it be referenced by the OP in this informative and helpful thread. I think that's a good idea.

http://xdaforums.com/showpost.php?p=24633717&postcount=1
[Samsung Galaxy Nexus] sylar012:
Hi! I'm just one of the first timers to use Android.. Just a question.. I tried to install and follow the command but I am getting an error

apt-get install sun-java6-jdk

It seems that the destination or 'sun-java6-jdk' is no longer available. Will there be any issue if I I ignored it? Btw, I am now in the process of sync repo. Thanks!
[Samsung Galaxy Nexus] exb0:
check the 2nd page of this thread, there's a fix for that. I'd really reccommend you to have java, since parts of android are java too.
[Samsung Galaxy Nexus] sylar012:
Thanks! I found the fix but not implemented yet due to repo sync is pain in the ass. It takes so longggg... :( Do I need to perform repo sync every time I install?

Also, which build shall I choose to install binaries? Current build is GSM ICL53F 4.0.2. But I will soon update to 4.0.4 once I know how.. ;)

Binaries for Galaxy Nexus (GSM/HSPA+) ("maguro")

<based from the website>

Android 4.0.1 (ITL41D)

Android 4.0.1 (ITL41F)

Android 4.0.3 (IML74K)

Android 4.0.4 (IMM76D)
[Samsung Galaxy Nexus] beekay201:
Naturally, if you want to build 4.0.4, use 4.0.4 binaries.
[Samsung Galaxy Nexus] sylar012:
Will there be implications if I use different build from my current setup?
[Samsung Galaxy Nexus] mike919:
I've been building this whole time, probably without knowing this and i've always had warnigns during my AOSP build but it always finished but with no network access. I'm building for toro btw. I'm going to go home and fix this. I hope to god fixing this lib32 file on 11.10 is going to fix my builds... I've been trying to research this for days.

---------- Post added at 04:25 PM ---------- Previous post was at 04:23 PM ----------

Also, can someone tell me, I've extracted my proprietary files and ran the .sh in ~/AOSP... should i be running the .sh files somewhere else??? I don't understand why my builds don't have data (unless its related to my post directly above this)
[Samsung Galaxy Nexus] dave_t321:
Read the script. It's just a whole load of adb pull commands. You can see they refer to ../../../vendor/ so it should be run from /device/samsung/toro
[Samsung Galaxy Nexus] Att.Fan1982:
I'm stuck at step 4: obtaining proprietary binaries. I have downloaded the binaries but how do I get to the "root of the source tree" to run the self-extracting script?

Edit: I figured the problem out, I think. I created ics_source directory as root user instead of as user and the ics_directory is inaccessible so I'm doing it all over again from step 3.
[Samsung Galaxy Nexus] beekay201:
root of the source tree.

meaning, if you repo synched in /home/username/android/, then the root of the source tree is folder /home/username/android. That's where you need to run the self-extractors. creating a folder as root would make it accessible only by root... it had nothing to do with it.

On windows, folders would be like C:\android\, ofc.
[Samsung Galaxy Nexus] Att.Fan1982:
Okay, I got past that issue and I'm presented with a new issue during the build process. Right after I make my choice in the lunch menu, I get this error:

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_maguro'

** Do you have the right repo manifest?
[Samsung Galaxy Nexus] crachel:
Looks like you don't have the JDK6 installed.

What is the output of the following command?

which java

if it's anything other than the dir of you JDK6 install, follow this post from earlier in the thread

http://xdaforums.com/showpost.php?p=23466374&postcount=271
[Samsung Galaxy Nexus] Att.Fan1982:
That worked like a charm and I'm in the process of building as I type this reply, THANK YOU, THANK YOU, THANK YOU :D

Edit: how long does it take for this rom to build?
[Samsung Galaxy Nexus] beekay201:
depends on build machine hardware specs..

http://source.android.com/source/building.html

Check sections Build the Code and Using ccache

Sent from my TF201
[Samsung Galaxy Nexus] exb0:
Depends on hardware. Clean build on my m15x takes about 2~ 3 hours. Rebuild is about 30 minutes.

On my desktop a clean build is about 40 minutes and a rebuild is about 10
[Samsung Galaxy Nexus] crachel:
Clean build on my System76 (i7, 16GB RAM, SSD) takes just a tad more than 40 minutes
[Samsung Galaxy Nexus] Att.Fan1982:
How would I go about finding the proprietary binaries for a different device other than what is listed in the link?
[Samsung Galaxy Nexus] adrynalyne:
Add ccache. It will drop down to 12 minutes on a clean build. Well, clean-ish (ccache isn't cleared).
[Samsung Galaxy Nexus] crachel:
my SSD is only 120GB, so I thought that would be cutting it too close for comfort. do you agree?

edit: here's the JBQ post where he talks about using 100GB for ccache https://groups.google.com/forum/?fromgroups#!topic/android-building/H8qNjyUzluM
[Samsung Galaxy Nexus] adrynalyne:
You can get away with 20gb. ccache is used separately for each aosp device. So altogether, it MIGHT use 100gb.

I build for several devices:
[Samsung Galaxy Nexus] nail16:
Thanks for the tutorial :)

noob question

what's the difference between git clone and repo ?

cause when i tried syncing with a persons github source, after repo sync

it gave me an error stating some file was missing (can't remember the name). then when i checked my work folder

it was empty.

I used git clone and it worked fine.
[Samsung Galaxy Nexus] adrynalyne:
repo init and sync is for many git repositories, listed under an XML file.

git clone and pull is for individual repositories.
[Samsung Galaxy Nexus] mwalt2:
Version Control

What's the best method for version control? I've read the guide on source.android.com, but I'm still confused as to the best way to go about it when I only want the version control for myself (ie not going to push anything into Gerrit). Is it best to still use both repo and git or just use git and github/bitbucket, etc.? In the past, I've used Mercurial and SVN version control for small projects and have always pushed the entire project to the remote server. Since android source is so large, I assume you just push the files you change to the remote server, right?

I guess I'm basically looking for a simple guide on the best way to proceed and track changes I'm going to be making. Thanks.
[Samsung Galaxy Nexus] Att.Fan1982:
How do I run the emulator after downloading the android source and building from that source? I get an error stating,

"No command 'emulator' found, did you mean:

Command 'qemulator' from package 'qemulator' (universe)

emulator: command not found"

but I thought the emulator was installed with the build?
[Samsung Galaxy Nexus] martin.capeletto:
thanks for the guide! i'm already downloading the source, we'll came back later if i have further questions!
[Samsung Galaxy Nexus] adrynalyne:
Bitbucket gives more space, but github is more reliable. Either way, I don't think you can set either up without paying. Of course if you don't want to do it online, you can still use git.

I would setup your own localmanifest.xml to pull from your own personal git projects locally. Then you can also sync the other parts from Google when you do a repo sync. Just make sure any modifications you do are to the git projects and not to your repo synced source.

I would look into
[Samsung Galaxy Nexus] martin.capeletto:
I'm having the following problem:

external/strace/util.c:909:30: warning: signed and unsigned type in conditional expression [-Wsign-compare]

external/strace/util.c:928:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

external/strace/util.c:928:26: warning: signed and unsigned type in conditional expression [-Wsign-compare]

external/strace/util.c:929:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

make: *** [out/target/product/maguro/obj/EXECUTABLES/strace_intermediates/util.o] Error 1

Does anyone know what this means? I'm compiling in Ubutu 10.04 using a VM. Search google and didn't find anything
[Samsung Galaxy Nexus] robin.cutshaw:
Are you doing an "eng" build? I just built today with the same error. The changes below allowed the tree to build but I think this is just masking another problem of the wrong config.h being included.

external/strace/io.c.diff

36c36

< #if HAVE_SYS_UIO_H

---

> #ifdef HAVE_SYS_UIO_H

77c77

< #if HAVE_SYS_UIO_H

---

> #ifdef HAVE_SYS_UIO_H

external/strace/util.c.diff

45c45

< #if HAVE_SYS_UIO_H

---

> #ifdef HAVE_SYS_UIO_H

646c646

< #if HAVE_SYS_UIO_H

---

> #ifdef HAVE_SYS_UIO_H
[Samsung Galaxy Nexus] martin.capeletto:
Hi robin, i didn't understand what you mean, could you please give me more details on your answer? i'm learning how to deal with android
[Samsung Galaxy Nexus] robin.cutshaw:
Hi Martin. If you go into your source tree and edit the two files external/strace/util.c and external/strace/io.c, you can make the changes from the lines that start with "<" to the lines that start with ">". Once you have made the changes, you can just rerun make. The output above was generated using the "diff" command.
[Samsung Galaxy Nexus] martin.capeletto:
hi robin, i've just resync the repo and try again from scratch and it works! (i couldn't flash it yet) but it compile it with no errors, so you may try with that again to see if it works
[Samsung Galaxy Nexus] thefotios:
Same problem

Caveat: my C is rusty, but I think this works...

I am having the same problem and came across the same solutoin Robin did. Here's a little more information I figured out. Tracing this variable back, it gets defined in AndroidConfig.h for whatever platform type you're building, and that "file is included by ALL C/C++ source files". So I don't think it's a problem of it being undefined.

I also looked at all of the files where HAVE_SYS_UIO_H is checked, and all of the C ones use #ifdef except our 2 files at the bottom (even another strace file uses it).

libmtp/src/playlist-spl.c:32:#ifdef HAVE_SYS_UIO_H
libmtp/examples/thumb.c:32:#ifdef HAVE_SYS_UIO_H
libmtp/examples/albumart.c:32:#ifdef HAVE_SYS_UIO_H
ppp/pppd/plugins/rp-pppoe/discovery.c:28:#ifdef HAVE_SYS_UIO_H
strace/net.c:88:#if defined(HAVE_SYS_UIO_H)
strace/strace.c:78:#ifdef HAVE_SYS_UIO_H
strace/io.c:36:#if HAVE_SYS_UIO_H
strace/io.c:77:#if HAVE_SYS_UIO_H
strace/util.c:45:#if HAVE_SYS_UIO_H
strace/util.c:646:#if HAVE_SYS_UIO_H

But this does raise another interesting point (and I think you were spot on about this masking a deeper problem). The strace code hasn't been updated in 2 months, so why act up now?

I've verified that this patch gets rid of these problems in strace, just download it to external/strace and run `patch -p0 < Android2.patch`. I don't want to push this patch upstream because I think this might get fixed elsewhere, but if anybody feels otherwise, lemme know.
[Samsung Galaxy Nexus] g.kohei:
wonder

I cant find build kernel for GSM Galaxy Nexus.

Please someone explain how to build.

thanks.
[Samsung Galaxy Nexus] crachel:
Try this http://source.android.com/source/building-kernels.html
[Samsung Galaxy Nexus] jzero88:
Any better guides? Im looking to build a kernel too, but isn't much help out there.
[Samsung Galaxy Nexus] asodsa:
Any idea how to compile ICS in Ubuntu 12.04 or Arch linux?

I can't find sun-java6-jdk in 12.04:(

Can i use oracle-java7-jdk instead?
[Samsung Galaxy Nexus] adrynalyne:
Ubuntu 12.04 should work fine if you use java6 sdk from Sun. Grab it from Oracle and install it manually.

https://help.ubuntu.com/community/Java

Arch becomes a lot harder. Now only do you need the above, but you also must downgrade several components. Off the top of my head, make and gcc are two big ones.
[Samsung Galaxy Nexus] beekay201:
tip: you still need to get through python2>python symlink

arch linux, 3.3.4-2 May 2nd

64bit
[Samsung Galaxy Nexus] Rakeesh_j:
Is stock the same as AOSP? (only the inclusion of gapps of course)
[Samsung Galaxy Nexus] adrynalyne:
No it is not.

Same base, but stock includes closed source components.
[Samsung Galaxy Nexus] Dawamaha:
Could someone please explain step-by-step how to install su and Gapps, including all the needed shell, fastboot, adb etc. commands? I would really appreciate that!
[Samsung Galaxy Nexus] exb0:
su is included with most custom roms. Its superuser. Gapps you can find on Google, flash it through recovery. Fastboot and adb is part of the android sdk.
[Samsung Galaxy Nexus] ismailnayir:
thanks

thanks
[Samsung Galaxy Nexus] ceribaen:
May be a dumb question - but is it possible to build roms with a Windows machine? Or absolutely necessary to be running linux?
[Samsung Galaxy Nexus] crachel:
absolutely necessary for Linux (vitrual machine is OK) or Mac
[Samsung Galaxy Nexus] Dawamaha:
Yes, but I want to include it into my own custom ROM. How do I include it into my build?
[Samsung Galaxy Nexus] adrynalyne:
Fork chainsdd's source and add it to your own.

https://github.com/ChainsDD
[Samsung Galaxy Nexus] TAWoody:
Thank you
[Samsung Galaxy Nexus] hamburgerman:
I'm on java 1.6.0_20 but it will not compile any know which version of 1.6 will work with this? ASOP's website says needs 1.6 or higher to compile but my compile is not working.

"JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older. You can download both from java.sun.com."

I followed the links and installed it now im stuck. I

Checking build tools versions...

************************************************************

You are attempting to build with the incorrect version

of java.

Your version is: java version "1.6.0_20".

The correct version is: Java SE 1.6.

Please follow the machine setup instructions at

http://source.android.com/source/download.html

************************************************************

Edit:

On a side note I don't think the jdk repo is functional now

sudo apt-get install sun-java6-jdk

Reading package lists... Done

Building dependency tree

Reading state information... Done

Package sun-java6-jdk 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

E: Package sun-java6-jdk has no installation candidate
[Samsung Galaxy Nexus] adrynalyne:
You need Sun java jdk 6. Grab it from Oracle.

https://help.ubuntu.com/community/Java
[Samsung Galaxy Nexus] hamburgerman:
I have done this and used the open jdk which is where i think have made a mistake.
[Samsung Galaxy Nexus] adrynalyne:
Oracle Java is what you need to use. The instructions are all on what I linked.
[Samsung Galaxy Nexus] michael_n:
I'm trying to compile on Ubuntu 12.04, but when I launch "lunch" I'm getting an error that I miss JDK.

The Error:

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_maguro'
** Do you have the right repo manifest?

But java seems to be installed fine, because when I run:

sudo update-alternatives --config java

I can choose the jdk

Output:

0 /usr/lib/jvm/jdk1.6.0_31/bin/java 1 autotilstand
* 1 /usr/lib/jvm/jdk1.6.0_31/bin/java 1 manuel tilstand
2 /usr/lib/jvm/jre1.6.0_31/bin/java 1 manuel tilstand

Anybody who knows what I'm doing wrong?
[Samsung Galaxy Nexus] beekay201:
10chars
[Samsung Galaxy Nexus] irisgl:
I've taken the latest version (android-4.0.4_r2.2, which is IMM76L). Compiled for full_maguro-user and flashed.

Everything works fine except for any bank app (search in play store by bank+apps). It just does not allow to install the app from market, the message in the market is - Your device isn't compatible with this version. Installing the apk from sdcard does not work also, it tries to install and fails.

Am I right that it's related with the test keys that signed the build by default or it could be something else?

I tried to replace build.prop with another one, taken from the yakju factory image, but it didn't help.
[Samsung Galaxy Nexus] adrynalyne:
You have an improper market fingerprint.
[Samsung Galaxy Nexus] irisgl:
OK, and what is wrong with the google original yakju fingerprints?

Does not it make sense if you flash the google factory image and it works without any hiccups and you just copy the build.prop from it and create your own rom with the very same build.prop, does that not help at all?

In this case, I would greatly appreciate it if somebody could share the working build.prop.

Or it's something else and is not related with the build.prop file?