init.rc: Add framework2 to BOOTCLASSPATH

Change-Id: I8c005ca795929558f34d0cee5cf93932c52d4b0f
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
init: Implement exec support

Code copied from CM7 implementation by Steve Kondik

Change-Id: Ic517b9ce4749b7cd94644cb3155c4a6656c1a37b
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
Safely restart services to avoid race conditions.

At present, service restarts exhibit a race condition whereby the new
(restarting) service process is often spawned before the old (stopping)
process has terminated.  This may result in the new service process failing
to acquire a limited resource (file lock, socket bind, etc.) that the old
process has not yet released.

The new method preforms a safe service restart by stopping the service,
waiting for the old service process to terminate, and (only then) start the
new service process.  In the event of "restarting" an already stopped
service, the previous behavior is maintained whereby the service is simply
started.

Change-Id: I70b34a4e762355d90a1f3bf3a770597da6ad799c
rootdir: Add support for ADB-over-network

Change-Id: Id161c44137b323afe775627a5cd1fe93a20499a1
Allow 'system' user to modify cpufreq control files

This is needed by CPU Settings

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

Change-Id: I44f7838d56c987244263d47807f9d8110b710e3f
Restart oneshot services when manually restarted.

Restores manual restart behavior of oneshot services prior to I9935b519.

Change-Id: Ia90c385136a20d40bd591b397ec73f8f4ef8966a