recovery: add overlay interface for recovery mode

Pan display needs FB allocation from driver and
since it is removed from driver, switching to overlay
interfaces in recovery mode. Basically forking out
the overlay and pan_display path in separate files.

Change-Id: I60f13e54befaa6da77e6c4d23399835509b41333
recovery: Add support for split display

Configure LEFT and RIGHT mixer separately
to drive high resolution display.

Change-Id: I3a3e6bffe6373caa991d9847dae6f2f4d8d20c48
recovery: Fix compilation for non MSM target

Make mdp5 version variable scope valid for non-MSM target.

Change-Id: Ib02c7d8f79c6d29e8f14b58810f628c3a80d416d
Fix overlay inclusion on MSM

Don't determine that target has an overlay if not using QCOM_BSP,
since most of the required functions will be dummied out

Change-Id: Ic2605baa00e629351bafa3f941c92f32d2155a4d
Fix mkfs.f2fs calling in roots

Change-Id: I4991732be70a7e9ae7e87fa1395e89b315717049
Fix recovery reboot command by adding the init sys.powerctl property control

Change-Id: I57c4c39135eb690340c933b5f696c70020f7b31d
fix display current path when navigating backward in folders

do not use static pointer in re-entrant function

clean up unused variable

Change-Id: I103f5de7561d1ffcdb6893f7a704ab906ee2b31d
fix compiler warning

Change-Id: Id552abe520856cc651582476b192d0fefa76b6d3
Fix mass storage in recovery

The proper order is mass_storage,adb. Some systems cannot recognize
the mass storage otherwise.

Change-Id: I7e240210adef52de70776353a3426e3fc3f1b5bc
Revert "Don't return immediately from reboot commands."

This reverts commit 11b8326aa3b6d1f14b9fe289978c44b89554ff8e.
nandroid: Allow tar backups of yaffs2 partitions

Change-Id: I33dca9864b043527640c6586751c9399bc3fb156
clean up unused variables and fix compiler warnings

Change-Id: I3c3e30d5e27706d59be78ec935e8a095ba4ab0c0
update-binary: Add collect_backup_data function

Add a function to identify files being backed up during an update so
they can be managed when applying patches.

Change-Id: Ied18d569a396a7324148d6a93809683673a19403
fix fread buffer has no terminating null string

do not allocate memory where it is not needed

Change-Id: I8ab4f7d36173c59aa74a590581a0f7027b7d8a69
use different USB PIDs for adb and adb+ums modes

Commit ad054c684524962eae3269c1d807dc60e8bca1ec made it so that
the same VID/PID pair was used for both adb and composite adb+ums
modes, which prevents the installation of drivers in Windows so that
either mode can be supported.

This uses the original VID/PID pair (18d1/d001) for adb+ums and
uses 18d1/d002 for adb.

Change-Id: I190c821995b7fe9e8177354aec70bd02c114d122
use correct USB PID for adb and new PID for adb+ums

The previous commit assumed that the correct PID for adb+ums
was 18d1/d001. That is incorrect. That VID/PID pair is widely
used for non-composite adb function in recovery. Since there is
no "generic Android" VID/PID allocated for adb+ums, we will
"unofficially reserve" an unused one for that purpose: 18d1/d003.

Change-Id: I6ae095569186c1e854f10b803f786d8c1ae7fb93
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
remove unused variable

Change-Id: I0f66df38964baccd1c8e58fa7006cb9db5fc6df5
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