[Galaxy Note 4 Android Development (Snapdragon)] tripLr:
How To Build This Rom.

1. Set up your version of Linux on your computer the way you like.

2. This is a Pie version of AOSP so all the instructions at Google, are for Ubuntu and it's relatives such as what it's derived from Debian Linux all have the same naming methods for the software libraries.

I use Fedora, based off Red hat, centos, etc. I have a guide for installing these libraries on another thread and in my personal Github.com/tripLr account

Start Here

https://source.android.com/

3. Download your tools and binaries like compilers and such

Follow these instructions from Google for Ubuntu or MacOS

https://source.android.com/setup/build/initializing

Then the next page is to download the source code

You will need git ( installed above )

You will need repo ( install directly from Google , instructions in web page below )

https://source.android.com/setup/build/initializing

4 Once you have repo command installed you are ready to download any Rom you want.

We have a good collection of roms for the note 4 we build for but in this case we will download XenonHD

So first make a folder for XenonXD

mkdir -p ~/android/XenonHD/.repo/local_manifests

This step creates all the folders we need to use, now let's download our Rom

5. Repo init.

SAVE SPACE INSTRUCTIONS HERE

If you follow exactly the Google directions and most suggestions of developers YOU WILL DOWNLOAD ALL THEIR CODE not just what you need.

So the Github source code is located here for all of XenonHD code

Github.com/TeamHorizon

What we need is located on one file called the platform_manifest

https://github.com/TeamHorizon/platform_manifest

It has the instructions for downloading the ROM

Now on your computer , goto your Rom directory

cd ~/android/XenonHD

Now copy the line from the TeamHorizon manifest, but add the control to tell the server you ONLY want to download the Pie branch, not all the others.

This step is called the repo init

The version of the command they have is

"repo init -u https://github.com/TeamHorizon/platform_manifest.git -b p"

We want

repo init --depth=1 -u [url]https://github.com/TeamHorizon/platform_manifest.git[/url] -b p

6. Sync the source code.

This downloads the lists of what needs to be downloaded for the Rom,

Let's sync that.

To save space and time use,

repo sync -c --force-sync --no-clone-bundle --no-tags

If you have a fast internet connection , go make a coffee and come back. You will be downloading about 80 gb, compared to 150 or more .

7. roomservice.xml

All the goodies for the note 4 snapdragon...

Once completed now you need the roomservice to build for the note 4 snapdragon variants.

It goes in the local_manifests folder you created above, it and all the source code from Our Github account

Github.com/triplr-dev

You should be in the build folder now so..

wget -O ~/android/XenonHD/.repo/local_manifests/roomservice.xml [url]https://raw.githubusercontent.com/triplr-dev/local_manifests/xenonhd-p/master.xml[/url]

roomservice.xml can be ANYFILENAME.xml but to make it easy we all use roomservice when compiling for multiple devices

8. Sync the goodies...

repo sync -c --force-sync --no-clone-bundle --no-tags

this step wont take long..

9. Setup the environmentt OR in other words, tell the compilers where everything is.

Make sure your in your rom folder

~/android/XenonHD

and run this command

. source/envsetup.sh

what this means is tell your shell, in our case, bash,

Hey bash, there is the file located in ~/android/XenonHD/source called envsetup.sh , would you be so kind and run it so i can build my rom ? Pretty please, like right now when i press the enter key ?

You will see a list of what the script accomplishes.

Now its time to

10. Build your rom !

Hey , guess what you downloaded code for 3 devices.

Pick the one you want

# build trlte
breakfast trlte
brunch trlte
# build tblte
breakfast tblte
brunch tblte
# build trlteduos
breakfast trlteduos
brunch trlteduos

wait a bit...... wait some more...,

now browse to your output folder , use a usb cable to download to your phone, or upload to the cloud and share to the world ...