restorecon /data/misc/media.

Otherwise it will be mislabeled on upgrades with existing userdata.

AOSP: https://android-review.googlesource.com/79022/

Signed-off-by: Humberto Borba <humberos@gmail.com>
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Change-Id: Ibde88d5d692ead45b480bb34cfe0831baeffbf94
Revert "sdcard: Allow building as a static library"

For some reason (maybe gcc) the sdcard daemon is broken for some devices

I can't reproduce this error but I got some logs below:

from logcat
http://paste.omnirom.org/view/380f6994

from kernel
http://paste.omnirom.org/view/3ebfe137

This reverts commit 1e8b51531e4d9ff356da0c09da4bf2860d523c8c.

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I56b0b8c0b50fdc53101494557c773ce717273bd0
Merge "Revert "sdcard: Allow building as a static library"" into android-4.4
init: add a restorecon_recursive built-in command to init.

Functionally equivalent to the restorecon -R toolbox command.

Also, fix error handling and documentation for restorecon command.

<3>[    5.447612] init: /init.rc: 230: invalid command 'restorecon_recursive'

Signed-off-by: Humberto Borba <humberos@gmail.com>
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Change-Id: Ia7fbcc82645baf52c6bff0490d3492f458881cbb
init: Add vendor-specific initialization hooks

Allow optional vendor-specific initializations
within init.  This can be used for runtime
initialization setup that init rc scripts do
not support.

Change-Id: I7623a0d59b18f9ec8e3623958e2f7ccd72b877bf
(cherry picked from commit a36f7998a135a63934465889f089f96deefe7c42)
(cherry picked from commit 2ce27688b13bbc9a2237442ec2d6a554325ef658)
(cherry picked from commit 8e4dc4f79011bf0a8832e8d1251fc17b3e542057)
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
Merge "init: Add vendor-specific initialization hooks" into android-4.4
Allow a device to define the max number of service groups in init.h

Certain proprieatary binaries (such as tcmd for instance) require
more than 12 supplementary service groups.  By definiing:
TARGET_NR_SVC_SUPP_GIDS := in BoardConfig this can now be changed
per device.

Change-Id: I8f968adc21768ca90232ded7b7e1ffa68dc7ea78
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
init: Allow basic environment variable expansion in env assignment

Allow environment variable expansion in 'export' command if the
value begins with "${_var_}" (where "${_var_}" will be replaced
with the current value of environment variable _var_).  Expansion
will only occur one time.

e.g.
export BOOTCLASSPATH ${BOOTCLASSPATH}:/system/framework/abc.jar
(cherry picked from commit 7940299507f15055851a6e8b61ae8d8a7d7f3484)

Change-Id: If9e4adfa1aba2c7a4ca243978ced3c46c2cb4d73
init: Fix serial number display for semc msm7x30 devices

Add proper check since semc msm7x30 bootloader exports
"serialno" in cmdline instead of the standard androidboot.serialno,
so init doesn't pick it

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: Ib4e715fafc64dd47fb667aeb63a7307334cca844
charger: allow custom charger res

Change-Id: I9fefc823f72fd34b10073179e9f6d4b1f4831895
Example: BOARD_CHARGER_RES := device/samsung/galaxys2/res/charger
Merge "restorecon /data/misc/media." into android-4.4
Merge pull request #3 from omnirom/android-4.4

fixes data/misc