Thanks to _that, return null if vector is empty

Change-Id: Idc44455dd0c971c876ae283528c4367a82e145bd
Clean up make flash utility make files

Change-Id: Ie396be7d9636a8b481bcf7c062f94ce51a4b1fde
Make libmincrypttwrp a shared library

Change-Id: I8c3f084fc34b00edb4cd1b652290df8bc80ea1db
Tweak 5.0 L decrypt

Mount the vendor partition if it exists so we can use any
proprietary files we may need.
Relocate auto decrypt when default_password is in use to after all
partitions are added so that we can mount the vendor partition.

Change-Id: I93455a35695779f53ef57a82d3d45c7216c13639
Add flag for including additional files built from source in TWRP

Some devices may need additional binaries or libs that TWRP
normally does not need included in /sbin
Use TW_RECOVERY_ADDITIONAL_RELINK_FILES to build them from source
and get them added to the recovery ramdisk.
For example, Nexus 9 needs libc++ included in order to decrypt
the data partition. The following will build it from source and
include it in TWRP:
TARGET_RECOVERY_DEVICE_MODULES := libc++
TW_RECOVERY_ADDITIONAL_RELINK_FILES := \
    out/target/product/volantis/system/lib/libc++.so

Change-Id: I147c0d5569c83514d2e50226ecc50e80bf8aac36
Add /firmware to the mount list for L decrypt

Needed by Nexus 6 and possibly others

Change-Id: I3309e2141a21a94dce90e34cced16450b591a92c
Fix process to disable stock recovery flashing

/system/etc/install-recovery.sh no longer exists on AOSP devices
so we will stop checking for it.

Change-Id: I9074dfc443371a27b909faa8f66998683cfb6171
Properly set tw_settings_path after decrypt on data media devices

When tw_settings_path is not set correctly for /data/media/0 when
present, custom themes will not load (and who knows what else may
also be broken) so set it properly after decrypting the device.

Change-Id: Id3dff04f62cf9c953c8a2ca07fe9ac597dcda20f
TWRP MTP: make sure inotify_fd is set

Originally the inotify_init() call was part of a separate thread
which would occasionally allow the readDirs function to run and
start trying to add watches before inotify_fd was init'ed properly
and result in the add watch failing. This patch set relocates the
inotify_init call to happen outside and before starting the
separate thread to ensure that inotify_fd is set properly.

Change-Id: I8748c23473b60b57887df9d692834f3d2b249802
 Make the android-5.0 branch compile in 4.4 to 4.1

Migrate previous minzip to minzipold replacing the existing
minzipold. This will break compatibility with trees that do not
support selinux (ICS and older). Migrate former verifier files to
verifierold.

Add fuse.h to recovery source because older trees do not have it.

Add LOCAL_MODULE_TAGS where needed for 4.1 tree.

Change-Id: Iade57cb2b0115af7fce9f56aa98636b1744a1ef4
bootable recovery: we upgraded to 5.0.1

Change-Id: I9e2f359dd7274e1ae885f6a3b392d5ab5ca99ac9
Reduce libs needed for decrypt and clean up old decypt files

Trim cryptfs.c to remove functions that TWRP does not use for
decrypt and remove the need for libfs_mgr from cryptfs.c by
passing some items to cryptfs.c from the partition manager.

Add support for new fstab flags:
encryptable and forceencrypt=/path/to/cryptokey
For example:
flags=forceencrypt=/dev/block/platform/sdhci-tegra.3/by-name/MD1
Note that "footer" is the default, so you do not need to set this
flag on devices that use the footer for the crypto key.
Also add mounttodecrypt if you need to mount a partition during
the decrypt cycle for firmware of proprietary libs.

Clean up decrypt and only support one version

Android 5.0 lollipop decrypt should be backwards compatible with
older versions so we will only support one version, 1.3 that came
with 5.0 lollipop.

Remove support for Samsung TouchWiz decrypt. It does not work with
the latest versions of Samsung encryption anyway and it has not
been updated to work with any AOSP decryption higher than 1.1

Change-Id: I2d9c6e31df50268c91ee642c2fa090f901d9d5c9
add function to partition.cpp to return max file size to mtp responder
Change-Id: If8114b5eac741db6c512fb35cb48e3825c2ff098
Use screen dimensions used for bootanimation to set resolution for recovery

Change-Id: Ib5036475122b8ce67ba520f06d0803850716c136