libcutils : reboot mount fix

On aries for eg, cache needs to be rw for the RECOVERY_PRE_COMMAND to
work because we write to /cache/.startrecovery

This patchset moves the RECOVERY_PRE_COMMAND prior to the remount.

Conflicts:
	libcutils/android_reboot.c

Change-Id: I4bd97517e00cdd117191d29b610e9623ad7d9255
Use RECOVERY_PRE_COMMAND before calling __reboot() recovery

For the Power menu,
frameworks/base/core/jni/android_os_Power.cpp#L180
already uses RECOVERY_PRE_COMMAND if
TARGET_RECOVERY_PRE_COMMAND is defined in the
BoardConfig.mk for a device to make a system() call before
calling __reboot() for recovery. This commit adds
the same thing to the other places that we know we are
getting into recovery using __reboot(), namely,
adb reboot recovery, the reboot binary and init
in the case of errors.

Signed-off-by: Humberto Borba <humberos@gmail.com>

Conflicts:
	libcutils/Android.mk
	libcutils/android_reboot.c

Change-Id: Id0fb6675accd732f46d4b10e0fce459d2582875c
adb: Look for bu in /sbin when in recovery mode

 * Restore global variable recovery_mode.  This is set based on the
   commandline parameter --banner.

 * Use recovery_mode to select path to 'bu' binary for both backup and
   restore services.

Change-Id: Ie4c945d00601514d7f16357bae10ff7f232633e1
adb: Fix compilation warning

Change-Id: Iab0cb977f81824338a37ecba233b45883c0bc13b
adb: Allow configuring the adb shell with a persistent property.

To set to bash: setprop persist.sys.adb.shell /system/xbin/bash

Change-Id: I24e65f4592aaf23356c13db02c9869076df3b841
Core: fix compile issue of healthd.`

fixes this in darwin cp: symlink: /sbin/healthd: File exists

Change-Id: Ia0a51962ec6d1713ece1e9c1d4f9df479fee5f5b
 healthd: increase healthd fast timer to 10mins instead of 1min

healthd 1 min wakeups are causing significant power impact
during static display use case. so increasing the timer to 10min.

Change-Id: If7a514e4152789144242e198175918b6687c3bcf
init: Bring back support for arbitrary chargermode cmdlines

This was accidentally removed while debugging the init breakage
fixed in change I8ef5c932efcd5e7f8d6f6fce0915683d84c3ee11. Put
it back

Change-Id: If35b9d5db281f8aab6de26f2bb63717d28b2db30
RECOVERY_PRE_COMMAND_CLEAR_REASON and extended reboot arguments

fix the 2 new warnings created by our 4-lines recovery patch ;p

Allow also to override toolbox reboot applet, for bootmenu

Conflicts:
	libcutils/Android.mk
	libcutils/android_reboot.c
	toolbox/Android.mk

Change-Id: I2bff30b5f911e7b9ba8f26593523368223b12814
Cleanup previous merges and tidy up

Change-Id: I4bcdff53eb758e93cb0bcb1d778ea76dac96c30c