[Nexus 5 Android Development] XXMrHyde:
Building from Source:

Requirements:

Linux, (I use Ubuntu, works with other distros, too, but maybe you have to make some changes to the commands)

A working Build Environment, (here is a guide how to set up a Build Environment on Ubuntu)

(needed steps till "Identify Yourself to the Repo")

Create working directory and init repo:

mkdir ~/Android/Darkkat

(you can use a directory name and path you like, but you have to change the commands to match to your local path)

cd ~/Android/Darkkat

For Android 4.4.3/4.4.4 version:

repo init -u git://github.com/XXMrHyde/android.git -b darkkat-4.4.3

For Android 4.4.2 version:

repo init -u git://github.com/XXMrHyde/android.git -b darkkat-4.4

Sync the repo:

cd ~/Android/Darkkat && repo sync

(now it`s time to drink a big cup of coffee, tea, or ... this can take some time)

Get the needed binaries for the Nexus 5:

Download from Google Developers:

For 4.4.4:

Nexus 5 (GSM/LTE) binaries for Android 4.4.4 (KTU84P)

For 4.4.3:

Nexus 5 (GSM/LTE) binaries for Android 4.4.3 (KTU84M)

For 4.4.2:

Nexus 5 (GSM/LTE) binaries for Android 4.4.2 (KOT49H)

(all 3 tgz archives)

Extract to the root of your working directory,

Run the scripts:

cd ~/Android/Darkkat

./<filename>

(Confirm Licensing Agreement)

Get the missing binaries:

Download any deodexed 4.4.X Stock rom,

(X depending on the version you building for)

and extract:

/system/etc/DxHDCP.cfg

/system/vendor/firmware/discretix, (folder)

/system/vendor/lib/libvdmengine.so

/system/vendor/lib/libvdmfumo.so

/system/app/OmaDmclient.apk

/system/app/TimeService.apk

/system/app/shutdownlistener.apk

Copy TimeService.apk and shutdownlistener.apk to

~/Android/Darkkat/vendor/qcom/hammerhead/proprietary

all others, (and the content of the discretix folder not the folder itself) to:

~/Android/Darkkat/vendor/lge/hammerhead/proprietary

Open (in a text editor):

~/Android/Darkkat/vendor/qcom/hammerhead/device-partial.mk

and add these lines:

vendor/qcom/hammerhead/proprietary/shutdownlistener.apk:system/app/shutdownlistener.apk:qcom \
vendor/qcom/hammerhead/proprietary/TimeService.apk:system/app/TimeService.apk:qcom \

~/Android/Darkkat/vendor/lge/hammerhead/device-partial.mk

and add these lines:

vendor/lge/hammerhead/proprietary/OmaDmclient.apk:/system/app/OmaDmclient.apk:lge \\
vendor/lge/hammerhead/proprietary/DxHDCP.cfg:system/etc/DxHDCP.cfg:lge \
vendor/lge/hammerhead/proprietary/dxhdcp2.b00:system/vendor/firmware/discretix/dxhdcp2.b00:lge \
vendor/lge/hammerhead/proprietary/dxhdcp2.b01:system/vendor/firmware/discretix/dxhdcp2.b01:lge \
vendor/lge/hammerhead/proprietary/dxhdcp2.b02:system/vendor/firmware/discretix/dxhdcp2.b02:lge \
vendor/lge/hammerhead/proprietary/dxhdcp2.b03:system/vendor/firmware/discretix/dxhdcp2.b03:lge \
vendor/lge/hammerhead/proprietary/dxhdcp2.mdt:system/vendor/firmware/discretix/dxhdcp2.mdt:lge \
vendor/lge/hammerhead/proprietary/libvdmengine.so:system/vendor/lib/libvdmengine.so:lge \
vendor/lge/hammerhead/proprietary/libvdmfumo.so:system/vendor/lib/libvdmfumo.so:lge \

Build the rom:

cd ~/Android/Darkkat && . build/envsetup.sh && brunch hammerhead

(time for the next big cup of coffee, ...)

That`s it,

you (hopefully) compiled successfully your own DarkKat rom

Update the sources:

cd ~/Android/Darkkat && repo sync

(this time it doesn`t take much time)

Now build again,

(if there are a lot of sourcecode changes, or your last build is some times ago you may need to clean your "out" directory):

cd ~/Android/Darkkat && . build/envsetup.sh && make clobber

Update the sources from 4.4.3 to 4.4.4:

cd ~/Android/Darkkat && repo sync

Update the needed binaries:

Download any deodexed 4.4.4 Stock rom,

and extract:

/system/app/OmaDmclient.apk

system/app/qcrilmsgtunnel.apk

/system/app/shutdownlistener.apk

/system/app/TimeService.apk

system/app/UpdateSetting.apk

system/bin/sensors.qcomsensors.qcom

system/framework/qcrilhook.ja

system/vendor/lib/libmmcamera2_iface_modules.so

system/vendor/lib/libmmcamera2_imglib_modules.so

system/vendor/lib/libmmcamera2_isp_modules.so

system/vendor/lib/libmmcamera2_sensor_modules.so

system/vendor/lib/libmmcamera2_stats_algorithm.so

system/vendor/lib/libmmcamera2_stats_modules.so

system/vendor/lib/liboemcamera.so

system/vendor/lib/libsensor1.so

copy:

OmaDmclient.apk

qcrilmsgtunnel.apk

UpdateSetting.apk

to:

~/Android/Darkkat/vendor/lge/hammerhead/proprietary

the rest to:

~/Android/Darkkat/vendor/qcom/hammerhead/proprietary