From f7bed71a211ba1e19c37af5a606e48a9dee0c186 Mon Sep 17 00:00:00 2001
From: Amit Mahajan <amitmahajan@google.com>
Date: Thu, 23 Feb 2017 15:18:44 -0800
Subject: [PATCH] Move rild to vendor partition.

Test: Basic telephony sanity
Bug: 35672432
Change-Id: I7d17cc7efda9902013c21d508cefc77baccc06a8
---
 private/file_contexts       | 1 -
 public/rild.te              | 1 -
 vendor/file_contexts        | 1 +
 {private => vendor}/rild.te | 1 +
 4 files changed, 2 insertions(+), 2 deletions(-)
 rename {private => vendor}/rild.te (79%)

diff --git a/private/file_contexts b/private/file_contexts
index 1754ffee2..e64cb4051 100644
--- a/private/file_contexts
+++ b/private/file_contexts
@@ -187,7 +187,6 @@
 /system/bin/vold	u:object_r:vold_exec:s0
 /system/bin/netd	u:object_r:netd_exec:s0
 /system/bin/wificond	u:object_r:wificond_exec:s0
-/system/bin/rild	u:object_r:rild_exec:s0
 /system/bin/audioserver	u:object_r:audioserver_exec:s0
 /system/bin/mediadrmserver	u:object_r:mediadrmserver_exec:s0
 /system/bin/mediaserver	u:object_r:mediaserver_exec:s0
diff --git a/public/rild.te b/public/rild.te
index 1ce19e3dc..fd1eccaa4 100644
--- a/public/rild.te
+++ b/public/rild.te
@@ -1,7 +1,6 @@
 # rild - radio interface layer daemon
 type rild, domain, domain_deprecated;
 hal_impl_domain(rild, hal_telephony)
-type rild_exec, exec_type, file_type;
 
 net_domain(rild)
 allowxperm rild self:udp_socket ioctl priv_sock_ioctls;
diff --git a/vendor/file_contexts b/vendor/file_contexts
index 7fda294f7..bce40df89 100644
--- a/vendor/file_contexts
+++ b/vendor/file_contexts
@@ -21,6 +21,7 @@
 /(vendor|system/vendor)/bin/hw/android\.hardware\.nfc@1\.0-service            u:object_r:hal_nfc_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.power@1\.0-service          u:object_r:hal_power_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.sensors@1\.0-service        u:object_r:hal_sensors_default_exec:s0
+/(vendor|system/vendor)/bin/hw/rild                                           u:object_r:rild_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.thermal@1\.0-service        u:object_r:hal_thermal_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.usb@1\.0-service            u:object_r:hal_usb_default_exec:s0
 /(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator@1\.0-service       u:object_r:hal_vibrator_default_exec:s0
diff --git a/private/rild.te b/vendor/rild.te
similarity index 79%
rename from private/rild.te
rename to vendor/rild.te
index ac6a05d36..515d1b499 100644
--- a/private/rild.te
+++ b/vendor/rild.te
@@ -1,3 +1,4 @@
 # type_transition must be private policy the domain_trans rules could stay
 # public, but conceptually should go with this
+type rild_exec, exec_type, file_type;
 init_daemon_domain(rild)
-- 
GitLab