[Android] Calin:
Vendor files (First part)

​

Now guys let's contimue the modifications also with the vendor files shaw we?

Make sure that you forked and cloned the repo to your computer with SmartGit by including also the upstream branches.

Before continue obviously we need to explain what this repo means, well exactly as from the title vendor we can assume that these vendors files are the propietary ones which every ROM have.

For example, each phone got propietary files (vendor) so the same is also here, so every ROM differ from each other.

Ok so now, for the fact that there will gonna be more things to do here i will split the vendor part in two.

In the first one we will remove all the CM stuff as in the android build.

In the second one instead we will talk about features or modifications that can be made on it.

So let's begin with the CM removable modifications:

Open the config folder.

Now here you will find multiple xml files, each of them will need to be modified.

But first let's take cm_audio.mk

The first thing to do is to remove this little cm and rename it with your ROM name (in lower case)

Now open it, and make CTRL F and search:

cm

And change it with your ROM name, do it for all of the search results.

Now you will need to do the exactly same thing also with the others located in the config folder except for the common.mk which is for later.

Now the last thing about this part is this:

Take the default.xml from platform manifest and change this line:

<project path="vendor/cm"

And change the path by changing the cm with your ROM name instead.

Now commit it and let's move on to the second part.

Vendor files (Second part)

​

**Attention**

Before continue make sure to have commited the changes made earlier...

*************

Now, let's continue with the second part where we will add new features and make the latest changes....

Earlier i said that the common.mk is left for later, but i had reasons to do so.

That's because the common.mk is the most of important one (I think in my opinion).

So what we are waiting for let's open it! :D

The first thing you may see is : "Mooore Cyanogen stuff", yes you right bro mooore cyanogen stuff but here will be a bit different because we will not change everything at the moment because some of the strings will be left as their are.

A proper guide will be made to the Extra section where these strings will be able to be modified.

So let's go on:

The first thing to do is to change the vendor path exactly as we did in the previous files so for example:

vendor/cm/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \

The cm name change it with your ROM name just as you did in the previous files (lowercase)

Now go to the first string::

So change the Product Brand name with yours.

Now remove this entire ifndef because is not necessary:

ifdef CM_NIGHTLY
PRODUCT_PROPERTY_OVERRIDES += \
ro.rommanager.developerid=cyanogenmodnightly
else
PRODUCT_PROPERTY_OVERRIDES += \
ro.rommanager.developerid=cyanogenmod
endif

Now remove also this entire block:

ifndef CM_BUILDTYPE
ifdef RELEASE_TYPE
# Starting with "CM_" is optional
RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^CM_||g')
CM_BUILDTYPE := $(RELEASE_TYPE)
endif
endif

Also for this one:

ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(CM_BUILDTYPE)),)
CM_BUILDTYPE :=
endif

Now remove this block and sobstitute it with this one provided by me

(To Remove)

ifdef CM_BUILDTYPE
ifneq ($(CM_BUILDTYPE), SNAPSHOT)
ifdef CM_EXTRAVERSION
# Force build type to EXPERIMENTAL
CM_BUILDTYPE := EXPERIMENTAL
# Remove leading dash from CM_EXTRAVERSION
CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
# Add leading dash to CM_EXTRAVERSION
CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
endif
else
ifndef CM_EXTRAVERSION
# Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag
CM_BUILDTYPE := EXPERIMENTAL
else
# Remove leading dash from CM_EXTRAVERSION
CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
# Add leading dash to CM_EXTRAVERSION
CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
endif
endif
else
# If CM_BUILDTYPE is not defined, set to UNOFFICIAL
CM_BUILDTYPE := Release_1_Revision_1
CM_EXTRAVERSION :=

(To Add)

ifdef ROMNAME_BUILDTYPE
# If ROMNAME_BUILDTYPE is not defined, set to UNOFFICIAL
ROMNAME_BUILDTYPE := YOUR RELEASE

Now change these names:

CM_BUILDTYPE
CM_EXTRAVERSION
CM_VERSION
CM_BUILD
CM_DISPLAY_VERSION (Except for the ro.cm.display.version=$(CM_DISPLAY_VERSION) don't modify this one)

So now that the common.mk file is completed and modified, let's move on by telling you the basics things to know:

- The first thing to know is that the bootanimation is situated here in this repo in prebuilt/common/bootanimation so if you want to add a bootanimation for your own this is the place where you can store (Make sure to include different screensize for each type of device i mean the Resolution of every bootaimation)

- The default wallpaper is situated here: overlay/common/frameworks/base/core/res/res so if you want to change the wallpaper of the ROM here you will need to put it (Also here, make sure to include the wallpaper with the exact same name of the stock one and also change the wallpaper for all the drawable folders (to be sure))

- You can also add files for your own and add it to your out folder in order to be included in your ROM.

Just follow this syntax:

PRODUCT_COPY_FILES += \

Full origin path of the file / File(zip,apk it doesn't matter what type of file is) :Full destination path including also the file name\

When you finished to add your files at the last file don't put the:

/

Because at the last file to copy you don't need to put it because it means that this the last file to add and after there is nothing more to add .

Now for example this syntax:

PRODUCT_PROPERTY_OVERRIDES += \

Will be explained in the Settings section because you need also to modify some files inside the Settings sources.

Basically these are the main changes which you can made.

If you got something some new stuff which could be added just write it on the thread and i will add it on the Guide ;)

As always after making the changes make sure to commit the changes, and if you got problems regarding this section just write it on the thread and i will answer you ;)

Now let's move on the Settings part….