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
Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:
	tools/releasetools/edify_generator.py
Wrong product package: Gallery was replaced by Gallery2

Change-Id: Ia34e1fa9bc9ac494fac098eb86a5ddab78b6d149
build: Add script to generate extra images

Change-Id: I53081c7a2b4f18bc8c8a27b04d311a6b078b2022
Use CM standard qcom naming

Change-Id: I360b3dcf1fe82140a7993189e881f9d77b571bef
[HAX] Allow per-target dtbTool

 * Revert this when fixed

Change-Id: I97ecb0448ae7bd5859454be290c5dde6248b2859
Remove QuickSearchBox from build

* This thing is ancient, and apparently conflicts with Google Now.

Change-Id: I18548dd0b61cc8dedf6570562d073d0973120cba
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
Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:
	tools/releasetools/common.py
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
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.

PS2: build: Add alternate recovery to pathmap
Change-Id: I2827ace9729b6af8d5b4e637374ccd1e5902dd55

PS3: Fix the alternate recovery inclusion logic
Change-Id: Ifb59d61dae44dd639d7f891dc57bb326b06b1118

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
Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:
	core/Makefile
	tools/releasetools/common.py

Conflicts:
	core/Makefile
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
build: Set ccache base to build top

This enables ccache sharing between different build tree paths.

Change-Id: I99636bdd2779a6ccf0649f027e35cf67df44b6ae
Don't set CCACHE_BASEDIR if its already set

 * enable use of shared ccache

Change-Id: Ic708a5d5169291d674b167aa2c87bf2c8adaafae
ota: Generate recovery-from-boot.p file

This may be wanted to update the recovery with system updates

Change-Id: Iacd41be7a8018cbc08b2606485d446756910f506
Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:
	tools/releasetools/ota_from_target_files

Conflicts:
	tools/releasetools/ota_from_target_files
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
Signed-off-by: cj360 <ayunker551@gmail.com>

Conflicts:
	core/Makefile
	tools/releasetools/ota_from_target_files