yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] sparksco:
A Google toolbar won't really help you much for merge conflicts on a kernel.

We'll I decided to go ahead and merge into my custom kernel and I have to say it was somewhat of a challenge. I didn't see any merge conflicts resulting from cm changes as fattire stated. The merge issues were related to Google stripping out certain commits. Much of the commit history did not match up when comparing the old with the new. I had to revert about 4 commits and that still didn't resolve all the merge conflicts but it did help to reduce it to only about 4 files needing fixed. Then of course I had to update the defconfig as fattire mentioned. If anyone is interested you can see how I did it on my github commit history. https://github.com/pbeeler/Kernel-Grouper/commits/jellybean

This kernel is not based on cm kernel so don't think just a merge of my kernel into cm will work cause it won't. But you can get the general idea.

I also uploaded the stock Google kernel on a separate branch to make viewing the source and commit history easier.

https://github.com/pbeeler/Kernel-Grouper/tree/android-tegra3-grouper-3.1-jb-mr1-fr
[Nexus 7 Android Development] sunny2303:
You got me wrong mate... My post had no connection with yours.

I just wanted to thank the OP and let know others that guide worked well for me...
[Nexus 7 Android Development] sparksco:
Oh I see, I guess it was probably due to the vagueness of your post... I'm also trying to help as well :)

Glad the guide is working well for you, cheers.
[Nexus 7 Android Development] z1gackly:
I've written a "how to" guide covering repo, github, git and gerrit. It explains the next steps to take after using fattire's guide to get started, and how to control your Android development:

http://z1gackly.wordpress.com/2012/11/11/how-to-use-repo-github-git-and-gerrit/
[Nexus 7 Android Development] sparksco:
Nice, can you also add how to handle pull request? I think that's a pretty common feature used by developers on github ;)
[Nexus 7 Android Development] z1gackly:
I've never had to do it, because the only ROM I submit stuff for is CM10! Want to write a paragraph or two on it, and I'll add it to the guide?
[Nexus 7 Android Development] sparksco:
It was just a suggestion... No need to get worked up over it... When I'm home I'll link you to github's section on it.

BTW it's not for cm it's for developers outside of cm gerrit to share code changes that cm probably would not approve of but may still be use full. It's just a way to collaborate on something perhaps even to get something ready before it's worth submitting to gerrit.
[Nexus 7 Android Development] z1gackly:
What made you think that? I wasn't worked up at all, just saying I've never used that feature.
[Nexus 7 Android Development] Phil3759:
Hi,

Have a noob question:

I always tend to use lunch cm_device-eng instead of cm_device-userdebug

At the end, what's the difference in ROM output? Just a debug android version?
[Nexus 7 Android Development] sparksco:
For people that want to learn about using Github's pull request feature here's a few links I found using

Google Search

Using Pull Request

Merging a pull request

Creating a pull request

---------- Post added at 01:46 AM ---------- Previous post was at 01:40 AM ----------

Any reason why your building eng without knowing what it does? engineering builds have more debugging tools in it so unless your developing a app that needs debugging or working on fixing things in rom source code it's not very useful to general every day users. The result product will be larger sized roms and more overhead processes running in the background. Probably end up with higher batter drain.
[Nexus 7 Android Development] Phil3759:
No, i know well -eng is for release engenearing version. Just when you google specifically cyanogenmod implementation on it, no info exists. Plus for recovery it does not matter, and i build recoveries. Thank you anyway.
[Nexus 7 Android Development] Screw Muggz:
No Flashable .zip

Hi, Ive tried compiling and I haven't seen any errors but I have not produced a .zip I can flash.

I see .img files in the out directory but not the unofficially marked .zip file.

Could someone point me in the right direction please?

Thanks!!
[Nexus 7 Android Development] AndDiSa:
brunch grouper

Should create the zip
[Nexus 7 Android Development] Screw Muggz:
I'm trying to figure out why I don't get the zip after running brunch grouper.
[Nexus 7 Android Development] gee one:
I think CM has a few things built into the env such as brunch and the otapackage.

Try lunch and select grouper

Then use "make otapackage -j <number of proc cores>"

For an i7, I would use -j 8, for an i3/i5, use -j 4

If you using something older, good luck.

I think this is the aosp way to build.

sent while running with scissors
[Nexus 7 Android Development] sparksco:
Just a FYI 4.2 source is up. Not sure who the maintainers are since Grouper isn't in the changelog... A couple things about the device changes, merge breaks cm USB otg storage function. We'll probably need new recoveries for the new sdcard location. Newer kernel source should be up soon. Factory images and binaries are available. I wouldn't build until cm gets everything hammered out.
[Nexus 7 Android Development] apascual89:
Yes, I did a stock install to check it out. Every update keys getting better! The current twrp reads sdcard in a funky named location. It's under SD card/0

Quick question, just came across this:

http://wiki.cyanogenmod.org/wiki/Recreating_CM_Releases

How's that different than the lunch process to get the device dependencies?
[Nexus 7 Android Development] sparksco:
We need new recoveries, I have the same issue it can't find my old cm backups which is annoying.

That's not feature that's in the Roms yet, and probably not something I'm going to use since I use my own manifest anyways.
[Nexus 7 Android Development] fattire:
Quick heads-up. I re-did the AOSP 4.2 branch that I mentioned earlier and hopefully I did it more correctly.

The CM 10.0 release uses the regular kernel without these changes, which I guess is how it should be, since these were targeted for 4.2.

In any event, before they get pushed upstream to the official CM repository, I wanted to give you self-builders a chance to vet them for me :)

Here's the commit. Aside from including all the internal commit information in one merge commit, this version has a few fixes to the CM defconfig which weren't in the one I posted previously.

Can any enterprising folk give it a shot and let me know if you find any issues? Pay special attention to the 10 files in the commit message that had conflicts. I fixed 'em, and things seem to be fine, but I just wanna be sure because as you can see, this thing is gigantic.

It's got 115 changed files with 8,601 additions and 1,624 deletions.

Thanks, volunteers!
[Nexus 7 Android Development] sparksco:
I'm downloading aosp source right now. Once I get the source and blobs set up I'll compile fattire's changes and put it in the aosp source as a prebuilt. This way it can be fully tested on a 4.2 aosp rom.

Edit: might not be til tomorrow or next day as I'm also adding in linaro patches and toolchains.
[Nexus 7 Android Development] fattire:
Well my changes are AOSP changes applied to cyanogenmod source...
[Nexus 7 Android Development] sparksco:
Well like I said I plan on compiling your kernel changes with cm kernel as a prebuilt so it should work fine since aosp uses a prebuilt kernel. The main thing is to test it on a 4.2 rom. Even cm's kernel is 99.9% aosp source....
[Nexus 7 Android Development] gabx:
A little bit of topic, but as this thread is active, hope I will find an answer.

When building N7 image from Google source, it build the android stock recovery. When flashing it on my device, it will override my custom TRWP recovery and I don't want that. How shall I proceed to :1- build the custom one at build time or 2-change the recovery image after the build. Ty for help

EDIT: maybe as simple as replacing android original recovery folder with TRWP source one before I build?
[Nexus 7 Android Development] fattire:
Yup. That should do it.
[Nexus 7 Android Development] iDavidStory:
I just performed a "repo sync", build, and flash, expecting to see 4.2, but see 4.1.2 with my build info (user/hostname/timestamp). I was expecting to see 4.2. Guess its not in the main branch yet? If you give me an example how to pull your 4.2 changes, I'd give it a spin.
[Nexus 7 Android Development] EnemyOfGlaDOS:
Nexus 7 showed up! I'm gonna sit down this week and start at page one, see how far I can make it :D
[Nexus 7 Android Development] gabx:
Remove your build info file before your new build
[Nexus 7 Android Development] iDavidStory:
I performed a "make clean", before I started the build.
[Nexus 7 Android Development] gabx:
$ rm build.prop != $ make clean

REMOVE,DELETE your /system/build.prop BEFORE you make.
[Nexus 7 Android Development] sparksco:
make clean deletes the entire contents of the output (out) folder
[Nexus 7 Android Development] gabx:
Known bug. If you do not remove your old build.prop, you will be stick with it.

And before you sync, best is to remove your /build/envsetup.sh to get a new one from syncing.
[Nexus 7 Android Development] sparksco:
That's not a known bug for me, works fine.
[Nexus 7 Android Development] gabx:
I am not building CM10, but AOSP. The CM team may have probably get rid of it, or maybe did this bug disappeared with 4.2.
[Nexus 7 Android Development] sparksco:
Nope, same thing on AOSP...

Edit: you need to initialize the build environment before running make clean.

. build/envsetup.sh && lunch cm_grouper-userdebug && make clean
[Nexus 7 Android Development] iDavidStory:
I perform the following commands (to clean, sync, build):

cd into the top directory

source build/envsetup.sh

croot

make clean

repo sync

brunch grouper

I see this during the build:

PLATFORM_VERSION_CODENAME=REL

PLATFORM_VERSION=4.1.2 <---- NOT 4.2 ----

TARGET_PRODUCT=cm_grouper

TARGET_BUILD_VARIANT=userdebug
[Nexus 7 Android Development] sparksco:
cm hasn't merged 4.2 yet.
[Nexus 7 Android Development] iDavidStory:
I see fattire has made a commit with 4.2 changes (in a previous post, page 48).

I'm wondering if I can pull from there?

I don't know the command to grab it.

Can anyone help?
[Nexus 7 Android Development] sparksco:
For the kernel you can just do a local merge that will reset back to normal after a repo sync. From the root of your source.

cd kernel/asus/grouper

git pull https://github.com/fat-tire/android_kernel_asus_grouper.git jellybean

After the merge you'll need to hit Ctrl+o and then press enter, then press Ctrl+x to exit to complete the local merge once the merge screen pops up.

Now just build the rom as normal.
[Nexus 7 Android Development] fattire:
I haven't pushed this to the cm repo yet (been busy) but hopefully will soon.

It's pretty well-tested with 4.1.2 though. As far as how to get it-- you can make a patch out of any commit on github by adding ".patch" to the URL. Also, you can do ".diff"

then git am patches.patch

or

git apply adiff.diff

Of course you can also add my github as a remote (git add remote) and then fetch it and cherry-pick from there. That may be a little more advanced tho..
[Nexus 7 Android Development] lightninbug:
:) :) :) :) :) :)
[Nexus 7 Android Development] shinjielric:
Every time I do a repo sync or anything repo related I get a "Repo 1.18 is out you should upgrade soon."

How do I do this? I've even went as far as starting from scratch and everything. It's not effecting my build or anything its just annoying to see that message every time.

---------- Post added at 08:52 PM ---------- Previous post was at 08:51 PM ----------

I'm trying to compile that. I keep getting an error and it stops compiling.
[Nexus 7 Android Development] gee one:
It might suggest a command like cp .repo/repo/repo /usr/local/sbin/

I thought there were some issues with repo 1.18 and git. I think it's fine with ubuntu 12.x, but if you are building in 10.04, you might have to manually update git.

sent while running with scissors
[Nexus 7 Android Development] sparksco:
git pull worked fine for me..
[Nexus 7 Android Development] sparksco:
Seems to work fine for me on Ubuntu 12.10, but I'm using a proxy so not sure if that has anything to do with it or not.
[Nexus 7 Android Development] sparksco:
Hey fattire I went ahead and merged in the missing branch into the kernel and sent a pull request to your github. The merge went clean :)

https://github.com/fat-tire/android_kernel_asus_grouper/pulls
[Nexus 7 Android Development] fattire:
Thanks, but... I'm a bit confused-- what did you do that isn't in the commit I linked to eleven days back?

Anyway I'm finally building 4.2 as we speak (I know, I know... I've been a bit busy with the holiday and such) so we'll see if it works out.
[Nexus 7 Android Development] sparksco:
The "android-tegra3-grouper-3.1-jb-mr1" never got merged into cm which is the branch before the branch you already merged... The branch you merged is "android-tegra3-grouper-3.1-jb-mr1-fr"
[Nexus 7 Android Development] fattire:
Ah I didn't realize they did yet another branch.. the fr stands for factory release... we obviously want to use the most recent branch. Since I did a merge I would assume that fr has the mr1 stuff... you didn't have any issues with the merge? Or did you do the merge on top of mine (in which case I probably dealt with them...)

I guess I should look to make sure we're not missing anything in mine.. if mr1 was before the -fr branch it should be inclusive.... I guess I need to look to see which came first. But it may be fr is before mr1. In which case yeah the new stuff may be needed.

Update: yeah I just went to my kernel repo and did:

git fetch goog

git merge goog/android-tegra3-grouper-3.1-jb-mr1

(goog is upstream aosp)

and it all came in... no problems at all, no merge clashes, nothing. Just accepted it all easy peasy. So I'll just rebuild the kernel in my build here and see if this works. Looks like mr1 is newer than mr1-fr. And I don't see any changes to defconfig needed either.. so testing... thx...

Next Update: Okay I learned a few things:

1. Don't update from cm10 to cm10.1 when you have a 9x9 lockscreen. Because, like, 10.1 doesn't.

2. If you should do such a stupid thing, rm /data/system/locksettings.*

3. I got a few "clock has unfortuantely quit" errors.

4. live wallpapers don't work for some reason. also youtube.. fails.

5. otherwise so far so good... i probably should do a wipe but nah.

The video error is:

E/MediaPlayer( 6071): Attempt to call getDuration without a valid mediaplayer

E/MediaPlayer( 6071): error (-38, 0)

Another update: Oh dear, did I forget to update the binaries to the new ones? Let's see what kind of difference that might make :)
[Nexus 7 Android Development] sparksco:
Yeah I just merged on top of yours and it merged clean. New changes/commits came in.
[Nexus 7 Android Development] fattire:
Okay, so it turns out that when you use the right binary blobs, you get a pretty damn good build :)

Camera, video are back. The only issue I'm seeing at the moment is it warns me that "clock" quits when I first boot. I'm guessing this is related to some difference between the cm10 and cm10.1 clock (or maybe clock settings).

I was just in the terminal so just pushed up... it's 100% exactly same as yours, I'm pretty sure. Thanks again!

And... good times. I'm done for the night :)
[Nexus 7 Android Development] sparksco:
No worries, and I think there's a thanks button around here somewhere...
[Nexus 7 Android Development] fattire:
So I (finally) pushed the mr1-staging device and kernel repos up.

The device repo adds about 176MB of history-- sorry-- I think most of it is updating the prebuilt kernel that CM10.1 builds from scratch, but a decision was made to restart with AOSP's full mr1 as a base. So this is mr1 from AOSP, plus a few CM10 bits applied to it by nemith. The talapia (3g) nexus 7 relies on grouper as well, for anyone who has one....

The kernel repo you're more familiar with-- it's the one everyone's been testing. It has two simple merges as discussed above-- mr1-fr and mr1, because I hadn't previously eliminated any of the bulk (there wasn't any).

If you're building mr1-staging, remember that you need to use the newer proprietary blobs, most of which are here.
[Nexus 7 Android Development] sparksco:
Any clue as to when cm will get out of the staging branch and make a official development branch for 10.1? I'm pretty happy with stock aosp for now. Is there any reason why I should switch to building the staging branch?
[Nexus 7 Android Development] fattire:
I think but I'm not sure that this is the development branch . And if you want to build cm 10.1 right now this is how you have to do it. The cool thing about this entire thing that I'm saying now is that I'm literally saying it into my phone. I love voice to text.
[Nexus 7 Android Development] apascual89:
I'm trying to build 10.1 for my nexus 4 It builds for almost the same amount of time that it normally takes to do a clean build, but stops. This is the error:

Install: external/vim/runtime/colors/zellner.vim -> /home/andres/android/mr1/out/target/product/mako/system/usr/share/vim/

Install: external/vim/runtime/filetype.vim -> /home/andres/android/mr1/out/target/product/mako/system/usr/share/vim/

Install: external/vim/runtime/ftoff.vim -> /home/andres/android/mr1/out/target/product/mako/system/usr/share/vim/

Install: external/vim/runtime/indent.vim -> /home/andres/android/mr1/out/target/product/mako/system/usr/share/vim/

Install: external/vim/runtime/indoff.vim -> /home/andres/android/mr1/out/target/product/mako/system/usr/share/vim/

Install: external/vim/runtime/scripts.vim -> /home/andres/android/mr1/out/target/product/mako/system/usr/share/vim/

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

1 error

make: *** [/home/andres/android/mr1/out/target/common/obj/APPS/Settings_intermediates/classes-full-debug.jar] Error 41

make: *** Waiting for unfinished jobs..

Can anyone help me out?
[Nexus 7 Android Development] fattire:
You need to scroll up a bit more and find the actual build error. Just do a Find (reverse, ie, from bottom to top) for the word "error" and you'll likely hit it pretty quick. There may be an issue with vim upstream, so be sure to do a fresh repo-sync just in case before you try again :)
[Nexus 7 Android Development] gabx:
usually, running make one or two more time will leave you with only a few lines and the correct error message
[Nexus 7 Android Development] sparksco:
Yeah my problem when building is it's using 8 threads to build so the error message is normally to far up to see the first time around.

---------- Post added at 01:43 PM ---------- Previous post was at 01:40 PM ----------

Really? Hmm, alright well hence the name "staging", I assumed it was more for a temporary solution and the normal "jellybean" branch would continue to be the development branch (which is the way it has always been). "Jellybean-stable" (release branch), "jellybean" (development branch). So we can assume that jellybean branch will no longer be used for future jellybean updates? :confused:

Also... Voice-to-text has been around forever. I'm enjoying the new gesture typing of the 4.2 keyboard (requires gapps).

Speaking of gapps what gapps do you recommend using on the N7 with cm10.1?

---------- Post added at 01:53 PM ---------- Previous post was at 01:45 PM ----------

If the problem persist I would just remove vim altogether. It's not a critical part of the ROM by any means. You can just delete it from the source and remove it in one of the common config makefiles in vendor/cm (forget which one has it)... The file that tells the ROM to build vim.
[Nexus 7 Android Development] apascual89:
I did a repo sync this morning and it magically built without errors :D

Thanks for all the feedback
[Nexus 7 Android Development] Seferi:
Hi, i have been building for my nexus 7 since few months. Now i just got my nexus 4 and i would love to build also for nexus 4. Shall i just apply all the steps on the doc and change the lines to nexus 4? Or is there anything specific i need to do? Thanks in advance.

EDIT: I tried with lunch command and choosing mako from the list, it downloaded some stuff but at the and i got this error:

build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/mako/cm.mk]]: "frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk" does not exist. Stop.

** Don't have a product spec for: 'cm_mako'

** Do you have the right repo manifest?
[Nexus 7 Android Development] gabx:
Please run make once or two times more. Java compiler is multithreading, and by running make again you will get in just a few lines the correct erros.
[Nexus 7 Android Development] sparksco:
Looks like a java error, add java to your .bashrc I added it to my guide.
[Nexus 7 Android Development] apascual89:
Still getting the same error
[Nexus 7 Android Development] sparksco:
You have to open a new terminal window after the edits.
[Nexus 7 Android Development] apascual89:
I just did a make clean, and rebooted and started another, let's see how it goes
[Nexus 7 Android Development] sparksco:
What kind of machine are you building on seems like it takes a long to build? :x
[Nexus 7 Android Development] apascual89:
Got busy with family time. :) Normally takes me about 90 minutes for a clean build.
[Nexus 7 Android Development] apascual89:
It finally built successfully
[Nexus 7 Android Development] sparksco:
Nice, btw I just build successfully with java 1.7 :)
[Nexus 7 Android Development] apascual89:
Good for you! I cursed Java plenty yesterday :D
[Nexus 7 Android Development] gabx:
Open jre or Sun java one?
[Nexus 7 Android Development] sparksco:
Sun java. There's a patch from linaro that removes the java check.

https://github.com/pbeeler/android_build/commit/74be8760215460756eab8826ce0302c9500065d1
[Nexus 7 Android Development] gabx:
Thank you for the link. Do you think there is any improvments? I currently build n7 aosp with Sun Java 6, but ready to pacth if it can improves the build
[Nexus 7 Android Development] sparksco:
I haven't tested it much but so far the builds work fine. No issues to speak of. Some app developers use java 1.7 so maybe this will make the Roms more compatible with those apps but not really sure.
[Nexus 7 Android Development] smo1970:
Hello all,

First I want to say thanks for this awesome guide. I've been building my own CM10 roms for several weeks now. I've learned a great deal and it's been a great experience.

Unfortunately I've not been to successful with cherry picking and and using git, but I'm not giving up.

Anyway, yesterday I notice on Google + they announced that rebranching is complete and said most folks would just need to do:

$ repo init -b cm-10.1

$ repo sync

So, I did.

My first attempt building yeilded several errors. After some troubleshooting and googling, I resolved the matter by removing the devices/asus/grouper/overlay folder. After doing this the build completed and all was good. Or so I thought.

I flashed the new 10.1 to my device and it booted fine. My problem is that I'm missing the three navigation buttons and the bottome of the screen(back, home, and recent apps). I'm assuming this may have something to do with the overlay folder I removed?? Also the Rom seems to have been built for using a data network(mine is wifi only, grouper). The Wifi works fine, but the settings and status bar show options for cellular data.

For these reasons I cannot use the ROM and I'm certain I did something wrong.

I'm guessing I need to do the ./extract-files.sh , however, because my nexus is currently 4.1.2, I'll need to download the blobs, instead of pulling them from my device?

I'm also wondering if I can still build 4.1.2 would I do 'repo init -b cm-10' then 'repo sync' ?

I'm the noobliest noob there is, so any guidance would be appreciated. In the meantime I'll get to readin'

Thanks!