Revert^5 "Allow system server to access udc sysfs"
This reverts commit e09cefccbb0497e5e9f8aba64e31dadb9e6ea5fd.
Reason for revert: b/361985697#comment48
Bug: 361985697
Bug: 339241080
BuG: 379420248
Change-Id: If2a7fe4bf83dfbd4a707e140e58ac3400bda43f2
Merged-In: If2a7fe4bf83dfbd4a707e140e58ac3400bda43f2
(cherry picked from commit abfc8b086616ae900f35a356537b60579125eca9)
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 d629dd2..46b0109 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;