Merge remote-tracking branch 'AOSPA/kitkat' into 4.4.3

Conflicts:
	CleanSpec.mk
	core/Makefile
	core/build_id.mk
	core/version_defaults.mk
	target/product/telephony.mk
	tools/releasetools/ota_from_target_files
	tools/roomservice.py

Change-Id: I03045fe52db2813afda9c0e21aa30f3f18b46455
build: Add new public keys to recovery

Change-Id: I11dea464297813be36e60c23728dde8893535c46

Conflicts:
	core/Makefile
ota: Generate recovery-from-boot.p file

This may be wanted to update the recovery with system updates

Change-Id: Iacd41be7a8018cbc08b2606485d446756910f506

Conflicts:
	tools/releasetools/ota_from_target_files
Change CM recovery install script filename [1/2]

This is part 1/2 to maintain backwards compatibility with CWM's
verify_root_and_recovery() function. CWM checks if install-recovery.sh
exists and has an executable flag set, then offers to disable the script
for the user. CM now controls this with the persist.sys.recovery_update
property which is configurable via settings, so we don't need to
double-check this.

This changes the name of the recovery install script to
install-cm-recovery.sh.

Change-Id: Ie08d428cfd092a1de10973ba5ffc326ccdb1a369
keys: avoid duplicating recovery keys

Setting PRODUCT_EXTRA_RECOVERY_KEYS duplicates the default key and
makes it so we can't set an extra key earlier in the build

Change-Id: I239d9994d9ad40b1779877ea2e89b55bd02e4c00
ota: Allow devices to skip generation of recovery-from-boot.p

* Not all devices have a real recovery partition, so those devices
  should skip this generation step.

Change-Id: I4abc3f92b879e6997e4874543ec9772c3179b1d0
build: get rid of the sparse expand stuff

* i don't see a reason why we are doing this because we never deal
with flashing system img rawly
* This will put useless write on ssd..
* we don't have space on ssd

Change-Id: Icd53d161b8515f5eca238b98ad68515d69caa34f
Generate extra userdata partition if needed

* To support variants of devices which may come in 16/32/64GB variants.

Change-Id: I74c32d8316f0450a1445fe95a95e5cabb7a9dd1b
Fixed building incrementals when "no separate recovery" is specified.

Change-Id: I1d7add44554ebc4b68dc09debdd0c0fb229061a9
colorize non-fatal javac stderr yellow (and actually display it... at all)

woops!

Signed-off-by: nuclearmistake <nuclearmistake@gmail.com>
Change-Id: I984f428022a68a825aa041866e8d459bd6611f71
ota: Let devices specify their own recovery-from-boot.p installer

Some devices apply transformations to the installed images, making
the sha1 checksums fail (or, worse, generating invalid images). If
"/system/etc/recovery-transform.sh" exists, run that instead, passing
the expected sizes and checksums as arguments in the form of

recovery-transform.sh <recovery_size> <recovery_sha1> <boot_size> <boot_sha1>

A direct emulation of the standard patcher could look like this, transformations
should be added as needed.

----------------
RECSIZE=$1
RECSHA1=$2
BOOTSIZE=$3
BOOTSHA1=$4

dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=$C/recovery.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=$C/boot.img

if ! applypatch -c EMMC:$C/recovery.img:$RECSIZE:$RECSHA1; then
  log -t recovery "Installing new recovery image"
  applypatch -b /system/etc/recovery-resource.dat EMMC:$C/boot.img:$BOOTSIZE:$BOOTSHA1 EMMC:$C/recovery.img $RECSHA1 $RECSIZE $BOOTSHA1:/system/recovery-from-boot.p || exit 1
else
  log -t recovery "Recovery image already installed"
fi
----------------

Change-Id: Ie601841ca1cdad6b8f3b16e593d2718a92e8ca09
add support for building flashable kernel zips

choose device from lunch menu then enter make bootzip, builds flashable boot.img with updated source ramdisk

Change-Id: I07820d5e5e48d5b973901ed2bb3f330744c6498c

make bootzip: add support for loki patch

patchset 2:
   whitespace
Change-Id: I4a757f7483e3bea1b4dad981f8236bb9551e9eca

make bootzip: convert bash to python

Change-Id: Ie5d3e6d07df7f46df3717b9203b6f70edf208cb1
build: Default to python2

On some systems, /usr/bin/env python is default to python3, specifiy
python2 to fix that

Change-Id: Ieecb98d69b0e9e958042622b97826d1ba6ef672c
build: Improve roomservice

roomservice has improved in the sense that once a duplicate path is
found, a <remove-project> tag will be added into roomservice.xml

Change-Id: If3e1dc672d25996a0cd19628ece24c010e213adf
Add the keys I used to sign the market version of Superuser.
recovery: Always allow the CM release key

Avoid the "Untrusted" warning in recovery when flashing a CM-signed
build

Change-Id: I13900bd7e2539fdc7442477a844391b8c5d87dda
Updated CM release key for recovery

Change-Id: I4aad710101cb6fbbd9df2a3137f9a5ae0e0432da