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.
Here is the link where you can find how to download source and initialize repo.
Pay attention on how to choose the right branch.You can find all info about branches here.
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.
lunch - Choose the device you want(hammerhead is 14)
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-->
<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"/>
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.
Like this i can have bootanimation directly built in my otapackage.
HOW TO ADD LAYERS SUPPORT TO ROM
Go to this site
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
1 parent 5402f10
bgill55 bgill55 authored 23 days ago
Repeat these steps for every project.