Import custom init file from kitkat

Change-Id: I8a0a6515e2d39e390e1affc9d6b9b8511669b65b
Comment out flash recovery service

Change-Id: I7ead0b40f4bd0f8170948cb98dd066814e8423ae
ADB Logcat colored output.

This patch adds a new '-C' option to logcat so that the output is
colored with colors similar to the ones in DDMS.
Simply type "adb logcat -C" to use it.
Works well with bash in gnome-terminal.

Change-Id: Ie72199ecca0e04f2082c993f5763646bb09da61ea
adb: Add "wait-for-sideload" command

 * Waits for connected device to enter sideload mode

Change-Id: I65b4ad86456c13a3bbc48880e12ab7a034707b88
adb: Add a few more wait-for commands

 * wait-for-recovery is obvious.
 * wait-for-online will wait for recovery || device

Change-Id: I70f747bcd201a4157b988d7ed49bcc8e5ff4c85f
set /system/etc/init.d/* permissions

ported from CM7

Change-Id: I279d78679f7d779d6cd6bbc6c834d94706937ae8
Modular backuptool.sh.  Executes backup and restore methods defined in arbitrary /system/addon.d/*.sh scripts.

Set permissions on /system/addon.d/ and files within.

Patch Series
============
http://review.cyanogenmod.com/#change,13265
CyanogenMod/android_build
  * edify generator
http://review.cyanogenmod.com/#change,13266
CyanogenMod/android_system_core
  * permissions on /system/addon.d
http://review.cyanogenmod.com/#change,13267
CyanogenMod/android_vendor_cm
  * 50-cm.sh reference backup script
  * modular backuptool.sh
  * support backuptool.functions used by /system/addon.d/*.sh scripts

Change-Id: I4f1464ea8d55f45d47ba760a7a448036a46feb00
healthd: charger: Add tricolor led to indicate battery capacity

Add led to indicate battery capacity when doing off mode charging. The
led behavior is design as below:
   i. 	Shows red led if capacity is lower than 15%.
   ii.	Shows yellow (red + green) led if capacity is
	lower than 90% but higher than 15%.
   iii. Shows green led if capacity is higher than 90%.

Change-Id: If637defec8a04e859b00a6492ec1f95d6bff2200
healthd: charger: Turn off charging animation by power key event

Currently, the charging animation can be turned on by power key event. Add
support to make charging animation can be turned off by power key event.

Change-Id: Icc8101ae3d4fd777efedeff10ca535a9e6e7a57d
healthd: charger: Draw battery capacity in charging animation

Draw a text to show the battery capacity value in charging animation.

Change-Id: I0117fb0aee69181ce0d608ba4b1644fa42cd1a0d
Fix memory corruption when sanitizing platform paths

This commit fixes code that incorrectly increments s when it
hits the terminator character of the string being sanitized.
This means it will randomly start trashing memory beyond the
end of the string being sanitized until it happens to hit two
NULs (\0\0) which will break it out of the loop.

- Remove init.d permissions

Change-Id: I76553d7f183236a78a0bc7b408e92559b98f732f
healthd: Support alarm in power off charging mode

To implement this feature need to let the phone reboot some time
earlier than the alarm time.

Change-Id: I6505a99b51932ffa23518769f8fd4d2590021543
Add torch light access permission to torch app

Add torch light access permission to torch app

Change-Id: Icf3eb08d75481fb70229887b76a8cdb5d3516944
toolbox: new applet restart

- stop + start
- for the lazy.

Change-Id: Ie0ef0e27f5b7819a5575ece6b82c5813f4e38420
Update permissions to the superuser binary

Change-Id: Ia382c74854cfbe625653b8b6b016b37f93132658
Add group qcom_oncrpc and give permissions to ril-daemon and /dev/oncrpc

Change-Id: I022aae4a81c720a026ea6c1a41bda30acbe60224
diag: Remove world read/write permissions from /dev/diag

/dev/diag has world read/write permissions which is considered
a security risk.  Remove these permissions.  Add new qcom_diag
group for access to /dev/diag

CRs-Fixed: 356415
(cherry picked from commit 14c85ec56fd47c5eb143617a3bd5a6e7ee39cb6e)

Change-Id: I536323a97e19a07bbd8eadffa0265d1955590285

Conflicts:
	include/private/android_filesystem_config.h
rootdir: Update cpufreq permissions when governor changes

 * Requires a kernel change to send the uevent.
 * This should alleviate some frustration that the performance/kernel
   folks have expressed regarding the Power HAL.

Change-Id: I31e6e13534159214a3b600082b7c0e4249433364

Conflicts:
	rootdir/ueventd.rc
rootdir: Tighten permissions on boostpulse nodes

 * New PowerHAL code will only write to this as the system user, so
   remove the need for it to be world writable.

Change-Id: Ia9e69a6feff7c5ef1ff34a1180225e4008e8130f
adbd: Disable "adb root" by system property (2/3)

 * Require persist.sys.root_access=1 on non-eng debuggable builds

Change-Id: Iedab030e81ffb525fed64aed80cf0014f3e07073