[Sony Xperia ZR] xenius9:
CM12 build 12.03.2015, ODEXed - https://yadi.sk/d/dTadZHj_fCZKN

Build instruction:

1. Install ubuntu

2. We start with setting up the build environment:

First, start with installing this:

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

3. Once that is done, we go about installing JDK-7 since that's the one that works for lollipop

sudo apt-get install openjdk-7-jdk

4. Then we install the Android SDK for some useful stuff:

sudo apt-get install android androidsdk-uiautomatorviewer android-copyright android-src-vendor android-emulator android-tools-adb android-headers

android-tools-adbd androidsdk-ddms android-tools-fastboot androidsdk-hierarchyviewer android-tools-fsutils androidsdk-traceview

5. Once all that is dealt with, we can move on to the repo tool. That's what will get your CM repos syncing:

mkdir -p ~/bin

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

chmod a+x ~/bin/repo

and then, reboot to apply the changes.

Now for the interesting part

Not really, actually.

Time to yank the CM source code.

Create a working directory where you're going to sync all the sources and do the dirty stuff.

For this guide, we'll call the working directory "cm12"

Create the directory by running

mkdir cm12

enter your working directory by typing

cd cm12

6. Inititialize the repo by throwing in:

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

Wait for all the activity in the terminal to cease. And then type in:

repo sync

if needed post user information when promted

while the stuff is downloading, grab a ginger ale, or a cup of coffee and admire your handiwork. If you're the impatient type, find a generous

dose of your favourite sedative, and knock yourself out for a few hours. When you're up again, you'll be faced with one of two things. Either

your repos have synced successfully (yay!), or you get some nasty fetch errors. If it's the latter, then, Voila! You've just faced your first

ever compiling frustration. Take some time out and break a few things, drive the neighbours crazy and then return to the PC and knock in:

repo sync -j1

This should (hopefully) work perfectly as long as you have an internet connection worth paying for. If not, then compiling probably isn't for you

anyway.

7. Once all that stuff's over, create a folder called

local_manifests

in the .repo folder, and then make a new file in that folder called

roomservice.xml

open roomservice.xml using gedit, and add the following:

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

<manifest>

<project name="xenius9/android_device_sony_dogo" path="device/sony/dogo" remote="github" revision="cm-12.0" />

<project name="xenius9/android_device_sony_fusion3-common" path="device/sony/fusion3-common" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_device_sony_msm8960-common" path="device/sony/msm8960-common" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_kernel_sony_apq8064" path="kernel/sony/apq8064" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_hardware_sony_DASH" path="hardware/sony/DASH" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_device_sony_common" path="device/sony/common" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_device_sony_qcom-common" path="device/sony/qcom-common" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-12.0" />

<project name="xenius9/proprietary_vendor_sony" path="vendor/sony" remote="github" revision="cm-12.0" />

</manifest>

or you can use full cm12 sources without additional settings by using this:

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

<manifest>

<project name="CyanogenMod/android_device_sony_dogo" path="device/sony/dogo" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_device_sony_fusion3-common" path="device/sony/fusion3-common" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_device_sony_msm8960-common" path="device/sony/msm8960-common" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_kernel_sony_apq8064" path="kernel/sony/apq8064" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_hardware_sony_DASH" path="hardware/sony/DASH" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_device_sony_common" path="device/sony/common" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_device_sony_qcom-common" path="device/sony/qcom-common" remote="github" revision="cm-12.0" />

<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-12.0" />

<project name="xenius9/proprietary_vendor_sony" path="vendor/sony" remote="github" revision="cm-12.0" />

</manifest>

Then cd back to your working directory

cd ~/cm12

8. YOU'RE READY TO ROLL!

Finally, to build, type in:

. build/envsetup.sh

brunch dogo

9. Wait for the build to compile. Usually takes about 2-3 hours on an okay PC. You'll find your completed build in cm12/out/target/product/dogo.

The next time you want to build, run:

make clean

repo sync

. build/envsetup.sh

brunch dogo

.. and so on.

Happy Building!