Hi ! 🙂 If you are interested in building a fresh operating system for your Android device from CyanogenMod source code, lets start from here… First of all you need to get the required source code which will take some extra hours from your time to sync. So be patient.
Prerequisites:
- Linux environment
- Repo – repository management tool built on top of Git
What is CyanogenMod?
Why are we using CyanogenMod ? that because we are interested in what CyanogenMod offers which does not present in other official firmware. 🙂
I extracted the following description from CyanogenMod official web site
“CyanogenMod (pronounced sigh-AN-oh-jen-mod), is a customized, aftermarket firmware distribution for several Android devices. Based on the Android Open Source Project, CyanogenMod is designed to increase performance and reliability over Android-based ROMs released by vendors and carriers such as Google, T-Mobile, HTC, etc. CyanogenMod also offers a variety of features & enhancements that are not currently found in these versions of Android…”
Step 1: Install Repo
Repo is making the job easy for Android developers to collect the source code , since it enables downloading files from several git repositories.
- Create a folder name bin inside home directory.
Command: mkdir -p ~/bin

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


Command: chmod a+x ~/bin/repo

Command: gedit ~/.bashrc
Open the ~/.bashrc add following
# set PATH so it includes user’s private bin if it exists
if [ -d “$HOME/bin” ] ; then
PATH=”$HOME/bin:$PATH”
fi

Step 2: Initialize CyanogenMod source repository
- Create directory structure ~/android/system
Command: mkdir -p ~/android/system
Command: cd ~/android/system/
Command: repo init -u https://github.com/CyanogenMod/android.git -b cm-11.0
With this command it initializes the repository in the android/systems directory.

Step 3: Downloading the source code with sync
Next step is to sync the source of CyanogenMod. Fetching and cloning will take several hours. Until the fetching is completed you will not see source files in the directory.
Command: repo sync -j4 -c

- Fetching completed –> Start checking out source

- Completed checking out all source

Complete source: ~/android/system

Cheers! 🙂
Like this:
Like Loading...