[OnePlus 3 Guides, News, & Discussion] MarcoLK:
Yes and after this you should initialize roomservice.xml which you edited before.

but only if you are facing ninja wrapper errors or "subcommand failed" or something like this.

i am not building anymore so i won´t say anything more :D

But for me this was the fix for the ninja errors after editing the roomservice.xml

i will edit this post later with a stepbystep instruction how i built my own cm14.1

For those who are facing any errors. But first, i want to thank the guy who helped alot with his guide [MENTION=5552241]cohaolain[/MENTION]

I have to say that his guide is very very good! But for many people not. So if anybody are facing any errors, they can look into my step by step.

Do this at your own risk. If this guide is not working, do not come to me or caholain because he and me do NOT take any responsibility for this.

This is only how I built android.

Ok first you can use "stock" ubuntu or a "builduntu", the last one is a pre-made xubuntu were all the things are installed that you will need to build android.

I used builduntu.

If you choose ubuntu, you will need to start from cohaolain's guide.

If you choose builduntu you can go on with my step by step tut

First you will need to install one of those. There will be a install setup where you can choose what you want.

If you are on the destop, open the Terminal and let the game begin :)

First you will need to create the folders.

mkdir ~/bin
PATH=~/bin:$PATH

mkdir -p ~/android/system

After you have made this you can download repo.

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

and set the permissions:

chmod a+x ~/bin/repo

Now set you username and email: (please enter you realname and real email address.)

git config --global user.name "YOUR USERNAME"
git config --global user.email YOUREMAIL@DOMAIN.COM

Now remember, to be sure that you are in your /android/system folder everytime you are running my commands from now on.

run this command everytime you close and open terminal again.

cd ~/android/system/

Ok now initialize repo:

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

If you have done this you can choose for yourself a time, where you can download the whole source!

Do this over night or when you have time. (At me it was 2 1/2 to 3 hours. I have a 25,1mbit/s download connection. (not mb/s !))

To begin you download remember the command above that you are in system folder.

repo sync -f --force-sync

The option -f or --force-broken will not stop the donwload if your internet goes down, it will pause it. And it will recover broken files.

This saved me many times.

And --force-sync will try to sync always.

So if your download(the repo sync) is done you can procceed.

Jack the Server:

Now i will tell you something weird with the jack server and its mystery.

So you will need the jack server installed on your ubuntu/builduntu installation!

Without the jack server you can not compile the classes.jar (or similar)

If your build proccess is at this file it will detect that no jack server is installed and will install it.

The problem is, the server is not started! It will be installed but not started automaticily.

So you have to wait until this proccess and after this you can start the jack server and build again.

Or someone can find a workaround for this. Maybe you can install it before you start the first building attempt.

So if you are sure that the jack server is installed, it does not matter how you have madethis.

You can always check if the jack server is installed correctly with this:

./prebuilts/sdk/tools/jack-admin start-server

If your jack server is installed you can start it with this command

if not there will be an error: no jack server founded or something like this.

Now you have to run this command:

cd ~/android/system
source build/envsetup.sh
breakfast oneplus3

After this you can edit the local manifest (roomservice.xml) which was created during the breakfast command.

nano ~/android/system/.repo/local_manifests/roomservice.xml

Delete everything (hold the delete button (dont know how it is called :D ))

and paste this into it:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_oppo_common" path="device/oppo/common" remote="github" revision="cm-14.1" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" />
<project name="TheMuppets/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" revision="cm-14.1" />
<project name="CyanogenMod/android_device_oneplus_oneplus3" path="device/oneplus/oneplus3" remote="github" revision="cm-14.1" />
<project name="CyanogenMod/android_kernel_oneplus_msm8996" path="kernel/oneplus/msm8996" remote="github" revision="cm-14.1" />
<project name="CyanogenMod/android_external_sony_boringssl-compat" path="external/sony/boringssl-compat" remote="github" revision="cm-14.1" />
<project name="CyanogenMod/android_external_stlport" path="external/stlport" remote="github" revision="cm-14.1" />
<project name="CyanogenMod/android_vendor_nxp-nfc_opensource_Nfc" path="vendor/nxp-nfc/opensource/Nfc" remote="github" revision="cm-14.1" />
<project name="CyanogenMod/android_vendor_nxp-nfc_opensource_frameworks" path="vendor/nxp-nfc/opensource/frameworks" remote="github" revision="cm-14.1" />
<project name="CyanogenMod/android_vendor_nxp-nfc_opensource_libnfc-nci" path="vendor/nxp-nfc/opensource/libnfc-nci" remote="github" revision="cm-14.1" />
<project name="TheMuppets/proprietary_vendor_qcom_binaries" path="vendor/qcom/binaries" remote="github" revision="cm-14.1" />
</manifest>

After this run this command to prevent any ninja wrapper erros (subcommand failed) during the building proccess!

repo init roomservice.xml

And now

repo sync

again!

optional: you can add the option from the last repo sync(-f --force-sync) but this time there will be not so much to download.

Now set the cache for building

export USE_CCACHE=1
prebuilts/misc/linux-x86/ccache/ccache -M 50G

Now these jack server ****.

Try this to set you ram head size.

Replace the 8 (4until ∞) with the amount of ram which you want to use.

cd ~/android/system
export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx8g"
./prebuilts/sdk/tools/jack-admin kill-server
./prebuilts/sdk/tools/jack-admin start-server

If you are getting error like "no jack server was founded" or something like this you know what to do.

Be sure you are still in the system folder in your terminal.

build!

brunch oneplus3