Revert "Revert "minui: Match API to AOSP""

This reverts commit 2457cc01c709abcf7835799d7737ca51b6485cab.
updater: introduce and set_metadata and set_metadata_recursive

Introduce two new updater functions:

* set_metadata
* set_metadata_recursive

Long term, these functions are intended to be more flexible replacements
for the following methods:

* set_perm
* set_perm_recursive

Usage:

  set_metadata("filename", "key1", "value1", "key2", "value2", ...)
  set_metadata_recursive("dirname", "key1", "value1", "key2", "value2", ...)

Description:

set_metadata() and set_metadata_recursive() set the attributes on a file/directory
according to the key/value pairs provided. Today, the following keys are
supported:

* uid
* gid
* mode (set_perm_extd only)
* fmode (set_perm_extd_recursive only)
* dmode (set_perm_extd_recursive only)
* selabel
* capabilities

Unknown keys are logged as warnings, but are not fatal errors.

Examples:

* set_metadata("/system/bin/netcfg", "selabel", "u:object_r:system_file:s0");

This sets the SELinux label of /system/bin/netcfg to u:object_r:system_file:s0.
No other changes occur.

* set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "selabel", "u:object_r:system_file:s0", "capabilities", 0x0);

This sets /system/bin/netcfg to uid=0, gid=3003, mode=02750,
selinux label=u:object_r:system_file:s0, and clears the capabilities
associated with the file.

* set_metadata_recursive("/system", "uid", 0, "gid", 0, "fmode", 0644, "dmode", 0755, "selabel", "u:object_r:system_file:s0", "capabilities", 0x0);

All files and directories under /system are set to uid=0, gid=0,
and selinux label=u:object_r:system_file:s0. Directories are set to
mode=0755.  Files are set to mode=0644 and all capabilities are cleared.

Bug: 10183961
Bug: 10186213
Bug: 8985290
Change-Id: Ifdcf186a7ed45265511dc493c4036e1ac5e3d0af
Don't apply permission changes to symlink.

Bug: 10183961
Bug: 10186213
Bug: 8985290
Change-Id: I57cb14af59682c5f25f1e091564548bdbf20f74e
4.4 compatibility

Add a copy of reboot.c from system/core/reboot, since it is no
longer a cleanly usable tool in toolbox.
minor API updates
verifier: update to support certificates using SHA-256

Change-Id: Ifd5a29d459acf101311fa1c220f728c3d0ac2e4e
start healthd in recovery

Change-Id: I16e3e0ddb8ca062431deb4be83c5be5eb786d76f
recovery: copy logs to cache more aggressively

Copy logs to /cache immediately upon a package installation failure;
don't wait for recovery to finish.  (If the user reboots without
exiting recovery the "right" way, the logs never get copied at all.)

Change-Id: Iee342944e7ded63da5a4af33d11ebc876f6c0835
recovery: preserve recovery logs across cache wipes

When doing a cache wipe or a factory reset (which includes a cache
wipe), save any last* log files in the /cache/recovery directory and
write them back after reformatting the partition, so that wiping data
doesn't lose useful log information.

Change-Id: I1f52ae9131760b5e752e136645c19f71b7b166ee
fix secure adb in recovery

Recovery's init.rc was missing a line (added to the main system's
init.rc in change Ic97fd464440ff4a29fc9da7ad15949ac5215ade3) is
required for secure adb to work.

Change-Id: Id79b94d2abb4cbe3cca7cabeb4bc5faf7205e56b
recovery: fix mounting voldmanaged volumes

Starting from 4.4, voldmanaged volumes now have the mount point set
to "auto", which recovery will have to handle.

This is done by setting the mount point to /storage/[label], and
modifying vold to mount to /storage/[label] instead of
/mnt/media_rw/[label].

Other explored, but dropped, options include:
 - Setting the mount point directly to /mnt/media_rw/[label] does not
   work because vold expects the volume to be in form of /storage/[label]
 - We can also also use a symlink to /mnt/media_rw/[label], but that
   requires mangling with mtab when checking which partitions are mounted
   and also breaks install scripts which make certain assumptions
   (particularly, aries)

Requires http://review.cyanogenmod.org/53733

Change-Id: I4d35fd81edbc9cbed1812caa5c93e5fb5384154a
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
Quickly install from last install path

This patch stores the last path a zip was installed
from and adds a menu option to jump there quickly
when installing new zips.

Patchset 1) initial commit
Patchset 2) remove un-need call to dirname()
            increase install_menu_items[] size
Patchset 3) removed use of stat
            more install_menu_items[] changes
Patchset 4) removed unused variable info
Patchset 5) removed unused variables
            general clean up

Change-Id: I02d2fde26b375fad36dbab50ec2a8b8a52afc003
unmount /data on user request for /data/media devices

Change-Id: I86723215edb8c5d256bdd380ff1806729aa81a8f
install zip menu fixes:
    * fix memory overflow if num_extra_volumes = MAX_NUM_MANAGED_VOLUMES
    * simpler to manage install zip menu
    * better ordered listing of volume storage paths

Change-Id: I11d8f76bfe4a60623842810b7bdddd18e5cb99f9
clean up reboot to main system and remove old useless variables

Change-Id: Idf8cda0639e3fa5e6073b196a85899c57ca18e9b
Swipe: make swipe thresholds uniform across devices

Devices with high screen densities require very small swipes to activate
a key. Make the swipe distance uniform across devices by using the screen
density from ro.sf.lcd_density and activating a key based on the following
thresholds:
  Left/Right swipe: 0.5in
  Up/Down swipe: 0.3in

Change-Id: I39fe4b1007a4e4784d3d7d26a392d78b1adf9462
6.0.4.5

Change-Id: I4c67db56928243aa75db950c70ad80483a133fec
Merge "Quickly install from last install path" into cm-11.0
Merge "unmount /data on user request for /data/media devices" into cm-11.0
Merge "install zip menu fixes:     * fix memory overflow if num_extra_volumes = MAX_NUM_MANAGED_VOLUMES     * simpler to manage install zip menu     * better ordered listing of volume storage paths" into cm-11.0
Merge "clean up reboot to main system and remove old useless variables" into cm-11.0