how do i cherry pick a single commit from a github source? like get a certain commit from aokps settings app and get it into cm10.1
i tried this and seemed to break my build
cd ~/android/system/frameworks/base
git fetch https://github.com/AOKP/packages_apps_Settings.git && cherry-pick 8b7e06fe63939730067b539ca7343fcd8e68ad01 FETCH_HEAD
is that the right way to do it? and how do i know if it cherry picked correctly? sorry im still getting the hang of thins with github
azoller1 said:
how do i cherry pick a single commit from a github source? like get a certain commit from aokps settings app and get it into cm10.1
i tried this and seemed to break my build
cd ~/android/system/frameworks/base
git fetch https://github.com/AOKP/packages_apps_Settings.git && cherry-pick 8b7e06fe63939730067b539ca7343fcd8e68ad01 FETCH_HEAD
is that the right way to do it? and how do i know if it cherry picked correctly? sorry im still getting the hang of thins with github
Click to expand...
Click to collapse
I'd go to their gerrit. Anything and find what you want.
http://gerrit.sudoservers.com/#/q/status:open,n,z
Click on it, note the Project listed. cd to that in your tree. then in the download section you see a cherry-pick tab. click that and select the command there. That is the command you use. If it comes in without needing to merge anything you are good.
thanks, and how would i know if merging is needed?
azoller1 said:
thanks, and how would i know if merging is needed?
Click to expand...
Click to collapse
it'll tell you. Not sure if you use UI or command line but in command line i installed vimdiff, then set it as git mergetool with,
git config --global merge.tool vimdiff
if using UI I'd use meld.
so it'll report something needs to be merged then just
git mergetool and it'll open up. manually fix the merge
then
git status
This will show you the .orig files. delete them
Then:
git add -A
git commit -a
Control+X(nano) or :wq (vim)
And you're done.
git remote add -f repo.git then git cherry pick commit id
so basically just get the branch i want a cherry pick from, then picks it from the branch when i enter the commit, and i need to cd in the right directory before doing
git remote add -f repo.git?
see if it help!http://forum.xda-developers.com/showthread.php?p=23527685#post23527685
yeah i saw that guide, but still confused using github, gerrit is pretty easy
I always use this thingy as reference for cherry-picking:
http://stackoverflow.com/questions/...ctively-pull-merge-changes-from-anothers-fork
sorry forgot about this i will give a better example. if you want tp cherry pick a framwork base commit be in the framework folder then
git remote add paranoid(name is irrlefvent) -f [email protected]aranoidAndroid/android_frameworks_base.git
wait for it to download
then git cherry pick the commit id: git cherry pick f9cedfe79cc1d545b920f93539a0843d02819fe6
FYI, if you are looking at a specific commit on github, you can get it in patch format by adding .patch to the URL.
For example:
https://github.com/CyanogenMod/andr...mmit/e8ba824b16a3575d9a4c5d85dce6d3800970d093
becomes
https://github.com/CyanogenMod/andr...8ba824b16a3575d9a4c5d85dce6d3800970d093.patch
If you download that .patch file, it can be applied using:
Code:
git am <patchfile>.patch
FYI, on your own machine, if you want to export such a patch for distribution, use
Code:
git format-patch
For example:
Code:
git format-patch HEAD~3
Would output the last 3 patches you committed in "git am" committable form.
FYI, this is why any developer who tells you that releasing source code for test kernels is not feasible is full of BS. It's understandable that you don't want to push test commits to a public repo, but it's perfectly feasible to meet the requirements of the GPL by providing formatted patches.
As an example: http://forum.xda-developers.com/showpost.php?p=22925793&postcount=339
Entropy512 said:
FYI, if you are looking at a specific commit on github, you can get it in patch format by adding .patch to the URL.
For example:
https://github.com/CyanogenMod/andr...mmit/e8ba824b16a3575d9a4c5d85dce6d3800970d093
becomes
https://github.com/CyanogenMod/andr...8ba824b16a3575d9a4c5d85dce6d3800970d093.patch
If you download that .patch file, it can be applied using:
Code:
git am <patchfile>.patch
FYI, on your own machine, if you want to export such a patch for distribution, use
Code:
git format-patch
For example:
Code:
git format-patch HEAD~3
Would output the last 3 patches you committed in "git am" committable form.
FYI, this is why any developer who tells you that releasing source code for test kernels is not feasible is full of BS. It's understandable that you don't want to push test commits to a public repo, but it's perfectly feasible to meet the requirements of the GPL by providing formatted patches.
As an example: http://forum.xda-developers.com/showpost.php?p=22925793&postcount=339
Click to expand...
Click to collapse
If using this method to patch, which folder in my source do I download the patch to? Also when adding commits to my source do I need to add every single commit individually or can I just choose the commit from the major header? For example there are many commits within the Frameworks folder (Frameworks/Base..etc) do I need to go into the Frameworks folder and add each element individually or can I just add the commit from the Frameworks folder? One more thing, how to I apply a patch that I have downloaded as xxx.patch? Sorry if this is hard to understand I'm new at this and still learning the jargon.
Thanks!
The truth is already out there: http://wiki.cyanogenmod.org/w/After_You_Build
http://wiki.cyanogenmod.org/w/Doc:_...building_a_patch_submission_already_on_Gerrit
Sent from my Nexus 7 using xda premium
i want this commit: https://github.com/CyanogenMod/andr...mmit/d1f1fb4064bfcef528a12a4c5176df7b44ffd48c
you need two things, the url to the main project and the commit id, both you just copy out of your browser
the branch i always use is called "jellybean"
my remote to my git is called "github"
that might differ from your configuration-
cd aosp
cd packages/app/Settings
git checkout jellybean
git remote add cyan https://github.com/CyanogenMod/android_packages_apps_Settings
git fetch cyan
git cherry-pick d1f1fb4064bfcef528a12a4c5176df7b44ffd48c
done.
in case it conflicts, you run:
grep -r "<< HEAD" .
and fix all the files it spits out. search for "<< HEAD" in these files and you should see what to do.
when you're done fixing your files you can test if it builds, if it does you go:
git add --all
git commit --all
in the end you push it up to your git
git push github jellybean
Entropy512 said:
FYI, if you are looking at a specific commit on github, you can get it in patch format by adding .patch to the URL.
For example:
https://github.com/CyanogenMod/andr...mmit/e8ba824b16a3575d9a4c5d85dce6d3800970d093
becomes
https://github.com/CyanogenMod/andr...8ba824b16a3575d9a4c5d85dce6d3800970d093.patch
If you download that .patch file, it can be applied using:
Code:
git am <patchfile>.patch
FYI, on your own machine, if you want to export such a patch for distribution, use
Code:
git format-patch
For example:
Code:
git format-patch HEAD~3
Would output the last 3 patches you committed in "git am" committable form.
FYI, this is why any developer who tells you that releasing source code for test kernels is not feasible is full of BS. It's understandable that you don't want to push test commits to a public repo, but it's perfectly feasible to meet the requirements of the GPL by providing formatted patches.
As an example: http://forum.xda-developers.com/showpost.php?p=22925793&postcount=339
Click to expand...
Click to collapse
i think this is the easiest way to pick a commit from someone and add it into your own source, but instead i used this command line in my root source
patch -p1 < ./patch
seems to fail a lot when adding the patch but its really easy to fix it
Entropy512 said:
FYI, if you are looking at a specific commit on github, you can get it in patch format by adding .patch to the URL.
For example:
https://github.com/CyanogenMod/andr...mmit/e8ba824b16a3575d9a4c5d85dce6d3800970d093
becomes
https://github.com/CyanogenMod/andr...8ba824b16a3575d9a4c5d85dce6d3800970d093.patch
If you download that .patch file, it can be applied using:
Code:
git am <patchfile>.patch
FYI, on your own machine, if you want to export such a patch for distribution, use
Code:
git format-patch
For example:
Code:
git format-patch HEAD~3
Would output the last 3 patches you committed in "git am" committable form.
FYI, this is why any developer who tells you that releasing source code for test kernels is not feasible is full of BS. It's understandable that you don't want to push test commits to a public repo, but it's perfectly feasible to meet the requirements of the GPL by providing formatted patches.
As an example: http://forum.xda-developers.com/showpost.php?p=22925793&postcount=339
Click to expand...
Click to collapse
FYI, you use a lot of `FYI` in your post lol.
Sent from my Nexus 7 using Tapatalk 4
Hello xda,
I had a little time on my hands the other night, and wanted to figure out a way that I could work on any of the project repositories needed to build say, aokp, cyanogenmod, aosp, etc... without having to connect to the internet.
Mirroring is not new. Simple enough to:
Code:
mkdir cm-mirror
cd cm-mirror
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1 --mirror
repo sync -j[dl-jobs]
then create a working directory:
Code:
cd ..
mkdir cm-work
cd cm-work
repo init -u file:///Volumes/Android/cm-mirror/CyanogenMod/android.git --reference /Volumes/Android/cm-mirror/ -b cm-10.1
repo sync # no jobs needed. super fast.
But at this point you only have what you need for cm-10.1. What if you also have work you are doing for 10.1.0? Or an old update to make for cm-7.2.0?
I originally started looking for a solution to sync every branch in the manifest one at a time, but while talking with cdesai he showed me a really clean way of getting the repositories directly from gerrit.
Anyways, here is the resulting script. Let me know your thoughts.
I've moved the script to a git repository here: https://github.com/bhundven/repo-mm
in case anyone wants to contribute.
I've also written a post on my blog about using the new gerrit-mirror.sh on gh.
ChangeLog
Changes:
[06/30/13]: Announce some updates to gerrit-mirror.sh, and blog post.
[06/24/13]: Moved gist to github project.
GitHub for repo-mm.
i' m following a guide to try builiding my first rom and i don't understand a step
"6. After the repo sync finally finishes, all you need to do is add your device, kernel, vendor specific files for the device you are building for."
Where can i find these things? Is there a command i should give in the terminal?
I've searched a little but not found anything...any hint would be accepted!
tylpica wives
phoenixita said:
i' m following a guide to try builiding my first rom and i don't understand a step
"6. After the repo sync finally finishes, all you need to do is add your device, kernel, vendor specific files for the device you are building for."
Where can i find these things? Is there a command i should give in the terminal?
I've searched a little but not found anything...any hint would be accepted!
Click to expand...
Click to collapse
What rom are you building? If CM10.1 or CM10.2 just follow the instructions on
wiki.cyanogenmod.org - w - Build_for_ville
(sorry, cannot post the link since I don't have enough posts Just replace - with /)
I guess your point 6 refers to items 2.7-2.9 where prebuilt apps, device-specific code (e.g. kernel etc.) and other
proprietary drivers are copied to your source code.
To init for CM10.1, use
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
for CM10.2 use
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
Hope this helps. good luck
drkxyz said:
What rom are you building? If CM10.1 or CM10.2 just follow the instructions on
wiki.cyanogenmod.org - w - Build_for_ville
(sorry, cannot post the link since I don't have enough posts Just replace - with /)
I guess your point 6 refers to items 2.7-2.9 where prebuilt apps, device-specific code (e.g. kernel etc.) and other
proprietary drivers are copied to your source code.
To init for CM10.1, use
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
for CM10.2 use
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
Hope this helps. good luck
Click to expand...
Click to collapse
I'm trying to build another rom not CM but i'm trying following the 2.7-2.9 steps from your link
What
Building from source or MOD ROM?
xdluisssxd said:
Building from source or MOD ROM?
Click to expand...
Click to collapse
i think i'm building it from source lol
if u dont have internet connection to make a ROM this guide is for you and you dont need to have download for GB's of file
first im taking carbon ROM for example
1.You will need to set up some directories in your build environment:
To create them run:
mkdir -p ~/bin
mkdir -p ~/carbon
2.Install the Repository
Enter the following to download the "repo" binary and make it executable:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
You may need to reboot for these changes to take effect. Now enter the following to initialize the repository:
cd ~/carbon
Repositories:
Before you continue --> run this in the terminal:
repo init -u https://github.com/CarbonDev/android.git -b kk
3.now open carbon folderand press ctrl + H if u see .repo folder u can continue to next
repo sync --> firsy sync for 5mins to load the folder and then stop syncing by closing terminal
4.after that see the manifest.xml with notepad or any suitable one and you can see link for the packages EXAMPLE: android_art search in the cyanogenmod or in which u want to build
5.im sharing link database of packages for building carbon rest u have the job to search and typer in github
package which to be downloaded for carbon ROM is here http://d-h.st/zru
6.after making source proper --> Building the System --->>>Initialize the environment with the envsetup.sh script. Note that replacing "source" with a single dot saves a few characters, and the short form is more commonly used in documentation.
. build/envsetup.sh
lunch
Enter the number of the build you want to start and press enter:
make carbon -j7 = Run Squisher/Run Opticharger
make otapackage -j7 = No Squisher/No Opticharger
optional --> Submitting Patches
Patches are always welcome! Please submit your patches via CarbonDev Gerrit! You can do this by using these commands:
Setting up for repo upload: (run these commands once)
git config --global review.review.carbonrom.org.username <Your username registered at CarbonDev gerrit>
git config --global review.review.carbonrom.org.email <Your email registered at CarbonDev gerrit>
(From root android directory)
. build/envsetup.sh
repo start kk .
(Make your changes and commit)
repo upload .
Note: "." meaning current directory For more help on using this tool, use this command: repo help upload
Make your changes and commit with a detailed message, starting with what you are working with (i.e. vision: Update Kernel) Commit your patches in a single commit. Squash multiple commit using this command: git rebase -i HEAD~<# of commits>
To view the status of your and others' patches, visit EAMPLE:Carbondev Code Review
if you want to build :
CYANOGENMOD -->do steps upto initialisng repo ------------https://github.com/CyanogenMod/android
OMNIROM -->do steps upto initialisng repo ------------https://github.com/omnirom/android
CARBON -->do steps upto initialisng repo ------------https://github.com/CarbonDev/android
dont click thanks if i helped you because thanks button is gonna damage
CREDITS:
---------> Ramsudharsan madhavan for teaching me
---------> Guru sanjay my friend helping me to download
---------> and me for thinking this idea in my school time
Goin gud. keep it up.
Awesome man!
Worth for Portal!
Sent from my Xperia Sola using XDA Premium 4 mobile app
Nevermind.
Hi guys
I'm new to rom development, I have many question to deal with...
First thing first, I'm about to download android source as per the steps in source.android.com, but i have limited data quota per day. so i searched the internet to reduce the downloading source size and i found that adding
Code:
--depth=1
to git clone command will reduce the downloading size.
But I need to know what is the difference between below two git clone commands
Code:
repo init --depth=1 -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r1.0.1
and
Code:
repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r1.0.1
Second thing is I'm building rom for Huawei ascend P6-U06 (code name: hwp6-u06), for this device i can't find kernel tree, device tree and vendor blobs for lollipop. I'm only getting kernel tree, device tree and vendor blobs for Kitkat in github (cm-11.0 based) can i use these ones
orelse can i use google common kernel source to build custom kernel