[Nexus 6 Android Development] Neo:
How to build RR for Shamu with an already established build environment

How to build RR for Shamu with an already established build environment

Ok so, I figured I'd do a little write-up real fast for those of you who want to build Resurrection Remix for Shamu. It's really quite simple once you get an ida of what's going on.

So the first thing you need to do is get a build environment set up. That means a distro of some kind to use, all the required packages, java, git and with git set up.

I can create a more thorough tutorial on that later but for now, we are going to focus on the Resurrection Remix part of this. So after all those pre-reqs above are fulfilled, this is what you do:

create a Resurection Remix directory where your source is gonna go:

mkdir rr

then, move into that directory:

cd rr

Now, you're going to initiate the repo for their source:

repo init -u https://github.com/ResurrectionRemix/platform_manifest.git -b nougat

Once this happens, it might ask you to set up your name, email, and if you want to use a color coded system for output stuff (I always say yes).

When that is complete, initiate a repo sync:

repo sync -f --force-sync --no-clone-bundle

This process will take a while because you're now downloading a whole ton of stuff (around 20+gb). When it has completed, I typically run it again juuuust in case some code was missed. Since you have just about everything synced, it shouldn't take but a couple minutes to check it's source for updates and missing files.

Now that your source is synced, all of your directories and files are populated in your rr folder. However, you're still missing some required dependencies for Shamu, particularly the entire device, kernel, and vendor blobs. You could clone them all in individually, but they won't update every time you do a repo sync so if updates are being made to them on-line, you won't be pulling it. So what you need to do is create a room service.

While still in the rr main directory, change directory (cd) to .repo:

cd .repo

Now create a local_manifests folder:

mkdir local_manifests

cd into local_manifests and either create a roomservice.xml file, or dump mine in there which you can download form the attachment on this post.

If you decide to make your own roomservice.xml file though, this is what needs to be in the xml:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_device_moto_shamu" path="device/moto/shamu" remote="github" revision="cm-14.1" />
<project name="LineageOS/android_kernel_moto_shamu" path="kernel/moto/shamu" remote="github" revision="cm-14.1" />
<project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="cm-14.1" />
</manifest>

Once you have it, cd back into the main rr directory, and perform a repo sync again:

cd ../..
repo sync -f --force-sync --no-clone-bundle

It will do it's check again only this time, it will recognize the 3 necessary repos it needs and will take some time pulling them. Once it's done, you're ready to build! All you need to do at that point is:

. build/envsetup.sh && brunch shamu

That's it! It should build outright with no problems.

Your completed build will be located in out/target/product/shamu. Keep in mind that building it this way is without using ccache as I've never liked ccache and don't trust it to update when files actually change :p