recovery: Compatibility with upstream minui change

 * minui is changing a lot upstream. We won't merge it here, but
   it's being used in another branch. Add compatibility in CWM
   so that we can move forward.

Change-Id: I8a3289df2d7bc569229b7212c22adb90d4e76ffd
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
remove unused variable

Change-Id: I0f66df38964baccd1c8e58fa7006cb9db5fc6df5
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
applypatch: add support for BML partitions

This actually uses the EMMC partition access code. In order for this
to work, the BML partition name is changed back to the block
device name (e.g. "boot" -> "/dev/block/bml9"), and the
BML_UNLOCK_ALL ioctl is called before writing.

Change-Id: I82d7080717583b4a4860f28ddb0efe411c051c25
Make legacy prop environment available to recovery

Google changed the in-memory format for storing properties in 4.4.
Zips containing an older update-binary expect the old format, otherwise
assertions on properties in the update script fail.

This is just enough of the old property service to copy the properties
to the legacy format before running the updater.

Note: this commit has been amended from the original version by _that.
1) It has been trimmed to only provide the legacy prop environment.
Edits to install.c are done in a separate commit from scratch to
maintain apache2 licensing in this repo.
2) Return values are given to check whether prop environment was setup
successfully.
3) Slight formatting changes.

Change-Id: I1fa9f96fa7a62c7eaba852e4d62e793cd6818907
Use legacy property environment if old update-binary

If an installation package contains an update-binary that is
incompatible with the kitkit bionic property environment, set a legacy
property environment. This removes the need for a fallback update-binary
which is often incompatible with older update-scripts.

Method of setting prop environment based on cyanogen's commit:
"Set ANDROID_PROPERTY_WORKSPACE in exec." Tip to rename
/dev/__properties__ so that the legacy property workspace is actually
used comes from conversation with _that.

Change-Id: I5268f67537ad03c077fa05cbb98dfd4da194ffb8
Revert "Add a copy of the updater binary to the recovery resources"

No longer necessary when a legacy property environment is available.

This reverts commit 1153ae5ad9a25198e4edfa7ff9b0bce7f9d40220.

Change-Id: I9726f45d896eb3e14b80e2ddf1df5e6acea83323
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
Only init legacy property environment once

Installing multiple pre-kitkat packages in succession may cause
legacy_properties_init() to fail. Only initialize the workspace once and
then just do path renames for all subsequent requests to enable legacy
props.

Change-Id: Ida528aca9322f77935411b270fdf182828abab8a
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
updater: ignore all deleted files during apply_patch_check

Change-Id: If52cd3320c2b2f2dc3e457a2ef36cda6df67a7ff
loki updates:

- fix fstat could fail on getting open partition size
- sync latest sources to support new devices
- match original loki upsteram sources
- fix all loki_recovery compiler warnings
- one binary for all functions patch/flash/find
- Makefile and Android.mk to compile new multi-binary tool or lib
Change-Id: I050a673f39b32136c817b69c00939818696e2c56
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
Merge branch 'cm-11.0' of https://github.com/androidarmv6/android_bootable_recovery into cm-11.0