Revert "Remove AOSP support"

This reverts commit 21d1bd16e5100d590bc7b57313b1d8d300bdc25e.

Change-Id: Id270e6b2bc2f4d030a0bfafbc54b633f24d637b6
use the default recovery UI

The key handling we use for deb is now the recovery default; we no
longer need a subclass of ScreenRecoveryUI.

Change-Id: I6ce2a48c66f3360a32c3aa8ba92f30d40c2bbe3f
Migrate SELinux related flo changes to deb.

Copy over the flo related SELinux changes to deb.
See https://android-review.googlesource.com/70190

Change-Id: Ie3a07b12ad6d12dedf2d0ccbfd8fb3211dcbe890
Update for KOT49H

Change-Id: I03c77e289e7ba0a460b6d67f33660c21193f9a22
fix build: deb radio partition mount point changed

deb's radio partition is now found under /firmware, not /radio, and we
have to treat it as EMMC even though the regular system mounts it as
VFAT.

Change-Id: I69b6ffc9a4bf6d2ca4fc02ebd7adee5f5550b400
fix deb build fstab

This reverts commit 03a8c20b51f781f23a6b628073adb6b504071e46, and
updates the fstab to have two entries for the radio block device.

Change-Id: I118dc87e0af39645664bc7430d4f193553df5500
fix build: deb radio partition mount point changed

deb's radio partition is now found under /firmware, not /radio, and we
have to treat it as EMMC even though the regular system mounts it as
VFAT.

Change-Id: I69b6ffc9a4bf6d2ca4fc02ebd7adee5f5550b400
fix deb build fstab

This reverts commit 03a8c20b51f781f23a6b628073adb6b504071e46, and
updates the fstab to have two entries for the radio block device.

Change-Id: I118dc87e0af39645664bc7430d4f193553df5500
Relabel sensors files

In device/asus/flo commit 9d6624a0, /data/misc/sensors
and /data/system/sensors were changed from system_data_file to
sensors_data_file. /data/nfc was changed from system_data_file
to nfc_data_file.

However, we forgot to fix up existing files.

Addresses the following sensors denials:

<5>[  103.234466] type=1400 audit(1387408621.036:26): avc:  denied  { setattr } for  pid=4833 comm="sensors.qcom" name="debug" dev="mmcblk0p31" ino=188441 scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir
<5>[  103.254089] type=1400 audit(1387408621.066:27): avc:  denied  { append } for  pid=4833 comm="sensors.qcom" name="error_log" dev="mmcblk0p31" ino=188442 scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0 tclass=file
<5>[  103.273681] type=1400 audit(1387408621.086:28): avc:  denied  { open } for  pid=4833 comm="sensors.qcom" name="error_log" dev="mmcblk0p31" ino=188442 scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0 tclass=file
<5>[  103.293914] type=1400 audit(1387408621.106:29): avc:  denied  { read } for  pid=4833 comm="sensors.qcom" name="debug" dev="mmcblk0p31" ino=188441 scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir
<5>[  103.313537] type=1400 audit(1387408621.126:30): avc:  denied  { open } for  pid=4833 comm="sensors.qcom" name="debug" dev="mmcblk0p31" ino=188441 scontext=u:r:sensors:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir

nfc denials:

<5>[  579.726409] type=1400 audit(1387410509.432:35): avc:  denied  { write } for  pid=1257 comm=4173796E635461736B202331 name="nfc" dev="mmcblk0p31" ino=253953 scontext=u:r:nfc:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir
<5>[  579.746185] type=1400 audit(1387410509.452:36): avc:  denied  { add_name } for  pid=1257 comm=4173796E635461736B202331 name="halStorage.bin4" scontext=u:r:nfc:s0 tcontext=u:object_r:system_data_file:s0 tclass=dir
<5>[  579.765014] type=1400 audit(1387410509.472:37): avc:  denied  { create } for  pid=1257 comm=4173796E635461736B202331 name="halStorage.bin4" scontext=u:r:nfc:s0 tcontext=u:object_r:system_data_file:s0 tclass=file
<5>[  579.783477] type=1400 audit(1387410509.492:38): avc:  denied  { write } for  pid=1257 comm=4173796E635461736B202331 name="halStorage.bin4" dev="mmcblk0p31" ino=253956 scontext=u:r:nfc:s0 tcontext=u:object_r:system_data_file:s0 tclass=file

Change-Id: Ic2076102123f9336c35974a944664ecbf8d216ae
Remove /data/app/sensor_ctl_socket on boot.

Unix domain sockets need to be unlinked and re-created on each
reboot regardless, and removing the old socket left by a prior boot
ensures that we do not have a dead socket file in the wrong security
context, thereby yielding denials and preventing proper removal
and re-creation by the sensors service.

This same patch was applied to flo in commit
https://android-review.googlesource.com/79110 but we forgot to
apply it to deb.

Bug: 12728711
Change-Id: Ibe7b44d7be4659806340b71a8ffb6fe977333cb9
Allow kickstart_checker.sh to run in system group.

This change helps address an SELinux denial where the
kickstart_checker.sh script needs access to /data/qcks.

avc: denied { dac_override } for pid=214 comm="ls" capability=1 scontext=u:r:kickstart:s0 tcontext=u:r:kickstart:s0 tclass=capability

Change-Id: I0b19a1ee15b07b66007cd01daee95253c86c997a
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Mount firmware partition as radio_efs_file.

Add explicit context option to fstab.deb to ensure
that the radio block device is mounted with the correct
label.

Change-Id: I0892992e04bf04103c61dddd74503795d61e0a10
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Add missing restorecon_recursive calls.

Match the ones in init.flo.rc.

Change-Id: If13f8b3412426983f0b6da24a3a0f20170b01972
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Drop restorecons from init.deb.rc file.

Recent changes have obsoleted the need to call
restorecon on any of /data files and dirs. This
patch drops those restorecons from the file.

Change-Id: I3157538a5d37d63fa027e6f75ac69edc7a258985
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
remove custom recovery UI for deb

All its functionality is now in the default UI.

Change-Id: Ic886dbaf239c899091ac637290c6207db0b02c74
Address new SELinux denial.

system/core commit 75b287b771b302c99797d812122b72f83d2f56f9 fixed
/sys/devices/system/cpu/cpu*/cpufreq/scaling_* so that it was properly
owned by uid/gid system. That started generating the following SELinux
denial:

<4>[  380.676844] type=1400 audit(1398985976.921:19): avc:  denied  { dac_override } for  pid=2033 comm="mpdecision" capability=1  scontext=u:r:mpdecision:s0 tcontext=u:r:mpdecision:s0 tclass=capability

Add mpdecision to the system group. This stops the DAC override denial
by giving mpdecision DAC read/write access.

Change-Id: I3173c95a7fc618a0cc7894cf1edac22a6c04a83e
Drop ppd service entry from init.deb.rc.

The ppd service which runs the mm-pp-daemon binary appears
to no longer be used. The last occurrence of the binary is
with the jls36i build. In fact, current builds report that
the ppd service is explicitly being disabled.
<3>[    5.023345] init: cannot find '/system/bin/mm-pp-daemon', disabling 'ppd'

Change-Id: I609cd6f34ee01059344d4a5a9564b2b3a1a08e44
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Run the charger in the healthd domain.

The current policy assumes that the charger will run in the healthd domain.
Add a seclabel entry for the charger service to ensure that it runs in the
healthd domain even when the charger is a separate binary.

Change-Id: Ib79e60425fa2244a5716327f45e63d2c216ad2cc
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Rename GL binary name

Change-Id: I9d60da0dfdfa65b8e813709a6e86febe523a6854
Indicate this uses dlmalloc.

Change-Id: I27678c2ca40b5c409fb2d700c420c6235127850f