init: Implement exec support

Code copied from CM7 implementation by Steve Kondik

Change-Id: Ie8f11e9dc9e552aa7a4fe354995daaf8f0d99a11
init: add detection of charging mode

-when BOARD_CHARGING_MODE_BOOTING_LPM is set to a path_to_sysfs_attribute
 then it and lpm.rc will be read accordingly.

-adapted from techomancer's original change:
 (add detection of charging mode, remove the code for parsing param.lfs,
  since it is not needed)
 http://goo.gl/I19GG

Change-Id: I64c2379225e00afaaf17ee03eab67546781668f8

Conflicts:
	init/init.c
core: allow radio users to access all rmnet* interface

Change-Id: Ibc3bf9654cf68362369422f82afe53ef86e3e710
mkbootimg: Add --dt parameter to specify DT image

New optional --dt parameter to specify a kernel device
tree image.

Change-Id: I7e2c48c25c04165642eedadc3dc16a082dd99eb0
core: QCOMs revenge

Based on CAF kk_2.7_rb1.9

Change-Id: Ida724519aa1501ff43d66994ef6622fb45dd11b0
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
fix up adb to prefer /sbin/sh if it exists

Change-Id: Ifa68efec387e6c12dc4bb2d0e764b8ecf96c0ad5
system/core: Add command NATIVE_WINDOW_SET_BUFFERS_SIZE

Add native window command to set user defined buffer size.

Change-Id: Ib500e65283706d860d62cb487720008d7331ce2d
system/core: Add command NATIVE_WINDOW_UPDATE_BUFFERS_GEOMETRY

Add native window command to update buffer buffer width, height
and format before queuing the buffer.

Change-Id: Ic133f89afb762cfce5084af820af5f9bad2a4a0b
Fix the QCOM_BSP ifdef

We only want this when the full BSP is enabled.

Change-Id: I7bb7b0d274d1221c5bb566d4ac24419e1e134519
Remove QCOM_BSP from here for now

Change-Id: I0482aaf67b9f60946d5f0bac9906b94d66bab6f5
camera bringup changes system-core

Change-Id: I1cf98641eca9096bd27645e07ea802646ea1fb96
(cherry picked from commit 3cb7c2da69f582d88b8eebf05f15788c4a13bdbb)
(cherry picked from commit a52870bfcbe7c54a21dbf5607aa2087292b139dc)
(cherry picked from commit 0b752a35a24e5cd8df90aa562a196d310dc5bd36)
set /system/etc/init.d/* permissions

ported from CM7

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

Change-Id: I2760d7affcc754da4dad1031250307a16466b73b
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
init: added missing permissions

Else PerformanceControl will not be able to change them
-scaling_min_freq
-scaling_governor
-I/O scheduler

Change-Id: I55eb68087e991a906d91009b0a9bc43f0b162635
init: fixup cpufreq permissions

It is safe to have read permissions for everyone
Also required for the CPU info overlay service

PS3:
add cpu0-cpu3

PS4:
mke this work on at least a few devices :)

Change-Id: I1de067f63121a8a19f29d4e994fbc3bf73054556
rootdir: Allow to use a custom environ.rc

This is helpful for device which relies on blobs that needs their dependencies to be placed on a different dir

Change-Id: Ic5ebb7abe6ea97599c28c8a0d61350358b18fda6
init: Add a mechanism to extend the property service in device configs

Instead of every so often adding a new set of stuff here for a specific
device, let the device includes overload the property arrays. The
new device_perms.h header documents it

Change-Id: I477e27abebeb4b85abe5fcaf19333999b1625417
init: Allow device-specific appends to the property service permission structs

Extends device_perms.h API to allow property_perms and control_perms to be
appended on a device-specific basis, without needing to redefine the entire
struct contents.

Conflicts:
	init/property_service.c

Change-Id: Ifa4ec83cbd72b063da5bb8964677fcfd8f4831c5