build: Don't run backuptool on GMS builds

Change-Id: I5dde27f9d16b88049171db9805221d92e67f3e5d
Store the path to the ota file generator where it can be reused

Change-Id: I8896713c79a751b79fbbcc75f6ba30dad4ea9fac
Don't make assumptions about the formats of build descriptions

Change-Id: Id83a7594e9e1b9b4ffbdbaba695506d8d0d21a46
build: Add cafremote command to envsetup

 * So lazy!

Change-Id: I99a988180abb4fb486d4ebbb842bb9eda03bf1bc
envsetup: Fix remote functions to deal with symlinks

Change-Id: I6f35dc30dda22149b2c37e1c6c7d41ea7239d3bb
envsetup: do not print an error if complete fails

complete is a bashism; so it will fail on other shells. Avoid printing
an error if that is the case.

Change-Id: Id6d6311792f409cc3a697c7a2bb003863f1afe60
envsetup: drop unnecesary exports

export -f is a bashism and we don't actually need it, so lets remove it.

Change-Id: I9228cef0c4a9543b3d34fdc39a368ad0238431e2
envsetup: Mark zsh as compatible

Basic functionality has been tested on zsh 5.0.2 and has been found to
work correctly.

Change-Id: I02e5e3bedf56b43104c280d9737ae7b334357643
build: Add support for PRODUCT_COPY_FILES_OVERRIDES

 * We may have a case where prebuilts need to be built from
   source instead based on an externalized config.
 * New directive takes a list of destination files to remove from
   PRODUCT_COPY_FILES so that other instructions can be supplied.

Change-Id: I7feff16440e54d1676ffddbbd96d5947efa43ede
Allow individual projects to enforce a property's value

Some projects require system properties to be set to a specific
value (for example, a shared library needing a property pointing
to its own path) in order to work correctly, but some device
configurations are mistakenly setting those properties with the
wrong value (usually inherited from the original OEM build).

"PRODUCT_PROPERTY_UBER_OVERRIDES += property=value" can (and
should) be used in that project's makefile to ensure the value
is the correct one. This variable is intended for software projects,
and should never be used in product makefiles (BoardConfig, cm.mk,
AndroidProduct)

Change-Id: I1986e7c444e51cce8b198e43fdc793fad16d6276
Store the value from TARGET_OTA_ASSERT_DEVICE to a file

This is needed so it can be read in when re-signing a package to
allow for the proper device asserts.

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

Also use saner permissions on backuptool.sh

Change-Id: I50742b51867aa358f5924b8dc208833092a35bd9
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
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
build: Include an extra device.mk

Change-Id: I4373f78f57c81e46affc2f6a6bc854bf4c3d00db
ota: Make sure we don't install on top of an incompatible system

If the system has data present, make sure said data doesn't depend
on a system signature different from our own. If we can't find
our platform key, abort the installation

Change-Id: I16572daf9464de326a9d0d126597cfbf03208f94
build: Store the jenkins build number in misc_info

If the jenkins build number is available, list it as build_number in
the misc_info.txt file.

Change-Id: I6500c6b53661f2904dff738d25d8a8d24a7dca80
ota: Include copies of the recovery scripts even if shipping in block mode

Change-Id: Idc07569225e4e9247ba3ca245ba68ce9481d8aea
Edify: Add AssertSomeBaseband

Allow releasetools.py to assert a baseband version. Works just like
AssertSomeBootloader.

Change-Id: Ic8eb341cef1d777d983be25ba21a3bc545819c29