[Android] Calin:
Repo Part

​

Ok so let's begin with the Repo part.

In order to have multiple Projects (I mean repo) you need to create an Organization in Github:

Now just follow the Github instructions and you should now have this screen:

Now before doing something you need to think and choose what repo to fork and what repo to create manually.

Remember that i will not help you with the Repo created manually those are created by you and only you know what to include there.

By default the repo which need to be forked first are these:

platform_mainfest

android_vendor_files

These usually should be always present in your Github organization, so i recommend you at the begining to fork these repo from Cyanogenmod if you want that your ROM should be based on CM.

So go and fork the these repositories and then go back to your ROM Project.

For the platform_manifest you can fork it here: https://github.com/SlimRoms/platform_manifest/tree/lp5.1

(We will modify it later)

Remember that when you fork the repositories to fork them in your Organization and not in your Github profile.

You should have this screen:

Now you need to think about what Apps or things you are gonna change i mean, there are plenty of things that you can modify before the compilation process like Java files, create new Preference headers in Settings, modify the framework and so go on....

Once you choosed what repo to include in your Organization then you can start to modify your platform manifest.

But what is platform manifest actually?

Platform manifest is that repo that include a file called default.xml which includes all the Projects that should be fetched by the organization. And represent the most important part of a ROM Project followed after by the android_vendor_files.

Once you cloned platform manifest

Go and open the default.xml file.

So let's the modifications begin!

As you can see the default.xml is composed entirely by these sort of strings:

<project path="android" name="XOSP/platform_manifest" remote="github" revision="lollipop" />

(For example)

So let me explain you what is this:

project path=means the path used from where the files will be stored in your ROM folder

name: reffer to the path used in Github like https://github.com/CyanogenMod/.....

remote=The Origin of the files (Sort of) it can also be bitbucket or Sourceforge but mainly Github is used always

revision= The branch that you want to checkout

So now you know how the default .xml works go and add your repo that should be fetched!

Tip!

Because the default.xml includes all the projects to be fetched, some of them are not required in most of the cases so some strings can be deleted:

<project path="device/generic/mini-emulator-arm64" name="device/generic/mini-emulator-arm64" groups="pdk" remote="aosp" />
<project path="device/generic/mini-emulator-armv7-a-neon" name="device/generic/mini-emulator-armv7-a-neon" groups="pdk" remote="aosp" />
<project path="device/generic/mini-emulator-mips" name="device/generic/mini-emulator-mips" groups="pdk" remote="aosp" />
<project path="device/generic/mini-emulator-x86" name="device/generic/mini-emulator-x86" groups="pdk" remote="aosp" />
<project path="device/generic/mini-emulator-x86_64" name="device/generic/mini-emulator-x86_64" groups="pdk" remote="aosp" />
<project path="hardware/intel/audio_media" name="platform/hardware/intel/audio_media" groups="intel" remote="aosp" />
<project path="hardware/intel/bootstub" name="platform/hardware/intel/bootstub" groups="intel" remote="aosp" />
<project path="hardware/intel/common/bd_prov" name="platform/hardware/intel/common/bd_prov" groups="intel" remote="aosp" />
<project path="hardware/intel/common/libmix" name="platform/hardware/intel/common/libmix" groups="intel" remote="aosp" />
<project path="hardware/intel/common/libstagefrighthw" name="platform/hardware/intel/common/libstagefrighthw" groups="intel" remote="aosp" />
<project path="hardware/intel/common/libva" name="platform/hardware/intel/common/libva" groups="intel" remote="aosp" />
<project path="hardware/intel/common/libwsbm" name="platform/hardware/intel/common/libwsbm" groups="intel" remote="aosp" />
<project path="hardware/intel/common/omx-components" name="platform/hardware/intel/common/omx-components" groups="intel" remote="aosp" />
<project path="hardware/intel/common/utils" name="platform/hardware/intel/common/utils" groups="intel" remote="aosp" />
<project path="hardware/intel/common/wrs_omxil_core" name="platform/hardware/intel/common/wrs_omxil_core" groups="intel" remote="aosp" />
<project path="hardware/intel/img/hwcomposer" name="platform/hardware/intel/img/hwcomposer" groups="intel" remote="aosp" />
<project path="hardware/intel/img/libdrm" name="platform/hardware/intel/img/libdrm" groups="intel" remote="aosp" />
<project path="hardware/intel/img/psb_headers" name="platform/hardware/intel/img/psb_headers" groups="intel" remote="aosp" />
<project path="hardware/intel/img/psb_video" name="platform/hardware/intel/img/psb_video" groups="intel" remote="aosp" />
<project path="hardware/nvidia/audio" name="CyanogenMod/android_hardware_nvidia_audio" groups="nvidia_audio" />
<project path="hardware/nvidia/tegra124" name="CyanogenMod/android_hardware_nvidia_tegra124" groups="tegra124" />

Usually are these, so now when you will make repo sync to your ROM path those projects won't be fetched by the manifest.

Don't forget to commit the changes made to default.xml with SmartGit (Check this post about how to configure it:)

More tips about platform_manifest:

If you want to simpify the work for the other users who will want to build your ROM (If they are new comers) you can use this script written originally by the Resurrection Team and then adapted by me:

#!/bin/bash

#Based on the original one from Resurrection Remix

clear
echo ____ ___________ ___________________ __________ __ __
echo \ \/ /\_____ \ / _____/\______ \ \______ \_______ ____ |__| ____ _____/ |_
echo \ / / | \ \_____ \ | ___/ | ___/\_ __ \/ _ \ | |/ __ \_/ ___\ __\
echo / \ / | \/ \ | | | | | | \( <_> ) | \ ___/\ \___| |
echo /___/\ \\_______ /_______ / |____| |____| |__| \____/\__| |\___ >\___ >__|
echo \_/ \/ \/ \______| \/ \/

echo Installing Dependencies in 5 Seconds...
sleep 1
echo Installing Dependencies in 4 Seconds...
sleep 1
echo Installing Dependencies in 3 Seconds...
sleep 1
echo Installing Dependencies in 2 Seconds...
sleep 1
echo Installing Dependencies in 1 Seconds...
sleep 1
echo Insert your User Password
sudo apt-get update
sudo apt-get install openjdk-7-jdk
y
sudo apt-get update && sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jre openjdk-6-jdk pngcrush schedtool libxml2 libxml2-utils xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib
y
clear
echo Dependencies have been installed!
sleep 4
clear
echo Installing REPO in 5 Seconds...
sleep 1
echo Installing REPO in 4 Seconds...
sleep 1
echo Installing REPO in 3 Seconds...
sleep 1
echo Installing REPO in 2 Seconds...
sleep 1
echo Installing REPO in 1 Seconds...
sleep 1
mkdir ~/bin
PATH=~/bin:$PATH
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
clear
echo REPO has been Downloaded!
sleep 4
clear
cd ..
mkdir XOSP
echo Creating and Initializing XOSP Source at $XOSPpath in 5...
sleep 1
echo Creating and Initializing XOSP Source at $XOSPpath in 4...
sleep 1
echo Creating and Initializing XOSP Source at $XOSPpath in 3...
sleep 1
echo Creating and Initializing XOSP Source at $XOSPpath in 2...
sleep 1
echo Creating and Initializing XOSP Source at $XOSPpath in 1...
sleep 1
cd XOSP
repo init -u https://github.com/XOSP-Project/platform_manifest.git -b lollipop
clear
echo XOSP Source Code has been initialized!
sleep 4
clear
echo Enter 1 to repo sync now, anything else to do it later
read ch
if [ $ch -eq 1 ] ; then
echo Enter number of jobs to repo sync with. If you\'re not sure, enter 4
read jobs
echo Syncing/Downloading in 5 seconds...
sleep 1
echo Syncing/Downloading in 4 seconds...
sleep 1
echo Syncing/Downloading in 3 Seconds...
sleep 1
echo Syncing/Downloading in 2 Seconds...
sleep 1
echo Syncing/Downloading in 1 Seconds...
repo sync -j$jobs
clear
echo Source code has been Set-Up Succesfully.
else
echo repo has been initialized in $XOSPpath
echo To sync the source, cd to $XOSPpath and run the following command
echo "repo sync"
fi

Just change the XOSP name with your ROM name in all the cases (Just make CTRL F and write XOSP, it will find all the names)

Save it as .sh file, give it a name and then make the commit.

To run it on the computer just open a terminal window and write ./filename.sh

Once you done all these things it's time to repo init your ROM path:

If you done the script then the commands will be less:

git clone https://github.com/Your Project/platform_manifest.git
cd ~/platform_manifest
./scriptname.sh

Now just sit and relax because it will take a while..

Repo-synched, your ROM path should look like this:

If you made some mistakes into the default.xml files please write it in the Thread.

If it's all good now your brain maybe is gonna to explode because you don't know what are those folders but you don't even to know all these folders, why?

Because is not necessary.

Usually folders like external, developers, bootable are not modified only but the main source which usually is CM or of course Android (AOSP)

So calm down because we will not gonna modify files from each of these folders but just a part of them:

build (Many things to do here)

Framework (Customization most of it)

Packages (Settings for sure + some other ones)

vendor (Many things also here)

So mainly these are the projects which they will be modified.

If you didn't forked framework base on Github or you don't want now to modify framework stuff it's ok but remember that when you want to modfify files in a Project repo to be yours in order to commit the changes after.

Before to proceed i want to add something you should absolutely need to know:

In order to work on the different Projects you can't work in the ROM Path because it's always better to clone that specific repo in an other folder and commit the changes.