yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

Yep..

But if i remember correctly, make clean wont update the date..

I could be wrong..

I never use it, so dnt know for sure..

I always just do make clobber

Sent from my Nexus 7
[Nexus 7 Android Development] azoller1:
Re: [HOWTO] Build CM10.1 for Nexus 7

So after your first repo sync ever later builds will take a lot less time? And also do you have to repo sync every time to update to a new nightly or version?
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

No.. Repo sync is used to download source code from git..

You should do repo sync about once a week, to make sure you have the latest code, all up to date..

Builds will take anywhere from 15 mins to 8-9 hours.. Depending on how powerful your machine is... And how many jobs your processor can handle simultaneously..

You dont even need to do make clean or make clobber everytime you build..

But if you make any change in the source/device tree, then you'll have to clean before making a new build, otherwise the changes wont vet picked up...

PS : build time can be reduced by something called CCACHE or Compiler Cache..

Mine reduced from 6.5 hrs down to a little over 2....

Its info is there in the tutorial fattire has written...

Sent from my Nexus 7
[Nexus 7 Android Development] azoller1:
Re: [HOWTO] Build CM10.1 for Nexus 7

OK thanks and you only the proprietary files once, and does make clobber or clean take awhile or just a few minutes, and how much ccache do you recommend?
[Nexus 7 Android Development] fattire:
Wikiwikiwiki

I think this is a good time for a fresh plug to check out all the stuff we've written for the wiki, particularly in the development section. Check under Learning to build CM.

So many of the questions that are being asked here are answered there.
[Nexus 7 Android Development] bradman117:
i got it all workin thanks to bhargz16!
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

Happy to help!! ;)

Sent from my Nexus 7
[Nexus 7 Android Development] TheDarkDefender:
Re: [HOWTO] Build CM10.1 for Nexus 7

Thank you guys! :)

I would also like to know if changes are made everyday for all devices.

My other device, haida, gets an official update only every Sunday. Does that mean commits are made only every Sunday, or is it worth building everyday?

Thanks again for the prompt replies.
[Nexus 7 Android Development] sunny2303:
Re: [HOWTO] Build CM10.1 for Nexus 7

You can check it here..

http://review.cyanogenmod.org/#/q/status:merged,n,z
[Nexus 7 Android Development] EnemyOfGlaDOS:
Just a quick question.. with Android 4.2.2 rolling out, will we see it in the repo sync? Meaning, will it be part of the nightlies now?
[Nexus 7 Android Development] eug89:
We'll have to wait that the cyanogenmod team merges all the changes. Some repos are just straightforward to merge, others, such as frameworks/base requires a lot of work.
[Nexus 7 Android Development] DJLamontagneIII:
im having a issue adding multiple commits one shows up fine on all the builds ive compiled so far but its as if the others dont go in.. theres no errors wile adding them and no commits left behind warnings wile adding them.. ive been useing this command found in a earlier post:

git fetch http://review.cyanogenmod.com....................... && git checkout FETCH_HEAD

should i be useing cherry-pick insted of checkout?... any help would be very appreciated thanks guys :p
[Nexus 7 Android Development] TheDarkDefender:
Re: [HOWTO] Build CM10.1 for Nexus 7

You should ask this in the CM IRC. Fattire has answers to all your questions. He literally breaks down every detail. He's the best.
[Nexus 7 Android Development] eug89:
When I have to add some commits from gerrit or from somewhere else I usually create a new branch and just cherry-pick the commits I want. In this way you'll only encounter errors if two or more commits conflicts with each other. In that case there's nothing to do other than manually resolve the conflicts.

I don't know if I'm right but I think that when you use checkout you can't add multiple commits like with cherry-pick.

Anyway you can verify what commits you managed to merge by using git log.
[Nexus 7 Android Development] DJLamontagneIII:
Re: [HOWTO] Build CM10.1 for Nexus 7

I'll give that a shot:D

Sent from my Nexus7
[Nexus 7 Android Development] DJLamontagneIII:
Re: [HOWTO] Build CM10.1 for Nexus 7

I'm thinking this is the way to go... Now how do I go about making a branch, do I make the branch in github? and how do you add commits from review to the branch sorry for the noobish questions unfortunately my googleing hasn't been to successful:( and still can't find what should be used cherry-pick or checkout

Sent from my Nexus7
[Nexus 7 Android Development] eug89:
R: [HOWTO] Build CM10.1 for Nexus 7

There's two way to create a new branch:

1)From the android source directory, type

repo start name project

Where name is the name you want to give to the branch and project is the project (repo) you want to create a branch for.

For example:

repo start test CyanogenMod/android_frameworks_base

Will create a branch called test in the frameworks/base repo

2) from the directory in which you want to create a new branch type

git checkout -b name

There are some differences between these two methods and I usually use the first one because in that way the new branch will get updated when you do repo sync.

If you want to cherry-pick a commit from gerrit you just need to copy the command that you find in the commit page.

For example, for this commit http://review.cyanogenmod.org/#/c/31545/ you go where it says download, choose cherry-pick and copy the command. You'll then need to run that command in the project directory, /packages/apps/Calculator in that case.
[Nexus 7 Android Development] DJLamontagneIII:
Re: [HOWTO] Build CM10.1 for Nexus 7

Thanks for the good info man just wonder wile adding the cherry-pick lets say for example.

cd frameworks/base

git fetch http://review.cyanogenmod.org/CyanogenMod/android_frameworks_base refs/changes/62/31762/4 && git cherry-pick FETCH_HEAD and it will automaticly go to my newly created branch?

Edit: figured it out :thumbup:

Sent from my Nexus7
[Nexus 7 Android Development] azoller1:
anyonr know where or how i can get android_kernel_grouper for cm10.1? because i cant build it, it says i need the kernel specifics for grouper and it didnt download it when i did breakfast grouper

EDIT: it also said, find, "src" no such file or directory when i typed in brunch grouper
[Nexus 7 Android Development] .torrented:
ok to get android_kernel_grouper you needed to run the " breakfast grouper " command that will get the Nexus 7 files you need before you " brunch grouper "

dont worry about "src" no such file or directory it doesnt do anything negative to the build

Edit* Forgot to mention that " breakfast grouper " is a one time command you dont need to keep doing it everytime you want to " brunch grouper "
[Nexus 7 Android Development] Nova163:
Since you figured it out: :p

If you add a branch, cherry pick a commit and then repo sync, will the cherry pick automatically get merged / reverted? And will the code still sync with the official CM repo?
[Nexus 7 Android Development] azoller1:
Re: [HOWTO] Build CM10.1 for Nexus 7

Yeah when I do breakfast grouper it doesn't get the files?? Now I'm starting from a fresh repo sync and files
[Nexus 7 Android Development] eug89:
I f you create a new branch with repo start yes, the branch will be updated with repo sync and the commit you cherry-picked will be readded on top of it.

Also, if you want to know in which branch you're on type git branch from the repo directory. Use git log to see a list of all the commits.
[Nexus 7 Android Development] TheDarkDefender:
Re: [HOWTO] Build CM10.1 for Nexus 7

But the cherry pick is removed once a new 'repo sync' is done right?
[Nexus 7 Android Development] eug89:
R: [HOWTO] Build CM10.1 for Nexus 7

No, the commit you cherry-picked will be added automatically on top of the new commits you get after a repo sync
[Nexus 7 Android Development] TheDarkDefender:
Re: [HOWTO] Build CM10.1 for Nexus 7

Okay. Thanks.
[Nexus 7 Android Development] fattire:
I didn't follow the whole conversation (sorry, skimming) but usually if I cherry-pick something from gerrit, a repo sync will clear it out.. there's a message "discarding 1 commit in such and such repository.." or whatever during hte repo sync..

Your mileage may vary. You can always do a git log to see the commits for any repository and determine what's there.
[Nexus 7 Android Development] TheDarkDefender:
Re: [HOWTO] Build CM10.1 for Nexus 7

Yeah. You just told me yesterday. So I was wondering about that, since the guy was confident in his reply.
[Nexus 7 Android Development] azoller1:
Uhhh Help?

alex@alex-HP-2000-Notebook-PC:~/android/system$ breakfast grouper

including vendor/cm/vendorsetup.sh

ls: cannot access device/*/grouper/cm.mk: No such file or directory

build/core/product_config.mk:234: *** Cannot locate config makefile for product "cm_grouper". Stop.

Device grouper not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).

Found repository: android_device_asus_grouper

Default revision: cm-10.1

Checking branch info

CyanogenMod/android_device_asus_grouper already exists

Syncing repository to retrieve project.

error: project device/asus/grouper not found

Repository synced!

Looking for dependencies

Dependencies file not found, bailing out.

Done

ls: cannot access device/*/grouper/cm.mk: No such file or directory

build/core/product_config.mk:234: *** Cannot locate config makefile for product "cm_grouper". Stop.

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

** Do you have the right repo manifest?

alex@alex-HP-2000-Notebook-PC:~/android/system$
[Nexus 7 Android Development] eug89:
Just did a repo sync, this is the output i get for frameworks/base where I have some commits I cherry-picked from linaro:

project frameworks/base/
First, rewinding head to replay your work on top of it...
Applying: frameworks/base: Fix various aliasing violations
Applying: frameworks/base: Fix aliasing violations
Applying: frameworks/base: Fix compile errors
Applying: Fix error when cpufreq is loaded at runtime
Applying: frameworks/base: Fix build in ISO C++11 mode

output of git log: http://pastebin.com/hGqLvZDt

You can see that what I cherry-picked has been applied on top of the new commits.

I think that repo sync discards the cherry-picked commits only when you apply them without creating a branch.
[Nexus 7 Android Development] DJLamontagneIII:
Re: [HOWTO] Build CM10.1 for Nexus 7

Same for me commits on branches stay after repo sync... Latest issue I'm having is dealing with conflicts I use meld and fix the conflicts but I just can't figure out how to add it in after that, it says to use git add <file>

Sent from my Nexus7
[Nexus 7 Android Development] bradman117:
Re: [HOWTO] Build CM10.1 for Nexus 7

Every time I finish compiling I get an error in flash but it stays md5 not found and skipps it and when I boot it its just black no boot animation, no nothing won't boot up
[Nexus 7 Android Development] eug89:
Once you've finished fixing the conflicts you just need to type

git add <path of the file that contained conflicts>

and then type git commit.
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

Hey guys, wrong place to ask about AOSP probably, but I have 4.2.1 source, and I wanna merge 4.2.2 changes into it..

How??

I hope I dnt have to redownload the whole source...

Sent from my Nexus 7
[Nexus 7 Android Development] eug89:
Depends on the branch you're using, if you're on the master branch you just need to repo sync.
[Nexus 7 Android Development] underwaterjr:
My build broke last night. I wonder if it has to do with the merge to 4.2.2 or the fact that I change from java 1.6 to java 1.7. Anyone else having any troubles building right now?
[Nexus 7 Android Development] AndDiSa:
Change the revision to android-4.2.2 in your manifest.xml and do a repo sync. There are some projects, especially those hardware related projects, which do not have the 4.2.2 tag, here you can remain on the 4.2.1_r1.2 tag.

After that a repo sync and you should be ready to build.
[Nexus 7 Android Development] DJLamontagneIII:
Re: [HOWTO] Build CM10.1 for Nexus 7

I would say having java 1.7 when I first started I accidentally had 1.7 and wasn't able to get it to work correctly till I switched to 1.6

Sent from my Nexus7
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

Yeah that's kinda what I was thinking. I will switch it back and see if that helps
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

Done... Thanks for the quick replies guys...

Changing the default.xml's main tag from 4.2.1_r1 to 4.2.2_r1 did the trick...

Sent from my Nexus 7
[Nexus 7 Android Development] DJLamontagneIII:
Re: [HOWTO] Build CM10.1 for Nexus 7

Little off topic... I see some bionic commits from cyanogen for neon optimization anyone know anything about it..tegra3 supports it

Sent from my Nexus7
[Nexus 7 Android Development] eug89:
Strange... builds fine for me with oracle's java 1.7

Yes, the nexus 7 supports these bionic optimization. I was using linaro's bionic optimization before, now I want to try these ones to see what is best.

@fattire

Do you know if there updated proprietary binaries to use with 4.2.2 or they are the same of 4.2.1?
[Nexus 7 Android Development] underwaterjr:
Running into a problem. Bought a second hard drive so I can dual boot and trying to re setup my build environment. When I run the breakfast grouper I keep getting this same error. What am I doing wrong?

ls: cannot access device/*/grouper/cm.mk: No such file or directory

build/core/product_config.mk:234: *** Cannot locate config makefile for product "cm_grouper". Stop.

Device grouper not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).

Traceback (most recent call last):

File "build/tools/roomservice.py", line 59, in <module>

result = json.loads(urllib2.urlopen(githubreq).read())

File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen

return _opener.open(url, data, timeout)

File "/usr/lib/python2.7/urllib2.py", line 407, in open

response = meth(req, response)

File "/usr/lib/python2.7/urllib2.py", line 520, in http_response

'http', request, response, code, msg, hdrs)

File "/usr/lib/python2.7/urllib2.py", line 445, in error

return self._call_chain(*args)

File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain

result = func(*args)

File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default

raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

urllib2.HTTPError: HTTP Error 403: Forbidden

ls: cannot access device/*/grouper/cm.mk: No such file or directory

build/core/product_config.mk:234: *** Cannot locate config makefile for product "cm_grouper". Stop.

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

** Do you have the right repo manifest?
[Nexus 7 Android Development] azoller1:
yeah i have gotten all of those same errors it really frustrated me now im trying linux mint 14
[Nexus 7 Android Development] underwaterjr:
This is the first time I've ever gotten them. I'm using Ubuntu 12.10. And had used that for my virtual machine as well.
[Nexus 7 Android Development] azoller1:
seems python is not installed i think

try this in terminal

sudo apt-get install python
[Nexus 7 Android Development] sam3000:
Re: [HOWTO] Build CM10.1 for Nexus 7

You can also do repo start test . from within the project directory you want to branch.
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

That didn't fix it. Thanks for trying. Any other ideas?
[Nexus 7 Android Development] underwaterjr:
Still not working did the repo manifest change? Can't get it to breakfast grouper.
[Nexus 7 Android Development] azoller1:
lets see download or clone these files then skip the breakfast grouper and see if it builds correctly

put the kernel files in the root directory of your files then make a folder called kernel then put the files in there

root/kernel/files in here

put the device files in root/device/asus/grouper/ files in here

here are the files

kernel: HERE

device: HERE
[Nexus 7 Android Development] underwaterjr:
Nope still didn't build, but got farther than before. Heres the paste bin http://pastebin.com/nsygdErL
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

Don't even know if this would work but is it possible to bring my build files from my virtual machine and put them on my ubuntu machine (dual boot).
[Nexus 7 Android Development] yogi2010:
Re: [HOWTO] Build CM10.1 for Nexus 7

Does your virtual machine recognize USB connections, like an external hard drive? If so, it MIGHT be possible. I actually tried to back up my working folder to an external hard drive once, and it seemed OK, but once it got to around 8GB, the transfer started moving REALLY slow. Perhaps, with patience it might have worked..
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

Well I can give it a shot, I guess. I just don't know where I went wrong. I have set up the virtual machine four times and got builds out of all of them. Just really like how ubuntu feels all on is own.
[Nexus 7 Android Development] .torrented:
just to double check did you guys (that are getting errors) do these because if you are on 12.10 you need to use them as well:

Most people miss this step thats why im asking
[Nexus 7 Android Development] azoller1:
the second line? where it moves a file? i will try that later tonight hopefully it works, and are you using linux mint 14?
[Nexus 7 Android Development] .torrented:
Right now im on Ubuntu 12.10 but I have successfully built on Mint 14
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

I did that but tried it again. No go. Thanks though.
[Nexus 7 Android Development] Nova163:
Since we had a discussion about cherry picking and how to make them 'stick' a few pages ago, I thought I'd share my solution.

I made a script, 'update' in my home directory (in my case home/benjamin). To make a script in Linux is really easy: you just put the commands you otherwise type in the terminal in a file and mark the file as executable (by using chmod a+x or selecting the option in the file properties).

My script looks like this:

export PATH=${PATH}:~/bin
export PATH=${PATH}:/home/benjamin

# sync repo with CM and Harsh repository

cd ~/android/system
repo sync

# cherry pick commits

# Battery view 10->15 apps
cd ~/android/system/packages/apps/Settings
git fetch http://review.cyanogenmod.org/CyanogenMod/android_packages_apps_Settings refs/changes/85/31085/2 && git cherry-pick FETCH_HEAD

cd ~/android/system/packages/apps/Settings
git fetch http://review.cyanogenmod.org/CyanogenMod/android_packages_apps_Settings refs/changes/62/31062/4 && git cherry-pick FETCH_HEAD

# Battery Bar
cd ~/android/system/frameworks/base
git fetch http://review.cyanogenmod.org/CyanogenMod/android_frameworks_base refs/changes/12/31912/3 && git cherry-pick FETCH_HEAD
cd ~/android/system/packages/apps/Settings
git fetch http://review.cyanogenmod.org/CyanogenMod/android_packages_apps_Settings refs/changes/13/31913/2 && git cherry-pick FETCH_HEAD

# Calculator Parts
cd ~/android/system/packages/apps/Calculator
git fetch http://review.cyanogenmod.org/CyanogenMod/android_packages_apps_Calculator refs/changes/45/31545/6 && git cherry-pick FETCH_HEAD
git fetch http://review.cyanogenmod.org/CyanogenMod/android_packages_apps_Calculator refs/changes/27/31927/1 && git cherry-pick FETCH_HEAD

# and prepare for building

cd ~/android/system
export USE_CCACHE=1
. build/envsetup.sh

As you all probably understand it sets the right PATH, moves to the building directory, repo syncs and then cherry picks all commits I want. Repo sync discards all commits, but they're automatically cherry picked again right after. If I want a new cherry pick I just add it to this file and type '. update'

If you like you can add 'brunch grouper' to the file and it will automatically build after fetching all commits and updates.

I hope this helps.
[Nexus 7 Android Development] TheDarkDefender:
Re: [HOWTO] Build CM10.1 for Nexus 7

Wow. That cleared a lot. Thanks! So all these are basically done in the script huh?
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

Yep.. You jsut run the script and lie back and it'll do all the work.. ;)

Sent from my Nexus 7
[Nexus 7 Android Development] Nova163:
Yep. You can add anything you like.

I'm thinking of making a 'build' script too. It would look something like:

make clobber
brunch grouper
cd $OUT
adb push cm-10.1-20130218-UNOFFICIAL-grouper.zip /sdcard/goomanager/cm-10.1-20130218-UNOFFICIAL-grouper.zip

I'm just looking to find out if I can use a variable instead of the specific name for the zip, because this script won't work tomorrow, as the file name will be changed to February 19th.
[Nexus 7 Android Development] xdp:
Any progress on this problem? I'm stuck here as well, also on Ubuntu 12.10 VM. Maybe it's an Ubuntu 12.10 thing...
[Nexus 7 Android Development] underwaterjr:
I haven't had a chance to go at it again. Gonna work on it again tomorrow night. What's strange is I have had a 12.10 VM machine building just fine, and I didn't think I did anything different when setting up my dual boot system. Oh well, love a challenge will keep you posted if I get it resolved.
[Nexus 7 Android Development] Nova163:
In case anyone is interested: I found the solution to automatically adb push the output file to a device:

cd $OUT
adb push cm-10.1-*-UNOFFICIAL-grouper.zip /sdcard/goomanager/cm-10.1-$(date +%Y%m%d)-UNOFFICIAL-grouper.zip

this will first find the file that was just build (by using a wildcard instead of the date) and then push it to the device with the right name using the date variable: $(date +%Y%m%d).
[Nexus 7 Android Development] underwaterjr:
Finally got it working. I am so glad I bought another HDD and switched to a dual boot set up. My build times went from 2 1/2 hours down to 1 hour twenty minutes. Thank you to everyone who helped me get this going again.
[Nexus 7 Android Development] azoller1:
Re: [HOWTO] Build CM10.1 for Nexus 7

You got it working? What did you do differently?
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

Well I think when I first tried your idea to download the grouper source from git I got the folders wrong. I also completely uninstalled Java and just installed sun Java 1.7 and just went through all the sudo apt-get install packages except for the Java ones just to make sure I didn't miss any. And presto it built me a rom, using it now.
[Nexus 7 Android Development] azoller1:
Re: [HOWTO] Build CM10.1 for Nexus 7

Will do this then!
[Nexus 7 Android Development] azoller1:
finally got mine working also, and how long should it take after i make the build, brunch grouper?
[Nexus 7 Android Development] underwaterjr:
You mean to finish building? I would say that depends on your set up. Mine takes 1 hour twenty minutes. That's on a quad core with 8 gigs ram and HDD, wish I had a SSD would be even faster.
[Nexus 7 Android Development] azoller1:
yeah to build the rom, its been about 45 min with CCACE at 1
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

How long did it take to finish? Are you using a VM or a full Linux system?
[Nexus 7 Android Development] azoller1:
Re: [HOWTO] Build CM10.1 for Nexus 7

Took about an hour, using live CD installation type
[Nexus 7 Android Development] underwaterjr:
Re: [HOWTO] Build CM10.1 for Nexus 7

A virtual machine is a nice way to test the waters in Linux, but a live machine is so much nicer.
[Nexus 7 Android Development] #define:
Re: [HOWTO] Build CM10.1 for Nexus 7

Building in vm needs a lotta juice...

I gave up the MacOS eye candy to be able to build on a live OS...

Sent from my Nexus 7