[Xiaomi Redmi 1S] rebelos:
Building Instructions : For CyanogenMod

Unofficial

CM-11.0 [Android-4.4.x]

To get started with Android/CyanogenMod, you'll need to get familiar with Git and Repo.

To initialize your local repository using the CyanogenMod trees, use a command like this:

first create folder named " cm "

mkdir cm

enter into cm

cd ~/cm

For CM - 11.0 kitkat 4.4.x

[COLOR="black"]repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0[/COLOR]

Then to sync up:

[COLOR="black"]repo sync[/COLOR]

Please see the CyanogenMod Wiki for building instructions.

For more information on this Github Organization and how it is structured, please read the wiki article.

Create and edit device.xml in .repo:

[COLOR="black"]gedit .repo/local_manifests/device.xml[/COLOR]

Add this to the device.xml:

For CM 11.0 KitKat 4.4.x

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- armani Specific -->
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" />
<project path="hardware/qcom/fm" name="CyanogenMod/android_hardware_qcom_fm" revision="cm-11.0" />
<project path="kernel/xiaomi/armani" name="armani-dev/android_kernel_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="device/xiaomi/armani" name="armani-dev/android_device_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="vendor/xiaomi" name="armani-dev/proprietary_vendor_xiaomi" remote="github" revision="cm-11.0" />

</manifest>

[COLOR="black"]. build/envsetup.sh (notice the period and space)
vendor/cm/get-prebuilts
[/COLOR]

then

brunch armani

CM-12.0 [Android -5.0.x]

For CM - 12.0

[COLOR="black"]repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0[/COLOR]

Then to sync up:

[COLOR="black"]repo sync[/COLOR]

Please see the CyanogenMod Wiki for building instructions.

For more information on this Github Organization and how it is structured, please read the wiki article.

Create and edit device.xml in .repo:

[COLOR="black"]gedit .repo/local_manifests/device.xml[/COLOR]

Add this to the device.xml:

For CM 12.0

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- armani Specific -->
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-12.0" />
<project path="hardware/qcom/fm" name="CyanogenMod/android_hardware_qcom_fm" revision="cm-12.0" />
<project path="kernel/xiaomi/armani" name="armani-dev/android_kernel_xiaomi_armani" remote="github" revision="cm-12.0" />
<project path="device/xiaomi/armani" name="armani-dev/android_device_xiaomi_armani" remote="github" revision="cm-12.0" />
<project path="vendor/xiaomi" name="armani-dev/proprietary_vendor_xiaomi" remote="github" revision="cm-12.0" />

</manifest>

Repo Sync again to grab device stuff

repo sync

[COLOR="black"]. build/envsetup.sh (notice the period and space)
[/COLOR]

then

brunch armani

Building Instructions : For Carbon Rom

Unofficial

To get started with the Carbon-Dev sources, you'll need to get familiar with Git and Repo.

Getting Started

To get started with the Carbon-Dev sources, you'll need to get familiar with Git and Repo.

Create the Directories

You will need to set up some directories in your build environment.

To create them run:

[COLOR="black"]mkdir -p ~/carbon[/COLOR]

Install the Repository

You may need to reboot for these changes to take effect. Now enter the following to initialize the repository:

[COLOR="black"]cd ~/carbon[/COLOR]

Repositories:

Before you continue --> run this in the terminal

[COLOR="black"]repo init -u https://github.com/CarbonDev/android.git -b kk[/COLOR]

after it does its thing

[COLOR="black"]mkdir .repo/local_manifests
touch .repo/local_manifests/device.xml
gedit .repo/local_manifests/device.xml[/COLOR]

Add this to the device.xml:

For Carbon Rom kk

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- armani Specific -->
<project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" />
<project path="hardware/qcom/fm" name="CyanogenMod/android_hardware_qcom_fm" revision="cm-11.0" />
<project path="kernel/xiaomi/armani" name="armani-dev/android_kernel_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="device/xiaomi/armani" name="armani-dev/android_device_xiaomi_armani" remote="github" revision="cm-11.0" />
<project path="vendor/xiaomi" name="armani-dev/proprietary_vendor_xiaomi" remote="github" revision="cm-11.0" />

</manifest>

save and exit then

[COLOR="black"]repo sync[/COLOR]

after everything syncs

[COLOR="black"]gedit vendor/carbon/vendorsetup.sh[/COLOR]

and add this to the bottom:

[COLOR="black"]add_lunch_combo carbon_device-userdebug[/COLOR]

save and exit.. then

[COLOR="black"]See The Below link and make the Following Changes in your Repo[/COLOR]

https://github.com/tarunkapadia93/a...mmit/738f266a3b14da2ed578f55e2bc8f488f4240c14

[COLOR="black"]. build/envsetup.sh[/COLOR]

[COLOR="black"]brunch device[/COLOR]

Next Tutorial is Strictly Not for beginners

Building with Linaro 4.8 toolchain

Checkout these toolchains customised for arm v7 and scorpion Cpu here http://xdaforums.com/showthread.php?t=2098133

thanks [MENTION=4825437]Christopher83[/MENTION]

Go into Terminal and navigate to the root folder of your source tree, then:

[COLOR="Black"]prebuilts/gcc/linux-x86/arm/[/COLOR]

Run:

[COLOR="black"]wget http://releases.linaro.org/13.06/components/toolchain/gcc-linaro/4.8/gcc-linaro-4.8-2013.06.tar.bz2[/COLOR]

Run:

[COLOR="black"]bunzip2 *.tar.bz2[/COLOR]

Run:

[COLOR="black"]tar -xvf *.tar[/COLOR]

Using your file manager, navigate to the root folder of your source tree again.

Navigate To "/build", in your root folder.

Run:

[COLOR="black"]gksudo gedit envsetup.sh[/COLOR]

change the line in bold, to look exactly like this one:

[COLOR="black"]case $ARCH in
x86) toolchaindir=x86/i686-linux-android-4.6/bin
;;
[B]arm) toolchaindir=arm/gcc-linaro-4.8-2013.06[/B] [COLOR="Red"]<--------[/COLOR]
;;
mips) toolchaindir=mips/mipsel-linux-android-4.6/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
[/COLOR]

Exit out and open new. Initialize and build. That's it! Makes you wonder why you never did it before, right?

Not so fast. You may have build issues, you may not. I had a few lengthy sets of errors in gsm calltracker and another .java file that was solved by using Meld and making it look exactly like a successful build's file. More as I learn.......

Thanks to infected_ for this tut; his post can be found here: [/COLOR]

http://xdaforums.com/showpost.php?p=42976693&postcount=12

This is a work in progress. Many more pieces of information will be added and this is meant to be an ever-changing thread. If you see something that is outdated or incorrect, please let me know ASAP, so I can make the correction. Also, make sure that any info offered can be and has been confirmed as functional.