Rearrange opening of output and input files for error handling

If the file could not be opened, the process would log an error
to the log file but the GUI would report success. Rearrange the
process so that the GUI shows an error.

Change-Id: I96af0b934c8f6f463d56656647b16accd1d40654
Only split archives when split_archives is set

In some cases, statfs used on partitions like /system does not
report a size that would trigger a split archive, but using stat
on the individual files shows a larger size that statfs that
would trigger a split. This patch prevents us from trying to split
an archive unless we explicitly decided to split in advance.

Change-Id: I67f5cd343f12333e1189100cf0ec1c20c15b7cc2
Fix touch on Sprint HTC One m8

Change-Id: Ia9fba3be16a33b3cb0c4a3458398a2e60ba7f001
Add find file class to search for files

Scan a folder for a file based on file name. First scan the files
in the current path, then search real directories and finally
search symlinks in that order. Goal is to locate important sysfs
files for things like brightness, battery capacity, lun files, etc

This implementation just scans for the brightness file for the LCD

Change-Id: I8ed3e74a2e2851d58b443718b6e92b50a5491f08
Force zip verification in OEM builds

Change-Id: Ie894b5f5cda64f83b1bb58bb977024230b0337f2
Improve handling of shell symlink in recovery ramdisk

Change-Id: I06351f8ecdfe5b119bbae0d6800258adef844c66
Allow device files to specify a custom theme

Change-Id: I360f93e70c6a48eed502a5aacd6d8d654ca7b570
Enable rk30xx hack

Fix problem with erase/restore mtd partitions on Rockchip SoC

Change-Id: I3320f711446441cf79e38e9ffb5dfdb6b1717a55
Simplify twrpTar skip dir checks, DU code cleanup

* Remove unused parent variable from twruDU constructor

* Replace manual checks for /data/media with DU's check_skip_dirs()
  function

* Remove check_skip_dirs(A,B) function which duplicates the
  functionality of check_skip_dirs(A)

* Remove redundant trailing slash removal from
  check_absolute_skip_dirs(); this function is only accessed through
  check_skip_dirs()

Change-Id: Icfe8d71de36e33db6749fc5896dd3eafbcf7c9a4
Support .md5sum extension for package verification

Change-Id: Idb6df99251726e5415b415ea6ae55337b96b2dbb
Support alternative .android_secure location

Some devices (jewel, m8) have .android_secure at a non-standard
location. Allow a different partition to be specified as the home of
.android_secure using the fstab flag 'andsec'.

Using the /data/media variant of jewel as an example, recovery.fstab or
twrp.fstab could be edited like follows:

/external_sd  vfat  /dev/block/mmcblk1p1  flags=display="MicroSD";andsec

Note, this is NOT a method to move .android_secure in your ROM. Your ROM
must already write to this alternative location.

Change-Id: I3a6e4e63aaddb35870b79e80938b0f9c2c902443
Add additional search path for brightness

Change-Id: Ib1f032d87aafd7732d460caeca1e3ae6745a563d
Add support for actions triggered by key combination

Change-Id: I9dfa7de40229f00412d63fc9c1eb3a809a6eb2e6
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
Fix handling of storage with data/media vs data/media/0

Sometimes loading the values from the settings file may set the
storage path to /data/media when the proper path is /data/media/0
This commit will grab the storage path from the partition manager
to ensure that we are using the proper path.

Change-Id: Ibfd63125a2b9705319eb55b09c7e65391757bbc2
fix merge conflict
 conflict : gui/gui.cpp

Change-Id: I781e745207a45009d2bf91a5dfb7f1463ee6c08d
Signed-off-by: sndnvaps <sndnvaps@gmail.com>