yashsingh1/xdaforums huggingface dataset:
[Nook Color Android Development] jewnersey:
alright well let me ask some basic Q's and then get more into where i am currently

whats the difference between repo sync and repo sync -j16 ?

if i were to complete a build toinght and then want to do it again to update.. at what step would i have to start..

so i ran repo sync -j16 last night, it completed, and then i ran into other issues. if i just did the git clone .../fat-tire/... and then mv, do i need to redo the sync -j16 or is just sync good enough.
[Nook Color Android Development] inportb:
@jewnersey: -j16 runs the process with 16 threads, allowing you to fetch 16 things concurrently; since the operation of downloading source code is largely network-bound, you might find that concurrency reduces your waiting time, regardless of CPU capacity.

@fattire: I see you have a webchat link in there. You could link directly to #nookcolor, if you want.

Personally, I'd recommend starting from update-cm-9.0-0-encore-emmc-sneakpeek1-fullofbugs.zip -- it works great, in my experience, with a minor tweak.
[Nook Color Android Development] fattire:
Basically I believe it has to do with the number of threads/connections running simultaneously. They do the same thing, essentially, but repo sync -j16 is a lot faster.

Basically you'd want to cd to android/system, then type

$ . build/envsetup.sh (this gets you the "lunch" command)
$ repo sync -j16 (this will update all your source code to the latest)
$ lunch (and then choose the "target". In this case you want to build for encore)
$ mka (this starts the build)

In the above example, the $ is the prompt, not part of the command.

Only stuff that has changed will be re-built. That is, unless you type "make clobber" to erase everything that you've already built, say to build totally from scratch all over again. In which case you're in for a long re-build :)

sync -j16 and sync are the same thing essentially. You can try -j4 and -j23 or whatever and see if they work for ya.
[Nook Color Android Development] Homer_S_xda:
Thanks,

I meant a how to on making a .zip from the output. I see you mentioned later that a trained professional was already adding that capacity. I will be patient and wait.

Homer
[Nook Color Android Development] ioos:
A couple of pages back I was trying to get this to build on Arch Linux. While it may be possible, it isn't easy. The problem is that Arch is too "bleeding edge". Python, Make and Java are all versions newer than required by the build process. There are workarounds, but there may be more problems after those are resolved.

In summary, I still highly recommend Arch for most purposes, but I'm still booting into Ubuntu 11.10 to build CM9/ICS.
[Nook Color Android Development] fattire:
Talk to user "FMKaiba" in irc. He was building in Fedora (unsuccessful), then switched to arch and was able to build.
[Nook Color Android Development] jewnersey:
@fattire and inportb

Thanks for all that. im syncing now.

last Q. how often are updates made? how often should i sync and rebuild?
[Nook Color Android Development] fattire:
Updates are coming in constantly, both from Google for the AOSP (Android Open Source Project) components, and via CyanogenMod, as various contributions from the Internet are accepted.

Check out CyanogenMod's review system-- gerrit. Here you can see what has been recently merged into the codebase. More interestingly, you can see what people have been submitting for review. If there's something you want to try, you can actually test it by merging it into your code and building. It's a simple matter.

Let's say you're Greek, so you want to try out these new Greek translations for the reboot menu. This is just an example of something I found quickly that wasn't yet merged. You just do this:

So where it says Download in the middle of the screen, there's some instructions for you to highlight and copy. In this case, it looks like "git fetch http://review.cyanogenmod.com/p/CyanogenMod/android_frameworks_base refs/changes/31/11131/2 && git checkout FETCH_HEAD" (sorry, xda's bulletin board system actually puts some .... in the middle of the link. But you'll see the full command there.)

Alternatively, you can click the little icon to the right of those instructions and it will automatically go to your copy buffer.

Now go to the source code. cd to android/system. This patch affects android_frameworks_base (as you can see at the top of the gerrit description), so cd frameworks/base.

Now paste the command. You've just added the proposed change to your copy of the source code.

Go ahead and build. When you're done, (and if you've set greek to be your android language) you'll hopefully have greek instructions for the reboot option. If it worked alright, go sign up for gerrit and give a +1 vote to this proposed contribution.

Warning-- the next time you do a repo sync, you'll probably have these changes overwritten.

Being able to try cutting-edge features and improvements now is in your hands. You don't have to wait for a nightly build any more. You don't even need to wait for the code to be ACCEPTED into cyanogenmod! you can help test it and get these features before anyone else even knows about them. Just keep checking Gerrit.

Enjoy.
[Nook Color Android Development] Stale_bread:
so this isn't just for one device? but for all devices running cyanogenmod?
[Nook Color Android Development] fmkaiba:
Send me a PM, i got it to build wonderfully, runs great on arch, its all in the setup, and arch gives me the control i need, or just post where in the build log u got stuck, maybe i can help.

I build with newer make, and open java, despite the warning, without fail
[Nook Color Android Development] jewnersey:
mtp@mtpc:~/android/system$ mka
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=cm_encore
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=MR1
============================================
build/core/main.mk:322: implicitly installing apns-conf_sdk.xml
build/core/base_rules.mk:166: *** device/bn/encore/hwprops: MODULE.TARGET.EXECUTABLES.hwprops already defined by device/bn/encore/android_device_bn_encore/hwprops. Stop.
mtp@mtpc:~/android/system$

whats wrong now

:::

looked back a little and ended up sorta following what someone else did. deleted android_device_..... looks to be working now

:::

when i synced system it only pushed 3 files... otacerts. event log. build.prop

somemore things that look odd to me

Install: out/host/linux-x86/bin/acp
Install: out/host/linux-x86/framework/guavalib.jar
host Java: jsilver (out/host/common/obj/JAVA_LIBRARIES/jsilver_intermediates/classes)
Note: external/jsilver/src/org/clearsilver/FactoryLoader.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Install: out/host/linux-x86/framework/jsilver.jar
Install: out/host/linux-x86/framework/antlr.jar
host Java: doclava (out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes)
Note: external/doclava/src/com/google/doclava/Stubs.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Install: out/host/linux-x86/framework/doclava.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes-jarjar.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/emma_out/lib/classes-jarjar.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/noproguard.classes.jar
Install: out/host/linux-x86/framework/dx.jar
Copy: dx (out/host/linux-x86/obj/EXECUTABLES/dx_intermediates/dx)
Install: out/host/linux-x86/bin/dx
target Dex: core
[Nook Color Android Development] nukedukem:
jewnersey - I'm no expert but it looks like you have an extra folder with a duplicate of your nook files in it. I would delete the folder /android_device_bn_encore in your device/bn/encore folder and give it another shot.
[Nook Color Android Development] fattire:
Yes-- although you don't have the device folders for all the various devices. You can choose the ones you want. But generally speaking, it's one source code for many CM9 devices. An improvement added to one will more or less apply to all of them (unless you take specific steps to make sure it only applies to certain devices).
[Nook Color Android Development] fattire:
Yep.

Trebuchet is in "rapid development".. You could try clearing your settings from /data/app...launcher2 something or other... and/or look for fixes. Or better yet, see if you can figure out what's making it crash, fix it, and then apply your fixes to gerrit for others to use! :)

So basically the fix to the rotate animation had two parts:

1. remove the rotation=270 line in system/build.prop

2. use the kernel that does the rotation for you.

If you only replace the kernel, everything will be rotated 270 degrees... the whole OS will be sideways. If you only change the 270 line, same thing...

BTW-- anyone who isn't building from scratch that wants a fixed rotation and screenshots can do the two steps above manually and should have a better "sneakpeek1".
[Nook Color Android Development] fattire:
yeah. looks like you put the same thing in there 2x...

These must be the only files that changed since the last time you did an update. Also, to avoid everything being sideways, make sure that the build.prop you've pushed doesn't have the rotation=270 line in it if you're using the new kernel...

This all looks normal to me. No "Error:" messages...
[Nook Color Android Development] Stale_bread:
that is very cool. thanks for all the info. i am really close to having my ubuntu box set up to build from source. im super exited :D
[Nook Color Android Development] jschill31:
Well I have no idea how to fix it but I think the launcher has a memory leak. Not sure if I am using the correct terminology or not but it eats up cache like crazy. When it does fail I clean my cache and it usually is around 20mb. Then everything works great for a while, when it crashes I clean the cache again. ;-)

Is anyone having difficulties syncing with the repo?

Cheers
[Nook Color Android Development] jewnersey:
should it be taking 3+ hours to build?
[Nook Color Android Development] inportb:
Sounds about right. What kind of hardware are you building this on?
[Nook Color Android Development] jewnersey:
Intel® Core™ i3 CPU U 330 @ 1.20GHz

2GB

:(
[Nook Color Android Development] inportb:
You're probably looking at a 5~8 hour build, depending on how much other work you're giving your build machine. Take a nap!
[Nook Color Android Development] jschill31:
Hello,

Has anyone tried to sync this evening? I am getting to 99% and then it just hangs...

curious
[Nook Color Android Development] inportb:
Happens all the time, man... You need to kill the sync process (press ctrl+\) and retry until it works. If it complains about bad repositories, you must remove them and retry until you have 100%. How many threads are you running the sync with? It might help to use fewer threads.
[Nook Color Android Development] smiley4017:
OK. Took the last six hours trying to set this up but it beyond Me so I will just wait until someone post it. I guess if we can't compile it then we do not deserve it.
[Nook Color Android Development] jschill31:
Thanks for the heads up...only sync'd about 6 times and never had any issues. I have tried both just the repo sync & repo sync -j16. Each will hang at either 98% or 99%

Update, no longer hanging...finished the sync this time.

Cheers
[Nook Color Android Development] fattire:
The build time depends on the cpu-- I have an 4-core i7 and it takes about 45 minutes. Others have reported as low as _8 minutes_ on some ridiculous multi-core setup. Someone else in this thread said six hours!

Subsequent builds shouldn't take so long however. If you're using CCACHE every time, and if you don't do a "make clobber" every time, it should only build the "new stuff"-- based on what changed.
[Nook Color Android Development] therkr:
Can you please tell how much time my CPU would take?

Its a C2Quad Q6600 (OCed to 2.8GHz).

Has it to do with RAM? I only have a DDR2 667MHz.

Thanks!
[Nook Color Android Development] jewnersey:
still going strong over here... yikes

ive been pulling NZBs all day though too
[Nook Color Android Development] nukedukem:
Fattire could you share the changes you made to the old local manifest that used the stock launcher instead of the cm version? Or does anyone happen to have that version still?
[Nook Color Android Development] zequav:
After (unsuccessfully) trying to get it to compile in Gentoo I decided to soil my hard disk :p by installing Ubuntu 11.10 in an available partition. Everything compiled fine. I wish the build process was more robust, stopping gracefully with "you need package x.y instead of z.k" instead of failing with weird compilation errors (i.e., the typical configure phase).
[Nook Color Android Development] newellj79:
Having no problem building this, thanks to all fattires help. Yesterday I thought ics was not allowing me to write data to my sd card, turns out i had a bad card doh! This morning i was experimenting with the script to make update.zip's. Every seemed to work except it wont sign the packages. It pops up a error. The unsigned zip installs just fine though. I was wondering if maybe im missing some dev package that handles that? Thanks for the help.
[Nook Color Android Development] darkfalz:
First time poster, long time lurker. Big fan.

First of all, thanks for all the hard work going on here, you guys rock.

Second, while attempting to to build on my own, using fattire's instructions and the nice little script that inportb put together, I am getting the same error every time, at the same point in the process (very end of the repo sync command).

Fetching projects: 100% (243/243), done.
fatal: This operation must be run in a work tree
Traceback (most recent call last):
File "/home/erick/android/system/.repo/repo/main.py", line 366, in <module>
_Main(sys.argv[1:])
File "/home/erick/android/system/.repo/repo/main.py", line 346, in _Main
result = repo._Run(argv) or 0
File "/home/erick/android/system/.repo/repo/main.py", line 137, in _Run
result = cmd.Execute(copts, cargs)
File "/home/erick/android/system/.repo/repo/subcmds/sync.py", line 443, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/erick/android/system/.repo/repo/project.py", line 975, in Sync_LocalHalf
self._InitWorkTree()
File "/home/erick/android/system/.repo/repo/project.py", line 1758, in _InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree

I am hoping for a quick fix from one of you gents. Or point me in the right direction, I'm willing to learn.
[Nook Color Android Development] tsddave:
Really cool to see this :)
[Nook Color Android Development] bassrebel:
Up to this point, do we know what's working and what's not?
[Nook Color Android Development] inportb:
Is there any other output?

Yeah, if you plugged the makefile into what you already built, do:

make commonconfig
make init

That should download the appropriate signing tool and testkeys, but not rebuild your working directory.
[Nook Color Android Development] darkfalz:
No sir, that is it.

repo sync -> 100% -> that error
[Nook Color Android Development] inportb:
Are you running repo sync in the system directory (or make sync, one level up)?
[Nook Color Android Development] darkfalz:
repo sync in the system directory, and just tried make sync from a directory up, with the same results.

Also, if you'd rather talk in the irc room, I'm idling in there as well.
[Nook Color Android Development] Homer_S_xda:
I had the same errors. I traced it (I think) to having missed a few installs. The packages missing at the time were these

libsdl1.2-dev

zlib1g-dev

sun-java6-jdk

lib32z1-dev

Might also have been a coincidence. It did successfully (again I think) build. At least it produced a convincing looking file system complete with the kernel and other files.

Homer
[Nook Color Android Development] darkfalz:
I've already got those (tried to install anyways and it just said 0 upgraded, 0 newly installed), but the last one, lib32z1-dev, gives an error:

Package lib32z1-dev 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 'lib32z1-dev' has no installation candidate
[Nook Color Android Development] inportb:
You might need a different version of libz depending on your OS.
[Nook Color Android Development] darkfalz:
zlib1g-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 271 not upgraded.

Sound about right?
[Nook Color Android Development] Stale_bread:
i keep getting stuck at this:

git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool

resulting in:

git-core: command not found

i have installed git and even checked the software manager and it says git-core is already installed :confused:
[Nook Color Android Development] khaytsus:
I didn't see him in-channel, but I looked in logs and I see he was on 16.. Newer stuff I suppose. I'm on Fedora 14 (64 bit) and no problems building, even with OpenJDK.
[Nook Color Android Development] inportb:
Yep.

Installing packages on debuntu? Try apt-get install.
[Nook Color Android Development] jewnersey:
welp after endless amounts of effort and what looked like a bunch of errors, i pushed system and it booted. hopefully, whatever error'd wasnt too big of a deal.

thanks for your help everybody.
[Nook Color Android Development] mmarsman:
Thanks

This process has been awesome. It's great to learn about how all the pieces come together.

I just finished the build on a VM of Ubuntu 11.10 x64 (4cpus and 4GB of ram) and it took about 1.5 hours to build.

What gapps are you guys using?
[Nook Color Android Development] Homer_S_xda:
On Ubuntu, I first installed Synaptic Package Manager. Ran it, searched for each package and marked them for install. When you have them all, hit apply. Also, you have to add a new repository to get to the version of Java SDK they specify.

Homer

---------- Post added at 11:45 AM ---------- Previous post was at 11:40 AM ----------

Bam!

I managed to build last nights CM9, replace the juicy bits in Fattire's update.zip and flash it to SDcard. I'm so happy I could... nevermind about that.

Next up, log into my gmail account, reboot and load the Gapps. (Update: had to flip that order, got too excited.)

I did notice a DSPmanager stopped error when it first booted.

Having fun!

Homer
[Nook Color Android Development] Stale_bread:
didn't work :(

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root

and when i run under sudo it says command not found

and Homer, i ran this before and updated everything. but still nothing
[Nook Color Android Development] Homer_S_xda:
Updated update: got one good boot from it. Flashed the Gapps and all has gone to heck. Ah well.

Homer
[Nook Color Android Development] cybertimber2007:
It sound like something is messed up on your system.

Post the output of the following commands (ps # and $ aren't part of the command)

#df -h

#who

#su -

(log in as root)

$who

$apt-get install git-core

It might have something to do with an out of date system?(271 not upgraded)

$apt-get update

$apt-get upgrade
[Nook Color Android Development] inportb:
... or maybe apt-get is not in the root user's $PATH. Try /usr/bin/apt-get instead.
[Nook Color Android Development] Bawb3:
I never had the patience for building from source. And Ubuntu always ends making me want to kill babies and puppies. I don't even think I could get the sdk set up correctly.

Maybe I should try fedora.
[Nook Color Android Development] inportb:
You should definitely use Ubuntu!

(and exterminate those annoying babies and puppies)
[Nook Color Android Development] MrColdbird:
I think you guys misunderstand the puppy killing thing...

Gentoo = you kill the puppies and babies

Debian = someone else killed the babies for you

Ubuntu = someone else killed the puppies and babies for you

All you are left with is to clean up the mess.

On a less offtopic side.. do we already know what keeps audio out of reach from us?
[Nook Color Android Development] fattire:
Working update.zip files?

The build is a bit broken for a little while while nemith and I try to get the update.zips building...

standby...
[Nook Color Android Development] Jaostar:
Did someone achieve to get adb recognizing the Nook ( over usb ) when using virtualBox? ( wanna build, but can't copy the proprietary files... :( )
[Nook Color Android Development] AidenM:
EDIT: Stupid question

Delete please
[Nook Color Android Development] dgozalie:
update zip ?

Well, i just don't have time to learn to do the build anymore... i just use the original zip that fattire post and already feel very happy.. but then after everybody start built their own source, i just wondering some thing... can anybody, especially fattire will post the latest zip file for the rest of us that are clueless and got no time to learn how to build the source ? we all already read the warning and understand the risk to flash with 'alpha' zip file...

Donny
[Nook Color Android Development] Nburnes:
Read back a couple pages where fattire said no.
[Nook Color Android Development] inportb:
In addition, it seems that a new update.zip is in the pipeline.
[Nook Color Android Development] znelis:
Why not connect over wifi? I use https://market.android.com/details?id=siir.es.adbWireless and it is working fine.
[Nook Color Android Development] jschill31:
Hello,

Making changes to build.prop is easy to do but what kernel are we replacing the current kernel with? Or are you saying that since the first build you have made a change to the kernel and by syncing we will get the kernel swap automatically?

Thanks

Cheers
[Nook Color Android Development] Nburnes:
The kernel will change whenever you sync again and then you will have it.
[Nook Color Android Development] inportb:
Try doing that while the OS is booting ;)
[Nook Color Android Development] J-ROCK:
Im having issues myself with ADB and Ubuntu 11.10. I followed these ins. http://nookdevs.com/NookColor_USB_ADB and no luck
[Nook Color Android Development] jschill31:
Thank you, I figured as much but everything seems so automatic.

Cheers
[Nook Color Android Development] stevekent:
Is it still broke? I am trying to compile for the first time and have this issue:

Construct recovery from boot

mkdir -p out/target/product/encore/obj/PACKAGING/recovery_patch_intermediates/

Install: out/host/linux-x86/lib/libESR_Portable.so

target Symbolic: libstagefright_omx (out/target/product/encore/symbols/system/lib/libstagefright_omx.so)

target Symbolic: drmserver (out/target/product/encore/symbols/system/bin/drmserver)

PATH=out/host/linux-x86/bin:$PATH out/host/linux-x86/bin/imgdiff out/target/product/encore/boot.img out/target/product/encore/recovery.img out/target/product/encore/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p

target Symbolic: libaudioflinger (out/target/product/encore/symbols/system/lib/libaudioflinger.so)

target Symbolic: libcameraservice (out/target/product/encore/symbols/system/lib/libcameraservice.so)

target Symbolic: audio_policy.default (out/target/product/encore/symbols/system/lib/hw/audio_policy.default.so)

target Symbolic: libSR_AudioIn (out/target/product/encore/symbols/system/lib/libSR_AudioIn.so)

target Symbolic: librtp_jni (out/target/product/encore/symbols/system/lib/librtp_jni.so)

failed to stat "out/target/product/encore/boot.img": No such file or directory

failed to break apart source image

make[1]: *** [out/target/product/encore/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p] Error 1

make[1]: *** Waiting for unfinished jobs....

target Symbolic: audio.primary.goldfish (out/target/product/encore/symbols/system/lib/hw/audio.primary.goldfish.so)

make[1]: Leaving directory `/usr/source/system'

make: *** [build] Error 2