[Nexus 5 Android Development] malcho:
GUIDE 1

Initiate build enviroment and download source.​

This link contains all that is needed to initialize source build on ubuntu.I suggest use LTS(long term support) versions of ubuntu.

https://source.android.com/source/initializing.html

Here is the link where you can find how to download source and initialize repo.

https://source.android.com/source/downloading.html

Pay attention on how to choose the right branch.You can find all info about branches here.

https://source.android.com/source/build-numbers.html

For example if you want to build from the latest brunch choose android-5.0.2_r1.

After this download binaries(drivers)for your device.

You have to download three files.Broadcom,LG and Qualcom.

Copy three files to your build directory.If you create folder /build/aosp copy files to that directory nad extract it.

Run all file with following commands,for example ./extract_broadcom_hammerhead.sh.

Now it's time for building.

. build/envsetup.sh

lunch - Choose the device you want(hammerhead is 14)

make otapackage

GUIDE 2​

Ok let's spice up thing a little bit.

I want to remove and add some stuff to rom.First thing i need to do is to enable Show hidden files and folders in ubuntu.

In your build folde go to folder .repo(this folder is hidden).

In that folder create folder local_manifests.

After that create file roomservice.xml

Here is example of my file:

<?xml version="1.0" encoding="UTF-8"?>
<!--Please do not manually edit this file-->
<manifest>
<remote name="github"
fetch="https://github.com"
/>

<remove-project name="platform/packages/apps/Gallery" />
<remove-project name="platform/packages/apps/Browser" />
<remove-project name="platform/packages/apps/Calendar" />
<remove-project name="platform/packages/apps/Camera2" />
<remove-project name="platform/packages/apps/Gallery2" />
<remove-project name="platform/packages/apps/Music" />
<remove-project name="platform/packages/apps/MusicFX" />
<remove-project name="platform/packages/apps/QuickSearchBox" />
<remove-project name="platform/packages/wallpapers/HoloSpiral" />
<remove-project name="platform/packages/wallpapers/Galaxy4" />
<remove-project name="platform/packages/wallpapers/MagicSmoke" />
<remove-project name="platform/packages/wallpapers/NoiseField" />
<remove-project name="platform/packages/wallpapers/PhaseBeam" />
<remove-project name="platform/packages/apps/VoiceDialer" />
<project path="packages/apps/Camera2" name="CyanogenMod/android_packages_apps_Camera2" remote="github" revision="cm-12.0"/>
<project path="packages/apps/Browser" name="CyanogenMod/android_packages_apps_Browser" remote="github" revision="cm-12.0"/>
<project path="packages/apps/Gallery2" name="CyanogenMod/android_packages_apps_Gallery2" remote="github" revision="cm-12.0"/>

</manifest>

Like this i removed package Camera 2 for example and added Camera2 package from Cyanogenmod github.

Pay attention that i have to add remote github at the start of file and also i have to add revision on end of package.

How to add bootanimation into build.

I downloaded bootanimation.zip file.I create folder in vendor/lge/hammerhead and i named it bootanimation.

I copied zip file there.

Then i go to folder vendor/lge/hammerhead and open file device-partial.mk.

Use right click and open file with gedit.

I add this on end of the file.

vendor/lge/hammerhead/bootanimation/bootanimation.zip:system/media/bootanimation.zip:lge \

Like this i can have bootanimation directly built in my otapackage.

GUIDE 3​

HOW TO ADD LAYERS SUPPORT TO ROM​

Go to this site

http://xdaforums.com/android/apps-games/official-layers-bitsyko-apps-rro-t3012172?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+xda-developers%2FShsH+%28xda-developers%29

First you need to go on second post on this thread and open all links from android-review.googlesource.com

Cherry pick this in your source.

Go to respective folder in this case go to frameworks/base and paste cherry-pick link here.

Next you need to add cherry picks from https://github.com/bgill55.

Go to respective folder for example for this case Exposing hard coded resources for type 2 overlay access [3/6].

This have to go to packages/apps/Contacts

Next add remote like this:

git remote add layers git://github.com/bgill55/platform_packages_apps_Contacts.git where layers is a name of remote branch.

git fetch layers

git cherry pick number of commit which you can find bellow

Exposing hard coded resources for type 2 overlay access [3/6]

Have to expose hard coded hex coding to changeable resources for theming purposes. For the Layers type 2 overlays

frankie-mr-1 (#1)

commit 888a7be7ec16960cb80fd8371ff694b9dacb9002 1 parent 5402f10

bgill55 bgill55 authored 23 days ago

Repeat these steps for every project.