Squashed adb fixes.

fix up adb to prefer /sbin/sh if it exists

allow always insecure

Change-Id: I7e19b496eaf8c8d76fe48ec8a08e7bf2fcd1aced
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: Ib7120ad5a60a3d3a061f4de1a5934e5ca173415a
liblog: Move kineto and qcom RIL messages to radio log

Squashed commits from CM7

   liblog: I <3 you Kineto, but STFU.

   Kineto's native library obliterates the logs with debug info, which
   makes me a sad panda when trying to debug other things. Send it to the
   RADIO bucket instead.

   Added QCRIL to filter rules.

   QCRIL from LG P500 generate too much logcat output (about 20 lines per second) so it will be good to filter it.

   Mecha: Move qc-ril related logging to the radio log

Change-Id: Ie17cb23c60437de9288c7501abea490a8c5836cf
log: more qcom radio tag

Change-Id: I91013ef7fca7c7923436d34347365fba16906538
do not install recovery on boot

Change-Id: Iffad0f65a2ec00b1a8d6babf5884ba242f71dfb3
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.

Change-Id: I4274ac61b1c9af8c5e919d5a6a504da2fb5e904a
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.

Change-Id: Ie09a1124cdbe3588c0f4441f8078ac7519b87e60
debuggerd: Extend condition for exclusion of the fconstd instruction

The fconstd instruction only exists in ARM cores with VFPv3 or
later. Currently all supported ARMv6 targets do not have VFPv3 or
later, so let's just extend based on this trend.

Change-Id: Idfc12711770750375e1723e10181e90b21a6ee02
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

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

Change-Id: I703d011f6cc07ead0df103a748dc462203ddd24b
init: Support for emmc boot and init.target.rc

 * Via CodeAurora

Change-Id: I5bfd9c316d4b3befceb3e51e94425b346a39cd48
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: I6dab7438830b093bfa623b4eb8adb0c592cb45c3
init: implement a new 'log' command, useful to debug property events

liblog is not usable, because stderr and stdout are redirected to
/dev/null to control the android log output.

Only forked processes are able to write to the android logs...

Change-Id: I24288789426dfa0496b95b6238583edcab84ba44
Note: accept parameters: log [-t topic] [-p level] <message>
      limit : strings beginning with "--" are not handled
Allow 'system' user to modify cpufreq control files

This is needed by CPU Settings

 This is the 2nd commit message:

Fix PowerHAL cpufreq permissions

The process containing PowerHAL didn't have group permissions to open
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor|max_freq|min_freq.

Modified permissions to match AOSP using the system user as the owner.

Change-Id: Idbdad8b00b8ad7d7d2a845287cccbabb58fc5aba
rootdir: Change sysfs permissions to allow user control ksm

Change-Id: I44f7838d56c987244263d47807f9d8110b710e3f
Allow system to call custom reboot cmd

Change-Id: Ib6081a10f11e7bfc0fe5ad150c8de6ec75b0e95f
core: allow radio users to access all rmnet* interface

Change-Id: I3e812b803d11ac5e470b2c2dcce363545238beb2
Increase CMD_ARGS_MAX in FrameworkListener

This increases the maximum number of arguments for a framework command
from 16 to 32. 16 arguments are already used by NetworkManagementService
.startTethering().

Change-Id: I9abe07cce9676f2c87853cd88ae2ca25b7e52046
init: Add an emmc-specific configuration file

 * Load init.emmc.rc if emmc_boot is set
 * This makes startup much cleaner for devices with a mess of vendor RC
   configurations.

Change-Id: If0874c652eff7f56a49971d434328347ad6e6d3c
Add required permissions and files for data

 - Add /data/radio
 - Set gateway property after DNS
 - Allow radio users to set properties associated with
   all rmnet interfaces. Not just rmnet0

Change-Id: I8f972f91bdf40cd7f36648bf1778f469d12c11f3