Revert^3 "Allow system server to access udc sysfs"
This reverts commit 0fab92578c10254aac8969e9a5000865682e7f4c.
Reason for revert: Droidmonitor triggered revert due to Test breakage in b/349489148. Will be verifying through ABTD before submission.
Change-Id: Ia78a55c87d354084b3e56bf1398f3f0d876bd886
diff --git a/private/compat/202404/202404.ignore.cil b/private/compat/202404/202404.ignore.cil
index 6874821..efeeff7 100644
--- a/private/compat/202404/202404.ignore.cil
+++ b/private/compat/202404/202404.ignore.cil
@@ -13,5 +13,4 @@
binderfs_logs_transaction_history
proc_compaction_proactiveness
proc_cgroups
- sysfs_udc
))
diff --git a/private/genfs_contexts b/private/genfs_contexts
index de2b139..ac59c9a 100644
--- a/private/genfs_contexts
+++ b/private/genfs_contexts
@@ -136,7 +136,6 @@
genfscon sysfs /class/rtc u:object_r:sysfs_rtc:s0
genfscon sysfs /class/switch u:object_r:sysfs_switch:s0
genfscon sysfs /class/wakeup u:object_r:sysfs_wakeup:s0
-genfscon sysfs /class/udc u:object_r:sysfs_udc:s0
genfscon sysfs /devices/platform/nfc-power/nfc_power u:object_r:sysfs_nfc_power_writable:s0
genfscon sysfs /devices/virtual/android_usb u:object_r:sysfs_android_usb:s0
genfscon sysfs /devices/virtual/block/ u:object_r:sysfs_devices_block:s0
diff --git a/private/system_server.te b/private/system_server.te
index 436cfa7..1298bf7 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -1264,9 +1264,6 @@
# UsbDeviceManager uses /dev/usb-ffs
allow system_server functionfs:dir search;
allow system_server functionfs:file rw_file_perms;
-# To resolve arbitrary sysfs paths from /sys/class/udc/* symlinks.
-allow system_server sysfs_type:dir search;
-r_dir_file(system_server, sysfs_udc)
# system_server contains time / time zone detection logic so reads the associated properties.
get_prop(system_server, time_prop)
diff --git a/public/file.te b/public/file.te
index b28ca85..9f75f05 100644
--- a/public/file.te
+++ b/public/file.te
@@ -105,9 +105,6 @@
type cgroup_v2, fs_type;
type sysfs, fs_type, sysfs_type, mlstrustedobject;
type sysfs_android_usb, fs_type, sysfs_type;
-starting_at_board_api(202504, `
- type sysfs_udc, fs_type, sysfs_type;
-')
type sysfs_uio, sysfs_type, fs_type;
type sysfs_batteryinfo, fs_type, sysfs_type;
type sysfs_bluetooth_writable, fs_type, sysfs_type, mlstrustedobject;