do not install recovery on boot
healthd: Only use battery values that seems legit

On some devices, there are other sysfs paths having a "capacity"
node than just the battery, which can return a weirdo value. We
make sure we only use legit battery levels (> 0%).

Change-Id: I3caf34e7fed4b89f953ec98c486b53b8786c8f74
Merge remote-tracking branch 'origin/kitkat' into kitkat
fix up adb to prefer /sbin/sh if it exists

Change-Id: Ifa68efec387e6c12dc4bb2d0e764b8ecf96c0ad5
Fix build with gcc-4.8+ and unused-parameter error

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Fix build

Renaming to "TARGET_GCC_VERSION_AND" should work.
Fix
restorecon_recursive("/sys") speed boot time

Currently, the restorecon_recursive("/sys") call in
init.c takes approx 2 seconds on hammerhead. This change
reduces the delay to 1.2 seconds.

1) Avoid double stat call when using nftw (time savings
of 0.3 seconds)
2) Avoid the repeated calls to is_selinux_enabled() (time
savings of 0.5 seconds)

Avoid calling lsetfilecon if the file is already properly
labeled. This doesn't speed up the restorecon on /sys,
but it should help when handling files on /data.

Change-Id: Icf344edc5bfc9520d3a0ebd9527a065d29832f87
Merge branch 'kitkat' of github.com:AOSPAL/android_system_core into kitkat
restorecon /data/misc/media.

Otherwise it will be mislabeled on upgrades with existing userdata.

AOSP: https://android-review.googlesource.com/79022/

Signed-off-by: Humberto Borba <humberos@gmail.com>
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Change-Id: Ibde88d5d692ead45b480bb34cfe0831baeffbf94
Fix build with gcc-4.8+ and unused-parameter error

Signed-off-by: Paul Beeler <sparksco@gmail.com>
Fix build

Renaming to "TARGET_GCC_VERSION_AND" should work.
Fix
some fixes for gcc 4.8
Merge tag 'android-4.4.3_r1' into kitkat

Android 4.4.3 release 1
Merge branch 'kitkat' of github.com:AOSPAL/android_system_core into kitkat
Merge remote-tracking branch 'aospa-legacy/kitkat' into kitkat-legacy

Conflicts:
	adb/services.c
	healthd/BatteryMonitor.cpp
	init/util.c
	rootdir/init.rc