yashsingh1/xdaforums huggingface dataset:
[XDA-University] Red Devil:
woah I did not notice it there ! thanks [MENTION=2178960]pulser_g2[/MENTION] or whoever has included it there. I feel honored to have contributed to such a great project as Omni .
[XDA-University] Nasty_z:
[MENTION=4918174]Red Devil[/MENTION] I find your guide extremely useful. Thank you for taking the time and effort into putting it up here for everyone :)

If you could please add the 'groups switch' guide. That would be wonderful. :D
[XDA-University] Vivek_Neel:
Thanks a ton for your effort.

Was looking for this kind of guide. :highfive:

:D:D
[XDA-University] Nasty_z:
Hey if I may ask. How does one cherry pick commits? Say I want to add a simple feature like performance control in settings from omni to aosp rom. How do I go about that?
[XDA-University] p1000haha:
very good guide for newbies
[XDA-University] vishal_android freak:
Cherry-picking tut has been added too.. here it is mate..

http://xdaforums.com/showthread.php?p=42701768

Tip#5 in that post.. I guess you need to cherrypick the performance controll app and some commits to be cherry picked in settings so that you see the performance control in settings.. Google about the stuff or check omni repositories for commits.. ;)

Regards from my Nexus 5™
[XDA-University] Nasty_z:
Whoops. I don't know how I missed that. Thanks mate :D
[XDA-University] vishal_android freak:
No problem.. All the best.. ;)

Regards,

vishal_android freak
[XDA-University] Vivek_Neel:
Hi guys.

Quick Question:

How much time would it take to complete my first build considering my net speed is around just 150kb/s..?.:(
[XDA-University] Red Devil:
for sync the time will depend on your download speed

for build depends upon the specs of your computer and the load on it.
[XDA-University] Vivek_Neel:
Thanks mate.

But I need another two answers.

-Net speed 150kb/s .

Just guess and tell me the time would it take for sync

-specification are

6gb ram

I5

600gb Storage

So time for building based on your guess?

I just need to set time because here in our area they shut down power for 2hr / day.
[XDA-University] vishal_android freak:
Syncing can be continued even if you stop in between.. Don't worry.. :) it starts from the same place again..

About compiling, your specs seems very good.. Cm10.2 took me 50-55min approx on fresh builds without setting cache.. Still to compile kitkat so no idea.. But i recommend to set cache.. So first build will take time but the next ones will be real quick.. ;)

Regards from my Nexus 5™
[XDA-University] Vivek_Neel:
Hi vishal.

Sorry for asking too much questions

And thanks for your replies guys.

I hope I will come up with some success.:):D
[XDA-University] vishal_android freak:
No problem.. All the best.. :)

Regards from my Nexus 5™
[XDA-University] Vivek_Neel:
Strange.

Y don't I see any thing like

Android_device__codename in my manifest.xml (cm 11 for i9100):(

Am just wondering how did he reduced to 50projects.
[XDA-University] Red Devil:
android_device_codename is available in manifest for devices only officially supported by the ROM..

you have to remove the projects from the manifest as mentioned in the guide..

What can you remove?

Its in Post 2.. Tip #1..
[XDA-University] Android_User@1:
group tag in default.xml

Hello,

What is the significance of group tag in default.xml with respect to the remote repository mentioned next to it?

Thanks
[XDA-University] Vivek_Neel:
Guys.

Was repo sync pacman using

repo init -u git://github.com/PAC-man/android.git -b cm-10.2

It was sync ..but I get the following error while sync

Curl 22 requested url not found 404

Is this normal or should I do anything? :(
[XDA-University] v_superuser:
Don't worry if it appeared once, if it shows many times, then your internet is unstable, and the next time you repo sync, use this-

repo sync -j1 -f
[XDA-University] gimmeitorilltell:
I clicked thanks but I wanted to mention that I have been trying to figure out how to commit changes to my existing git repository. This guide is PRICELESS! Thank you for taking the time to write this up and share it with xda. I have read the github libraries and searched all over for a way to accomplish what I learned from your post. It seems so simple now that I know, git commit -m <my-branch> is what I was missing. :highfive:
[XDA-University] vishal_android freak:
git commit -m "Your message for the commit".. You need to be on the specific branch for pushing

git push remote_name branch_name.. :)
[XDA-University] Edge-Case:
Lots and lots of frustration and no freaking authoratative documentation, I HATE YOU, I HATE GOOGLE, I HATE ALL.

I set repo to sync last night, it was slow as ****, so I thought I might as well go to sleep and check in the morning, error [2] or some ****, tried again, same. Speed, 0 - 1 KiB/s but I have 50 meg TWC. So I am getting 8 bits per second, even AOL and do laps around that! Google WTF !?!?!, it is repo or the repositories, everything else is lightening fast on my end so quit blaming others, their sh*t is working.
[XDA-University] Red Devil:
thanks for the hate ;) haha

from what you've provided I can only guess what the error might be. I think there might be a problem with the repos that you're trying to sync or the hosting site of the repos. it might have gone down or something. try reducing number of jobs during the sync. instead of -j16 try -j4 and similar. and to speed things up avoid using your connection for heavy use such as downloading or streaming while the sync is on. that's all I can figure out
[XDA-University] thewisenerd:
Hi, a quick tip

In case you referenced, and synced a repo, and *unfortunately* moved the repo, and repo starts downloading gigs of data again :mad: :mad: :mad:

NVM, you just need to make sure that the "alternates" file found in <project-name>.git/objects/info/alternates, should point to the correct repo.

Example, I had "~/source/cyanogenmod-11.0", and moved it to "~/works/cyanogenmod-11.0"

My alternates file (in all the "alternates" in the projects folder found within .repo folder) read this:

/home/user/source/cyanogenmod-11.0/.repo/projects/art.git/objects

So, I just figured out that I needed to change the /source/cyanogenmod-11.0 to /works/cyanogenmod-11.0 :D

Yes, I ain't stupid to be replacing all the files, so, I just did:

cd .repo/projects
find ./ -type f -exec sed -i 's/\/source\/cyanogenmod-11.0\//\/works\/cyanogenmod-11.0\//g' {} \;

This is a sed command, /source/cyanogenmod-11.0 found in text with /works/cyanogenmod-11.0.

Worked pretty well, synced beanstalk sources.

Just posting this here, in case this helps someone :angel:

P.S. You *might* run into a "error: <so-and-so> does not point to a valid object!", just ignore it. Its just telling that you didn't sync those branches (ofc, you sync only specifc branches, so rest are missing) :silly:
[XDA-University] svprm:
First of all thanks for your nice guide.

I have one question.

If i'm going to compile a recovery for device which was not supported officially by the CM,then do i need to sync all the project.

if no,what are the projects do i need to sync?
[XDA-University] Red Devil:
Follow basically what I have mentioned in the guide.. you can remove all those repositories. Basically, while compiling a ROM , a recovery is also compiled (you can make a recovery otherwise as well) so you cant remove anything more apart from what I have mentioned..

Once you explore your work tree a bit and check out the make files , you will realise what projects are used in the compilation of a recovery!
[XDA-University] vishal_android freak:
https://github.com/TWRPXperia/android/blob/cm-10.2/default.xml

You can use this as reference to remove projects that aren't needed.. Still do have a look on what you are removing.. Because removing needed stuff can kill your recovery builds, giving errors.. After syncing all this.. You will need your device tree and kernel.. Once everything is synced.. Just do

. build/envsetup.sh
breakfast device_name
make bootimage

as far as i know, latest code doesn't support just the build of recovery image.. So build bootimage and in the process if you observe the out directory, you get your recovery image compiled too.. ;) all the best.. :)
[XDA-University] thewisenerd:
IDK much about what you're saying, as I know not, about fascinatemtd device itself, but just in case,...

The path in local_manifest.xml, and roomservice aren't the same? I've highlighted it in another color.

The path in roomservice.xml seems to be correct, for the fascinatemtd-vendor.mk is in the fascinatemtd subdirectory. So, keep it (the repo) in just one place. And make sure the paths are same?

This might just fix your problem? :)
[XDA-University] Vivek_Neel:
After repo sync

Easy thing would be to add your device repo , kernel and all those thing in local_manifest.xml then repo sync

romservice.xml will be automatically generated which you must not edit or rename .

Then do . build/envsetup.sh

brunch codename
[XDA-University] hhp_211:
thanks guys, between realizing that the default.xml(manifest.xml) generates the info in the roomservice.xml,,,

I fixed that issue and found/squashed the bug reporting the fascinatemtd-vendor.mk error,,,

[[ tracked that error down in my 'device/samsung/fascinatemtd/device.mk' file ]]

now onto tracking other issues now that is BUILDING!!!

thanks again :highfive:

this was my manifest.xml error::

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

########
#########
#########

<!--vendors-->
<project path="vendor/du" name="vendor_du" remote="du" revision="du44" />
[B]<project path="vendor/samsung[B][COLOR="Red"][STRIKE]/fascinatemtd[/STRIKE][/COLOR][/B]" name="android_vendor_samsung_fascinatemtd" remote="TeamRegular" revision="nexus" />
[/B]

and I had to edited the roomservice.xml file to take the whole line out::

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="android_device_samsung_fascinatemtd" path="device/samsung/fascinatemtd" remote="du" revision="du44" />
<project name="android_device_samsung_aries-common" path="device/samsung/aries-common" remote="du" revision="du44" />
<project name="android_hardware_samsung" path="hardware/samsung" remote="du" revision="du44" />
<project name="samsung-kernel-aries" path="kernel/samsung/aries" remote="du" revision="du44" />
<project name="android_kernel_samsung_aries" path="kernel/samsung/aries" remote="du" revision="du44" />
[COLOR="Red"][B][STRIKE] <project name="android_vendor_samsung_fascinatemtd" path="vendor/samsung" remote="TeamRegular" revision="nexus" />[/STRIKE][/B][/COLOR]
</manifest>
[XDA-University] fulldaykg:
Thank you OP. I have been struggling with this crap for a bit, great explanation. Stuff's starting to make much more sense.
[XDA-University] :
Hi,

While downloading cm10.1 source my download got interrupted many times. Say atleast 3GB of bandwidth is wasted due to interruption of large projects (each around 500MB - 2GB). I guess all the interrupted downloads remain somewhere in .repo/projects folder. Now my .repo folder has grown to around 15GB , which is not normal i guess.

So, How can i delete the unnecessary interrupted downloads from my .repo folder???

And, How can i make sure the .repo folder is exactly same as remote branch without no addition/deletion.???

Will using reference path, copies the required contents of .repo to the newly initialized folder??. Or will it just symlink to the original reference path.??
[XDA-University] demkantor:
Delete repo folder if you're worried but shouldn't be an issue

Use the -f command to force sync when you have spotty internet
[XDA-University] :
I solved this by deleting the tmp_pack_XXXXX files in the .rep/projects/anyproject/objects/pack/ folder. I got 1GB free after this.

To find tmp_pack files of incomplete downloads, use

cd to .repo folder.

find . -name tmp_pack_*

to find and delete.

find . -name tmp_pack_* -delete
[XDA-University] :
Guy i am getting these error when i used the local_manifest.xml

My code for local_manifest.xml

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="techix18"
fetch="https://github.com/Techix18/" />
<project path="device/samsung/i9082" name="android_device_samsung_i9082" remote="techix18" revision="cm-10.1"/>
<project path="kernel/samsung/i9082" name="android_kernel_samsung_i9082" remote="techix18" revision="cm-10.1" />
<remove-project name="android_device_htc_endeavoru" />
<remove-project name="TheBr0ken/device_htc_vigor" />
</manifest>

But when i repo sync,it shows these errors

Fetching projects: 99% (412/416) Fetching project platform/external/mdnsresponder
Fetching projects: 100% (416/416), done.
Traceback (most recent call last):
File "/home/developer/XenonHD/.repo/repo/main.py", line 408, in <module>
_Main(sys.argv[1:])
File "/home/developer/XenonHD/.repo/repo/main.py", line 384, in _Main
result = repo._Run(argv) or 0
File "/home/developer/XenonHD/.repo/repo/main.py", line 143, in _Run
result = cmd.Execute(copts, cargs)
File "/home/developer/XenonHD/.repo/repo/subcmds/sync.py", line 681, in Execute
if self.UpdateProjectList():
File "/home/developer/XenonHD/.repo/repo/subcmds/sync.py", line 464, in UpdateProjectList
if project.IsDirty():
File "/home/developer/XenonHD/.repo/repo/project.py", line 608, in IsDirty
'--refresh')
File "/home/developer/XenonHD/.repo/repo/project.py", line 2383, in runner
p.stderr))
error.GitError: device/htc/endeavoru update-index: fatal: Not a git repository (or any of the parent directories): .git

Please somebody help me
[XDA-University] roshan2989:
hi there sir..you thread is awesome ..i have two question to ask...

1)about the "use CCache while compiling" can i use the jellybean method for kitkat or diffrent...?

2) can you tell me how to remove the unwanted app like "email,live wallpaper before complie...?
[XDA-University] v_superuser:
1. Yes, you can use CCache JB method for KK!

2. You need to use Tinyconfig.mk in that case. ;)
[XDA-University] roshan2989:
thanks for the 1st method..and can you be more specific"how to use tinyconfig.mk...?"
[XDA-University] roshan2989:
hi guys anyone know why i get this error when i "Make Clobber"?

preshothemannair@Preshothemannair:~$ cd cm11
preshothemannair@Preshothemannair:~/cm11$ make clobber
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
CM_VERSION=11-20140206-UNOFFICIAL-galaxysmtd
TARGET_PRODUCT=cm_galaxysmtd
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a8
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.8.0-35-generic-x86_64-with-Ubuntu-12.04-precise
HOST_BUILD_TYPE=release
BUILD_ID=KOT49H
OUT_DIR=/home/preshothemannair/cm11/out
============================================
build/core/Makefile:44: warning: overriding commands for target `/home/preshothemannair/cm11/out/target/product/galaxysmtd/system/etc/permissions/android.software.live_wallpaper.xml'
build/core/Makefile:44: warning: ignoring old commands for target `/home/preshothemannair/cm11/out/target/product/galaxysmtd/system/etc/permissions/android.software.live_wallpaper.xml'
PRODUCT_COPY_FILES device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml ignored.
PRODUCT_COPY_FILES device/generic/goldfish/camera/media_profiles.xml:system/etc/media_profiles.xml ignored.
PRODUCT_COPY_FILES device/generic/goldfish/camera/media_codecs.xml:system/etc/media_codecs.xml ignored.
PRODUCT_COPY_FILES hardware/libhardware_legacy/audio/audio_policy.conf:system/etc/audio_policy.conf ignored.
No private recovery resources for TARGET_DEVICE galaxysmtd
Entire build directory removed.
preshothemannair@Preshothemannair:~/cm11$
[XDA-University] :
Rename old repo folder. Create new folder and initialize repo . Copy the contents of old-repo-folder/.repo/projects to new-repo-folder/.repo/projects and do repo sync.

After successfully syncing the working directory u can delete the old-repo-folder.

This is lengthy but works. If someone has a better solution, i would appreciate it.
[XDA-University] vishal_android freak:
The error is with the remove-project line.. That project isn't in the git repo from where it is fetched, with the name mentioned in the <remove-project name>

Else it is not a git repo.. That is it contains sub folders and the folder

device/htc/endeavoru

Doesn't contain a .git folder.. You need to be sure about what we are typing in manifest.. :)
[XDA-University] robt77:
After that you need to either run command brunch device name or lunch then select your device from the list. Then the build will start. Make clobber just removes the files from the out directory and you are building from the new source after repo sync.
[XDA-University] brajesh.sharma87:
Nice guide mate.

but I have some questions. There are many users like me who has compiled aosp or cm without doing any change. The step 2 of this process is to add features of own choice via cherry picking. The example that you have given in your guide is very simple. There are still many questions in my mind like how do I find that particular commit. sometimes to add a feature we need to pick many commits. For example I am a nexus 4 user. I compile aosp rom and then use many xposed modules to add feature (specially gravity box). Now those feature can also be inbuilt in the rom via cherry pick but I am not sure how I can add those. I have tried searching on cm,aokp and pa gerrits but still no success. Maybe someone of you can understand me and write a guide for these stuffs.

bdw, it would be awesome if someone help me add custom quick settings like CM in my aosp rom. This will help me go further.
[XDA-University] v_superuser:
Try searching on gerrits like that of PAC or ReVolt since they are packed with tons of features. Also I'd advice you to manually apply those commits unless you want to get into merge conflicts.
[XDA-University] emikaadeo:
Hi! :) Great guide !!

I've downloaded android sources using manifest from SuperNexus ROM (Sorry, I can't paste links :()

I've successfully build this ROM.

This repo is for Android KitKat 4.4.2_r1 (KOT49H)

Now i want to build a latest version of Android which is 4.4.2_r2 (KVT49L)

My (maybe stupid) question is: is there a way to update my local repository to version 4.4.2_r2 or do i need to download all sources again?

Thanks in advance.
[XDA-University] FBis251:
Daaaaaaaaaaaaaaaaaaaaaamn that's a nice tutorial yo!
[XDA-University] koolkunz:
hi

i was repo syncing first without reference tag and then came across this thread...i cancelled the repo sync and used reference tag..

in my directory..the .repo folder now obviously has extra files...because:

when i cancelled the first repo sync in between the size of .repo folder was 5 gb

so i guess those 5gb of data is not needed anymore

anyway to safely delete those files??
[XDA-University] Cuzz1369:
If the ROM you want to build has updated its source you just need to repo sync again. It won't download the whole thing again, just the changes. It should sync pretty quick. Then just build again.
[XDA-University] emikaadeo:
Hi, thanks for the answer.

I know about the "repo sync" method but the "problem" is that ROM doesn't update its source, so I wanted to know is there a way to

merge

SuperNexus repo (4.4.2_r1) with latest AOSP repo (4.4.2_r2) using Git or any other tool.

If it is, how can i do that?

Thanks in advance.
[XDA-University] demkantor:
Do you want both sources? You can just sync the r_2 source to a new folder on PC but use reference tag to your r_1 source, this way you will only download new stuff, probably will only take minuets for you
[XDA-University] emikaadeo:
Hi!

Here's what i want to do:

I want to build a ROM using SuperNexus source (4.4.2_r1) as a base, with changes, bugfixes, etc. made by AOSP in their 4.4.2_r2 release.
[XDA-University] :
building multiple branches

Lets assume I first initialized the cm10.1 repo in ~/cm10-1 path.

added ccache variables USE_CCACHE=1 and CCACHE_DIR=~/ccache to .bashrc

repo sync and build.

Then I want to build cm10.2 in ~/cm10-2 path

Using reference flag initializing repo. "repo init --reference=~/cm10-1 -u url -b branch"

and repo sync

My doubts.

Will this cm10-2 repo sync download the missing code files to cm10-1/.repo/projects/ folder or not??. If not, can i somehow download multiple branches source to the same directory.??

Since .bashrc contains CCACHE_DIR which is common to building cm10-1 and cm10-2 , will this interfere with build process.?
[XDA-University] rutz@8038:
[MENTION=4918174]Red Devil[/MENTION]

Sir, first of all.. thanks for this guide.. I've never build a rom.. but always wanted to.. however, I come from a non-coding background.. so used to feel that building rom ain't my thing.. Your guide sir, has helped me to get started and feel comfortable about the process..

I decided to build SuperNexus for my i9300 and followed the instructions as in this guide and elsewhere.. right now repo is synchronizing.. but its been hours now.. I mean.. literally, 9 hours.. I deleted all the unwanted stuff via local manifest.. devices and darwin.. I'm ready to wait more.. however, the following line is repeating itself quite often..

curl: (22) The requested URL returned error: 404

Server does not provide clone.bundle; ignoring.

Now I'm getting a feel that some repos might not have got downloaded.. and that will pose problem while building.. please help me out.. whether I should continue the repo sync.. or abort?
[XDA-University] v_superuser:
That line is not a big problem, it just means that the internet connection is not stable, but it still downloads all the repos and to make sure, just run

repo sync -f -j1

after it finishes just to confirm again! :D
[XDA-University] Firmino Neto:
Hi, i have this error with omnirom, can you help? Sorry the english...

Fetching projects: 100% (412/412), done.

Checking out files: 100% (26981/26981), done. files: 8% (2307/26981)

Checking out files: 100% (6663/6663), done.out files: 37% (2520/6663)

Checking out files: 100% (45881/45881), done.t files: 9% (4220/45881)

Checking out files: 100% (9597/9597), done.out files: 25% (2462/9597)

Checking out files: 100% (4301/4301), done.out files: 1% (73/4301)

Checking out files: 100% (3352/3352), done.out files: 27% (910/3352)

Checking out files: 100% (7954/7954), done.out files: 39% (3111/7954)

Checking out files: 100% (11685/11685), done.ut files: 23% (2793/11685)

Checking out files: 100% (22654/22654), done.ut files: 7% (1775/22654)

Syncing work tree: 59% (244/412) error: revision refs/tags/android-4.4.2_r2 in platform/frameworks/opt/timezonepicker not found

firmino@debian:~/android/omni$
[XDA-University] v_superuser:
I guess timezone picker has been removed, see here.
[XDA-University] a2441918:
Red Devil Seriously man. One of the best guides ever.
[XDA-University] FuMMoD:
Amazing guide for beginners like myself. Only wish it was a little more in depth on cherry picking and how to auto add apks (not from git) into a rom when building.
[XDA-University] rachanta:
replacing a folder in my local repo with a folder from github

I am trying to get faux sound control to work in my build. My base kernel does no have faux sound control, but works well as such. Now my problem is the follows:

I want to get only faux sound control from faux123's kernel. Files related to Sound control are there at: https://github.com/faux123/Nexus_5/tree/kk_mr1/sound/soc/codecs

[MENTION=4918174]Red Devil[/MENTION], do I replace the folder - kernel/lge/tasssadar/sound/soc/codecs - which is there in my local repository with faux's codec folder at github.

First of all is it the right method to get faux sound control into my kernel.

Any help would be appreciated.
[XDA-University] puskyer:
Wow this is great stuff

I have been blindly feeling my way around building a ROM, have been able to build both an Atrix 4g and Galaxy Tab 7" but it has been painful,.

This guide definitely clarifies things and will make life much easier. Thank you for taking the time to do this and helping us learn.

Off to trying some of these tricks.. :victory:
[XDA-University] v_superuser:
For building APKs, you can refer to this post. :)

http://xdaforums.com/showthread.php?p=49666330