Merge "init.rc: disable kernel module autoloading" into pie-gsi
diff --git a/rootdir/init.rc b/rootdir/init.rc
index d86c9bf..1336361 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -18,6 +18,11 @@
# Disable sysrq from keyboard
write /proc/sys/kernel/sysrq 0
+ # Android doesn't need kernel module autoloading, and it causes SELinux
+ # denials. So disable it by setting modprobe to the empty string. Note: to
+ # explicitly set a sysctl to an empty string, a trailing newline is needed.
+ write /proc/sys/kernel/modprobe \n
+
# Set the security context of /adb_keys if present.
restorecon /adb_keys