FORUMS
Remove All Ads from XDA

[GUIDE] How-To Cherry-Pick Features for your ROM (both GitHub and Gerrit)

521 posts
Thanks Meter: 701
 
Post Reply Email Thread
28th May 2014, 05:47 PM |#21  
OP Senior Member
Thanks Meter: 701
 
Donate to Me
More
Quote:
Originally Posted by jim_moriarity

I was hoping that someone could help me here so the problem is that I am trying to build OMNI ROM for mako but even after following the guide I dont't see any zip out/target/product/mako. I followed this guide http://docs.omnirom.org/Build_for_mako

This is probably a better question for somewhere else, but I can try to help you anyways. Can you tell me what the output of "ls out/target/product/mako" is?
 
 
28th May 2014, 05:53 PM |#22  
Junior Member
Thanks Meter: 0
 
More
How did you find the commits on Gerrit? Tried searching HALO but nothing comes up
28th May 2014, 06:03 PM |#23  
Junior Member
Flag London
Thanks Meter: 6
 
More
Quote:
Originally Posted by jabza

This is probably a better question for somewhere else, but I can try to help you anyways. Can you tell me what the output of "ls out/target/product/mako" is?

There are two folders obj and system and two makefiles clean_steps.mk and previous_build_config.mk
28th May 2014, 06:16 PM |#24  
p4rot's Avatar
Senior Member
Thanks Meter: 319
 
More
As stated here:

Once you do “git status” and all the files turn up green, you have finished resolving the conflicts. Now is the best time to compile your ROM and see if your changes worked. If you're in a rush (or lazy or don't feel like waiting for a ROM to compile or you've already tested it), you can now commit your changes.


Does that mean i can git commit after i built the rom?
And if i can do so,, do i have to git commit in the same location that i cherry picked ?
I guess so but im not sure.

Also thanks for the guide, like other said that was totally what i was looking for , i was familliar with the process of building from source but cherry picking no.
28th May 2014, 10:26 PM |#25  
OP Senior Member
Thanks Meter: 701
 
Donate to Me
More
Quote:
Originally Posted by G1ngerN1nja

How did you find the commits on Gerrit? Tried searching HALO but nothing comes up

Halo is under the "abandoned" section of gerrit, since PA decided to drop Halo. So in the top left, press "abandoned" and go back a few pages.

Quote:
Originally Posted by jim_moriarity

There are two folders obj and system and two makefiles clean_steps.mk and previous_build_config.mk

Try doing these commands in order:
Code:
. build/envsetup.sh
lunch
make -j16
And when you run the lunch command, choose mako from the list.

Quote:
Originally Posted by jonathanxx1

As stated here:

Once you do “git status” and all the files turn up green, you have finished resolving the conflicts. Now is the best time to compile your ROM and see if your changes worked. If you're in a rush (or lazy or don't feel like waiting for a ROM to compile or you've already tested it), you can now commit your changes.


Does that mean i can git commit after i built the rom?
And if i can do so,, do i have to git commit in the same location that i cherry picked ?
I guess so but im not sure.

Also thanks for the guide, like other said that was totally what i was looking for , i was familliar with the process of building from source but cherry picking no.

You can use "git commit" after you've built the ROM. You have to do "git commit" in the location that you started the cherry-pick, since each folder is its own git repository. Best practice is to resolve the conflicts, build the ROM and make sure it all works appropriately, and then run "git commit". Sometimes you want to move on to cherry-picking other things in that location or have other reasons not to do it that way, but regardless of when you do it, you have to run "git commit" eventually before you can add another commit or do a repo sync of that project.
29th May 2014, 04:57 AM |#26  
Junior Member
Flag London
Thanks Meter: 6
 
More
Quote:

Try doing these commands in order:

Code:
. build/envsetup.sh
lunch
make -j16
And when you run the lunch command, choose mako from the list.

Even after following your instructions I don't get any result.
29th May 2014, 04:55 PM |#27  
Senior Member
Thanks Meter: 114
 
More
Quote:
Originally Posted by jabza

- When you rebuild the ROM, as long as you don't use "make clean" or "make clobber", it will only recompile the parts that have changed. The next build will go much faster. If you want the builds to go even faster, you should use ccache.

So, if I use first "brunch", then cherrypick and than use "brunch" again, it creats me a zip-file with only the cherrypick in it?
29th May 2014, 06:00 PM |#28  
OP Senior Member
Thanks Meter: 701
 
Donate to Me
More
Quote:
Originally Posted by jim_moriarity

Even after following your instructions I don't get any result.

Does your terminal say that there were any errors? You won't get a zip if something stopped it from building.

Quote:
Originally Posted by xxLeoxx93

So, if I use first "brunch", then cherrypick and than use "brunch" again, it creats me a zip-file with only the cherrypick in it?

It'll be a full ROM zip. Your computer will re-use what it compiled last time and only recompile the parts that were changed since then.
31st May 2014, 05:38 AM |#29  
katinatez's Avatar
Senior Member
Flag Arizona
Thanks Meter: 18,779
 
Donate to Me
More
Thank you so much for tutorial just learned how to compile from source but having difficulty with cherry picking. I have been compiling OmniRom for I9300 and am trying to cherry pick Lockscreen notification from Omni Gerrit. And here are the links

https://gerrit.omnirom.org/#/c/5734/

https://gerrit.omnirom.org/#/c/6062/

I have done this a couple times and now its throwing up a message I have not seen before and here is the message from terminal.


[email protected]:~$ cd ~/android/omni
[email protected]:~/android/omni$ cd frameworks/base
[email protected]:~/android/omni/frameworks/base$ git fetch https://gerrit.omnirom.org/android_frameworks_base refs/changes/34/5734/21 && git cherry-pick FETCH_HEAD
From https://gerrit.omnirom.org/android_frameworks_base
* branch refs/changes/34/5734/21 -> FETCH_HEAD
HEAD detached from 0f7dace
You are currently cherry-picking commit 931f929.

nothing to commit, working directory clean
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

git commit --allow-empty

Otherwise, please use 'git reset'
[email protected]:~/android/omni/frameworks/base$


The steps I did was to follow your directions about the gerrit but after I cherry pick I then started


. build/envsetup.sh
brunch i9300


Question am I missing a terminal command to apply the commit? And what is the command?
Next question is I set ~/android/omni/prebuilts/misc/linux-x86/ccache/ccache -M 25G but if I view my disk space it show 50GB, I think I ran this command twice and how do I check that? And how do I remove 25GB cache?

Thank you any help would be appreciated.
1st June 2014, 02:11 AM |#30  
OP Senior Member
Thanks Meter: 701
 
Donate to Me
More
Quote:
Originally Posted by katinatez

[email protected]:~$ cd ~/android/omni
[email protected]:~/android/omni$ cd frameworks/base
[email protected]:~/android/omni/frameworks/base$ git fetch https://gerrit.omnirom.org/android_frameworks_base refs/changes/34/5734/21 && git cherry-pick FETCH_HEAD
From https://gerrit.omnirom.org/android_frameworks_base
* branch refs/changes/34/5734/21 -> FETCH_HEAD
HEAD detached from 0f7dace
You are currently cherry-picking commit 931f929.

nothing to commit, working directory clean
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

git commit --allow-empty

Otherwise, please use 'git reset'
[email protected]:~/android/omni/frameworks/base$

That means that your repository already has that commit. It looks like you've already started that cherry-pick or it's already been committed. You can do "git status" to see if there are any files that need to be resolved, and you can do "git log" to see if you've already committed that cherry-pick (press "q" to leave the log). If you have already done the command to grab the cherry-pick and resolved the errors, you can do "git commit" to finalize the commit.

Quote:
Originally Posted by katinatez

Question am I missing a terminal command to apply the commit? And what is the command?
Next question is I set ~/android/omni/prebuilts/misc/linux-x86/ccache/ccache -M 25G but if I view my disk space it show 50GB, I think I ran this command twice and how do I check that? And how do I remove 25GB cache?

If you do ~/android/omni/prebuilts/misc/linux-x86/ccache/ccache -M 25G, it just sets your ccache to 25G. Even doing it twice will just tell your computer "set the ccache size to 25 GB". You might be looking at the entire build directory, though. The cache is stored in ~/.ccache (with the period). It should stay at the size you set it. Google recommends 100GB for your cache, but admits that 50 will do.

If you want to remove the cache (it will need to be rebuilt during your next build), you can run this command:
Code:
sudo rm -r ~/.ccache
The Following User Says Thank You to jabza For This Useful Post: [ View ] Gift jabza Ad-Free
16th June 2014, 12:38 PM |#31  
jjardinero.01's Avatar
Senior Member
Thanks Meter: 16
 
More
Awesome guide. Thanks!
BTW, Its my first time compiling cyanogenmod from source. For now its just a stock CM11. Im planning on adding Paranoid Android features to my CM build but my problem is I dont know what to cherry pick. Can someone pls help me provide links to these features: Quick Settings tiles and Lock Screen. Thanks! Any help would be much appreciate.
Post Reply Subscribe to Thread

Tags
cherry pick, cherry picks, cherry-pick, gerrit, github

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes