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
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
init: update recovery when enabled in settings

Update the recovery image only if the option is enabled
under Developer options

This reverts commit 231e0a9e6a1da6fa4a188840f68af649669e417f.

Change-Id: I928f7ee8bb3eaf5581bb8225661d253ecca0c4ef

Change CM recovery install script filename [2/2]

This is part 2/2 to maintain backwards compatibility with CWM's
verify_root_and_recovery() function. CWM checks if install-recovery.sh
exists and has an executable flag set, then offers to disable the script
for the user. CM now controls this with the persist.sys.recovery_update
property which is configurable via settings, so we don't need to
double-check this.

This changes the name of the recovery install script to
install-cm-recovery.sh.

Change-Id: I275dd358b46c626dfcb8fe02c583a308d5a89c56
core: Add some static libraries

 * Add static versions of libdiskconfig and libsysutils for MiniVold

Change-Id: I9ea9498dcff3f094bbcbb1e05e6d10bc9b83ac74

Conflicts:
	libsysutils/Android.mk
Add libminshacrypt static lib

This is a sha-only version of libmincrypt, to provide the new
SHA_hash implementation to binaries that require libcrypto_static
camera: Add ifdefs for extended face detection fields

Change-Id: Iab51c3f269a83e626cfa613ffc73d4fbac62deaa
audio: Add ifdefs for QCOM audio features

Change-Id: I5380d12539bead947a79683335aca1ed0d0408ed

Conflicts:
	include/system/audio.h
Add HTC Logging functions to support newer HTC props.

* ifdef'd with HTCLOG.

Change-Id: I70d0a6878dddf0f41d96735febda82c93496d8ec
Revert "Init: Modify user/group option for bootanim"

This reverts commit 65745d12fd0af9c0ffc7ef8c94bcdbc25788b9ce.
This has a dependency on app-ops for validating access to sf that
needs to be resolved. Remove until we work on PG
liblog: add required function

Some Motorola proprietaries require a function named __android_log_loggable. This
change adds the function and solves problems with radio and other
binaries on qualcomm based Motorola phones. This code is activated with
TARGET_USES_MOTOROLA_LOG:=true

Change-Id: I722b42d34198c027f265c3cf9f220d9798814915
init: Add "export_rc" command to export env from a specified file

New export_rc command to import environment variables from
a specified file at the time the command is executed.

Differences between "import" and "export_rc":
1) export_rc can only import environment vars
2) export_rc is performed when the command
   is executed rather than at the time the
   command is parsed (i.e. "import")

Example:
in /init.rc:
    on post-fs
        export_rc /system/etc/init.xyz.rc

in /system/etc/init.xyz.rc:
    export LD_PRELOAD /system/lib/libxyz.so

Change-Id: If616dea5b508c27e9f7a95b5e9db696ecea2fdee
sdcard: Allow building as a static library

 * Split main() out in order to allow linking with a multi-call
   executable such as recovery.

Change-Id: I3325135e47e4dd5af3912f5ce67ec64007d54a63
fix up adb to prefer /sbin/sh if it exists

Change-Id: I5c15731c95d123488e90aaeac5b497f556b53363
init: Bring back support for arbitrary chargermode cmdlines

This was accidentally removed while debugging the init breakage
fixed in change I8ef5c932efcd5e7f8d6f6fce0915683d84c3ee11. Put
it back

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

Based on Prashant Somashekar's patch which is in turn based on techomancer's
patch http://goo.gl/I19GG.

When BOARD_CHARGING_MODE_BOOTING_LPM is set, init will read that
value (usually from /sys) and enable charging mode when set to 1.

This differs from the original patch in that Samsung-specific lpm.rc
is not loaded, but instead, init.rc is loaded using the "charger" class,
which is how AOSP devices handle charging.

The change is because the either the SELinux or the init.rc changes is
causing lpm.rc to not work, and porting lpm.rc to the Android system
is easier than trying to fix it.

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

Change-Id: I76553d7f183236a78a0bc7b408e92559b98f732f
toolbox: Add setfattr

Change-Id: I1981604f72d96c9ad38583f03f7f65df1ab865b7

Conflicts:
	toolbox/Android.mk

Change-Id: I3e723c67436a374269767ec2e0594ca35af8d003
charger: allow home button to wake

A squashed commit of the following:

commit 6ce21d726a967b2cc942476758b9ab3851ff39f1
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Sun Feb 3 22:21:32 2013 +0700

    charger: do not suspend when handling home

    When using Google's suspend implementation, home press should also wake
    the device from suspend

    Change-Id: I51f3e45c5cb418b0b3718e7223a1336876379043

commit 75a7cf84df719d8cf5cd77093b3f9fee3c09017e
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Sat Jul 21 22:09:37 2012 +0700

    charger: allow home button to wake

    On certain devices (e.g. galaxysmtd), the user expects the physical
    home button to be able to wake the device as well as the power button.

    Change-Id: If764f36aba3810dfa5233af8baf0a740b04889e0

Change-Id: I362b227e26bc864a2cad471df799bce2d682ecee
mkbootimg: Support 32K 64K and 128K pagesizes

Signed-off-by: ChampionSwimmer <android@championswimmer.tk>
Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I0ee608b74a1daefe536b9247f99368f3e043f93d