[Android] Calin:
How to create your first CM based ROM ​

Introduction

​

In this mega thread guys i will show you basically how to create your own custom CM based ROM, i will take CM in consideration because it is the most used here, but the native sources could be from Omni, or to be based on AOSP. But be aware that not all the things said here will be able to be applied to the ROM because some CM things may not be present in other ROM sources. So before jumping to the guides make sure to check out the first part of the thread from the Index.

Usually there are 4 kind of ROM developers:

Those who Create ROMs

Those who port a created ROM for an other device (device which is not supported officially) by adapting kernel sources, propietary files and vendors....

Those who maintain a ROM for a specific device which is not officially supported but the device sources in use are already prepared by an other developer in order to succeed the compilation process

Those who maintain a ROM for a device that is officially supported by the team or organization but the user also has the goal to help the users and know what he is publishing on the forum

We all know that the Bosses of all are Cyanogenmod, OmniROM and so on and after them there are the secondary ROMs which can be: PAC-MAN,Slim,AICP etc... Which they are all based on an already ROM sources (Could be CM or AOSP for example).

So why they can and you not?

That's because your are thinking from a different perspective.

Let me show you:

For sure you are thinking that "Oh my god there is too much coding for me i can't do all these stuff alone"

Exactly you can't do all these stuff alone, for sure you will need at least one more person to work on it but belive me i was also thinking in the same way but looking here and there i learned how to do many things that for example 2 years ago was something unknown for me coming from a different planet.Trust here i will explain you all you need to know about how to create a custom based ROM or at least show you the basics and then learn for your own.(Not necessary an organization for many devices but a small one just to get familiar and to help you starting from there)

So in this guide i will not show you how to compile a new ROM because i assume that you already know that, instead i will show all the common things that can be changed and even also added in the custom ROM sources by eliminating also the CM or the native ROM name from you're taking the sources as much as possible by including your ROM name instead and also showing you strategies which may help you.

Note.

When you fork the repos make sure to always work on the cm-12.1 branch because some changes which we will gonna make in the guide may not exists in cm-12.

For the fact that the guide will be very big, if you will need help, just write it on the thread but in this way:

Make sure that the post title start in this way:

Section of the thread: Settings, Repo part ....

Part of the section (If we talking about the CM Removable part in Settings for example)

Requirements

​

Knowledge and experience in compiling ROMs

Github knowledge (Usually you should know this if you compiled a ROM for a device)

Basic knowledge about XML, Java, C (At least know how to work on it not NOOBS on this OK?)

Good computer running Ubuntu (14.04/14.10/15.04/15.10) or a custom Distro based on the specified ones

High quantity of storage for all the file which you will gonna use.

SmartGit which it will help you very much

Index

​

Disclaimer and ROM specifications

Environment

Environment Setup

Linux Distribution Part

SmartGit Part

Repo Part

Android Build part

Extra features to be added to the Android Build files

Android Venodr files

Extra features to be added to the Android Vendor files

Settings && Packages part

Extra Features

*******************************************WIP**********************************************

For the fact that the Guide will be very long and it will take some time to complete it all,so please be patient

In the main time will leave here the staus for every part of the guide:

1- Introduction (First post) (Completed! )

2- Linux Distribution Part (Completed!)

3- Environment Setup Part (Completed!)

2- SmartGit Part (Completed! )

3- Repo part (Needs revisions )

4- android_build (Needs revisions )

5- Packages (Working on it!)

6- vendor (Needs revisions )

7- Extra features (Working on it )

8- ROM Description Part (Completed! )