[G3 Android Development] manups4e:
Hi there, since lots of you asked me how to build and how to solve errors, i decided to make this guide to help you.

I use Ubuntu 14.04 x64 since it's best for Lollipop (at least Google say this :D ).

Now we set the environment (you can copy and paste).

1) First of all install java, it must be openjdk-7 or the building environment will give you error.

In terminal type:

sudo apt-get update

sudo apt-get install openjdk-7-jdk

After that we must install the essential things

sudo apt-get install bison g++-multilib git gperf libxml2-utils

You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do "make clean" often, or if you frequently switch between different build products.

Put the following in your .bashrc or equivalent.

export USE_CCACHE=1

In terminal (be sure to be in your home folder typing "cd") type:

mkdir -p ~/bin

mkdir -p ~/android/system

Enter the following to download the "repo" binary and make it executable (runnable):

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

chmod a+x ~/bin/repo

2) Now we can download the cyanogenmod sources :)

In terminal type:

cd ~/android/system/

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

Once you are ready to download lots of Gigabytes of data :) type

repo sync

Note: use the --jN option to run multiple downloads (default is 4) example: repo sync -j8 to run 8 parallel downloads.

you can use repo sync everytime you want to sync with latest cyanogenmod changes.

3) Once you have downloaded all the sources available :) just download our device repos (thanks [MENTION=4460995]sooti[/MENTION]):

Create a folder called local_manifests under the .repo directory (hidden directory inside system folder), then create an XML file (text file with .xml extension) inside that directory. You can call the XML file anything you like, as long as it ends in .xml and rerun repo sync after you have created the relatives folders.

Put this inside the local_manifest.xml

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/lge/g3-common" name="sooti/android_device_lge_g3-common" remote="github" revision="cm-12.0" />
<project path="device/lge/d855" name="sooti/android_device_lge_d855" remote="github" revision="cm-12.0" />
<project path="kernel/lge/g3" name="sooti/android_kernel_lge_g3" remote="github" revision="cm-12.0" />
<project path="vendor/lge" name="sooti/proprietary_vendor_lge" remote="github" revision="cm-12.0" />
<project path="device/qcom_common" name="cyanogenmod/android_device_qcom_common" remote="github" revision="cm-12.0" />
</manifest>

4) Now we are ready to rock ;)

do theese steps evertime you want to build

First build will take some time so while building you can relax doing other stuff like watch a movie or listen music :)

Open terminal and type:

cd android/system

. build/envsetup.sh

brunch d855

and wait for build to finish :)

now you are ready to flash it with the gapps and the superSU :) Enjoy your personal Cyanogenmod 12 :D

P.S: everytime you build a new update, before brunch use this command "make clobber" to clean your old compiled sources and to avoid errors while building the new updates :D

---------------------------------------------

If you liked my guide and found that is useful ^^ make me a little gift here with a donation ^^ :angel: