summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-07-28 01:20:37 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-07-28 01:20:37 +0000
commit32dca193a5ce322684c3ee11f4321c2086e712b2 (patch)
treee5ff4c81203c8c335240c8f597d2b33a1ae31d6e
parent7bad2e18d50934b139b1447095aebe26eded624e (diff)
parent991a4eb5ec3b5d609cb7f662c8067b490baf28cb (diff)
Merge cherrypicks of [4651530, 4651531, 4651532, 4651533, 4651534, 4651535, 4651536, 4651537, 4651550, 4651131, 4651570, 4651351, 4651232, 4651233, 4651335, 4651352, 4651353, 4651354, 4651355, 4651336, 4651337, 4651338, 4651529, 4651590, 4651591, 4651592, 4651593, 4651594, 4651595, 4651596, 4651597, 4651598, 4651599, 4651600, 4651601, 4651602, 4651603, 4651604, 4651605, 4651608, 4651610, 4651611, 4651613, 4651614, 4651339, 4651132, 4651111, 4651615, 4651356, 4651357, 4651112, 4651358, 4651551] into pi-dr1-release
Change-Id: Ie04b0cdbc717f25ff0434645acc3a5be9a00b11f
-rw-r--r--vendor/google/file_contexts1
-rw-r--r--vendor/google/init-firstboot.te15
2 files changed, 16 insertions, 0 deletions
diff --git a/vendor/google/file_contexts b/vendor/google/file_contexts
index c68a73e..0652f30 100644
--- a/vendor/google/file_contexts
+++ b/vendor/google/file_contexts
@@ -12,6 +12,7 @@
/vendor/bin/hw/wait_for_strongbox u:object_r:wait_for_strongbox_exec:s0
/vendor/bin/hw/android\.hardware\.secure_element@1\.0-service-disabled u:object_r:hal_secure_element_default_exec:s0
/vendor/bin/hw/android\.hardware\.power@1\.3-service\.crosshatch-libperfmgr u:object_r:hal_power_default_exec:s0
+/vendor/bin/init\.firstboot\.sh u:object_r:init-firstboot_exec:s0
/vendor/bin/ramoops u:object_r:ramoops_exec:s0
/vendor/bin/init\.ramoops\.sh u:object_r:ramoops_exec:s0
/vendor/bin/pixelstats-vendor u:object_r:pixelstats_vendor_exec:s0
diff --git a/vendor/google/init-firstboot.te b/vendor/google/init-firstboot.te
new file mode 100644
index 0000000..7ca7168
--- /dev/null
+++ b/vendor/google/init-firstboot.te
@@ -0,0 +1,15 @@
+type init-firstboot, domain;
+type init-firstboot_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(init-firstboot)
+
+allow init-firstboot vendor_shell_exec:file rx_file_perms;
+allow init-firstboot vendor_toolbox_exec:file rx_file_perms;
+
+# Read USB connection state
+allow init-firstboot sysfs_msm_subsys:dir search;
+r_dir_file(init-firstboot, sysfs_batteryinfo)
+
+# Set property to trigger a shutdown
+set_prop(init-firstboot, powerctl_prop)
+