[ONE General] om22:
Because I saw some requests for a build guide for crDroid (ROM with many added features based on CM) I decided to make one. Please report if it worked. If you have errors I will try my best to resolve them.

Please read everything carefully. Although I tested this some times I DO NOT guarantee that this GUIDE is error free. Will try to keep this updated when the manifest or anything changes.

This guide has been tested on Ubuntu 14.04.1

Requirements are:

More or less recent computer [I got a Xeon E3-1230v3 (equal to an i7-4770) and 16gigs of RAM and a clean build takes about 40minutes on my HDD for me.]

At least 40GB of HDD space (SSD will speed up the build noticeably, just as more RAM does)

Linux of course (64 bit Ubuntu/debian base for having apt-get functionality. A VM also works but very slooooooooooow.)

Patience... (Donwload size is ~13-15GB and compiling takes it's time)

Some very basic linux terminal skills will make things easier but it should go perfectly well without them. :cyclops:​

1. First of all we need to make sure you've got all the packages installed you need for building:

Open a terminal and insert the following:

sudo apt-get install bison build-essential curl flex git gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev

2. If you don't know if you've installed repo yet do the step in the spoiler:

mkdir -p ~/bin

curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

chmod a+x ~/bin/repo

source ~/.profile

3. Now let's create the folder where your crDroid files will be saved:

mkdir -p ~/android/crdroid

4. The next step is to initialize CMs repo in your folder as crDroid is based on CM:

cd ~/android/crdroid/

repo init -u https://github.com/CyanogenMod/android.git -b cm-11.0

5. Now enable hidden files in your file explorer by opening it and pressing ctrl+h. Then navigate to your crdroid folder and then head into the hidden .repo folder. There you need to create a new folder called "local_manifests"(without quotes!). Navigate into this folder and create an empty file called "roomservice.xml"(without quotes!)

6. Open it in a editor and insert the following and save it:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" />
<project name="TheMuppets/proprietary_vendor_oppo" path="vendor/oppo" remote="github" />
<project name="cristianomatos/android_device_oneplus_bacon" path="device/oneplus/bacon" remote="github" revision="cm-11.0" />
<project name="cristianomatos/android_device_oppo_msm8974-common" path="device/oppo/msm8974-common" remote="github" revision="cm-11.0" />
<project name="CyanogenMod/android_device_oppo_common" path="device/oppo/common" remote="github" />
<project name="CyanogenMod/android_kernel_oneplus_msm8974" path="kernel/oneplus/msm8974" remote="github" />
<project name="CyanogenMod/android_hardware_qcom_display-caf-new" path="hardware/qcom/display-caf-new" remote="github" />
<project name="CyanogenMod/android_hardware_qcom_media-caf-new" path="hardware/qcom/media-caf-new" remote="github" />
<project name="CyanogenMod/android_frameworks_opt_connectivity" path="frameworks/opt/connectivity" remote="github" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
<remove-project name="CyanogenMod/android_build" />
<project path="build" name="cristianomatos/android_build" groups="pdk" >
<copyfile src="core/root.mk" dest="Makefile" />
</project>
<remove-project name="CyanogenMod/android_vendor_cm" />
<project name="cristianomatos/android_vendor_cm" path="vendor/cm" remote="github" revision="cm-11.0" />
<remove-project name="CyanogenMod/android_packages_apps_CMAccount" />
<project name="cristianomatos/android_packages_apps_CMAccount" path="packages/apps/CMAccount" remote="github" revision="cm-11.0" />
<remove-project name="CyanogenMod/android_packages_apps_DSPManager" />
<project name="cristianomatos/android_packages_apps_DSPManager" path="packages/apps/DSPManager" remote="github" revision="cm-11.0" />
<remove-project name="CyanogenMod/android_packages_apps_Dialer" />
<project name="cristianomatos/android_packages_apps_Dialer" path="packages/apps/Dialer" remote="github" revision="cm-11.0" />
<remove-project name="CyanogenMod/android_packages_providers_DownloadProvider" />
<project name="cristianomatos/android_packages_providers_DownloadProvider" path="packages/providers/DownloadProvider" remote="github" revision="cm-11.0" />
<remove-project name="CyanogenMod/android_packages_apps_InCallUI" />
<project name="cristianomatos/android_packages_apps_InCallUI" path="packages/apps/InCallUI" remote="github" revision="cm-11.0" />
<remove-project name="CyanogenMod/android_packages_services_Telephony" />
<project name="cristianomatos/android_packages_services_Telephony" path="packages/services/Telephony" remote="github" revision="cm-11.0" />
<remove-project name="CyanogenMod/android_packages_apps_Mms" />
<project name="cristianomatos/android_packages_apps_Mms" path="packages/apps/Mms" remote="github" revision="cm-11.0" />
<remove-project name="CyanogenMod/android_packages_providers_MediaProvider" />
<project name="cristianomatos/android_packages_providers_MediaProvider" path="packages/providers/MediaProvider" remote="github" revision="cm-11.0" />
<remove-project name="CyanogenMod/android_system_media" />
<project name="cristianomatos/android_system_media" path="system/media" remote="github" revision="cm-11.0" />
<remove-project name="CyanogenMod/android_frameworks_base" />
<project name="cristianomatos/android_frameworks_base" path="frameworks/base" remote="github" revision="cm-11.0" />
<remove-project name="CyanogenMod/android_packages_apps_Settings" />
<project name="cristianomatos/android_packages_apps_Settings" path="packages/apps/Settings" remote="github" revision="cm-11.0" />
<project name="cristianomatos/android_packages_apps_ScreenRecorder" path="packages/apps/ScreenRecorder" remote="github" revision="cm-11.0" />
<project name="cristianomatos/android_frameworks_opt_cards" path="frameworks/opt/cards" remote="github" revision="slim-recent" />
<remove-project name="CyanogenMod/android_packages_apps_CMUpdater" />
</manifest>

7. Now go back to your terminal and start sync:

cd ~/android/crdroid/

repo sync

This can take a looooong time!
​

8. Don't forget to get the prebuilt apps!

cd ~/android/crdroid/vendor/cm/

./get-prebuilts

9. Setup the build environment:

cd ~/android/crdroid/

. build/envsetup.sh

breakfast bacon

10. Finally start the build!

brunch bacon

When it finished building, the zip file is located at ~/android/crdroid/out/target/product/bacon/cm-11-builddate-UNOFFICIAL-bacon.zip. You can enable ccache(use: http://wiki.cyanogenmod.org/w/Build_for_bacon for info) to speed up subsequent builds.

It's normal that the bootanimation is the CM one instead of the crDroid one (simply replace it with one from an official crDroid build).

Also your crDroid version in about phone will show unknown.

Have fun with your own crDroid build! It would be very kind if you could leave a thanks because this took me quite a while to make:angel::good: