releasetools: don't create prebuilt_dir path if it exits

This path may already exists from previous build tasks. Attempting
to create it again will cause an error.

Change-Id: I4baad8bc846470b99f6ce9207c0682401406decc
build: Degreenify java

Change-Id: Iac348407997f7e52844af0494ee59762df0819d7
releasetools: use variable instead of fixed name for bootable image

When building for a device with a custom bootimage makefile, this
would cause the boot image to be used as the recovery image during
fastboot zip creation.

Change-Id: I075cfe4e9a2a8384d3767de351ec7f751f3e95ab
releasetools: Add radio images to fastboot packages

Fastboot packages should include radio images, if they exist. Also
generate a flash-radio.sh file if a filesmap file exists to indicate
the partition that a radio image should be flashed to.

Change-Id: Ic3392cc76407408b98aad00f36f4dfa3b9be176b
build: edify: use set_metadata for backuptool

Also use saner permissions on backuptool.sh

Change-Id: I50742b51867aa358f5924b8dc208833092a35bd9
Wrong product package: Gallery was replaced by Gallery2

Change-Id: Ia34e1fa9bc9ac494fac098eb86a5ddab78b6d149
Remove extra product property overrides

This appears to clash with vendor/cm/common mk's for overrides; causes
a broken default alarm (and OnTheHunt is so bleh).

Change-Id: I5ec990d3c5ad56b573c45f1a3b20169c989851a0
releasetools: Modify regex for radio files

The filesmap file may contain additional information (such as a
sha1 hash) after the parition name. We should still work in these
cases, but can ignore the additional data.

Change-Id: I0feaa5e94d48fa94b66b6c07e1946674fe703d85
releasetools: Add a newline for radio flashing scripts

When multiple radio images exist, make sure we put a newline at
the end of each flash command.

Change-Id: If113c88eb6dc90d2499f06c12e00494d7266a672
Colorize javac errors

You know those multi-line ones that are frequently interspersed with other buld output?
The ones that don't even have the word "error" in them to search for?

This makes them red.

ps2: fix jar_check failures cause by leaving empty stderr files in intermediates dirs
     this is probably not the best place to store stderr before colorizing it if javac
     exits non-zero, but it seems much lighter than mkdiring a bunch of temp directories
     or using sed to mangle the paths to point to per-intermediates directory unique
     temporary file names

Change-Id: I3b9b7d8a0c76958588ac1603b6742987d6dde54c
Signed-off-by: nuclearmistake <nuclearmistake@gmail.com>
build: core: Parameterize recovery with a variant

Include extra vendor config early.  If RECOVERY_VARIANT is set, use it
to look for the recovery in an alternate path.

Change-Id: Iba54f0746d728c0dfeeb67b4d3166d5e25b1b5d7
tools: getb64key - print the base64 version of a PEM public key file

Change-Id: Ia94ff560c88dfe85c3fa55db5c8219aa0d3419ee
Store the base64 release key in the OTA zips

This can be directly grepped in pre-existing package.xml tables
to make sure we're not trying to update to a differently signed
build

Change-Id: I7528a8e7c484ea9209cd665b9263328ae834586a
releasetools: Properly handle boot images that use dt

Instead of using a prebuilt boot/recovery image, bring the dt image
into the target files package and use it during package creation

Change-Id: I70ecf74423aad95a3eb8e085029c37450ae354a2
releasetools: Fix whitespace error for INSTALLED_DTIMAGE_TARGET

Copy/paste produced spaces instead of a tab; fix that

Change-Id: I937e5f6ffd2c947c77dc4baa7427b170c1ea4bcd
build: use /usr/bin/env to call python

Hardcoding the path to python instead of env is not recommended.  This
can break the build in some Linux environments that link /usr/bin/python
to python3.

Change-Id: I4c62eb391acc6d468ce24ac8640834e965e76e78
releasetools: bring back boot.img handling

This is required for galaxysmtd and other devices with custom
boot format.

This partially reverts "releasetools: Properly handle boot images that use dt"

Change-Id: Ib35001c2d9b906067e5a3c84712dc3a283a38cbb